From 5c72da6d1402c627562054a701c66ea970e8ffdf Mon Sep 17 00:00:00 2001 From: bymyself Date: Thu, 3 Apr 2025 09:51:03 +0800 Subject: [PATCH 1/2] reduce to unique nodes in install guide --- .../{App-BjVABi7E.js => App-YTMqGf2l.js} | 4 +-- ...BSTBilSm.js => WorkflowOption-BkjJYbiv.js} | 2 +- dist/copilot_web/input.js | 4 +-- ...QvDp.js => message-components-C_IXFNH1.js} | 26 +++++++++---------- ...t-CnVi6gIQ.js => workflowChat-BWzLtDl6.js} | 6 ++--- .../chat/messages/NodeInstallGuide.tsx | 9 ++++++- 6 files changed, 29 insertions(+), 22 deletions(-) rename dist/copilot_web/{App-BjVABi7E.js => App-YTMqGf2l.js} (91%) rename dist/copilot_web/{WorkflowOption-BSTBilSm.js => WorkflowOption-BkjJYbiv.js} (98%) rename dist/copilot_web/{message-components-B6pkQvDp.js => message-components-C_IXFNH1.js} (99%) rename dist/copilot_web/{workflowChat-CnVi6gIQ.js => workflowChat-BWzLtDl6.js} (99%) diff --git a/dist/copilot_web/App-BjVABi7E.js b/dist/copilot_web/App-YTMqGf2l.js similarity index 91% rename from dist/copilot_web/App-BjVABi7E.js rename to dist/copilot_web/App-YTMqGf2l.js index 052b616..b3d08e2 100644 --- a/dist/copilot_web/App-BjVABi7E.js +++ b/dist/copilot_web/App-YTMqGf2l.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-CnVi6gIQ.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-B6pkQvDp.js","copilot_web/input.js","copilot_web/assets/input-CJq8z6H1.css"].map(path => { +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-BWzLtDl6.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-C_IXFNH1.js","copilot_web/input.js","copilot_web/assets/input-CJq8z6H1.css"].map(path => { const apiBase = window.comfyAPI?.api?.api?.api_base; const prefix = apiBase ? `${apiBase.substring(1)}/` : ''; return `${prefix}${path}`; }))))=>i.map(i=>d[i]); -import{_ as E}from"./input.js";import{j as s}from"./vendor-markdown-Dek94WS0.js";import{r as t,R as w}from"./vendor-react-V04_Axys.js";import{C as v}from"./message-components-B6pkQvDp.js";const y=9999999,x={EXPLAIN_NODE:"copilot:explain-node"},D="/copilot_web/assets/logo-BTZhX0BN.png";function _(n={}){const[u,l]=t.useState({x:n.initialX??window.innerWidth-160,y:n.initialY??20}),[o,r]=t.useState(!1),[a,m]=t.useState({x:0,y:0}),[d,c]=t.useState(0),[g,b]=t.useState({x:0,y:0}),f=t.useCallback(e=>{if(o){const i=Math.min(Math.max(0,e.clientX-g.x),window.innerWidth-(n.boundaryPadding?.right??100)),h=Math.min(Math.max(0,e.clientY-g.y),window.innerHeight-(n.boundaryPadding?.bottom??40));l({x:i,y:h})}},[o,g,n.boundaryPadding]),p=t.useCallback(e=>{if(o){const i=Math.sqrt(Math.pow(e.clientX-a.x,2)+Math.pow(e.clientY-a.y,2)),h=Date.now()-d;i<5&&h<200&&n.onClick?.()}r(!1)},[o,a,d,n.onClick]);return t.useEffect(()=>(o&&(document.addEventListener("mousemove",f),document.addEventListener("mouseup",p)),()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",p)}),[o,f,p]),{position:u,isDragging:o,handleMouseDown:e=>{e.preventDefault(),r(!0),c(Date.now()),m({x:e.clientX,y:e.clientY});const i=e.currentTarget.getBoundingClientRect();b({x:e.clientX-i.left,y:e.clientY-i.top})}}}const C=w.lazy(()=>E(()=>import("./workflowChat-CnVi6gIQ.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.default})));function M(){const n=t.useRef(null),[u,l]=t.useState(!1),[o,r]=t.useState(!1),{position:a,isDragging:m,handleMouseDown:d}=_({boundaryPadding:{right:100,bottom:40},onClick:()=>l(!0)});return t.useEffect(()=>{const c=()=>{l(!0),r(!0)};return window.addEventListener(x.EXPLAIN_NODE,c),()=>window.removeEventListener(x.EXPLAIN_NODE,c)},[]),a?s.jsx(v,{children:s.jsx("div",{ref:n,children:s.jsxs("div",{className:"fixed",style:{zIndex:y,left:a.x,top:a.y,cursor:m?"grabbing":"grab"},children:[s.jsxs("button",{onMouseDown:d,className:"px-2 py-1 border border-gray-300 rounded-md bg-white text-black hover:bg-blue-300 hover:font-bold transition-colors select-none w-40 flex items-center space-x-1",style:{marginLeft:"-40px"},children:[s.jsx("img",{src:D,alt:"ComfyUI-Copilot Logo",className:"h-8 w-8"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-800",children:"ComfyUI-Copilot"})]}),s.jsx(w.Suspense,{fallback:s.jsx("div",{children:"Loading..."}),children:s.jsx(C,{onClose:()=>{l(!1),r(!1)},visible:u,triggerUsage:o,onUsageTriggered:()=>r(!1)})})]})})}):null}const I=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));export{I as A,D as l}; +import{_ as E}from"./input.js";import{j as s}from"./vendor-markdown-Dek94WS0.js";import{r as t,R as w}from"./vendor-react-V04_Axys.js";import{C as v}from"./message-components-C_IXFNH1.js";const y=9999999,x={EXPLAIN_NODE:"copilot:explain-node"},D="/copilot_web/assets/logo-BTZhX0BN.png";function _(n={}){const[u,l]=t.useState({x:n.initialX??window.innerWidth-160,y:n.initialY??20}),[o,r]=t.useState(!1),[a,m]=t.useState({x:0,y:0}),[d,c]=t.useState(0),[g,b]=t.useState({x:0,y:0}),f=t.useCallback(e=>{if(o){const i=Math.min(Math.max(0,e.clientX-g.x),window.innerWidth-(n.boundaryPadding?.right??100)),h=Math.min(Math.max(0,e.clientY-g.y),window.innerHeight-(n.boundaryPadding?.bottom??40));l({x:i,y:h})}},[o,g,n.boundaryPadding]),p=t.useCallback(e=>{if(o){const i=Math.sqrt(Math.pow(e.clientX-a.x,2)+Math.pow(e.clientY-a.y,2)),h=Date.now()-d;i<5&&h<200&&n.onClick?.()}r(!1)},[o,a,d,n.onClick]);return t.useEffect(()=>(o&&(document.addEventListener("mousemove",f),document.addEventListener("mouseup",p)),()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",p)}),[o,f,p]),{position:u,isDragging:o,handleMouseDown:e=>{e.preventDefault(),r(!0),c(Date.now()),m({x:e.clientX,y:e.clientY});const i=e.currentTarget.getBoundingClientRect();b({x:e.clientX-i.left,y:e.clientY-i.top})}}}const C=w.lazy(()=>E(()=>import("./workflowChat-BWzLtDl6.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.default})));function M(){const n=t.useRef(null),[u,l]=t.useState(!1),[o,r]=t.useState(!1),{position:a,isDragging:m,handleMouseDown:d}=_({boundaryPadding:{right:100,bottom:40},onClick:()=>l(!0)});return t.useEffect(()=>{const c=()=>{l(!0),r(!0)};return window.addEventListener(x.EXPLAIN_NODE,c),()=>window.removeEventListener(x.EXPLAIN_NODE,c)},[]),a?s.jsx(v,{children:s.jsx("div",{ref:n,children:s.jsxs("div",{className:"fixed",style:{zIndex:y,left:a.x,top:a.y,cursor:m?"grabbing":"grab"},children:[s.jsxs("button",{onMouseDown:d,className:"px-2 py-1 border border-gray-300 rounded-md bg-white text-black hover:bg-blue-300 hover:font-bold transition-colors select-none w-40 flex items-center space-x-1",style:{marginLeft:"-40px"},children:[s.jsx("img",{src:D,alt:"ComfyUI-Copilot Logo",className:"h-8 w-8"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-800",children:"ComfyUI-Copilot"})]}),s.jsx(w.Suspense,{fallback:s.jsx("div",{children:"Loading..."}),children:s.jsx(C,{onClose:()=>{l(!1),r(!1)},visible:u,triggerUsage:o,onUsageTriggered:()=>r(!1)})})]})})}):null}const I=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));export{I as A,D as l}; diff --git a/dist/copilot_web/WorkflowOption-BSTBilSm.js b/dist/copilot_web/WorkflowOption-BkjJYbiv.js similarity index 98% rename from dist/copilot_web/WorkflowOption-BSTBilSm.js rename to dist/copilot_web/WorkflowOption-BkjJYbiv.js index 6fdf63f..57b3a7d 100644 --- a/dist/copilot_web/WorkflowOption-BSTBilSm.js +++ b/dist/copilot_web/WorkflowOption-BkjJYbiv.js @@ -1 +1 @@ -import{j as t}from"./vendor-markdown-Dek94WS0.js";import{W as f,g as u,a as p}from"./message-components-B6pkQvDp.js";import{r as N}from"./vendor-react-V04_Axys.js";function z({content:v,name:C="Assistant",avatar:_,latestInput:y,installedNodes:k,onAddMessage:g}){const h=JSON.parse(v),w=h.ext?.find(e=>e.type==="workflow")?.data||[],[i,d]=N.useState({}),b=async e=>{if(!e.id){console.error("No workflow id provided");return}const r=String(e.id);if(!i[r]){d(o=>({...o,[r]:!0})),f.trackEvent({event_type:"workflow_accept",message_type:"workflow",message_id:h.message_id,data:{workflow_id:e.id,workflow_name:e.name}});try{const o=await f.getOptimizedWorkflow(e.id,y);if(o.workflow){const n=new Set;for(const s of o.workflow.nodes)n.add(s.type);const a=Array.from(n).filter(s=>!k.includes(s));if(console.log("[WorkflowOption] Missing node types:",a),a.length>0){try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await f.batchGetNodeInfo(a);console.log("[WorkflowOption] Received node infos:",s);const c={text:"",ext:[{type:"node_install_guide",data:s.map(l=>({name:l.name,repository_url:l.github_url}))}]},m={id:u(),role:"ai",content:JSON.stringify(c),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:o.workflow,optimizedParams:o.optimized_params}};g?.(m)}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.")}finally{d(s=>({...s,[r]:!1}))}return}j(o.workflow,o.optimized_params)}}catch(o){console.error("Failed to optimize workflow:",o),alert("Failed to optimize workflow. Please try again.")}finally{d(o=>({...o,[r]:!1}))}}},j=(e,r)=>{p.loadGraphData(e);for(const[n,a,s,c,m]of r){const l=p.graph._nodes_by_id[n].widgets;for(const x of l)x.name===c&&(x.value=m)}p.graph.setDirtyCanvas(!1,!0);const o={id:u(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};g?.(o)};return t.jsx("div",{className:"space-y-3",children:w.length>0&&t.jsx("div",{className:"flex flex-col space-y-4",children:w.map((e,r)=>{const o=e.id?String(e.id):"";return t.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[e.image&&t.jsx("img",{src:e.image,alt:e.name,className:"w-14 h-14 object-cover rounded-lg",onError:n=>{const a=n.target;a.onerror=null,a.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),t.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[t.jsx("div",{children:t.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:e.name})}),t.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.description&&t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),t.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:t.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-2 px-3 min-w-[400px] whitespace-normal break-words",children:e.description})})]}),t.jsx("button",{onClick:()=>b(e),disabled:i[o],className:`px-3 py-1.5 ${i[o]?"bg-gray-400 cursor-not-allowed":"bg-blue-500 hover:bg-blue-600"} text-white rounded-md transition-colors text-xs`,children:i[o]?"Loading...":"Accept"})]})]})]},r)})})})}export{z as WorkflowOption}; +import{j as t}from"./vendor-markdown-Dek94WS0.js";import{W as f,g as u,a as p}from"./message-components-C_IXFNH1.js";import{r as N}from"./vendor-react-V04_Axys.js";function z({content:v,name:C="Assistant",avatar:_,latestInput:y,installedNodes:k,onAddMessage:g}){const h=JSON.parse(v),w=h.ext?.find(e=>e.type==="workflow")?.data||[],[i,d]=N.useState({}),b=async e=>{if(!e.id){console.error("No workflow id provided");return}const r=String(e.id);if(!i[r]){d(o=>({...o,[r]:!0})),f.trackEvent({event_type:"workflow_accept",message_type:"workflow",message_id:h.message_id,data:{workflow_id:e.id,workflow_name:e.name}});try{const o=await f.getOptimizedWorkflow(e.id,y);if(o.workflow){const n=new Set;for(const s of o.workflow.nodes)n.add(s.type);const a=Array.from(n).filter(s=>!k.includes(s));if(console.log("[WorkflowOption] Missing node types:",a),a.length>0){try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await f.batchGetNodeInfo(a);console.log("[WorkflowOption] Received node infos:",s);const c={text:"",ext:[{type:"node_install_guide",data:s.map(l=>({name:l.name,repository_url:l.github_url}))}]},m={id:u(),role:"ai",content:JSON.stringify(c),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:o.workflow,optimizedParams:o.optimized_params}};g?.(m)}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.")}finally{d(s=>({...s,[r]:!1}))}return}j(o.workflow,o.optimized_params)}}catch(o){console.error("Failed to optimize workflow:",o),alert("Failed to optimize workflow. Please try again.")}finally{d(o=>({...o,[r]:!1}))}}},j=(e,r)=>{p.loadGraphData(e);for(const[n,a,s,c,m]of r){const l=p.graph._nodes_by_id[n].widgets;for(const x of l)x.name===c&&(x.value=m)}p.graph.setDirtyCanvas(!1,!0);const o={id:u(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};g?.(o)};return t.jsx("div",{className:"space-y-3",children:w.length>0&&t.jsx("div",{className:"flex flex-col space-y-4",children:w.map((e,r)=>{const o=e.id?String(e.id):"";return t.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[e.image&&t.jsx("img",{src:e.image,alt:e.name,className:"w-14 h-14 object-cover rounded-lg",onError:n=>{const a=n.target;a.onerror=null,a.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),t.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[t.jsx("div",{children:t.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:e.name})}),t.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.description&&t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),t.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:t.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-2 px-3 min-w-[400px] whitespace-normal break-words",children:e.description})})]}),t.jsx("button",{onClick:()=>b(e),disabled:i[o],className:`px-3 py-1.5 ${i[o]?"bg-gray-400 cursor-not-allowed":"bg-blue-500 hover:bg-blue-600"} text-white rounded-md transition-colors text-xs`,children:i[o]?"Loading...":"Accept"})]})]})]},r)})})})}export{z as WorkflowOption}; diff --git a/dist/copilot_web/input.js b/dist/copilot_web/input.js index e6c4492..e0fde02 100644 --- a/dist/copilot_web/input.js +++ b/dist/copilot_web/input.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/App-BjVABi7E.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-B6pkQvDp.js"])))=>i.map(i=>d[i]); -import{j as u}from"./vendor-markdown-Dek94WS0.js";import{a as v,R as p}from"./vendor-react-V04_Axys.js";import{w}from"./message-components-B6pkQvDp.js";const R="modulepreload",b=function(e){return"/"+e},m={},P=function(a,s,S){let d=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(s.map(o=>{if(o=b(o),o in m)return;m[o]=!0;const c=o.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=c?"stylesheet":R,c||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),c)return new Promise((y,E)=>{n.addEventListener("load",y),n.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${o}`)))})}))}function l(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&l(t.reason);return a().catch(l)})};var i={},f=v;i.createRoot=f.createRoot,i.hydrateRoot=f.hydrateRoot;const _=p.lazy(()=>P(async()=>{const{default:e}=await import("./App-BjVABi7E.js").then(a=>a.A);return{default:e}},__vite__mapDeps([0,1,2,3])).then(({default:e})=>({default:e})));function A(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}A().then(()=>w()).then(()=>{const e=document.createElement("div");e.id="comfyui-copilot-plugin",document.body.append(e),i.createRoot(e).render(u.jsx(p.StrictMode,{children:u.jsx(_,{})}))});export{P as _}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/App-YTMqGf2l.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-C_IXFNH1.js"])))=>i.map(i=>d[i]); +import{j as u}from"./vendor-markdown-Dek94WS0.js";import{a as v,R as p}from"./vendor-react-V04_Axys.js";import{w}from"./message-components-C_IXFNH1.js";const R="modulepreload",b=function(e){return"/"+e},m={},P=function(a,s,S){let d=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(s.map(o=>{if(o=b(o),o in m)return;m[o]=!0;const c=o.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=c?"stylesheet":R,c||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),c)return new Promise((y,E)=>{n.addEventListener("load",y),n.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${o}`)))})}))}function l(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&l(t.reason);return a().catch(l)})};var i={},f=v;i.createRoot=f.createRoot,i.hydrateRoot=f.hydrateRoot;const _=p.lazy(()=>P(async()=>{const{default:e}=await import("./App-YTMqGf2l.js").then(a=>a.A);return{default:e}},__vite__mapDeps([0,1,2,3])).then(({default:e})=>({default:e})));function A(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}A().then(()=>w()).then(()=>{const e=document.createElement("div");e.id="comfyui-copilot-plugin",document.body.append(e),i.createRoot(e).render(u.jsx(p.StrictMode,{children:u.jsx(_,{})}))});export{P as _}; diff --git a/dist/copilot_web/message-components-B6pkQvDp.js b/dist/copilot_web/message-components-C_IXFNH1.js similarity index 99% rename from dist/copilot_web/message-components-B6pkQvDp.js rename to dist/copilot_web/message-components-C_IXFNH1.js index 05afd67..e49636a 100644 --- a/dist/copilot_web/message-components-B6pkQvDp.js +++ b/dist/copilot_web/message-components-C_IXFNH1.js @@ -36,15 +36,15 @@ version: 2.9.0 prose-li:text-xs prose-code:text-xs prose-pre:text-xs - `,components:{p:({children:c})=>O.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:c}),h1:({children:c})=>O.jsx("h1",{className:"text-base font-semibold !my-1",children:c}),h2:({children:c})=>O.jsx("h2",{className:"text-sm font-semibold !my-1",children:c}),h3:({children:c})=>O.jsx("h3",{className:"text-xs font-semibold !my-1",children:c}),h4:({children:c})=>O.jsx("h4",{className:"text-xs font-semibold !my-1",children:c}),table:({children:c})=>O.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:c}),th:({children:c})=>O.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:c}),td:({children:c})=>{if(Array.isArray(c)&&c?.length>0){const f=[],v=c.length;for(let p=0;p"?f.push(O.jsx("br",{})):f.push(c[p]);c=f}return O.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:c})},code:({children:c})=>{const[f,v]=We.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(c),v(!0),setTimeout(()=>v(!1),2e3)}catch(g){console.error("Failed to copy text:",g)}};return O.jsxs("span",{className:"relative group inline-flex items-center",children:[O.jsx("code",{className:"text-xs bg-gray-100 text-gray-800 rounded px-1",children:c}),O.jsx("button",{onClick:p,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:f?O.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):O.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[O.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),O.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:c})=>O.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:c}),img:({node:c,...f})=>O.jsx("div",{className:"w-1/2 mx-auto",children:O.jsx("img",{...f,loading:"lazy",className:"w-full h-auto block",onError:v=>{console.warn("Image failed to load:",f.src,"Error:",v),v.currentTarget.style.opacity="0"}})}),a:({href:c,children:f})=>{let v="markdown",p=null;try{const g=JSON.parse(i);v=g.ext?.[0]?.type||"markdown",p=g?.message_id}catch(g){console.error("Error parsing content:",g)}return O.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:()=>{Li.trackEvent({event_type:"markdown_link_click",message_type:v,message_id:p,data:{link_url:c,link_text:f}})},children:f})}},children:h}),l=()=>{try{const h=JSON.parse(i),d=h.ext?.find(c=>c.type==="guides")?.data||[];if(o?.intent){const c=o.intent;if(c==="node_explain")return O.jsx(BI,{content:u(h.text||"")});if(c==="node_params")return O.jsx(FI,{content:u(h.text||"")})}return O.jsxs("div",{className:"space-y-3",children:[t==="markdown"&&h.text?O.jsx("div",{ref:s,children:u(h.text)}):h.text?O.jsx("p",{className:"whitespace-pre-wrap text-left",children:h.text}):null,d.length>0&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:d.map((c,f)=>O.jsx("button",{className:"px-3 py-1.5 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n?.(c),children:c},f))}),a]})}catch{return O.jsx("p",{className:"whitespace-pre-wrap text-left",children:i})}};return O.jsx(q$,{name:r,children:O.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:l()})})}const jI=LiteGraph;function Y$(i,r={}){const e=jI.createNode(i,"",r);if(!r.pos){const t=Mt.canvas.canvas.getBoundingClientRect(),n=t.width/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[0]/Mt.canvas.ds.scale,a=t.height/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[1]/Mt.canvas.ds.scale;e.pos=[n-e.size[0]/2,a-e.size[1]/2]}return Mt.graph.add(e),e}function LI({content:i,name:r="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(i),[a,o]=We.useState(null),s=n.ext?.find(c=>c.type==="node")?.data||[],u=c=>t.some(f=>f===c),l=s.filter(c=>u(c.name)),h=s.filter(c=>!u(c.name)),d=c=>c>=1e4?`${(c/1e4).toFixed(1)}w`:c>=1e3?`${(c/1e3).toFixed(1)}k`:c.toString();return O.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[l.length>0&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const f=Y$(c.name);f&&(f.connect(c.from_index,f,c.to_index),Li.trackEvent({event_type:"node_add_to_canvas",message_type:"node",message_id:n.message_id,data:{node_name:c.name}}))},children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 - bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},c.name))})]}),h.length>0&&O.jsxs("div",{className:`space-y-3 ${l.length>0?"mt-4":""}`,children:[O.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:h.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("a",{href:c.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md - border border-gray-900 hover:bg-gray-100 - transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{Li.trackEvent({event_type:"node_download",message_type:"node",message_id:n.message_id,data:{node_name:c.name,github_url:c.github_url}})},children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 - bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 + `,components:{p:({children:c})=>O.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:c}),h1:({children:c})=>O.jsx("h1",{className:"text-base font-semibold !my-1",children:c}),h2:({children:c})=>O.jsx("h2",{className:"text-sm font-semibold !my-1",children:c}),h3:({children:c})=>O.jsx("h3",{className:"text-xs font-semibold !my-1",children:c}),h4:({children:c})=>O.jsx("h4",{className:"text-xs font-semibold !my-1",children:c}),table:({children:c})=>O.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:c}),th:({children:c})=>O.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:c}),td:({children:c})=>{if(Array.isArray(c)&&c?.length>0){const f=[],v=c.length;for(let p=0;p"?f.push(O.jsx("br",{})):f.push(c[p]);c=f}return O.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:c})},code:({children:c})=>{const[f,v]=We.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(c),v(!0),setTimeout(()=>v(!1),2e3)}catch(g){console.error("Failed to copy text:",g)}};return O.jsxs("span",{className:"relative group inline-flex items-center",children:[O.jsx("code",{className:"text-xs bg-gray-100 text-gray-800 rounded px-1",children:c}),O.jsx("button",{onClick:p,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:f?O.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):O.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[O.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),O.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:c})=>O.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:c}),img:({node:c,...f})=>O.jsx("div",{className:"w-1/2 mx-auto",children:O.jsx("img",{...f,loading:"lazy",className:"w-full h-auto block",onError:v=>{console.warn("Image failed to load:",f.src,"Error:",v),v.currentTarget.style.opacity="0"}})}),a:({href:c,children:f})=>{let v="markdown",p=null;try{const g=JSON.parse(i);v=g.ext?.[0]?.type||"markdown",p=g?.message_id}catch(g){console.error("Error parsing content:",g)}return O.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:()=>{Li.trackEvent({event_type:"markdown_link_click",message_type:v,message_id:p,data:{link_url:c,link_text:f}})},children:f})}},children:h}),l=()=>{try{const h=JSON.parse(i),d=h.ext?.find(c=>c.type==="guides")?.data||[];if(o?.intent){const c=o.intent;if(c==="node_explain")return O.jsx(BI,{content:u(h.text||"")});if(c==="node_params")return O.jsx(FI,{content:u(h.text||"")})}return O.jsxs("div",{className:"space-y-3",children:[t==="markdown"&&h.text?O.jsx("div",{ref:s,children:u(h.text)}):h.text?O.jsx("p",{className:"whitespace-pre-wrap text-left",children:h.text}):null,d.length>0&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:d.map((c,f)=>O.jsx("button",{className:"px-3 py-1.5 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n?.(c),children:c},f))}),a]})}catch{return O.jsx("p",{className:"whitespace-pre-wrap text-left",children:i})}};return O.jsx(q$,{name:r,children:O.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:l()})})}const jI=LiteGraph;function Y$(i,r={}){const e=jI.createNode(i,"",r);if(!r.pos){const t=Mt.canvas.canvas.getBoundingClientRect(),n=t.width/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[0]/Mt.canvas.ds.scale,a=t.height/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[1]/Mt.canvas.ds.scale;e.pos=[n-e.size[0]/2,a-e.size[1]/2]}return Mt.graph.add(e),e}function LI({content:i,name:r="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(i),[a,o]=We.useState(null),s=n.ext?.find(c=>c.type==="node")?.data||[],u=c=>t.some(f=>f===c),l=s.filter(c=>u(c.name)),h=s.filter(c=>!u(c.name)),d=c=>c>=1e4?`${(c/1e4).toFixed(1)}w`:c>=1e3?`${(c/1e3).toFixed(1)}k`:c.toString();return O.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[l.length>0&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 \r + hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md \r + hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const f=Y$(c.name);f&&(f.connect(c.from_index,f,c.to_index),Li.trackEvent({event_type:"node_add_to_canvas",message_type:"node",message_id:n.message_id,data:{node_name:c.name}}))},children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 \r + bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 \r + border-4 border-transparent border-t-gray-800`})]})]},c.name))})]}),h.length>0&&O.jsxs("div",{className:`space-y-3 ${l.length>0?"mt-4":""}`,children:[O.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:h.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 \r + hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("a",{href:c.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md \r + border border-gray-900 hover:bg-gray-100 \r + transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{Li.trackEvent({event_type:"node_download",message_type:"node",message_id:n.message_id,data:{node_name:c.name,github_url:c.github_url}})},children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 \r + bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 \r border-4 border-transparent border-t-gray-800`})]})]},c.name))})]})]})}const zpe=Object.freeze(Object.defineProperty({__proto__:null,NodeSearch:LI},Symbol.toStringTag,{value:"Module"}));/** * vis-data * http://visjs.org/ @@ -145,9 +145,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Spe(i,r){var e;if(i){if(typeof i=="string")return H$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return sn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return H$(i,r)}}function H$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,P(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",P(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,P(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",P(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var n=ve({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length===2)this.options.editNode(n,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,n,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,P(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",P(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",P(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",P(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",P(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",P(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",ce(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,P(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(l.from.x,l.from.y),d=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",P(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",P(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",P(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",P(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(c){var f=l.edgeType.findBorderPositions(c);h.selected===!1&&(h.x=f.from.x,h.y=f.from.y),d.selected===!1&&(d.x=f.to.x,d.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:n};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var n=ve({},this.options.controlNodeStyle);n.id="targetNode"+io(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Yr(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,P(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Yr(this.editModeDiv),Yr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=Epe(Cr(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Yr(this.manipulationDiv),Yr(this.editModeDiv),Yr(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,P(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,P(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+us(Ee(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Fe({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+io(),from:n.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ie(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(t.x),h.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ie(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,n={id:io(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(n,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var n=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(ce(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),i}(),D="string",k="boolean",w="number",qa="array",H="object",JT="dom",Tpe="any",md=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],bd={borderWidth:{number:w},borderWidthSelected:{number:w,undefined:"undefined"},brokenImage:{string:D,undefined:"undefined"},chosen:{label:{boolean:k,function:"function"},node:{boolean:k,function:"function"},__type__:{object:H,boolean:k}},color:{border:{string:D},background:{string:D},highlight:{border:{string:D},background:{string:D},__type__:{object:H,string:D}},hover:{border:{string:D},background:{string:D},__type__:{object:H,string:D}},__type__:{object:H,string:D}},opacity:{number:w,undefined:"undefined"},fixed:{x:{boolean:k},y:{boolean:k},__type__:{object:H,boolean:k}},font:{align:{string:D},color:{string:D},size:{number:w},face:{string:D},background:{string:D},strokeWidth:{number:w},strokeColor:{string:D},vadjust:{number:w},multi:{boolean:k,string:D},bold:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},boldital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},ital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},mono:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},__type__:{object:H,string:D}},group:{string:D,number:w,undefined:"undefined"},heightConstraint:{minimum:{number:w},valign:{string:D},__type__:{object:H,boolean:k,number:w}},hidden:{boolean:k},icon:{face:{string:D},code:{string:D},size:{number:w},color:{string:D},weight:{string:D,number:w},__type__:{object:H}},id:{string:D,number:w},image:{selected:{string:D,undefined:"undefined"},unselected:{string:D,undefined:"undefined"},__type__:{object:H,string:D}},imagePadding:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:H,number:w}},label:{string:D,undefined:"undefined"},labelHighlightBold:{boolean:k},level:{number:w,undefined:"undefined"},margin:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:H,number:w}},mass:{number:w},physics:{boolean:k},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:k},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:H,boolean:k}},customScalingFunction:{function:"function"},__type__:{object:H}},shadow:{enabled:{boolean:k},color:{string:D},size:{number:w},x:{number:w},y:{number:w},__type__:{object:H,boolean:k}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:k,array:qa},borderRadius:{number:w},interpolation:{boolean:k},useImageSize:{boolean:k},useBorderWithImage:{boolean:k},coordinateOrigin:{string:["center","top-left"]},__type__:{object:H}},size:{number:w},title:{string:D,dom:JT,undefined:"undefined"},value:{number:w,undefined:"undefined"},widthConstraint:{minimum:{number:w},maximum:{number:w},__type__:{object:H,boolean:k,number:w}},x:{number:w},y:{number:w},__type__:{object:H}},Ipe={configure:{enabled:{boolean:k},filter:{boolean:k,string:D,array:qa,function:"function"},container:{dom:JT},showButton:{boolean:k},__type__:{object:H,boolean:k,string:D,array:qa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:k},scaleFactor:{number:w},type:{string:md},imageHeight:{number:w},imageWidth:{number:w},src:{string:D},__type__:{object:H,boolean:k}},middle:{enabled:{boolean:k},scaleFactor:{number:w},type:{string:md},imageWidth:{number:w},imageHeight:{number:w},src:{string:D},__type__:{object:H,boolean:k}},from:{enabled:{boolean:k},scaleFactor:{number:w},type:{string:md},imageWidth:{number:w},imageHeight:{number:w},src:{string:D},__type__:{object:H,boolean:k}},__type__:{string:["from","to","middle"],object:H}},endPointOffset:{from:{number:w},to:{number:w},__type__:{object:H,number:w}},arrowStrikethrough:{boolean:k},background:{enabled:{boolean:k},color:{string:D},size:{number:w},dashes:{boolean:k,array:qa},__type__:{object:H,boolean:k}},chosen:{label:{boolean:k,function:"function"},edge:{boolean:k,function:"function"},__type__:{object:H,boolean:k}},color:{color:{string:D},highlight:{string:D},hover:{string:D},inherit:{string:["from","to","both"],boolean:k},opacity:{number:w},__type__:{object:H,string:D}},dashes:{boolean:k,array:qa},font:{color:{string:D},size:{number:w},face:{string:D},background:{string:D},strokeWidth:{number:w},strokeColor:{string:D},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:w},multi:{boolean:k,string:D},bold:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},boldital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},ital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},mono:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},__type__:{object:H,string:D}},hidden:{boolean:k},hoverWidth:{function:"function",number:w},label:{string:D,undefined:"undefined"},labelHighlightBold:{boolean:k},length:{number:w,undefined:"undefined"},physics:{boolean:k},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:k},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:H,boolean:k}},customScalingFunction:{function:"function"},__type__:{object:H}},selectionWidth:{function:"function",number:w},selfReferenceSize:{number:w},selfReference:{size:{number:w},angle:{number:w},renderBehindTheNode:{boolean:k},__type__:{object:H}},shadow:{enabled:{boolean:k},color:{string:D},size:{number:w},x:{number:w},y:{number:w},__type__:{object:H,boolean:k}},smooth:{enabled:{boolean:k},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:w},forceDirection:{string:["horizontal","vertical","none"],boolean:k},__type__:{object:H,boolean:k}},title:{string:D,undefined:"undefined"},width:{number:w},widthConstraint:{maximum:{number:w},__type__:{object:H,boolean:k,number:w}},value:{number:w,undefined:"undefined"},__type__:{object:H}},groups:{useDefaultGroups:{boolean:k},__any__:bd,__type__:{object:H}},interaction:{dragNodes:{boolean:k},dragView:{boolean:k},hideEdgesOnDrag:{boolean:k},hideEdgesOnZoom:{boolean:k},hideNodesOnDrag:{boolean:k},hover:{boolean:k},keyboard:{enabled:{boolean:k},speed:{x:{number:w},y:{number:w},zoom:{number:w},__type__:{object:H}},bindToWindow:{boolean:k},autoFocus:{boolean:k},__type__:{object:H,boolean:k}},multiselect:{boolean:k},navigationButtons:{boolean:k},selectable:{boolean:k},selectConnectedEdges:{boolean:k},hoverConnectedEdges:{boolean:k},tooltipDelay:{number:w},zoomView:{boolean:k},zoomSpeed:{number:w},__type__:{object:H}},layout:{randomSeed:{undefined:"undefined",number:w,string:D},improvedLayout:{boolean:k},clusterThreshold:{number:w},hierarchical:{enabled:{boolean:k},levelSeparation:{number:w},nodeSpacing:{number:w},treeSpacing:{number:w},blockShifting:{boolean:k},edgeMinimization:{boolean:k},parentCentralization:{boolean:k},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:H,boolean:k}},__type__:{object:H}},manipulation:{enabled:{boolean:k},initiallyActive:{boolean:k},addNode:{boolean:k,function:"function"},addEdge:{boolean:k,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:H,boolean:k,function:"function"}},deleteNode:{boolean:k,function:"function"},deleteEdge:{boolean:k,function:"function"},controlNodeStyle:bd,__type__:{object:H,boolean:k}},nodes:bd,physics:{enabled:{boolean:k},barnesHut:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},forceAtlas2Based:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},repulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},__type__:{object:H}},hierarchicalRepulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},maxVelocity:{number:w},minVelocity:{number:w},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:k},iterations:{number:w},updateInterval:{number:w},onlyDynamicEdges:{boolean:k},fit:{boolean:k},__type__:{object:H,boolean:k}},timestep:{number:w},adaptiveTimestep:{boolean:k},wind:{x:{number:w},y:{number:w},__type__:{object:H}},__type__:{object:H,boolean:k}},autoResize:{boolean:k},clickToUse:{boolean:k},locale:{string:D},locales:{__any__:{any:Tpe},__type__:{object:H}},height:{string:D},width:{string:D},__type__:{object:H}},ZT={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},kpe=function(r,e,t){var n;return!!(oi(r).call(r,"physics")&&oi(n=ZT.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")},Ppe=function(){function i(){N(this,i)}return M(i,[{key:"getDistances",value:function(e,t,n){for(var a={},o=e.edges,s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,c=0,f=0,v=0,p=0,g=0;d>o&&us&&gy.type==="downstream_subgraph_search")?.data||[],f=y=>{const m=y.json.nodes.map($=>({id:$.id,label:$.type,color:{background:"#2B7CE9",border:"#1B5BB1"},font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},margin:12,padding:10,shape:"box",widthConstraint:{minimum:100,maximum:200}})),b=y.json.links.map($=>({from:$.origin_id,to:$.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#FFFFFF",width:2}));return{nodes:m,edges:b}};We.useEffect(()=>()=>{d.current&&(d.current.destroy(),d.current=null)},[]);const v=We.useCallback((y,m)=>{d.current&&d.current.destroy();const b=f(m),$=new z(y,b,{nodes:{shape:"box",margin:12,padding:10,font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},borderWidth:2,shadow:{enabled:!0,color:"rgba(0,0,0,0.2)",size:5}},edges:{arrows:"to",color:"#FFFFFF",width:2,smooth:{enabled:!0,type:"straightCross"}},physics:{enabled:!0,solver:"hierarchicalRepulsion",hierarchicalRepulsion:{nodeDistance:200,springLength:200}},layout:{hierarchical:{enabled:!0,direction:"UD",sortMethod:"directed",nodeSpacing:200,levelSeparation:150}},interaction:{dragNodes:!1,zoomView:!1,dragView:!1}});d.current=$},[]),p=async y=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",y),Li.trackEvent({event_type:"subgraph_accept",message_type:"subgraph",message_id:u.message_id,data:{subgraph_name:y.name,subgraph_tags:y.tags}});const m=y.json.nodes,b=Object.values(Mt.canvas.selected_nodes)[0];if(!b){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const $=m.map(R=>R.type),S=s;console.log("[DownstreamSubgraphs] Required node types:",$),console.log("[DownstreamSubgraphs] Installed node types:",S);const _=$.filter(R=>!S.includes(R));if(console.log("[DownstreamSubgraphs] Missing node types:",_),_.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const R=await Li.batchGetNodeInfo(_);console.log("[DownstreamSubgraphs] Received node infos:",R);const B={text:"",ext:[{type:"node_install_guide",data:R.map(C=>({name:C.name,repository_url:C.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",B);const I={id:Ur(),role:"ai",content:JSON.stringify(B),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:y}};console.log("[DownstreamSubgraphs] Created AI message:",I),t?.(I);return}catch(R){console.error("[DownstreamSubgraphs] Error fetching node info:",R),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),g(y,b)},g=(y,m)=>{const b=y.json.nodes,$=y.json.links,S=b.find(B=>B.id===0),_=S?.id;console.log("[DownstreamSubgraphs] Entry node ID:",_);const R={};_!==null&&(R[_]=m),Mt.canvas.emitBeforeChange();try{for(const B of b)if(B.id!==_){const I=S?.pos,C=[m._pos[0],m._pos[1]],j=[B.pos[0]+C[0]-I[0],B.pos[1]+C[1]-I[1]];R[B.id]=Y$(B.type,{pos:j})}for(const B of $){const I=R[B.origin_id],C=R[B.target_id];I&&C&&I.connect(B.origin_slot,C,B.target_slot)}}finally{Mt.canvas.emitAfterChange()}};return We.useEffect(()=>{const y=()=>{const m=Mt.canvas.selected_nodes;if(Object.keys(m??{}).length){const b=Object.values(m)[0];a({type:"SET_SELECTED_NODE",payload:b})}else a({type:"SET_SELECTED_NODE",payload:null})};return document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}},[]),O.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:c.length>0&&O.jsx("div",{className:"space-y-3",children:O.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(y=>O.jsxs("div",{className:"relative group",children:[O.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs`,onClick:()=>p(y),onMouseEnter:()=>h(y.name),onMouseLeave:()=>h(null),children:y.name}),O.jsxs("p",{className:"text-xs ml-3 text-gray-500",children:["[",y.tags.join(", "),"]"]}),l===y.name&&O.jsx("div",{className:`fixed -translate-y-full z-[9999] w-[500px] p-4 bg-gray-800 text-white text-xs - rounded-md shadow-lg mb-2 border border-gray-700`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:O.jsx("div",{style:{width:"100%",height:"300px"},ref:m=>{m&&v(m,y)}})})]},y.name))})})})}const Hpe=Object.freeze(Object.defineProperty({__proto__:null,DownstreamSubgraphs:Cpe},Symbol.toStringTag,{value:"Module"}));function Ape({content:i,onLoadSubgraph:r}){const t=JSON.parse(i).ext?.find(n=>n.type==="node_install_guide")?.data||[];return O.jsxs("div",{children:[O.jsx("p",{children:"在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:t.map((n,a)=>O.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200`,children:O.jsxs("div",{className:"flex flex-col",children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:n.name}),O.jsx("div",{className:"flex justify-end",children:n.repository_url?O.jsxs("a",{href:n.repository_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md + rounded-md shadow-lg mb-2 border border-gray-700`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:O.jsx("div",{style:{width:"100%",height:"300px"},ref:m=>{m&&v(m,y)}})})]},y.name))})})})}const Hpe=Object.freeze(Object.defineProperty({__proto__:null,DownstreamSubgraphs:Cpe},Symbol.toStringTag,{value:"Module"}));function Ape({content:i,onLoadSubgraph:r}){const n=(JSON.parse(i).ext?.find(a=>a.type==="node_install_guide")?.data||[]).reduce((a,o)=>(a.some(s=>s.name===o.name)||a.push(o),a),[]);return O.jsxs("div",{children:[O.jsx("p",{children:"在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:n.map((a,o)=>O.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 + hover:shadow-sm transition-all duration-200`,children:O.jsxs("div",{className:"flex flex-col",children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:a.name}),O.jsx("div",{className:"flex justify-end",children:a.repository_url?O.jsxs("a",{href:a.repository_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md border border-gray-900 hover:bg-gray-100 - transition-colors text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}):O.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(n.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md - border border-gray-300 text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},a))}),O.jsx("p",{className:"mt-4"}),O.jsx("p",{children:"安装完成后,请点击继续加载graph按钮,将graph加载到画布中:"}),O.jsx("div",{className:"mt-4",children:O.jsx("button",{className:`px-3 py-2 bg-blue-500 text-white rounded-md + transition-colors text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}):O.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(a.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md + border border-gray-300 text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},o))}),O.jsx("p",{className:"mt-4"}),O.jsx("p",{children:"安装完成后,请点击继续加载graph按钮,将graph加载到画布中:"}),O.jsx("div",{className:"mt-4",children:O.jsx("button",{className:`px-3 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors text-xs block mx-auto`,onClick:r,children:"继续加载graph"})})]})}const Wpe=Object.freeze(Object.defineProperty({__proto__:null,NodeInstallGuide:Ape},Symbol.toStringTag,{value:"Module"}));export{Lpe as A,q$ as B,Mpe as C,Hpe as D,MI as M,zpe as N,jpe as U,Li as W,Mt as a,Y$ as b,aI as c,Wpe as d,Bpe as f,Ur as g,sI as u,Fpe as v,Npe as w}; diff --git a/dist/copilot_web/workflowChat-CnVi6gIQ.js b/dist/copilot_web/workflowChat-BWzLtDl6.js similarity index 99% rename from dist/copilot_web/workflowChat-CnVi6gIQ.js rename to dist/copilot_web/workflowChat-BWzLtDl6.js index 0852bdd..cc9339a 100644 --- a/dist/copilot_web/workflowChat-CnVi6gIQ.js +++ b/dist/copilot_web/workflowChat-BWzLtDl6.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/WorkflowOption-BSTBilSm.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-B6pkQvDp.js"])))=>i.map(i=>d[i]); -import{j as h,r as vg,b as mg}from"./vendor-markdown-Dek94WS0.js";import{r as S,R as at,c as Lt}from"./vendor-react-V04_Axys.js";import{f as xg,v as yg,a as sn,B as wg,U as bg,A as yr,b as Ag,g as Ve,c as Sg,u as To,M as Ig,W as Nt}from"./message-components-B6pkQvDp.js";import{l as Eg}from"./App-BjVABi7E.js";import{_ as Sr}from"./input.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/WorkflowOption-BkjJYbiv.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-C_IXFNH1.js"])))=>i.map(i=>d[i]); +import{j as h,r as vg,b as mg}from"./vendor-markdown-Dek94WS0.js";import{r as S,R as at,c as Lt}from"./vendor-react-V04_Axys.js";import{f as xg,v as yg,a as sn,B as wg,U as bg,A as yr,b as Ag,g as Ve,c as Sg,u as To,M as Ig,W as Nt}from"./message-components-C_IXFNH1.js";import{l as Eg}from"./App-YTMqGf2l.js";import{_ as Sr}from"./input.js";/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. @@ -101,7 +101,7 @@ ${U.join(` hover:bg-gray-50`,children:"Close"})})]})})]})}function Hg(){const y=Object.values(sn.canvas.selected_nodes)[0],L=new Set;function o(W,z){if(!(!W||z>=1)&&W.inputs)for(const N of Object.values(W.inputs)){const O=N.link;if(O&&sn.graph.links[O]){const V=sn.graph.links[O].origin_id,m=sn.graph._nodes_by_id[V];m&&(L.add(m.type),o(m,z+1))}}}return y?(o(y,0),[{type:"upstream_node_types",data:Array.from(L)}]):null}function $g({nodeInfo:y,onSendWithIntent:L,loading:o,onSendWithContent:W}){return h.jsx("div",{className:"mb-3 p-3 rounded-md bg-gray-50 border border-gray-200",children:h.jsxs("div",{className:"text-sm text-gray-700",children:[h.jsxs("p",{children:["Selected node: ",y.type]}),h.jsxs("div",{className:"flex gap-2 mt-2",children:[h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-blue-50 text-blue-700 hover:bg-blue-100`,onClick:()=>W(`Reply in ${navigator.language} language: How does the ${y.type} node work? I need its official usage guide.`),disabled:o,children:"Usage"}),h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-green-100 text-green-700 hover:bg-green-200`,onClick:()=>W(`Reply in ${navigator.language} language: Show me the technical specifications for the ${y.type} node's inputs and outputs.`),disabled:o,children:"Parameters"}),h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-purple-100 - text-purple-700 hover:bg-purple-200`,onClick:()=>L("downstream_subgraph_search",Hg()),disabled:o,children:"Downstream Nodes"})]})]})})}function qg(){return h.jsx(wg,{name:"Assistant",children:h.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[h.jsxs("div",{className:"flex space-x-1",children:[h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),h.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const Zg=y=>`https://ui-avatars.com/api/?name=${y||"User"}&background=random`,Yg=S.lazy(()=>Sr(()=>import("./WorkflowOption-BSTBilSm.js"),__vite__mapDeps([0,1,2,3])).then(y=>({default:y.WorkflowOption}))),Xg=S.lazy(()=>Sr(()=>import("./message-components-B6pkQvDp.js").then(y=>y.N),__vite__mapDeps([3,2,1])).then(y=>({default:y.NodeSearch}))),Jg=S.lazy(()=>Sr(()=>import("./message-components-B6pkQvDp.js").then(y=>y.D),__vite__mapDeps([3,2,1])).then(y=>({default:y.DownstreamSubgraphs}))),Qg=S.lazy(()=>Sr(()=>import("./message-components-B6pkQvDp.js").then(y=>y.d),__vite__mapDeps([3,2,1])).then(y=>({default:y.NodeInstallGuide})));function Vg({messages:y,latestInput:L,onOptionClick:o,installedNodes:W,onAddMessage:z,loading:N}){const O=at.useMemo(()=>m=>{if(m.role==="user")return h.jsx(bg,{content:m.content,trace_id:m.trace_id},m.id);if(m.role==="ai"||m.role==="tool"){const H=Zg(m.role);try{const B=JSON.parse(m.content),$=B.ext?.find(U=>U.type==="workflow"),oe=B.ext?.find(U=>U.type==="node"),ae=B.ext?.find(U=>U.type==="downstream_subgraph_search"),we=B.ext?.find(U=>U.type==="node_install_guide");let k=null;if($)k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Yg,{content:m.content,name:m.name,avatar:H,latestInput:L,installedNodes:W,onAddMessage:z})});else if(oe)k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Xg,{content:m.content,name:m.name,avatar:H,installedNodes:W})});else if(ae){const U=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Jg,{content:m.content,name:m.name,avatar:H,onAddMessage:z})});if(m.metadata?.intent==="downstream_subgraph_search")return h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,extComponent:U,metadata:m.metadata},m.id);k=U}else we&&(k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Qg,{content:m.content,onLoadSubgraph:()=>{if(m.metadata?.pendingSubgraph){const U=Object.values(sn.canvas.selected_nodes)[0];if(U){const ue=m.metadata.pendingSubgraph,re=ue.json.nodes,de=ue.json.links,Ae=re.find(X=>X.id===0),fe=Ae?.id,q={};fe&&(q[fe]=U),sn.canvas.emitBeforeChange();try{for(const X of re)if(X.id!==fe){const Se=Ae?.pos||[0,0],pe=U._pos||[0,0],bn=[X.pos[0]+pe[0]-Se[0],X.pos[1]+pe[1]-Se[1]];q[X.id]=Ag(X.type,{pos:bn})}}finally{sn.canvas.emitAfterChange()}for(const X of de){const Se=q[X.origin_id],pe=q[X.target_id];Se&&pe&&Se.connect(X.origin_slot,pe,X.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if(m.metadata?.pendingWorkflow){const U=m.metadata.pendingWorkflow,ue=m.metadata.optimizedParams;sn.loadGraphData(U);for(const[de,Ae,fe,q,X]of ue){const Se=sn.graph._nodes_by_id[de].widgets;for(const pe of Se)pe.name===q&&(pe.value=X)}sn.graph.setDirtyCanvas(!1,!0);const re={id:Ve(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};z?.(re)}}})}));return B.text||k?h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,extComponent:k,metadata:m.metadata},m.id):k||h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,metadata:m.metadata},m.id)}catch(B){return console.error("[MessageList] Error parsing message content:",B),console.error("解析JSON失败",m.content),h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,metadata:m.metadata},m.id)}}return null},[W,o,z,L]),V=at.useMemo(()=>y?.map(O),[y,O]);return h.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[V,N&&h.jsx(qg,{})]})}async function ep(){try{return await(await Sg.fetchApi("/object_info",{method:"GET"})).json()}catch(y){throw console.error("Error fetching object info:",y),y}}async function np(){const y=await ep();return Object.keys(y)}var br={exports:{}};/** + text-purple-700 hover:bg-purple-200`,onClick:()=>L("downstream_subgraph_search",Hg()),disabled:o,children:"Downstream Nodes"})]})]})})}function qg(){return h.jsx(wg,{name:"Assistant",children:h.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[h.jsxs("div",{className:"flex space-x-1",children:[h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),h.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const Zg=y=>`https://ui-avatars.com/api/?name=${y||"User"}&background=random`,Yg=S.lazy(()=>Sr(()=>import("./WorkflowOption-BkjJYbiv.js"),__vite__mapDeps([0,1,2,3])).then(y=>({default:y.WorkflowOption}))),Xg=S.lazy(()=>Sr(()=>import("./message-components-C_IXFNH1.js").then(y=>y.N),__vite__mapDeps([3,2,1])).then(y=>({default:y.NodeSearch}))),Jg=S.lazy(()=>Sr(()=>import("./message-components-C_IXFNH1.js").then(y=>y.D),__vite__mapDeps([3,2,1])).then(y=>({default:y.DownstreamSubgraphs}))),Qg=S.lazy(()=>Sr(()=>import("./message-components-C_IXFNH1.js").then(y=>y.d),__vite__mapDeps([3,2,1])).then(y=>({default:y.NodeInstallGuide})));function Vg({messages:y,latestInput:L,onOptionClick:o,installedNodes:W,onAddMessage:z,loading:N}){const O=at.useMemo(()=>m=>{if(m.role==="user")return h.jsx(bg,{content:m.content,trace_id:m.trace_id},m.id);if(m.role==="ai"||m.role==="tool"){const H=Zg(m.role);try{const B=JSON.parse(m.content),$=B.ext?.find(U=>U.type==="workflow"),oe=B.ext?.find(U=>U.type==="node"),ae=B.ext?.find(U=>U.type==="downstream_subgraph_search"),we=B.ext?.find(U=>U.type==="node_install_guide");let k=null;if($)k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Yg,{content:m.content,name:m.name,avatar:H,latestInput:L,installedNodes:W,onAddMessage:z})});else if(oe)k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Xg,{content:m.content,name:m.name,avatar:H,installedNodes:W})});else if(ae){const U=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Jg,{content:m.content,name:m.name,avatar:H,onAddMessage:z})});if(m.metadata?.intent==="downstream_subgraph_search")return h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,extComponent:U,metadata:m.metadata},m.id);k=U}else we&&(k=h.jsx(S.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Qg,{content:m.content,onLoadSubgraph:()=>{if(m.metadata?.pendingSubgraph){const U=Object.values(sn.canvas.selected_nodes)[0];if(U){const ue=m.metadata.pendingSubgraph,re=ue.json.nodes,de=ue.json.links,Ae=re.find(X=>X.id===0),fe=Ae?.id,q={};fe&&(q[fe]=U),sn.canvas.emitBeforeChange();try{for(const X of re)if(X.id!==fe){const Se=Ae?.pos||[0,0],pe=U._pos||[0,0],bn=[X.pos[0]+pe[0]-Se[0],X.pos[1]+pe[1]-Se[1]];q[X.id]=Ag(X.type,{pos:bn})}}finally{sn.canvas.emitAfterChange()}for(const X of de){const Se=q[X.origin_id],pe=q[X.target_id];Se&&pe&&Se.connect(X.origin_slot,pe,X.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if(m.metadata?.pendingWorkflow){const U=m.metadata.pendingWorkflow,ue=m.metadata.optimizedParams;sn.loadGraphData(U);for(const[de,Ae,fe,q,X]of ue){const Se=sn.graph._nodes_by_id[de].widgets;for(const pe of Se)pe.name===q&&(pe.value=X)}sn.graph.setDirtyCanvas(!1,!0);const re={id:Ve(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};z?.(re)}}})}));return B.text||k?h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,extComponent:k,metadata:m.metadata},m.id):k||h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,metadata:m.metadata},m.id)}catch(B){return console.error("[MessageList] Error parsing message content:",B),console.error("解析JSON失败",m.content),h.jsx(yr,{content:m.content,name:m.name,avatar:H,format:m.format,onOptionClick:o,metadata:m.metadata},m.id)}}return null},[W,o,z,L]),V=at.useMemo(()=>y?.map(O),[y,O]);return h.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[V,N&&h.jsx(qg,{})]})}async function ep(){try{return await(await Sg.fetchApi("/object_info",{method:"GET"})).json()}catch(y){throw console.error("Error fetching object info:",y),y}}async function np(){const y=await ep();return Object.keys(y)}var br={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors diff --git a/ui/src/components/chat/messages/NodeInstallGuide.tsx b/ui/src/components/chat/messages/NodeInstallGuide.tsx index b4ad4c6..8a99824 100644 --- a/ui/src/components/chat/messages/NodeInstallGuide.tsx +++ b/ui/src/components/chat/messages/NodeInstallGuide.tsx @@ -19,12 +19,19 @@ interface NodeInstallGuideProps { export function NodeInstallGuide({ content, onLoadSubgraph }: NodeInstallGuideProps) { const response = JSON.parse(content); const nodeInfos = response.ext?.find((item: { type: string }) => item.type === 'node_install_guide')?.data || []; + + const uniqueNodeInfos = nodeInfos.reduce((acc: any[], node) => { + if (!acc.some(n => n.name === node.name)) { + acc.push(node); + } + return acc; + }, []); return (

在加载graph到画布前,以下节点有待安装,请跳转到对应的github安装节点:

- {nodeInfos.map((node: any, index: number) => ( + {uniqueNodeInfos.map((node: any, index: number) => (
{ - const apiBase = window.comfyAPI?.api?.api?.api_base; - const prefix = apiBase ? `${apiBase.substring(1)}/` : ''; - return `${prefix}${path}`; - }))))=>i.map(i=>d[i]); -import{_ as E}from"./input.js";import{j as s}from"./vendor-markdown-Dek94WS0.js";import{r as n,R as w}from"./vendor-react-V04_Axys.js";import{C as v}from"./message-components-yQk9DI7R.js";const y=9999999,x={EXPLAIN_NODE:"copilot:explain-node"},D="/copilot_web/assets/logo-BTZhX0BN.png";function _(e={}){const[u,l]=n.useState({x:e.initialX??window.innerWidth-160,y:e.initialY??20}),[o,r]=n.useState(!1),[a,m]=n.useState({x:0,y:0}),[d,c]=n.useState(0),[g,b]=n.useState({x:0,y:0}),f=n.useCallback(t=>{if(o){const i=Math.min(Math.max(0,t.clientX-g.x),window.innerWidth-(e.boundaryPadding?.right??100)),p=Math.min(Math.max(0,t.clientY-g.y),window.innerHeight-(e.boundaryPadding?.bottom??40));l({x:i,y:p})}},[o,g,e.boundaryPadding]),h=n.useCallback(t=>{if(o){const i=Math.sqrt(Math.pow(t.clientX-a.x,2)+Math.pow(t.clientY-a.y,2)),p=Date.now()-d;i<5&&p<200&&e.onClick?.()}r(!1)},[o,a,d,e.onClick]);return n.useEffect(()=>(o&&(document.addEventListener("mousemove",f),document.addEventListener("mouseup",h)),()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)}),[o,f,h]),{position:u,isDragging:o,handleMouseDown:t=>{t.preventDefault(),r(!0),c(Date.now()),m({x:t.clientX,y:t.clientY});const i=t.currentTarget.getBoundingClientRect();b({x:t.clientX-i.left,y:t.clientY-i.top})}}}const C=w.lazy(()=>E(()=>import("./workflowChat--6TDkP1M.js").then(e=>e.w),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.default})));function M(){const e=n.useRef(null),[u,l]=n.useState(!1),[o,r]=n.useState(!1),{position:a,isDragging:m,handleMouseDown:d}=_({boundaryPadding:{right:100,bottom:40},onClick:()=>l(!0)});return n.useEffect(()=>{const c=()=>{l(!0),r(!0)};return window.addEventListener(x.EXPLAIN_NODE,c),()=>window.removeEventListener(x.EXPLAIN_NODE,c)},[]),a?s.jsx(v,{children:s.jsx("div",{ref:e,children:s.jsxs("div",{className:"fixed",style:{zIndex:y,left:a.x,top:a.y,cursor:m?"grabbing":"grab"},children:[s.jsxs("button",{onMouseDown:d,className:"px-2 py-1 border border-gray-300 rounded-md bg-white text-black hover:bg-blue-300 hover:font-bold transition-colors select-none w-40 flex items-center space-x-1",style:{marginLeft:"-40px"},children:[s.jsx("img",{src:D,alt:"ComfyUI-Copilot Logo",className:"h-8 w-8"}),s.jsx("span",{className:"text-[14px] font-medium text-gray-800",children:"ComfyUI-Copilot"})]}),s.jsx(w.Suspense,{fallback:s.jsx("div",{children:"Loading..."}),children:s.jsx(C,{onClose:()=>{l(!1),r(!1)},visible:u,triggerUsage:o,onUsageTriggered:()=>r(!1)})})]})})}):null}const I=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"}));export{I as A,D as l}; diff --git a/dist/copilot_web/ParameterDebugInterfaceNew-CuNRLSlD.js b/dist/copilot_web/ParameterDebugInterfaceNew-CuNRLSlD.js deleted file mode 100644 index 32f244a..0000000 --- a/dist/copilot_web/ParameterDebugInterfaceNew-CuNRLSlD.js +++ /dev/null @@ -1,29 +0,0 @@ -import{j as e}from"./vendor-markdown-Dek94WS0.js";import{r as j}from"./vendor-react-V04_Axys.js";import{r as et,g as tt,m as st,i as rt}from"./workflowChat--6TDkP1M.js";import{a as Z,u as Ee,g as Ne,W as xe}from"./message-components-yQk9DI7R.js";import"./input.js";import"./App-By_5x9Zk.js";function nt(l,o){try{if(!l)return console.error("Invalid prompt_output: ",l),l;for(const r of o){if(!l[r.nodeId]){console.error(`Node with ID ${r.nodeId} not found`);continue}if(!l[r.nodeId].inputs){console.error(`Inputs not found for node with ID ${r.nodeId}`);continue}l[r.nodeId].inputs[r.paramName]=r.paramValue}return l}catch(r){return console.error("Error updating prompt:",r),l}}async function ot(l){const o=await Z.graphToPrompt(),r=nt(o.output,l);console.log("queuePrompt updated_prompt:",r);const u={prompt:r,client_id:Z.api.clientId,extra_data:{extra_pageinfo:{workflow:o.workflow}}};console.debug("queuePrompt request_body.prompt:",r);const f=await et(u);return console.debug("queuePrompt response:",f),f}function _e(l){const o=document.createElement("canvas"),r=o.getContext("2d");if(o.width=512,o.height=512,r){r.fillStyle="#f8d7da",r.fillRect(0,0,o.width,o.height),r.strokeStyle="#dc3545",r.lineWidth=4,r.strokeRect(10,10,o.width-20,o.height-20),r.fillStyle="#dc3545",r.beginPath(),r.arc(o.width/2,150,50,0,2*Math.PI),r.fill(),r.fillStyle="white",r.font="bold 80px Arial",r.textAlign="center",r.textBaseline="middle",r.fillText("!",o.width/2,150),r.fillStyle="#721c24",r.font="20px Arial",r.textAlign="center",r.textBaseline="middle";const u=o.width-60,f=30,m=l.split(" ");let c="",h=250;for(let w=0;wu&&w>0?(r.fillText(c,o.width/2,h),c=m[w]+" ",h+=f):c=E}r.fillText(c,o.width/2,h)}return o.toDataURL("image/png")}async function at(l){try{if(!l||l==="")return console.log("No prompt ID provided"),{1:[_e("Fail to generate prompt ID")]};const o=await tt(l);if(!o||!o[l])return console.log("Not finished for prompt ID:",l),{};const r=o[l];if(r.status&&r.status.status_str==="error"){console.error("Error for prompt ID:",l);const f=r.status.messages;if(f&&f.length>0){const m=f[f.length-1];if(m&&m.length>0){const c=m[0];return{1:[_e(c)]}}}}const u={};if(r.outputs)for(const f in r.outputs){const m=r.outputs[f];if(m&&m.images){u[f]=[];for(const c of m.images)if(c&&c.filename&&c.type){const h=Z.graph._nodes_by_id[f].imgs[0].currentSrc.split("?")[0];u[f].push(h+"?filename="+encodeURIComponent(c.filename)+"&type="+encodeURIComponent(c.type)+(c.subfolder?"&subfolder="+encodeURIComponent(c.subfolder):""))}console.log("outputImages for nodeId:",f,u[f])}}return u}catch(o){throw console.error("Error getting output images from prompt:",o),o}}function lt(){const l=Object.values(Z.graph._nodes_by_id),o=[],r=[];for(const u of l)u.type==="SaveImage"?o.push(u.id):u.type==="PreviewImage"&&r.push(u.id);if(console.log("saveNodeIds:",o),console.log("previewNodeIds:",r),o.length===0&&r.length===0)throw new Error("No SaveImage or PreviewImage node found, please add one to the graph");return o.length===1?o[0]:o.length==0&&r.length===1?r[0]:null}async function it(l,o){const r=await at(l);return Object.keys(r).length===0?null:r[o.toString()]&&r[o.toString()].length>0?r[o.toString()][0]:null}const ct=({selectedNodes:l,handleParamSelect:o,selectedParams:r,handleNext:u,handleClose:f})=>{const c=l.flatMap(h=>(h.widgets||[]).map(w=>w.name)).some(h=>r[h]===!0);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Select Parameters for Testing"}),e.jsx("p",{className:"text-xs text-gray-500",children:"Choose the parameters you want to include in your batch test"})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:f,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),l.map((h,w)=>{const E=h.title||"Unknown Node",C=h.widgets||[];return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsx("div",{className:"bg-gray-50 px-3 py-2 text-sm font-medium text-gray-700 border-b",children:E}),e.jsx("div",{className:"p-4 space-y-3",children:e.jsx("div",{className:"flex items-center gap-3 flex-wrap",children:C.map((S,_)=>{const F=S.name;return e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${r[F]?"border-red-500 bg-red-100":"border-gray-300"}`,onClick:$=>o(F,$),children:r[F]&&e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500"})}),e.jsx("span",{className:"ml-2 text-gray-700 text-xs",children:F})]},`widget-${_}`)})})})]},`node-${w}`)}),e.jsx("div",{className:"mt-6 flex justify-center",children:e.jsx("button",{onClick:h=>u(h),disabled:!c,className:`px-3 py-1.5 text-xs ${c?"bg-pink-200 text-pink-700 hover:bg-pink-300":"bg-gray-200 text-gray-500 cursor-not-allowed"} rounded-md transition-colors`,children:"Next"})})]})},dt=({selectedNodes:l,paramTestValues:o,selectedParams:r,updateParamTestValues:u,toggleDropdown:f,openDropdowns:m,handleTestValueSelect:c,searchTerms:h,handleSearch:w,handleSelectAll:E,handleNext:C,handlePrevious:S,handleClose:_,inputValues:F,setInputValues:$,textInputs:H,handleTextInputChange:W,handleAddTextInput:A,handleRemoveTextInput:N,openAiWritingModal:T})=>{const D=(d,k,V,Y=0)=>{if(d=isNaN(d)?0:d,k=isNaN(k)?100:k,V=isNaN(V)||V<=0?1:V,k{!l||l.length===0||l.forEach(d=>{const k=d.id.toString(),V=d.widgets||{};Object.values(V).forEach(p=>{const M=p.name;if(!r[M])return;if(!(o[k]?.[M]?.length>0)&&p.type==="number"){const x=p.options?.min||0,G=p.options?.max||100,I=(p.options?.step||10)/10,L=p.options?.precision||0,O=D(x,G,I,L);if(O.length>0){u(k,M,O);const B=`${k}_${M}`;$(g=>({...g,[B]:{min:x.toString(),max:G.toString(),step:I.toString()}}))}}if(p.type==="customtext"||p.type.toLowerCase().includes("text")){const x=`${k}_${M}`,G=H[x]||[""];JSON.stringify(G)!==JSON.stringify(o[k]?.[M]||[""])&&u(k,M,G)}})})},[l,r,o,H,u,$,D]),e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Parameter Options"}),e.jsx("p",{className:"text-xs text-gray-500",children:"Configure the test values for each parameter"})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:_,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),l.length>0?l.map((d,k)=>{const V=d.widgets||{},Y=Object.values(V),p=d.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b flex justify-between items-center",children:[e.jsxs("span",{children:[d.type," (ID: ",p,")"]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:M=>_(M,k),children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsx("div",{className:"p-4 space-y-4",children:Y.map((M,Q)=>{const x=M.name;if(!r[x])return null;const G=`${p}_${x}`;if(M.type==="customtext"||M.type.toLowerCase().includes("text")){const I=H[G]||[""];return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("label",{className:"text-xs font-medium text-gray-700",children:[x,":"]}),e.jsxs("button",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded text-xs flex items-center hover:bg-blue-200 transition-colors",onClick:()=>T(p,x),children:[e.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"})}),"AI Writing"]})]}),e.jsx("div",{className:"space-y-2",children:I.map((L,O)=>e.jsxs("div",{className:"flex items-start",children:[e.jsx("textarea",{className:`flex-1 border ${L?"border-gray-300":"border-red-500"} rounded p-2 text-xs resize-y`,rows:2,placeholder:"Enter text...",value:L,onChange:B=>W(p,x,O,B.target.value),required:!0}),e.jsx("button",{className:"ml-2 text-red-500 hover:text-red-700",onClick:()=>N(p,x,O),title:"Remove",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},O))}),e.jsxs("button",{className:"mt-2 px-2 py-1 border border-dashed border-gray-300 rounded text-xs text-gray-600 hover:bg-gray-50 flex items-center",onClick:()=>A(p,x),children:[e.jsx("svg",{className:"w-3 h-3 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),"Add Text"]})]},Q)}if(M.type==="number"){const I=M.options?.min||0,L=M.options?.max||100,O=(M.options?.step||10)/10,B=M.options?.precision||0,g=D(I,L,O,B),U=F[G]||{min:I.toString(),max:L.toString(),step:O.toString()};return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("label",{className:"text-xs font-medium text-gray-700",children:[x,":"]}),e.jsx("div",{className:"w-4"})]}),e.jsxs("div",{className:"flex space-x-2 items-center",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Min"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:U.min,required:!0,onClick:v=>{v.preventDefault(),v.stopPropagation()},onChange:v=>{v.preventDefault(),v.stopPropagation();const P=v.target.value;if($(R=>({...R,[G]:{...R[G],min:P}})),P===""||!isNaN(parseFloat(P))){const R=P===""?0:parseFloat(P),q=parseFloat(U.max||L.toString()),K=parseFloat(U.step||O.toString()),J=D(R,q,K,B);u(p,x,J)}}}),e.jsx("label",{className:"text-xs text-gray-600",children:"Max"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:U.max,onClick:v=>{v.preventDefault(),v.stopPropagation()},required:!0,onChange:v=>{v.preventDefault(),v.stopPropagation();const P=v.target.value;if($(R=>({...R,[G]:{...R[G],max:P}})),P===""||!isNaN(parseFloat(P))){const R=parseFloat(U.min||I.toString()),q=P===""?R:parseFloat(P),K=parseFloat(U.step||O.toString()),J=D(R,q,K,B);u(p,x,J)}}}),e.jsx("label",{className:"text-xs text-gray-600",children:"Step"}),e.jsx("input",{type:"text",className:"w-12 h-6 border border-gray-300 rounded text-xs px-2",value:U.step,required:!0,onClick:v=>{v.preventDefault(),v.stopPropagation()},onChange:v=>{v.preventDefault(),v.stopPropagation();const P=v.target.value;if($(R=>({...R,[G]:{...R[G],step:P}})),P===""||!isNaN(parseFloat(P))&&parseFloat(P)>0){const R=parseFloat(U.min||I.toString()),q=parseFloat(U.max||L.toString()),K=P===""?1:parseFloat(P),J=D(R,q,K,B);u(p,x,J)}}})]}),e.jsxs("div",{className:"mt-1",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:(()=>{const v=o[p]?.[x]||g;if(v.length<=10)return v.map((P,R)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:q=>{q.stopPropagation(),c(p,x,P,q)},children:[e.jsx("span",{children:P}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},R));{const P=v.slice(0,5),R=v.slice(v.length-5);return e.jsxs(e.Fragment,{children:[P.map((q,K)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:J=>{J.stopPropagation(),c(p,x,q,J)},children:[e.jsx("span",{children:q}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},`first-${K}`)),e.jsx("div",{className:"px-2 py-0.5 bg-gray-100 text-gray-600 rounded-md flex items-center text-xs",children:"..."}),R.map((q,K)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs cursor-pointer hover:bg-blue-200",onClick:J=>{J.stopPropagation(),c(p,x,q,J)},children:[e.jsx("span",{children:q}),e.jsx("svg",{className:"w-4 h-4 ml-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},`last-${K}`))]})}})()})]}),e.jsx("div",{className:"mt-1",children:e.jsx("p",{className:"text-xs text-gray-500",children:"Values are distributed evenly between Min and Max"})})]},Q)}else if(M.type==="combo"){const I=M.options?.values||[],L=`${p}_${x}`,O=g=>typeof g=="string"?g:g&&typeof g=="object"&&"name"in g?g.name:String(g),B=g=>typeof g=="object"&&g!==null&&"name"in g?g.name:g;return e.jsxs("div",{className:"border-b pb-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("label",{className:"text-xs font-medium text-gray-700",children:x}),e.jsxs("div",{className:"relative dropdown-container",children:[e.jsxs("button",{className:`appearance-none border ${(o[p]?.[x]||[]).length===0?"border-red-500":"border-gray-300"} rounded px-2 py-0.5 pr-6 text-xs flex items-center bg-white text-gray-700`,onClick:g=>{g.preventDefault(),g.stopPropagation(),f(p,x,g)},"data-dropdown":L,children:[e.jsx("span",{children:(o[p]?.[x]||[]).length>0?`${x}: ${(o[p]?.[x]||[]).length} selected`:`Select ${x}`}),e.jsx("div",{className:"ml-2",children:e.jsx("svg",{className:"fill-current h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",children:e.jsx("path",{d:"M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"})})})]}),m[L]&&e.jsxs("div",{className:"absolute z-[9999] mt-1 w-64 bg-white border border-gray-300 rounded-md shadow-lg dropdown-menu",style:{position:"fixed",top:typeof m[L]=="object"?`${m[L].y}px`:"0px",left:typeof m[L]=="object"?`${m[L].x}px`:"0px",maxHeight:"300px",overflowY:"auto"},children:[e.jsx("div",{className:"p-2 border-b sticky top-0 bg-white",children:e.jsx("input",{type:"text",className:"w-full px-2 py-0.5 text-xs border border-gray-300 rounded",placeholder:"Search...",value:h[L]||"",onChange:g=>{g.preventDefault(),g.stopPropagation(),w(p,x,g.target.value)},onClick:g=>{g.preventDefault(),g.stopPropagation()},autoFocus:!0})}),e.jsxs("div",{className:"px-3 py-1.5 bg-gray-50 border-b cursor-pointer text-xs flex items-center text-gray-700 hover:bg-gray-100",onClick:g=>{g.preventDefault(),g.stopPropagation();const v=I.filter(P=>!h[L]||O(P).toLowerCase().includes((h[L]||"").toLowerCase())).map(B);E(p,x,v)},children:[e.jsx("div",{className:`w-4 h-4 mr-2 border rounded-sm flex items-center justify-center ${I.length>0&&(o[p]?.[x]||[]).length===I.length?"bg-blue-500 border-blue-500":(o[p]?.[x]||[]).length>0?"bg-blue-500 border-blue-500 opacity-50":"border-gray-300"}`,children:(o[p]?.[x]||[]).length>0&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("span",{className:"font-medium",children:I.length>0&&(o[p]?.[x]||[]).length===I.length?"Deselect All":"Select All"})]}),e.jsxs("div",{className:"max-h-60 overflow-y-auto",children:[I.filter(g=>!h[L]||O(g).toLowerCase().includes((h[L]||"").toLowerCase())).map((g,U)=>e.jsxs("div",{className:"px-3 py-1.5 hover:bg-gray-100 cursor-pointer text-xs flex items-center text-gray-700",onClick:v=>{v.preventDefault(),v.stopPropagation(),c(p,x,B(g),v)},children:[e.jsx("div",{className:`w-4 h-4 mr-2 border rounded-sm flex items-center justify-center ${(o[p]?.[x]||[]).includes(B(g))?"bg-blue-500 border-blue-500":"border-gray-300"}`,children:(o[p]?.[x]||[]).includes(B(g))&&e.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("span",{className:"whitespace-normal overflow-hidden text-ellipsis",children:O(g)})]},U)),I.filter(g=>!h[L]||O(g).toLowerCase().includes((h[L]||"").toLowerCase())).length===0&&e.jsx("div",{className:"px-3 py-4 text-sm text-gray-500 text-center",children:"No matching options"})]})]})]})]}),e.jsxs("div",{className:"mt-2",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),(o[p]?.[x]||[]).length===0&&e.jsx("div",{className:"text-xs text-red-500 mt-1",children:"Please select at least one value"}),e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:(o[p]?.[x]||[]).map((g,U)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs",children:[e.jsx("span",{children:g}),e.jsx("svg",{className:"w-4 h-4 ml-1 cursor-pointer hover:text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",onClick:v=>{v.preventDefault(),v.stopPropagation(),c(p,x,g,v)},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},U))})]})]},Q)}else return e.jsxs("div",{className:"border-b pb-3",children:[e.jsx("div",{className:"flex justify-between items-center",children:e.jsx("label",{className:"text-xs font-medium text-gray-700",children:x})}),e.jsxs("div",{className:"mt-2",children:[e.jsx("label",{className:"text-xs text-gray-600",children:"Test values"}),e.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[(o[p]?.[x]||[]).map((I,L)=>e.jsxs("div",{className:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded-md flex items-center text-xs",children:[e.jsx("span",{children:I}),e.jsx("svg",{className:"w-4 h-4 ml-1 cursor-pointer hover:text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",onClick:O=>{O.preventDefault(),O.stopPropagation(),c(p,x,I,O)},children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})]},L)),e.jsxs("button",{className:"px-2 py-0.5 border border-dashed border-blue-300 text-blue-600 rounded-md text-xs flex items-center hover:bg-blue-50",onClick:I=>{I.preventDefault(),I.stopPropagation();const L=`${x}${(o[p]?.[x]||[]).length+1}`;u(p,x,[...o[p]?.[x]||[],L])},children:[e.jsx("svg",{className:"w-4 h-4 mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6v6m0 0v6m0-6h6m-6 0H6"})}),e.jsx("span",{children:"Add"})]})]})]})]},Q)})})]},k)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500",children:"No nodes selected. Please select a node in the workflow to configure parameters."}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:d=>S(d),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:d=>C(d),className:"px-3 py-1.5 text-xs bg-pink-200 text-pink-700 rounded-md hover:bg-pink-300 transition-colors",children:"Next"})]})]})},xt=({selectedNodes:l,paramTestValues:o,selectedParams:r,totalCount:u,errorMessage:f,handlePrevious:m,handleStartGeneration:c,handleClose:h})=>{const[w,E]=j.useState([]),[C,S]=j.useState(null),[_,F]=j.useState(!1);Ee();const $=()=>{const W=Object.values(Z.graph._nodes_by_id),A=[],N=[];for(const D of W)D.type==="SaveImage"?A.push(D.id):D.type==="PreviewImage"&&N.push(D.id);const T=[...A,...N];E(T),T.length===1?S(T[0]):T.length>1&&(F(!0),S(null))};j.useEffect(()=>{$()},[]),j.useEffect(()=>{const W=()=>{if(!Z.canvas.selected_nodes)return;const A=Object.values(Z.canvas.selected_nodes);if(A.length===0)return;const N=A[0];N&&(N.type==="SaveImage"||N.type==="PreviewImage")&&(console.log("Selected image node:",N.id),S(N.id))};return document.addEventListener("click",W),()=>{document.removeEventListener("click",W)}},[]);const H=W=>{if(W&&(W.preventDefault(),W.stopPropagation()),w.length>1&&!C){F(!0);return}c(W,C||void 0)};return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Confirm Test Configuration"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["In the selected parameter combinations, there are ",u," total runs. Each run will generate a separate image."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:h,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),_&&w.length>1&&e.jsx("div",{className:"mb-4 p-3 bg-yellow-50 border border-yellow-200 rounded-md text-amber-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:C===null?`Multiple SaveImage and PreviewImage nodes detected with IDs ${w.join(",")}. Please click the node on canvas.`:`Current node ID is ${C}, please click Start Generation again`})]})}),f&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:f})]})}),l.length>0?l.map((W,A)=>{const N=W.type||"Unknown Node",T=W.widgets||[],D=W.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b",children:[N," (ID: ",D,")"]}),e.jsx("div",{className:"p-4 space-y-3",children:T.map((d,k)=>{const V=d.name;if(!r[V])return null;const Y=o[D]?.[V]||[],p=Array.isArray(Y)?`[${Y.join(", ")}]`:JSON.stringify(Y);return e.jsxs("div",{className:kM.preventDefault()})})]},k)})})]},A)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500 text-xs",children:"No nodes selected. Please select a node in the workflow to configure parameters."}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:W=>m(W),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:W=>H(W),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${w.length>1&&!C?"bg-gray-200 text-gray-500 cursor-not-allowed":"bg-pink-200 text-pink-700 hover:bg-pink-300"}`,disabled:w.length>1&&!C,children:"Start Generation"})]})]})},ut=({selectedNodes:l,paramTestValues:o,selectedParams:r,totalCount:u,completedCount:f,errorMessage:m,handleClose:c,setIsProcessing:h,setCurrentScreen:w,cleanupPolling:E})=>{const C=S=>{S.preventDefault(),S.stopPropagation(),st({clear:!0}),rt(),E&&E(),h(!1),w(2)};return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4 relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gray-500 bg-opacity-30 flex flex-col items-center justify-center z-10",children:e.jsxs("div",{className:"text-center text-gray-800 bg-white p-4 rounded-lg shadow-lg",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:"Processing..."}),e.jsxs("div",{className:"text-xs mb-3",children:["Completed ",f," of ",u," runs"]}),e.jsx("div",{className:"w-48 h-2 bg-gray-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-pink-500 transition-all duration-200",style:{width:`${f/u*100}%`}})}),e.jsxs("div",{className:"mt-2 text-xs text-gray-600",children:["Already generated ",f," images"]}),e.jsx("button",{onClick:C,className:"mt-4 px-3 py-1.5 text-xs bg-gray-200 text-gray-800 rounded-md hover:bg-gray-300 transition-colors",children:"Cancel"})]})}),e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Confirm Test Configuration"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["In the selected parameter combinations, there are ",u," total runs. Each run will generate a separate image."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:c,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),m&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-xs",children:e.jsxs("div",{className:"flex items-start",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),e.jsx("div",{className:"ml-2",children:m})]})}),l.length>0?l.map((S,_)=>{const F=S.type||"Unknown Node",$=S.widgets||[],H=S.id;return e.jsxs("div",{className:"border rounded-md mb-4 overflow-hidden",children:[e.jsxs("div",{className:"bg-gray-50 px-3 py-2 text-xs font-medium text-gray-700 border-b",children:[F," (ID: ",H,")"]}),e.jsx("div",{className:"p-4 space-y-3",children:$.map((W,A)=>{const N=W.name;if(!r[N])return null;const T=o[H]?.[N]||[],D=Array.isArray(T)?`[${T.join(", ")}]`:JSON.stringify(T);return e.jsxs("div",{className:A<$.length-1?"flex justify-between items-center border-b pb-2":"flex justify-between items-center",children:[e.jsx("label",{className:"font-medium text-gray-700",children:N}),e.jsx("div",{className:"flex space-x-2 items-center",children:e.jsx("input",{type:"text",className:"w-64 h-7 border border-gray-300 rounded text-sm px-2 bg-gray-50 cursor-not-allowed text-gray-500",readOnly:!0,disabled:!0,value:D,onClick:d=>d.preventDefault()})})]},A)})})]},_)}):e.jsx("div",{className:"border rounded-md mb-4 p-4 text-center text-gray-500",children:"No nodes selected. Please select a node in the workflow to configure parameters."})]})},mt=({generatedImages:l,selectedImageIndex:o,handleSelectImage:r,handleApplySelected:u,handlePrevious:f,handleClose:m,currentPage:c,handlePageChange:h,imagesPerPage:w,notificationVisible:E,modalVisible:C,modalImageUrl:S,openImageModal:_,closeImageModal:F})=>{const $=Math.ceil(l.length/w),H=(c-1)*w,W=Math.min(H+w,l.length),A=l.slice(H,W);return e.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 p-4",children:[e.jsxs("div",{className:"mb-4 border-b pb-2 flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-medium text-gray-800",children:"Generation Complete"}),e.jsxs("p",{className:"text-xs text-gray-500",children:["All ",l.length," images have been generated."]})]}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:m,children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),E&&e.jsx("div",{className:"fixed top-4 right-4 bg-green-100 border-l-4 border-green-500 text-green-700 p-3 shadow-md rounded animate-fade-in-out z-50",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"py-1",children:e.jsx("svg",{className:"h-4 w-4 text-green-500 mr-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("p",{className:"text-xs",children:"Parameters has been applied."})]})}),C&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50",onClick:F,children:e.jsxs("div",{className:"bg-white rounded-lg p-2 max-w-4xl max-h-[90vh] relative",onClick:N=>N.stopPropagation(),children:[e.jsx("button",{className:"absolute top-2 right-2 text-gray-700 hover:text-gray-900 rounded-full hover:bg-gray-200 p-1",onClick:F,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),e.jsx("div",{className:"overflow-auto max-h-[calc(90vh-4rem)]",children:e.jsx("img",{src:S,alt:"Enlarged image",className:"max-w-full h-auto"})})]})}),e.jsx("div",{className:"grid grid-cols-3 gap-4 mb-6",children:A.map((N,T)=>{const D=H+T;return e.jsxs("div",{className:`relative rounded-lg overflow-hidden border ${o===D?"border-pink-500 ring-2 ring-pink-300":"border-gray-200"}`,onClick:d=>r(D,d),children:[e.jsx("button",{className:"absolute top-2 right-2 bg-white bg-opacity-75 rounded-full p-0.5 text-gray-600 hover:text-gray-900 shadow-sm z-10",onClick:d=>_(N.url,d),children:e.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5v-4m0 4h-4m4 0l-5-5"})})}),e.jsx("div",{className:"aspect-square",children:e.jsx("img",{src:N.url,alt:`Generated image ${D+1}`,className:"w-full h-full object-cover"})}),e.jsx("div",{className:"p-2 text-xs text-gray-600 bg-white max-h-16 overflow-y-auto",children:Object.entries(N.params).filter(([d,k])=>d!=="nodeParams"&&typeof k!="object").map(([d,k])=>e.jsxs("div",{children:[d,": ",String(k)]},d))})]},D)})}),$>1&&e.jsxs("div",{className:"flex justify-center items-center space-x-2 mt-4 mb-4",children:[e.jsx("button",{onClick:N=>h(1,N),disabled:c===1,className:`px-2 py-1 rounded ${c===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M15.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M8.707 15.707a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414l5-5a1 1 0 111.414 1.414L4.414 10l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})]})}),e.jsx("button",{onClick:N=>h(c-1,N),disabled:c===1,className:`px-2 py-1 rounded ${c===1?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"px-2 py-1 text-xs text-gray-800",children:["Page ",c," of ",$]}),e.jsx("button",{onClick:N=>h(c+1,N),disabled:c===$,className:`px-2 py-1 rounded ${c===$?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})}),e.jsx("button",{onClick:N=>h($,N),disabled:c===$,className:`px-2 py-1 rounded ${c===$?"text-gray-400 cursor-not-allowed":"text-gray-700 hover:bg-gray-100"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[e.jsx("path",{fillRule:"evenodd",d:"M4.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L8.586 10 4.293 14.293a1 1 0 000 1.414z",clipRule:"evenodd"}),e.jsx("path",{fillRule:"evenodd",d:"M11.293 15.707a1 1 0 001.414 0l5-5a1 1 0 000-1.414l-5-5a1 1 0 00-1.414 1.414L15.586 10l-4.293 4.293a1 1 0 000 1.414z",clipRule:"evenodd"})]})})]}),e.jsxs("div",{className:"mt-6 flex justify-between",children:[e.jsx("button",{onClick:N=>f(N),className:"px-3 py-1.5 text-xs bg-gray-100 text-gray-800 rounded-md hover:bg-gray-200 transition-colors",children:"Previous"}),e.jsx("button",{onClick:N=>u(N),className:"px-3 py-1.5 text-xs bg-pink-200 text-pink-700 rounded-md hover:bg-pink-300 transition-colors",disabled:o===null,children:"Apply Selected"})]})]})},ht=({visible:l,aiWritingModalText:o,setAiWritingModalText:r,aiGeneratedTexts:u,aiSelectedTexts:f,aiWritingLoading:m,aiWritingError:c,handleAiWriting:h,toggleTextSelection:w,addSelectedTexts:E,onClose:C})=>l?e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-lg shadow-lg w-full max-w-2xl max-h-[90vh] flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b flex justify-between items-center",children:[e.jsx("h3",{className:"text-lg font-medium",children:"AI Writing Assistant"}),e.jsx("button",{className:"text-gray-400 hover:text-gray-600",onClick:C,children:e.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),e.jsxs("div",{className:"p-4 overflow-y-auto flex-1",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Enter text and AI will generate variations"}),e.jsx("textarea",{className:"w-full border border-gray-300 rounded-md p-2 text-sm",rows:3,placeholder:"Enter some text here...",value:o,onChange:S=>r(S.target.value)}),e.jsx("button",{className:"mt-2 px-4 py-2 bg-blue-100 text-blue-700 rounded-md text-sm flex items-center hover:bg-blue-200 transition-colors",onClick:h,disabled:m,children:m?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-blue-700",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Generating..."]}):e.jsx(e.Fragment,{children:"Generate"})})]}),c&&e.jsx("div",{className:"mb-4 p-3 bg-red-50 border border-red-200 rounded-md text-red-600 text-sm",children:c}),u.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-sm font-medium mb-2",children:"Generated variations (select items to add):"}),e.jsx("div",{className:"space-y-2 max-h-[40vh] overflow-y-auto p-2",children:u.map((S,_)=>e.jsxs("div",{className:"flex items-start border border-gray-200 rounded-md p-2",children:[e.jsx("div",{className:"mr-2 mt-1",children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"checkbox",id:`text${_+1}`,checked:!!f[`text${_+1}`],onChange:()=>w(`text${_+1}`),className:"sr-only"}),e.jsx("div",{className:`h-4 w-4 rounded border ${f[`text${_+1}`]?"bg-blue-600 border-blue-600":"bg-white border-gray-300"} flex items-center justify-center`,onClick:()=>w(`text${_+1}`),children:f[`text${_+1}`]&&e.jsx("svg",{className:"h-3 w-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]})}),e.jsx("label",{htmlFor:`text${_+1}`,className:"text-sm text-gray-700 cursor-pointer flex-1",children:S})]},_))})]})]}),e.jsxs("div",{className:"p-4 border-t flex justify-end flex-shrink-0",children:[e.jsx("button",{className:"px-4 py-2 bg-gray-100 text-gray-700 rounded-md text-sm mr-2 hover:bg-gray-200 transition-colors",onClick:C,children:"Cancel"}),e.jsx("button",{className:"px-4 py-2 bg-blue-500 text-white rounded-md text-sm hover:bg-blue-600 transition-colors",onClick:E,disabled:Object.values(f).every(S=>!S),children:"Add Selected"})]})]})}):null,ke=l=>{const o=[],r={};if(Object.keys(l).forEach(m=>{const c=parseInt(m),h=l[m]||{},w=Object.keys(h).filter(C=>h[C]&&h[C].length>0);if(w.length===0)return;const E=[[]];w.forEach(C=>{const S=h[C],_=[];E.forEach(F=>{S.forEach($=>{const H=[...F,{nodeId:c,paramName:C,paramValue:String($)}];_.push(H)})}),E.length=0,E.push(..._)}),r[m]=E}),Object.keys(r).length===0)return o;if(Object.keys(r).length===1){const m=Object.keys(r)[0];return r[m]}const u=Object.keys(r);let f=r[u[0]];for(let m=1;m{c.forEach(E=>{h.push([...w,...E])})}),f=h}return f},pt=(l,o)=>{const r={};r.nodeParams={};const u=ke(l);return o{const c=m.nodeId.toString(),h=m.paramName,w=m.paramValue;r.nodeParams[c]||(r.nodeParams[c]={}),r.nodeParams[c][h]=w,r[h]=w}),r},gt=` - @keyframes highlight-pulse { - 0% { - box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); - } - 70% { - box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); - } - 100% { - box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); - } - } - - .highlight-pulse { - animation: highlight-pulse 1.5s infinite; - border: 2px solid #3b82f6; - } - - @keyframes fade-in-out { - 0% { opacity: 0; transform: translateY(-20px); } - 10% { opacity: 1; transform: translateY(0); } - 90% { opacity: 1; transform: translateY(0); } - 100% { opacity: 0; transform: translateY(-20px); } - } - - .animate-fade-in-out { - animation: fade-in-out 3s forwards; - } -`,Nt=({selectedNodes:l,visible:o,onClose:r})=>{const[u,f]=j.useState(0),[m,c]=j.useState({Steps:!0,CFG:!0,sampler_name:!0,threshold:!1,prompt:!1}),[h,w]=j.useState(Ne()),[E,C]=j.useState(!1),[S,_]=j.useState(!1),[F,$]=j.useState(0),[H,W]=j.useState(12),[A,N]=j.useState(null),[T,D]=j.useState(()=>Array(12).fill(null).map((t,s)=>({url:`https://source.unsplash.com/random/300x300?sig=${Math.random()}`,params:{step:s%3===0?5:s%3===1?10:15,sampler_name:"euler",cfg:1}}))),[d,k]=j.useState({}),[V,Y]=j.useState({}),[p,M]=j.useState({}),[Q,x]=j.useState({}),[G,I]=j.useState(1),L=6,[O,B]=j.useState(null),[g,U]=j.useState(!1),[v,P]=j.useState(!1),[R,q]=j.useState(""),[K,J]=j.useState({}),[$e,ue]=j.useState(!1),[ne,be]=j.useState(""),[ye,me]=j.useState([]),[We,he]=j.useState(!1),[Ce,Se]=j.useState(""),[Le,Pe]=j.useState(""),[De,oe]=j.useState(null),[Me,ae]=j.useState({}),{dispatch:le}=Ee(),pe=j.useRef(null),ie=j.useRef(null),Oe=async()=>{if(!ne.trim()){oe("Please enter some text to generate variations");return}he(!0),oe(null),me([]),ae({});try{const t=await xe.generateSDPrompts(ne);me(t),xe.trackEvent({event_type:"prompt_generate",message_type:"parameter_debug",message_id:h,data:{input_text:ne,generated_texts:t}});const s={};t.forEach((i,n)=>{s[`text${n+1}`]=!1}),ae(s)}catch(t){console.error("Error generating text:",t),oe("Failed to generate text variations. Please try again.")}finally{he(!1)}},Ae=(t,s,i,n)=>{const a=`${t}_${s}`;J(y=>{const z=[...y[a]||[]];return z[i]=n,{...y,[a]:z}});const b=[...K[a]||[]];b[i]=n,te(t,s,b)},Te=(t,s)=>{const i=`${t}_${s}`;J(a=>{const b=[...a[i]||[]];return b.push(""),{...a,[i]:b}});const n=[...K[i]||[],""];te(t,s,n)},Be=(t,s,i)=>{const n=`${t}_${s}`;J(b=>{const y=[...b[n]||[]];return y.splice(i,1),{...b,[n]:y}});const a=[...K[n]||[]];a.splice(i,1),te(t,s,a)},Re=t=>{ae(s=>({...s,[t]:!s[t]}))},ze=()=>{const t=`${Ce}_${Le}`,s=Object.entries(Me).filter(([n,a])=>a).map(([n])=>{const a=parseInt(n.replace("text",""))-1;return ye[a]});if(s.length===0)return;J(n=>{const a=[...n[t]||[]];return{...n,[t]:[...a,...s]}}),xe.trackEvent({event_type:"prompt_apply",message_type:"parameter_debug",message_id:h,data:{input_text:ne,generated_texts:ye,selected_texts:s}});const i=[...K[t]||[],...s];te(Ce,Le,i),ue(!1)},Fe=(t,s)=>{ue(!0),Se(t),Pe(s),be(""),me([]),ae({}),he(!1),oe(null)};j.useEffect(()=>{if(!l||l.length===0)return;const t={...d},s=l.map(n=>n.id.toString());Object.keys(t).forEach(n=>{s.includes(n)||delete t[n]}),l.forEach(n=>{const a=n.id.toString();t[a]||(t[a]={})}),JSON.stringify(t)!==JSON.stringify(d)&&k(t)},[l,d]),j.useEffect(()=>{le({type:"SET_SCREEN_STATE",payload:{currentScreen:u,isProcessing:E,isCompleted:S}})},[u,E,S,le]),j.useEffect(()=>{const t=document.createElement("style");return t.textContent=gt,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),j.useEffect(()=>{const t=s=>{if(Object.values(V).some(i=>i)){const i=s.target,n=!!i.closest(".dropdown-menu"),a=!!i.closest("[data-dropdown]");!n&&!a&&Y({})}};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[V]),j.useEffect(()=>{o&&w(Ne())},[o]);const Ie=t=>{if(t&&(t.preventDefault(),t.stopPropagation()),u===0){const s={...d};Object.keys(s).forEach(i=>{const n=s[i];Object.keys(n).forEach(a=>{m[a]||delete n[a]})}),k(s)}if(u===1){const s={...d};l.forEach(n=>{const a=n.id.toString(),b=n.widgets||{};Object.values(b).forEach(y=>{const z=y.name;if(m[z]&&(y.type==="customtext"||y.type.toLowerCase().includes("text"))){const ee=`${a}_${z}`,se=K[ee]||[""];s[a]=s[a]||{},s[a][z]=se}})}),k(s);const i=ke(s);W(i.length)}B(null),f(s=>Math.min(s+1,2))},je=t=>{if(t&&(t.preventDefault(),t.stopPropagation()),B(null),S&&_(!1),u===1){const s=l.map(a=>a.id.toString()),i=Object.keys(d),n={...d};i.forEach(a=>{s.includes(a)||delete n[a]}),k(n)}if(u===2||S){const s={...d};Object.entries(K).forEach(([i,n])=>{if(!n||n.length===0)return;const[a,b]=i.split("_");l.some(y=>y.id.toString()===a)&&(s[a]=s[a]||{},JSON.stringify(s[a][b])!==JSON.stringify(n)&&(s[a][b]=n))}),k(s)}f(s=>Math.max(s-1,0))},Ve=(t,s)=>{s&&(s.preventDefault(),s.stopPropagation());const i=m[t];if(c(n=>({...n,[t]:!i})),i){const n={...d};Object.keys(n).forEach(a=>{n[a][t]&&delete n[a][t]}),k(n)}},Ge=(t,s,i)=>{i.preventDefault(),i.stopPropagation();const n=`${t}_${s}`;Y(a=>{if(a[n]&&typeof a[n]=="object"?a[n].isOpen:!!a[n])return{...a,[n]:!1};{let y=0,z=0;if(i.currentTarget){const de=i.currentTarget.getBoundingClientRect();y=de.left,z=de.bottom}else y=i.clientX,z=i.clientY+20;const ee=window.innerWidth,se=250;return y+se>ee&&(y=ee-se-10),y<0&&(y=10),{...a,[n]:{isOpen:!0,x:y,y:z}}}})},te=(t,s,i)=>{k(n=>{const a={...n};return a[t]||(a[t]={}),a[t][s]=i,a})},Ue=(t,s,i,n)=>{n&&(n.preventDefault(),n.stopPropagation()),k(a=>{const b={...a};b[t]||(b[t]={}),b[t][s]||(b[t][s]=[]);const y=b[t][s];return y.includes(i)?b[t][s]=y.filter(z=>z!==i):b[t][s]=[...y,i],b})},He=(t,s,i)=>{const n=`${t}_${s}`;M(a=>({...a,[n]:i}))},qe=(t,s,i)=>{if(!d[t]){te(t,s,i);return}const n=d[t][s]||[];i.length===n.length?te(t,s,[]):te(t,s,[...i])},Ke=(t,s)=>{s&&(s.preventDefault(),s.stopPropagation()),I(Math.max(1,Math.min(t,Math.ceil(T.length/L))))},ge=()=>{pe.current&&(clearTimeout(pe.current),pe.current=null),ie.current=null};j.useEffect(()=>()=>{ge()},[]);const Je=async(t,s)=>{t&&(t.preventDefault(),t.stopPropagation()),ge();const i=ke(d),n=i.length;if(n>100){B(`Cannot generate more than 100 images at once (currently: ${n} images)`);return}if(B(null),C(!0),$(0),console.log("Generated parameter combinations:",i),xe.trackEvent({event_type:"start_generation",message_type:"parameter_debug",message_id:h,data:{workflow:(await Z.graphToPrompt()).output,all_params:d,count:n}}),i.length===0){B("No valid parameter combinations found. Please check your parameter selections."),C(!1);return}let a=s||null;if(a===null){const y=lt();y!==null&&(a=y)}if(a===null){B("Please select a SaveImage or PreviewImage node first."),C(!1);return}const b=[];try{const y=Date.now().toString();ie.current=y;for(const re of i){const X=await ot(re);X.prompt_id?b.push(X.prompt_id):(console.error("Failed to get prompt_id from response:",X),b.push(""))}const z=Array(i.length).fill(null).map((re,X)=>({url:`https://source.unsplash.com/random/300x300?sig=${Math.random()}`,params:pt(d,X)}));D(z);const ee=Date.now(),se=5*60*1e3,de=async()=>{if(ie.current!==y){console.log("Another polling session has started, stopping this one");return}if(Date.now()-ee>se){console.log("Timeout reached while waiting for images"),ie.current===y&&(C(!1),_(!0),I(1));return}let re=0;for(let X=0;X{s&&(s.preventDefault(),s.stopPropagation()),N(t)},Qe=(t,s)=>{s.preventDefault(),s.stopPropagation(),q(t),P(!0)},Xe=t=>{t&&(t.preventDefault(),t.stopPropagation()),P(!1)},Ze=async t=>{if(t&&(t.preventDefault(),t.stopPropagation()),A!==null){console.log(`Applied image ${A+1} with parameters:`,T[A].params);let s=1;if(d){for(const n in d)if(d[n])for(const a in d[n]){const b=d[n][a];if(b){let y=1;Array.isArray(b)?y=b.length>0?b.length:1:typeof b=="object"&&b!==null&&(y=Object.keys(b).length>0?Object.keys(b).length:1),s=s*y}}}xe.trackEvent({event_type:"parameter_debug_apply",message_type:"parameter_debug",message_id:h,data:{workflow:(await Z.graphToPrompt()).output,selected_params:T[A].params,all_params:d,count:s}});const i=T[A].params;i.nodeParams&&(Object.entries(i.nodeParams).forEach(([n,a])=>{const b=Z.graph._nodes_by_id[n];!b||!b.widgets||Object.entries(a).forEach(([y,z])=>{for(const ee of b.widgets)if(ee.name===y){ee.value=z;break}})}),Z.graph.setDirtyCanvas(!1,!0),U(!0),setTimeout(()=>{U(!1)},3e3))}},ce=(t,s)=>{if(t&&(t.preventDefault(),t.stopPropagation()),u===1&&s!==void 0){const i=[...l],n=i[s];if(i.splice(s,1),n){const a=n.id.toString();k(b=>{const y={...b};return delete y[a],y})}i.length===0?r&&(le({type:"SET_SCREEN_STATE",payload:null}),ve(),r()):le({type:"SET_SELECTED_NODE",payload:i});return}r?(le({type:"SET_SCREEN_STATE",payload:null}),ve(),r()):ve()},ve=()=>{f(0),c({Steps:!0,CFG:!0,sampler_name:!0,threshold:!1,prompt:!1}),w(Ne()),ge(),C(!1),_(!1),$(0),W(12),N(null),D(Array(12).fill(null).map((t,s)=>({url:`https://source.unsplash.com/random/300x300?sig=${Math.random()}`,params:{step:s%3===0?5:s%3===1?10:15,sampler_name:"euler",cfg:1}}))),k({}),Y({}),M({}),x({}),I(1),B(null),U(!1),P(!1),q(""),J({}),ue(!1),be(""),me([]),he(!1),Se(""),Pe(""),oe(null),ae({})};return!o||l.length===0?e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-8 bg-gray-50 overflow-y-auto",onClick:t=>t.stopPropagation(),children:e.jsxs("div",{className:"max-w-lg p-8 bg-white rounded-lg shadow-sm border border-blue-100 relative",children:[e.jsxs("div",{className:"mb-6 text-center",children:[e.jsx("h3",{className:"text-base font-bold text-blue-800 mb-2",children:"GenLab"}),e.jsx("div",{className:"h-1 w-16 bg-blue-500 mx-auto rounded-full mb-4"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"bg-blue-100 p-2 rounded-full text-blue-600",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-800",children:"Batch Test Parameter Pairs"}),e.jsx("p",{className:"text-xs text-gray-600",children:"Select a node to batch test parameter pairs"})]})]}),e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx("div",{className:"bg-indigo-100 p-2 rounded-full text-indigo-600",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium text-gray-800",children:"How To Use"}),e.jsx("p",{className:"text-xs text-gray-600",children:"Click on any node in your workflow to start the parameter testing process"})]})]}),e.jsx("div",{className:"mt-6 text-center",children:e.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"No node is currently selected"})})]})]})}):S?e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50 p-4",onClick:t=>t.stopPropagation(),children:e.jsx(mt,{generatedImages:T,selectedImageIndex:A,handleSelectImage:Ye,handleApplySelected:Ze,handlePrevious:je,handleClose:ce,currentPage:G,handlePageChange:Ke,imagesPerPage:L,notificationVisible:g,modalVisible:v,modalImageUrl:R,openImageModal:Qe,closeImageModal:Xe})}):E?e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50 p-4",onClick:t=>t.stopPropagation(),children:e.jsx(ut,{selectedNodes:l,paramTestValues:d,selectedParams:m,totalCount:H,completedCount:F,errorMessage:O,handleClose:ce,setIsProcessing:C,setCurrentScreen:f,cleanupPolling:ge})}):u===0?e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50 p-4 flex flex-col h-full max-h-[80vh]",onClick:t=>t.stopPropagation(),children:e.jsx(ct,{selectedNodes:l,handleParamSelect:Ve,selectedParams:m,handleNext:Ie,handleClose:ce})}):u===1?e.jsxs("div",{className:"flex-1 overflow-y-auto bg-gray-50 p-4 flex flex-col h-full max-h-[80vh]",onClick:t=>t.stopPropagation(),children:[e.jsx(dt,{selectedNodes:l,paramTestValues:d,selectedParams:m,updateParamTestValues:te,toggleDropdown:Ge,openDropdowns:V,handleTestValueSelect:Ue,searchTerms:p,handleSearch:He,handleSelectAll:qe,handleNext:Ie,handlePrevious:je,handleClose:ce,inputValues:Q,setInputValues:x,textInputs:K,handleTextInputChange:Ae,handleAddTextInput:Te,handleRemoveTextInput:Be,openAiWritingModal:Fe}),e.jsx(ht,{visible:$e,aiWritingModalText:ne,setAiWritingModalText:be,aiGeneratedTexts:ye,aiSelectedTexts:Me,aiWritingLoading:We,aiWritingError:De,handleAiWriting:Oe,toggleTextSelection:Re,addSelectedTexts:ze,onClose:()=>ue(!1)})]}):e.jsx("div",{className:"flex-1 overflow-y-auto bg-gray-50 p-4 flex flex-col h-full max-h-[80vh]",onClick:t=>t.stopPropagation(),children:e.jsx(xt,{selectedNodes:l,paramTestValues:d,selectedParams:m,totalCount:H,errorMessage:O,handlePrevious:je,handleStartGeneration:Je,handleClose:ce})})};export{Nt as ParameterDebugInterface}; diff --git a/dist/copilot_web/WorkflowOption-DPhIatDg.js b/dist/copilot_web/WorkflowOption-DPhIatDg.js deleted file mode 100644 index 75d2569..0000000 --- a/dist/copilot_web/WorkflowOption-DPhIatDg.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t}from"./vendor-markdown-Dek94WS0.js";import{W as f,g as u,a as p}from"./message-components-yQk9DI7R.js";import{r as N}from"./vendor-react-V04_Axys.js";function z({content:v,name:C="Assistant",avatar:_,latestInput:y,installedNodes:k,onAddMessage:g}){const h=JSON.parse(v),w=h.ext?.find(e=>e.type==="workflow")?.data||[],[i,d]=N.useState({}),b=async e=>{if(!e.id){console.error("No workflow id provided");return}const r=String(e.id);if(!i[r]){d(o=>({...o,[r]:!0})),f.trackEvent({event_type:"workflow_accept",message_type:"workflow",message_id:h.message_id,data:{workflow_id:e.id,workflow_name:e.name}});try{const o=await f.getOptimizedWorkflow(e.id,y);if(o.workflow){const n=new Set;for(const s of o.workflow.nodes)n.add(s.type);const a=Array.from(n).filter(s=>!k.includes(s));if(console.log("[WorkflowOption] Missing node types:",a),a.length>0){try{console.log("[WorkflowOption] Fetching info for missing nodes");const s=await f.batchGetNodeInfo(a);console.log("[WorkflowOption] Received node infos:",s);const c={text:"",ext:[{type:"node_install_guide",data:s.map(l=>({name:l.name,repository_url:l.github_url}))}]},m={id:u(),role:"ai",content:JSON.stringify(c),format:"markdown",name:"Assistant",metadata:{pendingWorkflow:o.workflow,optimizedParams:o.optimized_params}};g?.(m)}catch(s){console.error("[WorkflowOption] Error fetching node info:",s),alert("Error checking required nodes. Please try again.")}finally{d(s=>({...s,[r]:!1}))}return}j(o.workflow,o.optimized_params)}}catch(o){console.error("Failed to optimize workflow:",o),alert("Failed to optimize workflow. Please try again.")}finally{d(o=>({...o,[r]:!1}))}}},j=(e,r)=>{p.loadGraphData(e);for(const[n,a,s,c,m]of r){const l=p.graph._nodes_by_id[n].widgets;for(const x of l)x.name===c&&(x.value=m)}p.graph.setDirtyCanvas(!1,!0);const o={id:u(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};g?.(o)};return t.jsx("div",{className:"space-y-3",children:w.length>0&&t.jsx("div",{className:"flex flex-col space-y-4",children:w.map((e,r)=>{const o=e.id?String(e.id):"";return t.jsxs("div",{className:"flex items-center gap-4 p-4 rounded-lg border border-gray-200 hover:bg-gray-50",children:[e.image&&t.jsx("img",{src:e.image,alt:e.name,className:"w-14 h-14 object-cover rounded-lg",onError:n=>{const a=n.target;a.onerror=null,a.src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56' fill='none'%3E%3Crect width='56' height='56' fill='%23F3F4F6'/%3E%3Cpath d='M28 28C30.2091 28 32 26.2091 32 24C32 21.7909 30.2091 20 28 20C25.7909 20 24 21.7909 24 24C24 26.2091 25.7909 28 28 28Z' fill='%239CA3AF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M18.7253 37.6307C19.8278 35.1533 22.6897 33.6 26 33.6H30C33.3103 33.6 36.1722 35.1533 37.2747 37.6307C37.6419 38.4561 37.0611 39.2 36.1694 39.2H19.8306C18.9389 39.2 18.3581 38.4561 18.7253 37.6307Z' fill='%239CA3AF'/%3E%3C/svg%3E"}}),t.jsxs("div",{className:"flex-1 break-words flex flex-col h-[4.5rem] justify-between",children:[t.jsx("div",{children:t.jsx("h3",{className:"font-medium text-sm line-clamp-2 h-10 overflow-hidden",children:e.name})}),t.jsxs("div",{className:"flex justify-between items-center mt-1",children:[e.description&&t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"w-5 h-5 flex items-center justify-center text-gray-500 cursor-help",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-4 h-4",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"})})}),t.jsx("div",{className:"absolute bottom-full left-0 mb-2 hidden group-hover:block",children:t.jsx("div",{className:"bg-gray-900 text-white text-xs rounded-md py-2 px-3 min-w-[400px] whitespace-normal break-words",children:e.description})})]}),t.jsx("button",{onClick:()=>b(e),disabled:i[o],className:`px-3 py-1.5 ${i[o]?"bg-gray-400 cursor-not-allowed":"bg-blue-500 hover:bg-blue-600"} text-white rounded-md transition-colors text-xs`,children:i[o]?"Loading...":"Accept"})]})]})]},r)})})})}export{z as WorkflowOption}; diff --git a/dist/copilot_web/assets/input-CeTzrUyG.css b/dist/copilot_web/assets/input-CeTzrUyG.css deleted file mode 100644 index e07889a..0000000 --- a/dist/copilot_web/assets/input-CeTzrUyG.css +++ /dev/null @@ -1 +0,0 @@ -#comfyui-copilot-plugin *,#comfyui-copilot-plugin :before,#comfyui-copilot-plugin :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#comfyui-copilot-plugin ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }#comfyui-copilot-plugin .container{width:100%}@media (min-width: 640px){#comfyui-copilot-plugin .container{max-width:640px}}@media (min-width: 768px){#comfyui-copilot-plugin .container{max-width:768px}}@media (min-width: 1024px){#comfyui-copilot-plugin .container{max-width:1024px}}@media (min-width: 1280px){#comfyui-copilot-plugin .container{max-width:1280px}}@media (min-width: 1536px){#comfyui-copilot-plugin .container{max-width:1536px}}#comfyui-copilot-plugin .prose{color:var(--tw-prose-body);max-width:65ch}#comfyui-copilot-plugin .prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}#comfyui-copilot-plugin .prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-lead);font-size:1.25em;line-height:1.6;margin-top:1.2em;margin-bottom:1.2em}#comfyui-copilot-plugin .prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-links);text-decoration:underline;font-weight:500}#comfyui-copilot-plugin .prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-bold);font-weight:600}#comfyui-copilot-plugin .prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}#comfyui-copilot-plugin .prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}#comfyui-copilot-plugin .prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}#comfyui-copilot-plugin .prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}#comfyui-copilot-plugin .prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}#comfyui-copilot-plugin .prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}#comfyui-copilot-plugin .prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}#comfyui-copilot-plugin .prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}#comfyui-copilot-plugin .prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}#comfyui-copilot-plugin .prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}#comfyui-copilot-plugin .prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:disc;margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em}#comfyui-copilot-plugin .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{font-weight:400;color:var(--tw-prose-counters)}#comfyui-copilot-plugin .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--tw-prose-bullets)}#comfyui-copilot-plugin .prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.25em}#comfyui-copilot-plugin .prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--tw-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}#comfyui-copilot-plugin .prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-style:italic;color:var(--tw-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--tw-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em}#comfyui-copilot-plugin .prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}#comfyui-copilot-plugin .prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}#comfyui-copilot-plugin .prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:800;font-size:2.25em;margin-top:0;margin-bottom:.8888889em;line-height:1.1111111}#comfyui-copilot-plugin .prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:900;color:inherit}#comfyui-copilot-plugin .prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:700;font-size:1.5em;margin-top:2em;margin-bottom:1em;line-height:1.3333333}#comfyui-copilot-plugin .prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:800;color:inherit}#comfyui-copilot-plugin .prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;font-size:1.25em;margin-top:1.6em;margin-bottom:.6em;line-height:1.6}#comfyui-copilot-plugin .prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}#comfyui-copilot-plugin .prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;margin-top:1.5em;margin-bottom:.5em;line-height:1.5}#comfyui-copilot-plugin .prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:700;color:inherit}#comfyui-copilot-plugin .prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}#comfyui-copilot-plugin .prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){display:block;margin-top:2em;margin-bottom:2em}#comfyui-copilot-plugin .prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}#comfyui-copilot-plugin .prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:500;font-family:inherit;color:var(--tw-prose-kbd);box-shadow:0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),0 3px rgb(var(--tw-prose-kbd-shadows) / 10%);font-size:.875em;border-radius:.3125rem;padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;padding-inline-start:.375em}#comfyui-copilot-plugin .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-code);font-weight:600;font-size:.875em}#comfyui-copilot-plugin .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:"`"}#comfyui-copilot-plugin .prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}#comfyui-copilot-plugin .prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}#comfyui-copilot-plugin .prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}#comfyui-copilot-plugin .prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}#comfyui-copilot-plugin .prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-pre-code);background-color:var(--tw-prose-pre-bg);overflow-x:auto;font-weight:400;font-size:.875em;line-height:1.7142857;margin-top:1.7142857em;margin-bottom:1.7142857em;border-radius:.375rem;padding-top:.8571429em;padding-inline-end:1.1428571em;padding-bottom:.8571429em;padding-inline-start:1.1428571em}#comfyui-copilot-plugin .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){background-color:transparent;border-width:0;border-radius:0;padding:0;font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}#comfyui-copilot-plugin .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:none}#comfyui-copilot-plugin .prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}#comfyui-copilot-plugin .prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){width:100%;table-layout:auto;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.7142857}#comfyui-copilot-plugin .prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-th-borders)}#comfyui-copilot-plugin .prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-headings);font-weight:600;vertical-align:bottom;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}#comfyui-copilot-plugin .prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--tw-prose-td-borders)}#comfyui-copilot-plugin .prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}#comfyui-copilot-plugin .prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}#comfyui-copilot-plugin .prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--tw-prose-th-borders)}#comfyui-copilot-plugin .prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}#comfyui-copilot-plugin .prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}#comfyui-copilot-plugin .prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}#comfyui-copilot-plugin .prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--tw-prose-captions);font-size:.875em;line-height:1.4285714;margin-top:.8571429em}#comfyui-copilot-plugin .prose{--tw-prose-body: #374151;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151;font-size:1rem;line-height:1.75}#comfyui-copilot-plugin .prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}#comfyui-copilot-plugin .prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}#comfyui-copilot-plugin .prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}#comfyui-copilot-plugin .prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}#comfyui-copilot-plugin .prose :where(.prose>ul>li p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}#comfyui-copilot-plugin .prose :where(.prose>ul>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}#comfyui-copilot-plugin .prose :where(.prose>ul>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}#comfyui-copilot-plugin .prose :where(.prose>ol>li>p:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em}#comfyui-copilot-plugin .prose :where(.prose>ol>li>p:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:1.25em}#comfyui-copilot-plugin .prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}#comfyui-copilot-plugin .prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}#comfyui-copilot-plugin .prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}#comfyui-copilot-plugin .prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}#comfyui-copilot-plugin .prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}#comfyui-copilot-plugin .prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}#comfyui-copilot-plugin .prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}#comfyui-copilot-plugin .prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}#comfyui-copilot-plugin .prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}#comfyui-copilot-plugin .prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.5714286em;padding-inline-end:.5714286em;padding-bottom:.5714286em;padding-inline-start:.5714286em}#comfyui-copilot-plugin .prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}#comfyui-copilot-plugin .prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}#comfyui-copilot-plugin .prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}#comfyui-copilot-plugin .prose :where(.prose>:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}#comfyui-copilot-plugin .prose :where(.prose>:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){margin-bottom:0}#comfyui-copilot-plugin .prose-neutral{--tw-prose-body: #404040;--tw-prose-headings: #171717;--tw-prose-lead: #525252;--tw-prose-links: #171717;--tw-prose-bold: #171717;--tw-prose-counters: #737373;--tw-prose-bullets: #d4d4d4;--tw-prose-hr: #e5e5e5;--tw-prose-quotes: #171717;--tw-prose-quote-borders: #e5e5e5;--tw-prose-captions: #737373;--tw-prose-kbd: #171717;--tw-prose-kbd-shadows: 23 23 23;--tw-prose-code: #171717;--tw-prose-pre-code: #e5e5e5;--tw-prose-pre-bg: #262626;--tw-prose-th-borders: #d4d4d4;--tw-prose-td-borders: #e5e5e5;--tw-prose-invert-body: #d4d4d4;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #a3a3a3;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #a3a3a3;--tw-prose-invert-bullets: #525252;--tw-prose-invert-hr: #404040;--tw-prose-invert-quotes: #f5f5f5;--tw-prose-invert-quote-borders: #404040;--tw-prose-invert-captions: #a3a3a3;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d4d4d4;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #525252;--tw-prose-invert-td-borders: #404040}#comfyui-copilot-plugin .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#comfyui-copilot-plugin .\!visible{visibility:visible!important}#comfyui-copilot-plugin .visible{visibility:visible}#comfyui-copilot-plugin .collapse{visibility:collapse}#comfyui-copilot-plugin .static{position:static}#comfyui-copilot-plugin .fixed{position:fixed}#comfyui-copilot-plugin .absolute{position:absolute}#comfyui-copilot-plugin .relative{position:relative}#comfyui-copilot-plugin .sticky{position:sticky}#comfyui-copilot-plugin .inset-0{inset:0}#comfyui-copilot-plugin .inset-y-0{top:0;bottom:0}#comfyui-copilot-plugin .-bottom-1{bottom:-.25rem}#comfyui-copilot-plugin .-right-1{right:-.25rem}#comfyui-copilot-plugin .-top-1{top:-.25rem}#comfyui-copilot-plugin .-top-10{top:-2.5rem}#comfyui-copilot-plugin .-top-6{top:-1.5rem}#comfyui-copilot-plugin .bottom-0{bottom:0}#comfyui-copilot-plugin .bottom-1{bottom:.25rem}#comfyui-copilot-plugin .bottom-2{bottom:.5rem}#comfyui-copilot-plugin .bottom-3{bottom:.75rem}#comfyui-copilot-plugin .bottom-full{bottom:100%}#comfyui-copilot-plugin .left-0{left:0}#comfyui-copilot-plugin .left-1\/2{left:50%}#comfyui-copilot-plugin .left-3{left:.75rem}#comfyui-copilot-plugin .right-0{right:0}#comfyui-copilot-plugin .right-1\.5{right:.375rem}#comfyui-copilot-plugin .right-12{right:3rem}#comfyui-copilot-plugin .right-2{right:.5rem}#comfyui-copilot-plugin .right-3{right:.75rem}#comfyui-copilot-plugin .right-4{right:1rem}#comfyui-copilot-plugin .top-0{top:0}#comfyui-copilot-plugin .top-1\/2{top:50%}#comfyui-copilot-plugin .top-2{top:.5rem}#comfyui-copilot-plugin .top-4{top:1rem}#comfyui-copilot-plugin .z-10{z-index:10}#comfyui-copilot-plugin .z-20{z-index:20}#comfyui-copilot-plugin .z-50{z-index:50}#comfyui-copilot-plugin .z-\[9999\]{z-index:9999}#comfyui-copilot-plugin .\!my-0\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}#comfyui-copilot-plugin .\!my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}#comfyui-copilot-plugin .mx-auto{margin-left:auto;margin-right:auto}#comfyui-copilot-plugin .-ml-1{margin-left:-.25rem}#comfyui-copilot-plugin .mb-1{margin-bottom:.25rem}#comfyui-copilot-plugin .mb-2{margin-bottom:.5rem}#comfyui-copilot-plugin .mb-3{margin-bottom:.75rem}#comfyui-copilot-plugin .mb-4{margin-bottom:1rem}#comfyui-copilot-plugin .mb-6{margin-bottom:1.5rem}#comfyui-copilot-plugin .ml-1{margin-left:.25rem}#comfyui-copilot-plugin .ml-2{margin-left:.5rem}#comfyui-copilot-plugin .ml-3{margin-left:.75rem}#comfyui-copilot-plugin .mr-1{margin-right:.25rem}#comfyui-copilot-plugin .mr-2{margin-right:.5rem}#comfyui-copilot-plugin .mr-3{margin-right:.75rem}#comfyui-copilot-plugin .mt-0\.5{margin-top:.125rem}#comfyui-copilot-plugin .mt-1{margin-top:.25rem}#comfyui-copilot-plugin .mt-12{margin-top:3rem}#comfyui-copilot-plugin .mt-2{margin-top:.5rem}#comfyui-copilot-plugin .mt-4{margin-top:1rem}#comfyui-copilot-plugin .mt-6{margin-top:1.5rem}#comfyui-copilot-plugin .line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}#comfyui-copilot-plugin .block{display:block}#comfyui-copilot-plugin .inline{display:inline}#comfyui-copilot-plugin .flex{display:flex}#comfyui-copilot-plugin .inline-flex{display:inline-flex}#comfyui-copilot-plugin .table{display:table}#comfyui-copilot-plugin .grid{display:grid}#comfyui-copilot-plugin .contents{display:contents}#comfyui-copilot-plugin .hidden{display:none}#comfyui-copilot-plugin .aspect-square{aspect-ratio:1 / 1}#comfyui-copilot-plugin .h-1{height:.25rem}#comfyui-copilot-plugin .h-10{height:2.5rem}#comfyui-copilot-plugin .h-14{height:3.5rem}#comfyui-copilot-plugin .h-2{height:.5rem}#comfyui-copilot-plugin .h-20{height:5rem}#comfyui-copilot-plugin .h-3{height:.75rem}#comfyui-copilot-plugin .h-3\.5{height:.875rem}#comfyui-copilot-plugin .h-4{height:1rem}#comfyui-copilot-plugin .h-5{height:1.25rem}#comfyui-copilot-plugin .h-6{height:1.5rem}#comfyui-copilot-plugin .h-7{height:1.75rem}#comfyui-copilot-plugin .h-8{height:2rem}#comfyui-copilot-plugin .h-\[4\.5rem\]{height:4.5rem}#comfyui-copilot-plugin .h-auto{height:auto}#comfyui-copilot-plugin .h-full{height:100%}#comfyui-copilot-plugin .max-h-16{max-height:4rem}#comfyui-copilot-plugin .max-h-60{max-height:15rem}#comfyui-copilot-plugin .max-h-\[400px\]{max-height:400px}#comfyui-copilot-plugin .max-h-\[40vh\]{max-height:40vh}#comfyui-copilot-plugin .max-h-\[80vh\]{max-height:80vh}#comfyui-copilot-plugin .max-h-\[90vh\]{max-height:90vh}#comfyui-copilot-plugin .max-h-\[calc\(90vh-4rem\)\]{max-height:calc(90vh - 4rem)}#comfyui-copilot-plugin .min-h-\[80px\]{min-height:80px}#comfyui-copilot-plugin .w-1{width:.25rem}#comfyui-copilot-plugin .w-1\/2{width:50%}#comfyui-copilot-plugin .w-10{width:2.5rem}#comfyui-copilot-plugin .w-12{width:3rem}#comfyui-copilot-plugin .w-14{width:3.5rem}#comfyui-copilot-plugin .w-16{width:4rem}#comfyui-copilot-plugin .w-2{width:.5rem}#comfyui-copilot-plugin .w-3{width:.75rem}#comfyui-copilot-plugin .w-3\.5{width:.875rem}#comfyui-copilot-plugin .w-4{width:1rem}#comfyui-copilot-plugin .w-40{width:10rem}#comfyui-copilot-plugin .w-48{width:12rem}#comfyui-copilot-plugin .w-5{width:1.25rem}#comfyui-copilot-plugin .w-64{width:16rem}#comfyui-copilot-plugin .w-8{width:2rem}#comfyui-copilot-plugin .w-96{width:24rem}#comfyui-copilot-plugin .w-\[100\%\]{width:100%}#comfyui-copilot-plugin .w-\[480px\]{width:480px}#comfyui-copilot-plugin .w-\[500px\]{width:500px}#comfyui-copilot-plugin .w-\[calc\(50\%-0\.25rem\)\]{width:calc(50% - .25rem)}#comfyui-copilot-plugin .w-full{width:100%}#comfyui-copilot-plugin .min-w-\[400px\]{min-width:400px}#comfyui-copilot-plugin .max-w-2xl{max-width:42rem}#comfyui-copilot-plugin .max-w-4xl{max-width:56rem}#comfyui-copilot-plugin .max-w-full{max-width:100%}#comfyui-copilot-plugin .max-w-lg{max-width:32rem}#comfyui-copilot-plugin .flex-1{flex:1 1 0%}#comfyui-copilot-plugin .flex-shrink-0{flex-shrink:0}#comfyui-copilot-plugin .-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#comfyui-copilot-plugin .-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#comfyui-copilot-plugin .-translate-y-full{--tw-translate-y: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#comfyui-copilot-plugin .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#comfyui-copilot-plugin{@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}}#comfyui-copilot-plugin .animate-bounce{animation:bounce 1s infinite}#comfyui-copilot-plugin{@keyframes spin{to{transform:rotate(360deg)}}}#comfyui-copilot-plugin .animate-spin{animation:spin 1s linear infinite}#comfyui-copilot-plugin .cursor-ew-resize{cursor:ew-resize}#comfyui-copilot-plugin .cursor-help{cursor:help}#comfyui-copilot-plugin .cursor-not-allowed{cursor:not-allowed}#comfyui-copilot-plugin .cursor-ns-resize{cursor:ns-resize}#comfyui-copilot-plugin .cursor-pointer{cursor:pointer}#comfyui-copilot-plugin .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#comfyui-copilot-plugin .resize-none{resize:none}#comfyui-copilot-plugin .resize-y{resize:vertical}#comfyui-copilot-plugin .resize{resize:both}#comfyui-copilot-plugin .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#comfyui-copilot-plugin .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}#comfyui-copilot-plugin .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}#comfyui-copilot-plugin .flex-col{flex-direction:column}#comfyui-copilot-plugin .flex-wrap{flex-wrap:wrap}#comfyui-copilot-plugin .items-start{align-items:flex-start}#comfyui-copilot-plugin .items-center{align-items:center}#comfyui-copilot-plugin .justify-end{justify-content:flex-end}#comfyui-copilot-plugin .justify-center{justify-content:center}#comfyui-copilot-plugin .justify-between{justify-content:space-between}#comfyui-copilot-plugin .gap-1{gap:.25rem}#comfyui-copilot-plugin .gap-2{gap:.5rem}#comfyui-copilot-plugin .gap-3{gap:.75rem}#comfyui-copilot-plugin .gap-4{gap:1rem}#comfyui-copilot-plugin .space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}#comfyui-copilot-plugin .space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}#comfyui-copilot-plugin .space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}#comfyui-copilot-plugin .space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}#comfyui-copilot-plugin .space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}#comfyui-copilot-plugin .space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}#comfyui-copilot-plugin .overflow-auto{overflow:auto}#comfyui-copilot-plugin .overflow-hidden{overflow:hidden}#comfyui-copilot-plugin .overflow-visible{overflow:visible}#comfyui-copilot-plugin .overflow-x-auto{overflow-x:auto}#comfyui-copilot-plugin .overflow-y-auto{overflow-y:auto}#comfyui-copilot-plugin .scroll-smooth{scroll-behavior:smooth}#comfyui-copilot-plugin .text-ellipsis{text-overflow:ellipsis}#comfyui-copilot-plugin .whitespace-normal{white-space:normal}#comfyui-copilot-plugin .whitespace-nowrap{white-space:nowrap}#comfyui-copilot-plugin .whitespace-pre-wrap{white-space:pre-wrap}#comfyui-copilot-plugin .break-words{overflow-wrap:break-word}#comfyui-copilot-plugin .rounded{border-radius:.25rem}#comfyui-copilot-plugin .rounded-full{border-radius:9999px}#comfyui-copilot-plugin .rounded-lg{border-radius:.5rem}#comfyui-copilot-plugin .rounded-md{border-radius:.375rem}#comfyui-copilot-plugin .rounded-sm{border-radius:.125rem}#comfyui-copilot-plugin .rounded-xl{border-radius:.75rem}#comfyui-copilot-plugin .border{border-width:1px}#comfyui-copilot-plugin .border-0{border-width:0px}#comfyui-copilot-plugin .border-2{border-width:2px}#comfyui-copilot-plugin .border-4{border-width:4px}#comfyui-copilot-plugin .border-b{border-bottom-width:1px}#comfyui-copilot-plugin .border-b-2{border-bottom-width:2px}#comfyui-copilot-plugin .border-l-4{border-left-width:4px}#comfyui-copilot-plugin .border-t{border-top-width:1px}#comfyui-copilot-plugin .border-solid{border-style:solid}#comfyui-copilot-plugin .border-dashed{border-style:dashed}#comfyui-copilot-plugin .border-none{border-style:none}#comfyui-copilot-plugin .border-\[\#979797\]{--tw-border-opacity: 1;border-color:rgb(151 151 151 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-blue-100{--tw-border-opacity: 1;border-color:rgb(219 234 254 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-blue-300{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-gray-900{--tw-border-opacity: 1;border-color:rgb(17 24 39 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-green-500{--tw-border-opacity: 1;border-color:rgb(34 197 94 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-pink-500{--tw-border-opacity: 1;border-color:rgb(236 72 153 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-transparent{border-color:transparent}#comfyui-copilot-plugin .border-yellow-200{--tw-border-opacity: 1;border-color:rgb(254 240 138 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .border-t-gray-800{--tw-border-opacity: 1;border-top-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}#comfyui-copilot-plugin .bg-\[\#E5E7ED\]{--tw-bg-opacity: 1;background-color:rgb(229 231 237 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-black\/40{background-color:#0006}#comfyui-copilot-plugin .bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-green-50{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-pink-200{--tw-bg-opacity: 1;background-color:rgb(251 207 232 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-transparent{background-color:transparent}#comfyui-copilot-plugin .bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}#comfyui-copilot-plugin .bg-opacity-30{--tw-bg-opacity: .3}#comfyui-copilot-plugin .bg-opacity-50{--tw-bg-opacity: .5}#comfyui-copilot-plugin .bg-opacity-75{--tw-bg-opacity: .75}#comfyui-copilot-plugin .bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}#comfyui-copilot-plugin .from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}#comfyui-copilot-plugin .to-amber-100{--tw-gradient-to: #fef3c7 var(--tw-gradient-to-position)}#comfyui-copilot-plugin .fill-current{fill:currentColor}#comfyui-copilot-plugin .object-cover{-o-object-fit:cover;object-fit:cover}#comfyui-copilot-plugin .p-0\.5{padding:.125rem}#comfyui-copilot-plugin .p-1{padding:.25rem}#comfyui-copilot-plugin .p-1\.5{padding:.375rem}#comfyui-copilot-plugin .p-2{padding:.5rem}#comfyui-copilot-plugin .p-3{padding:.75rem}#comfyui-copilot-plugin .p-4{padding:1rem}#comfyui-copilot-plugin .p-6{padding:1.5rem}#comfyui-copilot-plugin .p-8{padding:2rem}#comfyui-copilot-plugin .px-1{padding-left:.25rem;padding-right:.25rem}#comfyui-copilot-plugin .px-1\.5{padding-left:.375rem;padding-right:.375rem}#comfyui-copilot-plugin .px-2{padding-left:.5rem;padding-right:.5rem}#comfyui-copilot-plugin .px-3{padding-left:.75rem;padding-right:.75rem}#comfyui-copilot-plugin .px-4{padding-left:1rem;padding-right:1rem}#comfyui-copilot-plugin .px-5{padding-left:1.25rem;padding-right:1.25rem}#comfyui-copilot-plugin .py-0\.5{padding-top:.125rem;padding-bottom:.125rem}#comfyui-copilot-plugin .py-1{padding-top:.25rem;padding-bottom:.25rem}#comfyui-copilot-plugin .py-1\.5{padding-top:.375rem;padding-bottom:.375rem}#comfyui-copilot-plugin .py-2{padding-top:.5rem;padding-bottom:.5rem}#comfyui-copilot-plugin .py-2\.5{padding-top:.625rem;padding-bottom:.625rem}#comfyui-copilot-plugin .py-3{padding-top:.75rem;padding-bottom:.75rem}#comfyui-copilot-plugin .py-4{padding-top:1rem;padding-bottom:1rem}#comfyui-copilot-plugin .pb-10{padding-bottom:2.5rem}#comfyui-copilot-plugin .pb-2{padding-bottom:.5rem}#comfyui-copilot-plugin .pb-3{padding-bottom:.75rem}#comfyui-copilot-plugin .pr-12{padding-right:3rem}#comfyui-copilot-plugin .pr-4{padding-right:1rem}#comfyui-copilot-plugin .pr-6{padding-right:1.5rem}#comfyui-copilot-plugin .pt-1{padding-top:.25rem}#comfyui-copilot-plugin .pt-2{padding-top:.5rem}#comfyui-copilot-plugin .pt-6{padding-top:1.5rem}#comfyui-copilot-plugin .text-left{text-align:left}#comfyui-copilot-plugin .text-center{text-align:center}#comfyui-copilot-plugin .\!text-\[11px\]{font-size:11px!important}#comfyui-copilot-plugin .text-\[10px\]{font-size:10px}#comfyui-copilot-plugin .text-\[11px\]{font-size:11px}#comfyui-copilot-plugin .text-\[12px\]{font-size:12px}#comfyui-copilot-plugin .text-\[14px\]{font-size:14px}#comfyui-copilot-plugin .text-\[16px\]{font-size:16px}#comfyui-copilot-plugin .text-base{font-size:1rem;line-height:1.5rem}#comfyui-copilot-plugin .text-lg{font-size:1.125rem;line-height:1.75rem}#comfyui-copilot-plugin .text-sm{font-size:.875rem;line-height:1.25rem}#comfyui-copilot-plugin .text-xl{font-size:1.25rem;line-height:1.75rem}#comfyui-copilot-plugin .text-xs{font-size:.75rem;line-height:1rem}#comfyui-copilot-plugin .font-bold{font-weight:700}#comfyui-copilot-plugin .font-medium{font-weight:500}#comfyui-copilot-plugin .font-semibold{font-weight:600}#comfyui-copilot-plugin .leading-relaxed{line-height:1.625}#comfyui-copilot-plugin .leading-snug{line-height:1.375}#comfyui-copilot-plugin .text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-green-900{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}#comfyui-copilot-plugin .underline{text-decoration-line:underline}#comfyui-copilot-plugin .placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}#comfyui-copilot-plugin .placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}#comfyui-copilot-plugin .opacity-0{opacity:0}#comfyui-copilot-plugin .opacity-25{opacity:.25}#comfyui-copilot-plugin .opacity-40{opacity:.4}#comfyui-copilot-plugin .opacity-50{opacity:.5}#comfyui-copilot-plugin .opacity-75{opacity:.75}#comfyui-copilot-plugin .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#comfyui-copilot-plugin .shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#comfyui-copilot-plugin .shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#comfyui-copilot-plugin .shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#comfyui-copilot-plugin .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#comfyui-copilot-plugin .outline-none{outline:2px solid transparent;outline-offset:2px}#comfyui-copilot-plugin .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#comfyui-copilot-plugin .ring-pink-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 168 212 / var(--tw-ring-opacity, 1))}#comfyui-copilot-plugin .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#comfyui-copilot-plugin .backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#comfyui-copilot-plugin .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#comfyui-copilot-plugin .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#comfyui-copilot-plugin .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#comfyui-copilot-plugin .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#comfyui-copilot-plugin .duration-200{transition-duration:.2s}#comfyui-copilot-plugin .ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}#comfyui-copilot-plugin h1,#comfyui-copilot-plugin h2,#comfyui-copilot-plugin h3,#comfyui-copilot-plugin h4,#comfyui-copilot-plugin h5,#comfyui-copilot-plugin h6,#comfyui-copilot-plugin p,#comfyui-copilot-plugin ul,#comfyui-copilot-plugin ol,#comfyui-copilot-plugin button,#comfyui-copilot-plugin input,#comfyui-copilot-plugin textarea,#comfyui-copilot-plugin select{margin:0;padding:0;font-size:100%;font-weight:400}#comfyui-copilot-plugin *{box-sizing:border-box;border-width:0;border-style:solid}#comfyui-copilot-plugin img,#comfyui-copilot-plugin svg,#comfyui-copilot-plugin video,#comfyui-copilot-plugin canvas,#comfyui-copilot-plugin audio,#comfyui-copilot-plugin iframe,#comfyui-copilot-plugin embed,#comfyui-copilot-plugin object{display:block;vertical-align:middle}#comfyui-copilot-plugin button{background-color:transparent;background-image:none}.hover\:border-b-2:hover{border-bottom-width:2px}.hover\:border-blue-300:hover{--tw-border-opacity: 1;border-color:rgb(147 197 253 / var(--tw-border-opacity, 1))}.hover\:border-blue-500:hover{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.hover\:bg-amber-200\/50:hover{background-color:#fde68a80}.hover\:bg-blue-100:hover{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-200:hover{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-50:hover{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-green-200:hover{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.hover\:bg-pink-300:hover{--tw-bg-opacity: 1;background-color:rgb(249 168 212 / var(--tw-bg-opacity, 1))}.hover\:bg-purple-200:hover{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.hover\:font-bold:hover{font-weight:700}.hover\:text-amber-700:hover{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.hover\:text-amber-800:hover{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-blue-700:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-red-700:hover{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-sm:hover{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-blue-500\/20:focus{--tw-ring-color: rgb(59 130 246 / .2)}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-100{opacity:1}.prose-headings\:font-semibold :is(:where(h1,h2,h3,h4,h5,h6,th):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:600}.prose-h1\:text-base :is(:where(h1):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:1rem;line-height:1.5rem}.prose-h2\:text-sm :is(:where(h2):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.875rem;line-height:1.25rem}.prose-h3\:text-xs :is(:where(h3):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-h4\:text-xs :is(:where(h4):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-p\:text-xs :is(:where(p):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-a\:font-medium :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){font-weight:500}.prose-a\:text-amber-700 :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.prose-a\:underline :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))){text-decoration-line:underline}.hover\:prose-a\:text-amber-800 :is(:where(a):not(:where([class~=not-prose],[class~=not-prose] *))):hover{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.prose-code\:text-xs :is(:where(code):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-pre\:text-xs :is(:where(pre):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ol\:text-xs :is(:where(ol):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-ul\:text-xs :is(:where(ul):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}.prose-li\:text-xs :is(:where(li):not(:where([class~=not-prose],[class~=not-prose] *))){font-size:.75rem;line-height:1rem}@media (prefers-color-scheme: dark){.dark\:border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-\[\#FFFFFF\]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900\/20{background-color:#14532d33}.dark\:bg-red-900\/20{background-color:#7f1d1d33}.dark\:text-\[\#000000\]{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.dark\:text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.dark\:placeholder-gray-400::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.dark\:hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-blue-300:hover{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:focus\:border-blue-400:focus{--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.dark\:focus\:ring-blue-400\/20:focus{--tw-ring-color: rgb(96 165 250 / .2)}}.\[\&\>\*\]\:\!my-1>*{margin-top:.25rem!important;margin-bottom:.25rem!important} diff --git a/dist/copilot_web/assets/logo-BTZhX0BN.png b/dist/copilot_web/assets/logo-BTZhX0BN.png deleted file mode 100644 index 3237ccfa0e36bc926d0eb560d1c8006ce3e157fe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 46281 zcmeFZby(C(`#(;HfYJg|0uqwTvUG=Z2m;d5-Q6HaNVgy*2nYzMbfePU-5m-nox9&% zJ)Yxvj^{bg^SOTi{I2WqLVfSdJu~;b?$^BLp4qpCt0+n1+#tJwfPjD_D`xO;9%{Hf^=}PmzKsd|%b4~i zrZxt4hPL0lbT+i*GyoV_SeiN+8rT>*nVYgXxX}D{!fIlQoQm+43igI3rcTt1&Zg$J zrgkpWhIXDV7M6DAoJ@b?-+$8bo2Oj=-cxBOdsjOX*hrGHO3DUm?v{4q)Qo&UUPW=H zU-EdO8Nwbduo4)p3~b?aftBdc0KZKg zR&4$wh6b=e+W%z1^~2&DV&5780N={~O2t3L1CSXbMn9H;u{#S@cl|9zIpmx zBw*7sv~jS2tAGv-_uu#~XK!iuO%OCKT`a`DnZw%sLOtMy-=%}v9cD`X-S)dHzZNXm zxHJ;>wq~B{vIZO+T$~&RYz}tjFh6Kq9c*BW7GD1y-M>N#U)0~+f}8)s8+iQ>A%j_1 zIvW^U7}}Ye!aLQW;Q;cOavJfPa2SG&ILwSpc}+|VO^o1 zniv6jxVeo19DICcrba*$J}zD(ZVp2lJzrm(W-4(61pIBdGP~P5S)19|yTh~@Cb}*L zb}%9tSi;8w0AQnkE3>h*v;L_JZt_jBVM6}R5N7vxTJ2!}&5|3$!N$kI0p#QZ@$&I< z0eM-dK|BC9ARiC};^OAz0qMc|aJKY<%cKq`fP;malZzW(W@ck(4)4Jmj-$O3ObuZl zK(J>x;bD(3%RhD#9dDW+Qu_^jXE?$?Jd;%vla_)Pz-I$%3GjvYZ|~~z+g79l{|H-k z4zPu5`E7pQG)k~RsNr2wo7p>2tI?~%+WmPug1hBzX<}~b;%wk%Xyf`F7(H0=Z{Tpk z41T!quN%y7;J^@J19EV20Js4FASW*X)&#`E!3N^s<>BSy;O6}Az~P1s_z&QGldqrs z5>u1^2^r4+D>8qY-#;P)m#!bk{3rVs%=|aNI03wDTpS#{+(2$F9xiSUJ}wq&ATKu? zCy)cg%>m@#UU2UZ80D~H*tUq(0>;PX;o!)C0NcP zZSXB|`AbCpuKxGf@cieo`L8hhn;`ws$6xcTpF#x}ydO*DU$f!gLID79@v*@`=Y{P9 z01!+xV90XASPu&VA2&A--+wK#a1s7B`hU>=pH&w4f7OydP4n02{R9wP^nL*JQ)&e( z{d;&|;_(e0m@sg|wj91cDaQ9b=Uy=C(R>j}+_{WTXeEyxK01mhk zIosH~7+Bhwn0mlB!v9!Pe!}M;afMIwhZm}*u!Pd(+X?Iks6Zeu8#jz|oO}R|-$(~r z@qa=U_)TVi2r*oEIsYD2SX%H;l>1p<@Bg%Ef&TAs+PT`;{0co-mhGfr*z z*u}}!6y~9Yy_2Pvy`768JmEGov~f1|g#r27e$V$4Vt=e|SON~0@_$I4e}fgasj=|^ z_<%f|AP_GIcIx`a-3`bF;O64y;pF|X^Z}flaEAPHcZ2KxFIDvq0{(HL_-QtO-OXUr z=l(YHA6b|AuZ|o)b@A`y7uFfipE~=VKmXMFUo$w~zYqEEra#F0d%+)Th=rODj?urY zB6uKwOy|eC`_ajd&%gHp%hcdI*k8K&o?HGW8~lGo5g0tbNH+iFfCxJi{v?dwRQ!kk zzdjKCSj>OjK)67EUdw-0NSJ(r`1tsEzLONbvj0uW4qq1kK)Qd7H{YM=@%{Yw6Fq*8 z4vb8I?~3@#bnSOG{6OaSg5N_6{7X>(bA|l{&c6=bPl19<-w$v8srbzvK90D!&)}4lM64GpzrU)_yyo z{ut>`$LilW&B@6LJ4V3{oB%!mFCP~OHfvS@F9?1X;Ns(hfeAkfd<*n%M^7LCMq?o0 z8_|C$p77(`FL8tS@_*$T0PqX4{Wn7NcRScG&#!*~^=nf8&Bey|<@r5$zXwwXmZHO! zHY`o24?xa z0+x`#EAG?4dxBZPI)i=w?gGtEI~2ScW((`^do}zh@yp!@ZU|d@u%GXS@BsfY30TM9 z`~J=2pQ_*`-`#{i!TbMxhHzfOf5XbZ_Y3zIHqf^#IfuVoo&31O)^+9PH002A1#z31 zQnOOSX9Hh@M!#Lf!Zb~XljE;C0OK|r2P~Q8<^^&5$QJ-`!QkQJ;(}|%x8pACAixF$ zaq|KI@I%>ev^Tc5v4>x%(9iyO4^&5Ih(>WDcBtkfQ=gjgdNFY zi6aLP$Om6{92~Hf$-%+L0Xwm9bA!I$(Yu-&{7yHxUedsBR-G;F?O?rdu)+QNe*FTw zpYkxUHFWsln6s&=iNS9-GvCU5$HhhB5D?N4WF^HOc_4mmM9((W)H;D?y7kO%rONIJ z-A$q_%09}$7)E&{dM+#_CM=0cB#@1ilfB8{kL5!>d^Zu{E@2>wxQq;S{}A{e0{=tc ze+c{!f&YIZ5NMGai20%gs<3!Ha9(Y7Je>F5#p7Y5OFdxJO1ggLxl+Y(Rsqr1qURc* zu#eePSMRg#^tK&6;p84rXg~YnVKZBIPyc9W;RIR`LSlVXuQ zpBcm2l`vv5L}<-z?Py-1`e!Z8!e1N59E)#71tph;4ehG9=-{8$idE39k9~2GY^GB8 zXKT~H9}|*jj47joh9FLZ?pwnZ=6BCoR6A(&(e$aS@1R{r;w(>}Vw*N8sxst^{Svz1 z+xzvj>2zhRiy;fQ_*92TJ|$X8vt6qUYd`se_}ip=$V`GANlMyA1Aqs2JU?k{dC8xr zr;7TmNc+#}Gng!Z*?s#J`m994n9G{Do37^~mNgB)_!~O-M-!P!Eh4KzLg*QgOUcEO zn9G;jV$zwoq3m-a8rV^7v0P1gPn$~8o)i;D$$=ya>w}FnPTxpTzMp`SwIbKHlr>l+ zh)`_khlm>FsF~zvApr;ZY|%(ClaP9i9?MwJ7u8PAW`(`%*n7_4djf($F}k5XXkY`40#=Oek>y`Jzo?50w z4)W$g1bP$`Watah=hZEu zev5DUHLnx6dvmBl1a#XrI3uRWaVovo!2e!ce!eu&?`1sIt5+r|B37rP{puGh*%UV( zMIxo+`9hG1XtVLqkh;jL(?h>(Pd*$Qp*H$x*8?2xHd<$1%mare69bIR<} zY;r9i$g}2g&`3kQ9YBoXBE45 zRcJzjnx*D0sl&=kf~7}_oG?=Exa8hMA#xntk=VK8(FhEDCfOp=|19y2QqML0e%ZiP z$F`w#1|@n$$^-iy-6J~OvGf~`t=iL~&AtzjzZOn)Q4}Z@mD#Zava3?&D|%R^B&9hK z?vD+kbM5pXe=;ybbSSbW!TEsw?)EU_A_BO>Uz>pBj+3nWr^L&}u*Jh$w6CL^TJs>` zwY$2#M;8FVa5QsuX;g>r5y-m_I%Ds*bFf{3PM(#+C%_l+fH~&q9x-`D2uHZi_@|}k z@{NHC6Y;6hT~)IfZ&(khS31jD^`tW<4(YebPO?fRRr@0r@R_)g+}mHY+-%+KTu`D= z3vaktyr5Muq8_0nUw-4laSSxkhD_yQL}5wL;!QAljdGPcd+oVM_=Ortv*Ds)JNx8d zQ>lSL>iZj3boY8((2njlVU$&|lrl}aic-A4TFaZp7?cuRbG`YdtC){}CZ{mf z2nAQ)fD2SGxI@BIA@VFUImosI?NB_w=ZiE@oEPeYd(eROIN0gmk+t-Kr-*^sKNs=rxI&*B9;H!a1Jvgx-U~ z5py&d!{iw3S=>13Py1z4E#347YoZJHpc~2?*SD!I=zFVP+8y%lDb)cmo&&^#doSKN z4QA(4ozwyHm_jD>{3X&I*D+`E%yb?Ja|X_dwTQIOiOrqPzCvO1>f;-``<{hZ(W>c` zF6V7lrSMhF%>76;!4LdQadBd?8;UqeyHW^`f+tLc#0Q#lB)^1X@`>iB;^&)r`SPHN zf(wWdQ0g5u&r~H6&*ZVwv=C;IKT}7A@M|p7vRvc3ND+cZgv#aQcLG24;I2iKulsC+8_?lHy%0ESGc)+Q`F!N-^&*e)cxFvcRbNL{?uF{bjGOLmH{WT? zdhdHAE2r+!&2-|xsyY|5jrHZHdp)_##B|B{ykh@CJ7D7%7TUF+>hGn=2!^$VyXRQRLB7rFZ<6Eu{>3R zNtAVai`IElE#;lkgqp4CdM@C2oS&<5*0p0D{ecJ%f;iPMf3Tv-%E(JqgKNKp3fIrKS@s$*tH90!uWYGidF z*qHmw<7i@Xu5OoDJ*=6Z>PunU{`_MH3F`GYzjhfyvALWvdDB_m;quggpIk<_E#RUP z#f=CNdgexCxnLfO=P{A6peh7e4Q=0^iX$Q03$5$SZ7ULZJ5Ug4JUW8Taw8W9V0N#D zIOyO}OM#$@=)^OZxCm9X&nlw0>rmY3&cY-S~9q#o9N7GJv$0a9n{KJ=d-#&CZhhHxa%7}UGgUtCm< zy+SXEoZ2D{>E0ndilo!Nvykd`ulb$?_2CU#^ZMegTX8A01AoGo zq6)r4$`8**L>XxeW0kLSTh^ojVPF!R}6 zA3^3y{{!Z7$&D!*6~;|$%CqIv9h|-Ha+f}Ky(Oc%aO)NOdZ8wHmKnZvLo}A?8H#zK zcqqNey0deEQ-w|y;_pY`69RQ3YBF`_ovZBgoc-jj-x&u{%ka(l+gR$xTJ zLxfJc;aM!KHxZo8virZ|H$BQGnG>YQRl|QU_7v~(3YhXG^zI22+k3i*^_P zPFkPNC0q^;MKh zkd}6vgNw`G*XPZ1oXe(Q5jMUz6|0? zW27v-9@H>eufM5dpe%u}$+toH5L?_YV)fN<#)%FDfrM%>LN4S>hls0^AQV;E7XMPh z{h$!@3ojBR?kjI{v?T*>&Dn&A4h5GGIjz<1p4H+b9xMZ*%p$>ux&3Wg_pK6yh~7~& zwo0=i%Au1zQ z?fnkwmT3{A0&5HxHU`~^)iLiZ!)g34ET@N%Gul%Aw%QJaLFpyDV;i|-dEq8^%1^$CNoZTFf03c_L*%qSLmA7Mq6`JN<~rMv2Xk4^@eI z49f-Dxo8&;v#q{@h+bPEs>q8zzx&K;Jl1uGe zlBW}ANB13ISQ@aUGsQ|4r)4rtfJ;vEHV7ktTT(2w zWzKTo^<;1?`{C>7-e@%YCpr}Lv~&Fw5;veCUmC&jAJg7N(O%-`1MtI<4NL$N+lj>f zPV(k#mMc?Z%JDIM&Zk5c9v+Y8knu*m#KxAd6I16Eo-p9;$5=B2x>lUVw1CR4bStgO zgAMv1UPIPQ5AKoo?kESoLCu7yu~yO`KHR82(W=?j)JyA(*f*DZRAYqDTg(R@&3yS( z;QB7(1rL-;0@Z12qa*KV#r&1tWvV@Dr*&SqNPp+^2mnDQr`VLTVWPNxtf;rd1~Wc(0v#n&a+J&>kb(luck4}xFV3&$avEl2y_lXVx4N!c zy=Q7B%1mHc3a@0c@J$>DNfosr$$hu9_CUxL`G}PE6&O)Mo7huhPESJq$oSL@Ngz-Z zQaytS=9eR=QAU9*Y5D8V9d(x%Uyt{-53Xy;dP!I2)V|1LZ^)f4A^!L(c|sNEgOmtD z*-$Q)DCh~wJ2utBd99hUh-uZMHE>@qsihr1!4Z}ukDwW*tJZ| z$%b);@&Y!34A@|=Km}9p6}*%4+Pa)bY)cH8X17%8>#3<~i`$hHVNa}i9YhXHnpFVr zL{xN#-||Dd$Wn9y3v-RcTyrb8rFwk@SL>fwpUoT2Fo^isfds$}ls!%|3m!6QaSY>6Ei>)q2C3 z_3TdP_B&EdahutVTvl|?sIxS0=LTEr-RakX%v(oqO=qmHJs1J}iKW%4c+?W% zW6U~Mb4%AqLVaJ}dJgaktA9`f?S0|<3tg% zn6Nj8Sr7NHH+M#JVv(;bnANXSaPVY@3S0x++-^*<_#S@fXDV`4j6RgIN^Wkm$JA|VSY3PSnf|%Z!`L9!ax|v^RF&}&C4-nc2+z*ud;Bc?iN3!je?pwZ; zh~v|_QgfN}B;&7{_3gK0r+3ZTQXfrN-ivagvmUl4kgdJ+Kb(_nV8xYf(AiO?@P6=C z#`3ZYyDu@(oA#n%yoQ$cy;WcPTfak!l8YKYANfiraD03sbbZ&2Gw@Qp1+B&R)jEej zdW(0~ampC*mI!NIwO#mpr2hM&k3OALs5v+9IpF&-VOLt*P?rp*Nm%BSm-4;)hVU~6 zjk%P$LtK#D%8_j9%e%uP+!6@ylLro*vX(`32vyI*#SuwkrPa9o4j;^h7^^-H%of^8 zaHfCl<5*>zu;9{<5mq&;c}+00Y~wR=+VaM-N^sZ{0tz1#3QykX<2!LGAo6+~)UC~l zn>>@@ zkXkA^xW{P_)b!y_(C71#XcJ*JnxVE{6UNo96D87kZvwj9F&^Q)sx`}6{;bTeg0VMC ziK%Av&K`yyvktcmISNDFPMO4Zus}gh_Pe7LcQCwG?j%{k2dFo@gzp>->~f0OiJd=e2O=;`6e}s*Z@0F zwZAAJKX{Cx;M35(7CzL%tD)euXZJDt@QKWyB~7ZlxxKXZ#%Al8coyRU+H(~3dz>d* z8a)^v56Ge~OsLP9-5LEHi?3IeG<#6L9%%cP-Z9oRDLSC6u~wrVj!|0?irMk-)EGxy zh7zoUi@*>hQrSWG4%9E>e`` zyROD1r-+PaJ~lbfXkx=r8HMH#vDC|%T}(65ULg9|Bk!5{`8H4lAIP$<7RpXC3LfF0y~lgYuJ1)VSN}sxUv( zby{nl2KnNb&8oesT#2+tDWZGTsvMW4AC9Vgao@6Jq)-p=xEs`(%TknE(Z#L^oejDd zLZZ`=U4Ife%wQIz&%n*T*Irk!ztf9^Gv^iZwlYcC z^7y-!_hGvz<#0%SDFZMMNcB+3r686$+BX?O{y)^Mz&*&=?3v)^6U$TnxMlFunmX7W(o z1DC4V^;zOaDYn`xSUxZK&h4yx-Sg0)$f+$mrGICPF^Mn?w8ld=d47IMsIKOZ$5LS0_t*E|!CRFB-@SQ*B=B$U!K7t1~>;%HSc zmm*{+Fi$gVQFuYabJpIjK#z zMJ{f&rhGD)h!m-txzbJ-A%r^-n!KUDkXoz6l{^ zosccluH(9B&f8711g%`1SQ}97o!yCOUi6reML9e71P0EDFMcq9h`MgJhs71DIu|(f z2@jD^GB8=*@F>JCpJS3?%4Xuy8Z3x^-{Ki8vzM2xE}4d~XD{GD~F+2B!$Dpt`(FKg@c7 z5@#aRI4iJ1osNy3sh+Y{-ztA_pj7efiLOK3C6itqRiO$<@DzD)Q~4P3Bu6skc`b3m z)SGIQOy`a@@JU$~#qCzm^D~I8PF1glvG$<3Mj7}X)y4K@)({!gmXsoLV6o8I2W9K+ z9$M6TFc>q{i1Pj82jQh2eW6*WI{jok!>k6uBZs%4IkRE*jx7nLOhjAKDv3AyWp7)W zc3T+rdbG0VPG~~(!*oJhlMGrP_)K%E`0DC9takg5r}r@goh1R=q-BwpGj;Tfg?Pe; zm@G9KMZCJJwM-Xx7WOZ}B!jcq|~zJhFLcfBG>OHYh0 zta`3`Fcgw`V9EVlwR@FC!u2k@sn~R44B-b1+UR>vFc&1Bii};kvi5j=t$j-UP^EZA zw<9b_7Z_GrkhR{xOWQz4Cy_v6S5VfV8L}cgU8797_^P!{e>-bQ-jz?H8z<`^0dX~i zr-@Uz$${B>SI4R(-59CDsC1UGtvOHIQ!^JL@u}HWi(S}zga|xd=FizgFfrCd_(j;x zeXc4`o9@+~vXWGmA2jkIY5wcMMCEyP%n$oZP9qn?v+<93o+_XSDhsRC6{P0wM3qI> z-ITMbi%;1$K4*>+s&Pi-uG6q%F;;BXTrcz!x+mkty!4FqP=ASRB!OfyZO5~eeVM+` zCMwHGd)VM=BF>B-LruC>jKc6M?T7;Z9q(AKgUkM77B4Sp(K0IkGjx9|u<|lwdJ4q` z;fu|uXlOI;*=)puI)zX@Y^NP4$f!4#NzSUrX*sJzq>I%OphbUu@D|tk-t@PI2 zp!~94eTt=5C>pW&A!4ydugrZ8vR|)N=F1nNe3FG6$0VJ~@RY^12fE{%$ln_HOr1!N zbr#2n?XOrTt1=JDaFNoNQML0F&rG6QXD?{d*Okq|zCT>-t#(NDMrxzP-czSxi`Act zN|EBFJN-K~xE?b-rr3f?F7}yUYahqvg-UKDhd-t}r+Vj7(uxf(Sp51%rI)jjO-o+( z&9WM*liH``b>nBR7E3Z7I(A>^GI2bsB-~8B860r79hQpOBIr5GI8l#XZARxOD_I-! z+-+AeFlO+6p;R?dc09)upTwQnR~Qm(1aH$AKug5PWae6Ak0G2wUu2O$!p{~xU7E4O z-)++PhdpcpDBXRT=I>1FTDcKYg&Rr}c9)ctVysg@4m#^Vv{L+F`I<+c(EfZNrd{!U z{>`||y^)EDCWu~Rzq@*`-F(g|TZPdB=4(fH8apf+d!61S^kbI3zV1v0b{)4J2O@Nm z{kN6oFBa2n_UCy!MRpJ4wqY0SxZrV(o31P{+(40GKqb1Dmt!ePemP4*IKc`~pRumR z6VKw_$YtTdBJU}uY!5Rt(@{qDslXa1Q zDwVzlY9S#ld8MSVCG~Lcy#BOx2fA2Y`vrDkg^73vp&q5&ei+vSk{a`Tob{!ViAK+* z910VQGe`O;4(7vCpXBnh2}3&>M1Ll7!mKkf5u&HVsYv`Fu>vjN7*TKFa(f(Pztxqm zswTYZi-bmahLMuENkD}&9z}SK)i5$n`?kEGS;dVdvl6FjJ1cpcNq$NK;0S;RNZ^d0 zq2)`$)p_5Jw$YA7iwnO;y2EH~S?c|3A;QnYvAbVvT+G&w;$*t!Eq7-|#XSRjK2?}` z(B(bbxECjPAHvz@^h8orxQxy934O@hC=QaZ?bCS~XRVdD+h>{`Pj2Ets~cAKiqW&Y zR2A%JUwEqSDn2Edq5h1FOrKKHhQVmbV#%;Hy-t-)UJ$k&Yc3`al;B-YJ?gqr6;AA6 z_eQB~Rl}|zzsDY!nY0x4YD}Y?@AOOIvz%fuCK2#~OU9ZDkL@IR^_-ix&E&hg5OE};WM!!cRX`DA&qrwTx@##wgr0fs1 zM>Uc&S};8uc{*5ov#?N2#ayi^{mncrHFo^YM8~W&&P_?in0N|M#_1+=@@4vZ&j71c z$LkBji9VZX>)pD0rFCB~Y7WNltb`m_x7CHSzAqF>rFmPYA99yGz9mz}(-e>O4s$4R z$6a~NHcWI%;tnd8$K=(}yN>&v@gy&|JN92&eNp4Ypku>M>p4ZW80A66cV>FrHiS)X zlTXaK8ApsTkML$s7bngW5~k??ka?Var?tcG+^^xdm@3?Q`6j+|bG44Wj#|lPk)?JJ z#3Dc6498nr%cIyaHR+Z41n2_!iFk=X8+p}%^vV7+8Dsar49P=6qLJIYW2A-$h8VG- z!5gx*Aq7{-LAx2D7kw6S=~a^H+FUfgD^Wb{x0@X7eD>nySK4>%!|s$eGwo{EbLVrZ z#A)0JuEt(vanGx5F5bl+U!aP+`_5--n0IwCX!%WUbR=**sS zUD&=pS@gQuYGQuWedZM7>a%illh-<8LHjkf<86r8O?8=?v z-6uq!5ppdyo`O;rsY?xHGOzW8&*PIym%RAd7h!JT^Vm@lYSl8v^P~%;VeEj zy8kk_q{doGK-lZE6gb*GlNQ|km9hXVE!1_p=_+ZPf$}JJ(>|?J z8)TG!0wLr@!37i;Q0yjYi{OfATi`a39|m~aB6NbB?-S`kh8bgD1vuub)P;bCbQ#f5 z+NIcPSs*gH4EcAky6<0wYAvWV`SngEN@bZ3tRV5BYsKGq5CA5B6$IgI=`HLc@|`GdR%dOMVG} zGu$IF?M`2Xo@B6M(V)6m+Vb6xk48kfXGXp#EQPZ?p;PIV!&f83JxV0z_o@weyeRFc zs>8Okd^`8)#DLpT-IL(vyqkx~MenZfdCAY`gxN1RO8J~!IWOx}>l0azc{Zz8ekuWK ze%XiKVfOCOpxrJLd0o#!={bqK%n;-4klu8aJ*h0t`N6fAcrWg*C^NcvOhBwlJ0TsV zD@aB#k?Xjz7*+Io&)Mp7p{DK*)bDc}_~cN8VnV%oFP00sm33`;JZ&)I11)4KVWQS3 zDpb21SSJdT5AI4>2jZR*Bkv^+tBy$bV3~D#hkVJvYYoa*zm@ zNaL-EIjM2BE)^xEQnlh8?lw;Y0d~k*78KOv2tj>ssmmU1vDN2!?K*1_YBzUcm1jjC za{QnzRA{r;13b`7op~}^(0ZWGe0Vy2n`%B_vTR|sz+^}Ffu8MR@>b|uk51roJ>@>g z=f*FG{(Ig~TF3-@vqfluXDE_`i8l!LrRT}^7d?_&r+q0`uCBAKk0X_2u8!jgh=aw* zKVa6fZCX~DQ+iu+CWQfIZum=~9lRX3Ps=W3+Gr8PM)Os@XSG5tC5PO?f$*WsAO*mS z28<`bIoZM9nZ_^qz&##gKkMb%u(x9nb_mk+Q?#ZTKP{Uzg;JfwtQ4;S@C(?4xH3Jv zC6>XVloZ9A(In>S2#4e5#x22qm8vbzQ@*b1dgHKs$w|~^vYT7B^Reqo0{&U8#^IRO6?CjMnJdNw@kd zn3w6Z-k>rIxUfm5;Y@}ln-7PGEN2&H=KGH0kZ7p!RcDSCzk*(i2ow54Z|y}>>AIRK z^t?#hv7a~f91qV^*HonHAoo^ixB!(!ZwT*bS=}Qcz)yY6xy+%!>?%cwTqq-~fupBg zVK(?>!7vl5(wYSsGHA`Zio3i5j$BvHV0`%i6|Db?>ANx~xA@h(@$E%h0ww93KtV2# zW-#J=X%bbsQJ3x*T(G$k*PXr-t|`q56bGry!_c%OM&Cl*c7!Kf{x^i5i;I+4=^@j! zH%nrL8{uk%lF>g1MB7qiyAv%xzCZ|tR4TV=f|MauFCsyX120d2fdc#1P~O66W#eei3NmevoGvrirY%MD^I&l|D}cQY%@Rj zOPGl-gutLMbN_{O>(K>hdt+m)!YFMyCOg9T#xyrx0rvpib6v5ADR}#oBY0rB$EwLz z%6{8)<)INrU!6<$>ptE66yqui6zSV>Avk_?NEz0a(tmAqHNOMp^>b(=GI}~`7r!xA z?mEL8nbJO^JzRd7@0%3C zM1vtlS`iA!hP@@>XBNKb1LDwCJyUNv=*inM01yU=DVC8SKChN1A-$4YVQ?gG*xegbWZ6T@WO4nX zg04>_tsgS9Yr3oe$@Wh*4fq7uib|ig-kj2h$Tw>>9GlgP@rS4#WCRM&&PX}Dc>UUNr-2U*rywM z3@$72TVEtFwrISt7&Fhvy}UQgm7=55{qJWI(*#Jnp;%oG{I=EXYcn$ z3oA*K`a%4SHd#%?kz+0n`Dbh;7I$=da**-ogVvmlhGCe7hSsG?dmluhOuRkt>LcF69_>xawp zb#UWse1ffn(q%XtQ0Z6lK}-*)`;LA`@0FL;A=C2g!*H=qOA?FV3`FY&vdH>z`($W|z>!u@hI{Yn z{-EEOUr%xuhKJ5o??~3`WUMJf1p@U<9CuUSqBYCx4bPn!(Bj^ye&drY7G&a z$X3^6xYCD3(GgT_ACK$0D*FU1Hq3~Gu1k;=cM{I_M98x0uhGHVr;W^PvtAQVVc*o9 ztZyfe^Dx*w=kZxLSQZ3tdKIu@j_|8PfPd^ z)dEcj*-~jGmfVg)2Gyw9Gal52H7b+X!pbe=eDeC%W(C8*QJYGSkK zNk+PP{85x7{%pXq;j^{hiaPjeqmgk}x7t)JLS%qLsJzs5CT&Ms1e%i-Gtmr=;(T%} zFc#BPfauR!X>xR|;}fxdu5zY*@^M=*I=mUgZvg7=D_NkZH%0v4xlv zzjHl-H9ofU_Ge?39T|iK))RRzfE&IZ7IbZbhq9F}rkRT=WIhjlEI8YrmXi2RZb%nY zbUUOHQ(+4~Q~WGig4x?;pFGc66@2iR71h?&RiRIz-8t*Jf%nwfU~Cprm~rry&f45| zZrtJ+i`~<(VJBlRjL)z40tedR??b15ad7*KS{A*xq}lUYZ(4pTsfKk_m3>mTd)^jY9LnW0<)es1|#`pxZyD+ z?_bFeo?J1q^Kn)(+_3^v5pNmt>vZ9h+L36!sdNfNBl(cGntF1k#vIAjOoG|%+`z2} z@r=JluFDK0dN84OHD<)|n*Ja<`SaX6OJBh?%Ym>xpHt58jZ6lJ;G8aK%4?vxN!n(5 zEURftd8Og7$qtMjS&b_Dq=1kS>p(W+joyPrp%{PlSpPoA*lPdBT_S6VQgLZ1$s}9ETkiUuF2;(P*7odF08vjjm#Yq(C^xq7dPn~A@JVK zlgPiIdhz=3-a?p;`_ibeYBhu1hR<@un6mJu7@*NqVtly#0lRBEf;?Vmi8jJ;z=&fP z)>=?>CAo540s-HoB3~Dwl9@$pXfJN3&q(G+f0Cyx!?}~doV!sYv5j~u2|CN*7=KmW zqig0-00(v) ze|YesNI%PBVpJIKHg^aHE*3~}J#-@gSo-SzHqxd$I-rSexpCp#s$nnQUi<3fv2j%j zbeXwW+G=WsuW^Msh4{f4X^8SJ25Z7mXY%j`&BFTexiX2pj`f@Ld%!?II0~X)rUIyi%SOVm8E7HOtLQK-v7Msr>Arr|Ab#2q%f0|8b zo2{H${1}CAQ-N4CkA5}vS^%6{+(fy@2R*bpSpYMiZ{>T>oiMZe*|FdckTx#9!BIX4 zup?SBO}^I$aoH&cRA=neO0t*mnuH&`dOMPhfHExFr%|f^hB&B~^T42=KmRs0dXUw? z1MVWn}USVF@n8~VWzO3=%O zi4~-X+eqC6=gh#nIB2aRLR}de2%OPkS?9zeQD@K|9*C^Z_F+~+eVYMpLn`dOOBm)U z%k%a2Cs(voniPPl`)E4_AKvY4+1l2IG@!g11*=ifonQpMMi7e?Pb9jop|2Fx{ZJUN zZk875sA+Lh7o0hmBG}BIomPy_Jmcu>F5j@_O!eG;K>LbdSLn=Zc!es(`P$r~Fz$?Y zJq?;ddxF|XqQ4rNogn?_;-Qyb_mvFP1Y`H$(O3zRr%;9oO3{>vt3l=_KG~)|%jD?D zLDRxn_r%J;{K-V!u}ixsu08z|r21&sw`_VHUS-WATGE*$5mg@o*hlJ)Y6|D^5eX5e zEKbtOly2UvX z*o!=Gkr?0=GUKsjWl7>QA>Fypk;K_yA1hmdv{+h}-YtC+dsh`|Gqi-Z8sj#l9!u%^ zfOk!8#5R^YBmF&tm)G%batQ(WPV+f`$%eA9HxQ9vk^)8Ua%Z=ue6Mx_&tpGOy1ldY zZSt}d=TQ~^MSQtXs&pP%xP?5)L6Aja-13+rhH$8NU1k!c zk`E*o*Ob)ty$|Sg>^}G!bnr9mO%@=ELAKMYh2q_ByndpaAP^*8$+>$6x*6pNzQs1C z9&;9&&I5NEc9ni}+j~jKz-?BoC^sbefizmc^mX21JSGz_a{ECW2c@Kd^k{slLy&T&LKQF+#U5}d;ZR|qNDS>cLN!=pNU9d zkB?y4a7=o5i@O!W_Gdin8gmGfgw;xvO}7ut1_wfCOfSLOE%4GUc9I*bsr{rnqM1Nc z7Z-5O*(_gHggdmS`TiZDWhkXtN@Hq^(p?yT3!coK()e!1b+poi%N7($6?sTcGqdib zVO_jdp@zsbp*$5qK?0?~ZVS$RnC?qCs6GypFzgl;ZzKuzaJe;qo1@-`QP^imb2(%y z>XH)nEluk!{=>K1uL`pA3;ka{%aro5aF6>)e?^Gl^KM{xa+&w=Cf)@4%1vakOBdxk z0e%ppbZ~OJRupX~J;L(hPz6-s zLh7JrLi}e2Xc9qw-9{?o#0g9>!mhIjPDt3ju7ZhkZjbMrhZ;$ z!C3_GJo~D1-G>z%u{jc17IYvD>3+h9rr%|a{lQFEbn6q-gEXYh4CbKCsOZ)Vo&~bK zs}6T-o6fTnkto>zFqt)hLX3?#fb^I{>-`4(YF~_}W2Hyhy61E6ZnvbX3+WPJRElS@ zt+Z@mVt!UUKEUi4HJ^tOEQrMd_sMO}M9;7sGB zlJNSA7qjmGUSa+^dI+2!NKjjlL|1WA#d0IaIqf@d)uA}yQPpy@BJn9ncqU#$YS}?h zJ85?R9CfkxuAw2~W|9>TLYIa1ybWfn%vkZ@g76ptQ}f)5%wk;1-JcAR~z=M zkf2F0orQL{vYp1a#L0s)6mp@?$Gqcl(u?=#Um%WdmM60V#8e(hvpgN}n=h%&zf;gc z$RzgY@%C-NtEt+wot->!XUCb@@w0B%g&2W#J9;bo)2A)Q172^?tdw>tUAgvhcPck& z5Act!UVqG!v0f<-6DmQ}ouKqT`0No#=y!3sRrgSrqRz9kSSxBx#T};vJ!5F-?1*op z6{mXEiCxvI47M8xybP#EaN}NT6ohP$Uu;@gddnytjSNQwwx-qPS*1+TMM7>zv0Znz zh%VustYa7>=88fd8NcQuWA}{SH+RsRsNBRhGJ8X`(74iGV`xMh=UJbELg}#`4yZO& zYs!mDIdS2#DrbMc>v|+7jLCDyGvQ7_Dyj(v8@}5CFosW4Uw(1Q;>+EIZayqABC!2d zpMN>99Q-QAN1+7q<%WbAwSQ^=<`)elJH*M7v(u}WRJA^)*c+38w8Ue<^N1WbnG*e* zkq`-5RR#{6Gv*DxC$Yv=k0`8Cw-d|;4g5H;S9O+Ywz@w0Uk`=Z&pDXt&NO!!#V_uj zPpnXZgRPE@O2)FyF731}x`|6JI(nn>nX-0Ya*elAv~(G0#ZD!ZpsY%F8C(%HuM!w@ zbwX&aQonLygmw_Op>7zEK+m%_77l}_3*h@8?k`UvrlDc$rFP#W+AtPuOf&&ycxuU zvOVEg*s(}Ko0{UhG`tM&q{=V5U_qG%_s)o&kut7B7l|fMv_VV}BonZbFD~=yuZRAL zGMMcHmOc7S){T>4A_sW=z{bHi4JyCMhn(ke^sPjBrHWBt@6FI(ozbn!PfZww{*V8( z)z#z+GG5f4cI3RJE)Zql{tZ2BGYxJ)_!S)Ya?GKfh0ZX*W8> z^nc%Yd>90lkS%Qnj(2O+Bjv)wEcm}LdrE#d7U!a(O;T|N@FD^J@zBW^G2PE|c-qfp z3`jWNocc!v{Tw*sm&p|M-ud;aOMKD?B*QmTkc z%7(n^2)pQDsH#P3trJm17yJ%z@xuR{p(VvPR+fVqRgF4Qzc}wP1D?A?smffC{GoPw z9^?M!Yzdytc(k15B}R+jV=B5f;P&r0ry``hI+OW<;GIX*cY*NRsUiLJ*RaDuxkWI2 zKd{{v<5R%D&ujQk&vQS&K-k+w(jOm2(e}_!Uai-ziqUY+a?qr(xAfeOEG*`P#JkH3 zdqd5FPdYbya@gDahNnqO=CovFawu;O0xW%=R<0)b{^$w1KjinZE78$_k1#MGrf-h~s?%J^*CkL zjubv4puX;}r@t!6q>~3x1Ka4a4NP`SdGm zLh-U?s0n+!WD#pbLI-O7vu)1&P|44S%dKbU{^#i!XISv|>2G8;%O3=N4e*KThlD=- z@!{DEAcI3TWHKKAlK6@d-$Cr1cK+R-G|g^Ah&ksb`=qL`5Fo!y(kzjAmsb|qc zz#X1H${x^Y)517J&1CLM{yT1dJ22gT)w}mRv6455l`YM*RTvFpjx;o?IW^j7*bnh zW#7^%#USeqhly7fhOg8ptANCafUD?hiLq3kY>(CLDCUS8k})bT`tA?VJ}jkxb;o4$ zDKz#b2Odtp{%eWHxL2ahGqt9tpA=}~0lpZ&nD=WSmpL9P^3 zB?4h1ps=g|Q4_Cc+LZd57RD7ZEO9w+*np5FKq(=5=#06g#p-u6oQt=LfEji!p+Aj7 z2n|j&YRDVs2oX`kxV0Lh&*8Q16W6P4TGQXZ^!=fp3hJ|&?lV^B7frik7Uw^1l>>C9|(e| z`7)jlu&gLEl-fL1wWkG~fTBwXskU)^>62rF&IlRmvtnFDGj&;3`fM&k3uz2O(te2w zT9B6)B|?$&5xMQh3cR%CD|Pny<;o^}4_9aPzQPXBjfM{=udCA+Pr}8y1*s9w5mZP3b$(b_kHlLVb!R-CGH4>SZ*pfu7rG&-NzX3#<7Z-@V`t7|LT^ul|UtvHBnIq+W@; zYqb?A=b*gRf?_3aUKpPlSLg3rJ}9&rL6p3qEz1@RKmXVucqt;>fxjctRKJ$;A@1!- z50-53lIr8?$>y&Lbt_@k1^_!;wt?1!P_@&^_|wC+L>ugAYkGlmTb7lM zuEpf7l0jVxLri?8=JIVCU+K=N-6(s6V5d)(rq}P5szRdYD$SC83^;K*O(kF%b=(uHJvZR70GfMZ31!P-o z5u*)h;QktVqZj<}&ADQeCW+es`tn^3mcf3f@ZSmkS3;aK_L8mn)o1S)%^!NGg%y3_~D-HWV4*6lHc@S*@chz7C@@3c$zT!_~&*Ktj>>!$`5cr z8JXEz@w**m4|aOX!^l%sV@nfYztGzwg_NJohln2zMu)6 zt6A@x*(G``1w_*+)SPsrgE7^x^pey;WSbq3p`Wg%Ik99)C&^19X`jn`)hz!J!moD`X>+Mm78SQ#Y(#mEMT=J79$Vg8 zhGK5qMn+3}P|%@vr&mCLiuF89i>o%M^#NU`lOZEb>gHBNYlme;KsRuzC2b2^i#{SA^vM{!Q;Z_7S^^t+b>V?;_35vjQ}_Yhcq zZlc22$w#m#FXcGxi(PQwe@U$Lza%!DysZ1#_hjE!8^_u8si93(3qQV-h4yJ*bGFOzM9Qz9- ztBhg{&#gg%YC5rW1%~4XPP;G*(e)t(X9WQR!DYErK0Dzhf%RSs|Jz>uS2{85kI`mT zn+Su`9C2<+bX)jCe#fKKPw>TS5)Cpx6JorMIWWkKJmp;EPn{!-Ds$s0T-W+mHxk=Z zVEd3%R>;?i3y^Wzn|Ll}u%60Be{$8)6t(h|*v_)H;%zo^za~vKMiAjk#!+P46?oGw5%vXSlwqle!ysTku|#@nOp-?LT`hx|i8XymukTUE3e}=WpR{BeTbT zad0}?nC#@E<*~(n+O?c$P8+QKk4NyyY`v9Y8`NivCfd#ZttqBJ5bdMIA6)59 z3@(TNuB6XB7i1u0cR$Jar227i}d zqY2H3gt?|7;iFKoKZh#l%gAtdSu#+gAql9_)NK3mK_Y_aLAo+<+Xydl@iDMjv2-RN z;b-oFC1(D8ru1iAUk%@^*Oya1T=L~6iC^3yLZKvS$*qNw>D(wz6s1YBZLosH)VL^HyWh}%yo7yFblWr|3l<=|B|$(^2>ehqd+4X*O>63~myCld(3P?Cr~N_>!L%{4 zD(#in!IxaPAP?@gg4*|PEJad~dkJhrBw$Qd+!N|3KSMyHqb-l@B`A6zQu#=xz4X3# zsRLN@=x&UjXpS${W}%3pIyEb}zAi?SCUw6nV&@`C;7=40m3?OLdP+n~a0V_YPx6?X zun1p_B>^MEi>5po_Yx4~umgfn&9hy!q0=gTrG2MwrhSWMZRI!-tPxe9Y%syM;fuva z;K@rcr(3+bHzm5tnY6vT9$zI-cZ^8|au7|1jx1JbY6S0Y93T7^~CO2Ug9PJv_?=&F9#X+0-zT7wYoT`}%6_b-^q z611>jm|py@ehwr_=)JDMC)CA=8#qBH(j@<<0E3J8ztC6FIPE`rTypMNG!_;o0B7*i z@a80_TZfm05n>4)&Hb2SC4*(;-sD(SO6pi>d{`|hq4^5lPm4RHovyr(h<4$v|8g*o zb6KgYk&|F}NTVpt%e&4-0Wy#~)OW`) z$w|~{;{N42DwEYDtEXoB^SP(pIN^vG#s7k7JVR1YatYii@Z5@6GZg=<%)^YXgYo*S z#)$E;-4OpEaESWVqEfm<1f@Ro{+oaL3Xa43Ej%n)Pv6{+>9aZtexKgrW_3xvwhC;I z-1l_zZvkI#Gq)=jUKE^fe(paf<;i!B)do^lvTkTqo**apF`GQvs7srmjDSBYp$FM9 zKu6d*5FMTk%x@{4nh^3^nQPYR?Sd+<_L6v#Fz#*)x+>qdAhf>m_=JKjCdXIL3#LVl zh-JnNWxXq3X-L4?7AVvLEI?<5aPe?9ePgyYSF(HsUkTC z8uobUZ%3G5&O%yL$tqRiKP(d`&9e#7}&2&Hx~mNW;1d3vQ#nN*pfa{QNvq=$}eN;q7* zulRDt3_7TClnneEZ=KUezFE_?HrZzU_ddV{f0xC2>wMo39dhvOY?Yb+{GtZ?g*k1` zpMiu#;AvCT|LVG+<;@MC#Jv4DW(0NIoR9?ekVHDwHFCfQouVhD-O5%R?7hV9OWX#r z=$SSQrYwII-#e2D@ zALB@kN10FM-CFkJ0HoKt(}?naf!LV=55#r!F!# z>KyF)w}u1Jc40mk8M1$tz4$0-=ESsiEjCwu*wT`AD^&L4^I2n&X0~(4Fz>t*K01M4 z$=5rCLZ5F1wn3@lZ!emG!IJ+b=HM1${{)y8H%a7Nu$b!nmRy<5AY*%z_*&h4!_QjVK{H=t9ai9sALW4aI27TuZtT`wKBplap6!#z`! zuQO?yrqCR!wegAmkB{wH&=q2>D`gmb}9pX z1Lp+<;KRr820Z9LVUXn7!%C;Q|LPqdNFUH0U|w$SbpG^}l1S!^Mvi`=hBQy{-g&a* z;Fsv@%oEb2U0BSQzAtVF2~ z*#_=U(!Jzyt-}k~&3u6^0^60LVIgAV04v;_U*O9e?@vY3Av$)3@u*N6bio@4Lbgki zP<7@6*V$g(VoXmp0M~FfU?%Z#1Dxr3&LVs;-;0?6LXnw-1@eVM9q*JD9*>~?l0?5w z%D-4(qYoTfik8*>QC8!UWYc&lnmTI>X!`-#hfoIrBe+=aH->LA&zuk~x*(m+o`zO4 znSIJcdW%y@c!a-2x6P%3PkxG!31i@yq1k@5bX2GT5+li|!&+&l4<~p5)u?uy;qp#; z&PatK{FGt$vlfY&K|!1IeHHp#^&5Aqz$7#Ly2MZuLn`~Pb|_RIb8NR;gEen4N*`{62B^-{zdBbmStDh_yX3l*}(zVH0_6W zA2q4#_R7=!8%D1g!Ap?Vg*m)__D6-=xJxaFwTJ&h;@U34A@~DD-`J2LSd4@DxsKKqGh}890fR3khRyi zgu@)ofK~d*Re7!}6+fZC`dBgM9||VJI}-|WSNmj=th5r}teOb2tqm?Ly3c-?Q{suk zSFA2>P$sqhqN{+i)Ekp0AOw}8Dx=$%NN8w*veQ1$>t9cS0+eJLA2i1!8U-{3X5eDL%>x!#w{HQt#|Iz_?w*wf< z1#}?#a1SGl1gzdHZo;^YssK;5VLjO3+ym zU->d#dn8@RE#bxYzx0>k5suPE3vNH@FRx8Vkq9Lu{+V&3h~l)Q#{Gj{7A~}>eir3M z`f?5u0$7&|Q67XIjQtET{U>;r78O6;2dg5vf7?~mtN(QtcPjk~pMe7$eLaL6k z-PYkF^fFcKQBh~Lpm+mJm7->C^GOe z2XQ32n;QeRNki7gWB%jK{*dBA*3>WlS^DTow?M^S0z`Q^4nEl9poo?z`vDg>6_Bvi z3uo^$F9BZpu+r<;m;5YMoScmFd`h<8mI;gKA^|oc(A|R)BB01K0>wHc<-RnEmB!ET zZr|diUBuc}T=DHX0aKKt!_ zXwK~3s^vqy_rtLxQd2vfUUDc(rNQVmwh?Gf&lmMo;hudRap3uoBy{=yFxhh(h85vjbrIHXgGTi8 z0$J+v>}CP;D;ruEgFd>95@W=tma?;W`6uf?05^q0-Id*RuQc+bC^iylu}X|^yw~wI z%eDoK4R)G;9By|*G9jeun!__*FTdfQe9)}~&8F02p4AG>t^q zICGSYk}SNqKNvhn1woH8@cmPLM_Q%T7<;_?O4hs(s`LW+CX9PW?83qv`5gQ+h36kh zzBC~E;;?1&Bnu6PIoWVYJ)LoGcX-Ckh+tiM({ zyN1nBk)S4`Ofq0Zen6~^+U?%=_f0s(;4ok{Jau5Kks;Cr zjk)WkQ5lm|n0((i3|Gv@FVw@&k7QX&#vfTYxn5FUj`u&TxM75f5Ga0Tk{y=hEELP> zU~hGT8V6|19ChS3?SVjKM3W3zgyj?|7=Jsw0t&;%&8`~LN@xz&1Lh*3>(aZ^3kyKl zsph~OZSXs;ymd;~?p=`NutS)yFWVjx_ngT_VGZTm5Lj1SyUu23@s|VJuQb8p*GgE} zVKSU=^xB8ULPCW8?U2b~F@WA%qyPx_tkQ981hMs0-7k7AfJgfP$32^r5}7h%WK8SBQ)pwnO!9f7l;x))aO$2|j0 zRNNDR>5kc1G0dca2QBq4-KS9(3FDj4I?4UzeY#n+AQFT`O!xovyTPZwZme6Jq`f)T zj?fgN{|bWvUdrP1&ZR1{eAxJb*pbfyCEvEqe`V!!V&U###pUAC&kO@b&g~Ph)VJm( zf+*>D%N1O+-HeISq!PB4 zu&xg?bpCqAbD}8A<&)I_CG1!Fu)_8cDq9G2`Jw4#(n=;dZ^SvCUp=PL8ExhsY+CvY=d{KE)p=^!r=?Zi$o`1?FpphKn9&ziY?T7^{R(=yeIuF#V~L zHE)ylvO^kd{&-eUuaFk#vQ}rW&y-0`BHHLQE`mj^K#A~O*+BuHZO zqz2PxOQqI)@O<(EVBTo7#3fxHb-SJ|q=^cKaZ~a#Nb*TVswK3AW!w{P!{pn-y3rl{ znaLi@6iOF9s9P{DEeaV~5-=sIsY3-{{63ty<9VtF3BBU+amtvBxYgcEbIO&vvOS4=k2* z4xs$rOS`%|s`=K*RId5uJPy)&p{;PJTJW}Z64|`Kq;w(PJq9B5>WpZ)>xK5({y`l4 zJjW`{in~~_6Kk*P3a`HQ$}z_q9&IraAgUp^+!2{7woHQW(mv9s)EQGAg7!m)h2|e37L6es`QN)v&j1FhRilvw-mcU9&x< zr6oZ5PV`*)HtrT0pPei``DXqRP$e4#rY}^Cn8-G)gy;b^xCnB@c|?Fb0cTUEv%!RS zovx~(`#E)JQZO>By*#|ctHFw9*$MjrX?rmTMLX4&H(u;^o`q4(jV*8Fl)yZissOdUhHP45sFsgUDtuOIPr? zdmCh@utFXY_~pVI5jZNy5z%RoUayUv$Z_jP;4ZI-te#pp7GG8yo^;I=9v!FLRBtKJ zrWxHZ(8_0XuCzXqE6e-5LCKn^H402^L|ibnpPvYcGUtX=CAr6ITF_f>RTs41X{@H2 zi|I&SRz__nq=~T52JK&YJ~}OQ4KEE@j_)7Vj{V*4zfEuG)RgX`9M&Gvc`+FK#!kmf zu7ZTokpC7x08lQ3$dDLJ9Jhw`UXnB1cd=L(F7HJ(KEAo|rfa5*$CE^ckJi&U$TDD8 z<}IKN(uLigTxpW65wz5&rHC%v8r=&o7=^rg(}0n9zv;z>R|hjff0LsIlHOhU?UI@q z18neX7OE;dBr!t8o8}1VnQRQ%EAG=e%fVS`>mT=UvKfZ*jWG<*^X||)#_Cz*J~SLV zzD9xl28Wz^lE$TAF@`W0G!V4Ea4#K+6t?$JH&^_8Yv}vz*zD-T_I9MSXyyWcr$I9( z@xDQA*?>$%L;Hi}QO~vdJqUMR<8#2@9E4bHVR4oM6=;sS+F;5-C^JvcT+*lI78jVQ z)P^4h+(7hV|CJ}?8YunZSEs9Ync`L^O_gU5kziNraRBy=*VLe^U^4Di3C(@XNPR#3 z!D9^IaM1IU&w)F}BC_eT!8;xKigixZK8O&8n#DSD6wfc9cE*SejxMEmDUt*j=gw8N zv^p+lC?D!!8hEnuIApstsIb{9<<=EqW-7_&*$XY978KMw>va*-5Zh1pACS{bo=cOa z*O2lG;BuRkcRtxa)C6Z9PSwP+UFoWS(@E(8dLHqYn+Mk!e2tlW*1s7 zphf8h;-iiE`vOfRMXGx7Pd1eqYROS9ng-BsYcfs3Akrv~As?yo!Sp&`=bd}iULvyI zZP5qLG$;s$t@OH2RZm2FHDVZYou_^FgX8V!&YQ`h+}Sk0R8q3_FC|*3E%af^f(Pxv z-;BXNYZ+HVUJGSBfIY)cU^c%6aD{|+Qh&`aaPA7FUvbbU)7$EUi>!mklH#fJm$z`I z)B7{XrmZFn3$5hC>%DaeHJV%gB9@CC%l>?RYZiAT!z5gDA7G;+&9vdKVe1>NJS{MHbyukE!8)A|M+4?(nE-=_?@ph+?gCBz;8|}H;;Kp)%O`|U%3^Usl zLwdSWkKucsr_E?XAM0}lJmZ>lxWfWYd#$)))rPgB)?i(HG3xqUF(@7pZk8B(4iR?s^Z~TMjty!2^L;H1I?$6inh7XIIdj~#E z-}ic-gBHFKX(UH!N(<;yduHjkQl}Wn7LZcfwucHlgW2_+Ag#q7h3h zI~Z|b0;| z51XGHa3Kv&K`k7w_RNJly54+cJx`7l+{9Z*+!Imscg${r-kf^LwbT|}KZ&}t_s^%) zj|B*#jxZ#dfae*Wj5`q-_sP`<9}kFus4}~OP{LkfR~GcabS+E3uJWs1far)Q4gl`O zGhbn)!pbveGAq+yBdC`sY(g;WucdDB;=-==A`Uz+yNjs}Py;sTb0w{|hR`0qN{W66N23Y5zAAXCji*ssdFjqu)$k_LO*>W`lYfGw@@;))huRW<&-$^;r^`1k_959W zJuE~B)zpYuRS{(DF<*!;*RdSRkNCC(w(xTcM{`>PZj=flyi9WeZTs#@t8KMt!cvZJ zH?|EWc&;YDoaoUzNtgF*8!5imy;Lp7=WjsDhqh#=9-jQ1e`Z1E=qGrV$k}}R`f8+` z74C;06ip3FjKkXoGL`BW$fTn6xl;l-GCtI`aL@=~#RJjU>(r{(%aqLm*H0T9wQ7B%Bu!G+4BlM_5cq%_bJ{#7?% z0PF9PwlN)@>8pIZQwFuiA{()VpgLm;ywm(t zYakmj?c(%ksZ$uBZb}4P6UpxUlN3_DHYJf024SOhf)Lzr!|haCxVDctmW9#`NEs~^?0O?tFGNsa=?nbi)+=y&MX@jvd6}MYB zN>EE(<9E!|)F4581OoyOsp#Lep&GIy`Xu+YQUe@i+G6M^Ind-GhOHXomqMpLy56nr z$CtFQw}T}=-MfwkF5u~u&R-iXyb)h}wEpraB*-5TmCqdhBE5m@Z828;>p>GZ8+ zPPKm9b&kAZLis}}{lv1v*;FNcjn%s+mxFh-`+G|!{gUe&2Kgqt?3uu+%=wsj0`I@v zb5YRlt*xHJ5n}gmnfgoi*%Ztc*%G1W+V#dVHs@#;FmhOw)Q%W@i;n28>N;;t(RiAN zQ#Rc7>Pop`FO6Js>-Or%#@!3O0~Nd2{vTb{&7X0XW2&ee3+O;)T~4a67+BdDulMKE z%ekb)frkY>BW7?Vo(5B&`zrh!@*~oj26>)X^xWJT_PVe=tLky?X%4QnI>CIr=TZy4 ztoSUUU~1{GUdi0n>{UNrjVowKzGWf{dJmHNZZ{sCPrXbG=Xd!oKwiGqVhlwZa$f=P~JWLtka;()p2~4Ci zpgG|$z20R6^PPu7cdkpmBD*+!*JChwnjsoNS|?0S8A%Lz_s{Y1D}nxlwyEe}&G6EG z0rqGq$SB^wTBmBibuzrVggQw^J2GI>jr%HbFKmh~(KiaLK5$L{53*Pws9^Q&7VV0m8}donZo_1F*@5}N1%Eq# zHvQuXl`uCz{+Hy9YogT%TUfx9y>9x%>SvC1Ib3pvT@t*Ubu|xs$54aaL7D8t2`QR? zwG!S`QMzB>?0!>>Vj?Yh!l!|=p+!pJ7XJ~%Rmd9wuQ?_cy^w9^ZGYhX{E$TORu`xfNdj=YOQ88Yv$p%9yRb?KR$`OERP`%fadj zmnz`Y_@s4?_3NjJiQ;$@z!cfvS+m_33(WI01 zsu=w~uTMZ#^?`sNR$!uwW#ed89jd)EX$<^#6FQ(;7|j|IZ!VQ?CChfJ9sRgCxINUI zOfdU7^j2M@i&RtHzkNHKZXGEKsYFcEI=&evTKCs`cNAxg$LJyRwJM=k*p?)Wbo1v< z{u_Qq7;tsp+k%Nn#*Cg)b4Fji;3#Anr&RDpLexy)iypB9PFVnR{i@gy`BueCCSDPB zn5-ga#NNlT7W@5i9KXSWr&6GZH#YFsl)x`-lMXV6(b9nQ31@{5KOOK$L-I|$5;h2= zmd%>N{YUAkm*}=f7YJE4)?!z;uy-BFx z`#HVFNNo-ajvos5D*dX2A8=Lv?ki;Ks;qXEXG-WXB+A&7nIw9tOl4uOCCEY1W1G_> z8yNGT&<4We!1nq-S8{)eb*~!s-lOtw8kTc2uEhw zUy?PK+8Cyyz8jO>j@GdWE0QSV4R;hfx)!T{7z@t6)$Z}Sw5V2J(rOLPzQ&%HK@&Yl zKBx#P2l?W~TE8C7KDLCx41>2}mD6l5%MomX(s^xMXeMp*4qt|C2_V!ux;nK%D> z?vum)9;q+sB^BoqQAh$u2^qms@7iBsr~`@Rp*{4CvgXeF(0sZ3yp88?wCv8;l?J`x zx1-<2D3aXth8#wW7Ew;5JT$^&Ke--?T!83sC8}+B*J^XHBq4JJ2_x`R*FuEo!-cSJ zOqbWdu+qB(=ceRQTVr*Nbp+z-c(T{F&*bWO6{CiC=hQ-Gn7TbJ4j*ch5c;m0mp504 zr`tR#pY4vgU@N-HO!CqD(Z7jl+KHRF&5+}{e|NTAD)wW1?sq~02-Ex_+l>Yec5ZVW zr&-#R1e-fI66MGX%)Li$v$*G%(Xml3_zroKLM`k_|EG)Z2k@#AUHBvaByWaj+1G)L zxw(N%_PF0VTiM9~W0?J|RP>~(!O#V49BsP<2u1zTuCxj+dF@`@u3fc$@BVIwc0d*B ztS)fHoI+fCpx_D81&IHFk=^4lV62EZ)uaOoaQ^tGOY6;aicBO0mKG*Ul@U9KHRAPq z8yU8xOtT`t?b&}7;gj^;#HVNLj^I34mdKAV!%(t;KSRaNYlukUKRchNw=4q(>BJ`GV&(<^NTEhHl((+#`tfW+{~8oK1}EFa zyA)C-*aus^BM5{$yepMLELJ_QMBfnoTtYU7-i5h`{JW>J9`{P&G4KPt9w7-0Pt|VO zW>Ds*8kH1Fvd|Cmjio$-7)sxXqP>oajxTcs6A)t1R{3~xv%DqHvTD(mx|s>cFkZV1 zpU%>%y;YGrzbj%OVf6$dex1URX5q5hcmy(hulm?2{^ch>w&O@A{OA1NRh5xa$v2_n z{}>^jznXI^y+W&HCgj+*l!!Ea`knlX+kiOhm!=o>By*8 z_~6ocq}$}oo!`Yh1ecFSPuFvnS!tK)kZESP3)IW;dG}IdvoUd-ApB+8U0s6uu3F`? z0|Ls@yi&KGik>pV6IJIB=S`bJzI5r4Cr3b-#9J5a6LSo2K)+qJ&LUgnqnEx-mSkc< zWJU_a42YFzZ+_1V32!WaUvEJkQHaR0I8vg>7%~og<9_17LdnMny$(7MPLqT7_;%Ny zXKNcFaxdcE!>zT`Wpo42`q*f`V5|ipO2ZalOJWE2CRRx9C*%EgbtH@~PR4eZG>qvj zEjsi`mjY7ZPQ-SywN*zw#5M3OBcY29?%&Jl9uLHd$A$<{{IsKoKD?~p*Dy`o=zL-t zGM%~*lR49Goao#`fF7^zh4>V&qv%B~KnfN<7R#im?6_y%Gg8Hi#KsKB{`1lZ+lV?~ zLo9*vgA2!h?DsRV=+zWF9j}$VaWF=)%T69T3yhfJgzc|i^{Do?y~^!|oF6UW&;@>Q zo~d57^4HL%alE#lVNPMOZ0lp#qu{)8l;|n`(#mGG%L2{fQG|MP-=qvgpetlGhaWOr zR%u$$&Jp92C1V@mhyt45SN@Vk`!SJvRvi1Ac)IJ23VYx6R5!ZC%N{PZjyHUU-=~Ji z*eD)k%GS#udLm&TKkf9}dtnF=F)m3EbJc7)il-qNbER3;Tbj=E;EGFgVcDqeHfHpkUwg6%#%2g|VPxO}80~ zMq^Ejl0t*V>V2I)o$2F_=r>BY^;;ABpH%kkbZgfON%*S%f@FX!l2!>nv+3C}e3er% zjN;r>U;#k&26jmbv>aZ9F)7V!&Oz}(*^iVg?@?ykR|ZuvS>T5J{;FKI(}oEpNsc4a zsl|#>5d2c)I(PlzH!*A%!`?HD^!+oXDpIc8BLY8M9M`ICA3~pio3wQ8*WdPKiHAd0 z-5{4RH}2IyT`us@f}R<2(VMu40m_7>GGn@|)YDvd{CHjdswtCqC74_Z%C_hUF_6)X{w=zQpz+4pVgx&A+kjfUrrbT>I(1&z{!%uvNm&hFe^wi`JIngEk@ zQ8)R{3iDL=tLF+GH=_J}%0K@&M)bp9)UQEI0os@j+_V0eb~U_bnf7XO204P-g8Ij{ z2xzVyqCK}=QR68$=TQC#8o6*754@M_$A26I_BP$koHQnMD(Wej{!+EB!O@Y+|Bw^z z^kX*LPPULsur{K(mKU6~-60S1Z&DD9G50D|f4Yv@TnWP{AaK!*R>Y)?8R;I|d@eM@ zRLv+&j@*`XH|5#dIe!P1sRGg=FvrhoMHGu#&f=^A{z?EE+TH=j#QZj zX0!RIJ|`0t>g?!owW)m-QODJkk8V}FnE(6vr&}WtFz9A;fXuzU?OuWT!M$_;wRiS- zJye0KV3nN7brL^4<84J7V)Y#({RUcJQpmL=UaMz4s`T{dP^3w0`tJF$fY|v_7Z$ds zUjjDX?bk^>DU5ggP9sVz!eoIe42szTiStKREypZv{V zU6cfwEW;>zn3gO^N&@=%e3RGU>SFlbBKTwrwd!zd6nYn2YU&hny282rcEQ;Gww%nI zG}HTvohvV>iLy!&U0H@aq46An8)Jf4Fh8#V55;Mbqs2%l$UxU&HYFcErAnIjqR7p* zOR%cPY&PdfF)_%87Z)bw!jkG5mjW|p(~(U4L0o-Xqh(Z~^q2qFO55@%&VyPIpNoik zlgLT<8((Z>s0gFz(J%8Uh0Valx;u>s(kR3>-l^mPSh=|H;P@t_@$tChZW2jQxO?;E z1dh@{>nP0~ZS0C-MEP%O?x^vfg3rpcUl+1u(hm~DI>i0GJM3JeGguX-?wIddGOb(3 z$>dU4vyzG}W&q{)7TYSqqT?T+%R8W85w~xQK*(2dXh9m}T@l{Dd~3IC&;1-8haGd3 z()(w@sf_aueUQMzuIxV5IKeonE_F0VujOn0)8rU_d42ej3@^Et+R%B%S;C>kb(_eA zf#!kYf1Ct9d>0SM(zjAPvhSk!IddWDj|da4KFq=SL=985@wG{GH|qOhlP*po4`4AC zR3h3Y&Y92Q_$Phi%BL{?p{fku^#Y-tBLZDW4PEb?nteFN;VN0 zOjifpr!N6o^>ynHOVNCsm@f65qIMcSF_R2RNClTsJ!`UC`Bza_;9$|u#}PB3!5*jN zF4pk2*C(5L*;>XE+Ay1(e^d8yjg92*Rm)b4e)ChU)2H30RzvliAx!hPX6m}2LPn%w^rng z5n=k|8fwT(Sm7!g$J+Cz#X1d;(xXD|6s&tOmN1V=&Zn3(SCjqCb@^^nRo0L%s$=4! zWZDLZBKr4U-0KUop9AWX2W9>tE;;5iG@AsRkC(kipKzp#^%Gh;X>JhA)2mZY?5~T_nHtWw`i5_bmZl8WS^O zw`2DQP3L3X6D49XO1qq0%P_Tg?w8>On`PK8DV z16q~}!2`4~NRx~MoW`8wcTOaPQ2SRq?-ib0r->uzjZ9&w*CA)Hbv3?k8P7&zHicc5 z5WEMp^B~L=wHi>`0<^5Afh~h#d!&ob#lL zliZj5c?yJ#lAXUO!^9RI9R0SPr44=Y#F^gu<_yX-{ZD)6{mq8=|MA3D8lzQPf~wk4 zv$n3#She>kLD6`tRYmREtBtL8?NNJFjS{umQlh9CdlNwreDnD?zNh!xAMX$MJkIOf zbIiTQPq~(7ap!I3v~jIIgbHxlGt4lzUkEEO%7bg?64locT(-lDALXQR z10kV=6v+_>vkmk9%HX1=Iu*cV(>#vj)Kuw*4YpyRakYiOGc*;J3lyKz1 zzAZ(^Lg#M&h**y(`RV#rCx5y_`1GvR8PyrrXt%Nz<#M7r=i(uuU4@TOpl+_+N&)iW~i=bHDkd-^9)`%BV{-K7(xwK*XX|WggGyYmEzv--Eh*t0%EG`DAXI`dNb@zYbU7Yp)bxPErBZyjt2;nj>IuM%!jB%vz2+VwxGI<5 z=_b_8E%!2mo9jR8+~F@TJqO_}C34)1tZS!LVavIVZ;?g#^~AHF>V~^PPm6HRzyjeR zSnOND}JlYYx7}hQt5Q%^1yx`T1|WB2Bv_}<;U8m_^Sib z!TP0opwn;S>P67+y}%9*72G3s!J*rPLXK%Q)`ajZxodp8nYe)t$rgp>tZIgS#g#O- zaA|c7>O-n!X z_N5Tf1+kbD6?CTQOV41Agwppv+`(u+NjQCaThXqtkg9 z-jy8UL_hN)*u(QxzDz&nWXG4|T`dW7h2B=!l-IY(+ z_xXmP%?P(CgS@~F1GU*(kN0C$U1DCCmEN(T2VkNwqFO(4)a^|n4P>^Awgbauw5^YK z(xL>^zK*6yTE(Lg%`c;yJ5N3wT=^{AR7KVnHeKW%MPiZ@-#o>GRPGeRp4dMnVh$yG z9{+-?+)d;lU5x|visV)sN4MZTM5AOye&1OyLk|bv_3l^^?J;~)m%nOoH^q&YWC}8n zxZ29G_+5l3rLmK~HaLItbt4`{H0an+xUQ=8%R!sGjmmN5KB*rUB4E?PJ_}g3Uj@sV zv{bucE*fmAL*AMMtx6qyRVAJ(7-`3}%Y|6Mx>P%?zEAs3cT-pg5Na`=;G-n@!;y>U zW-|Fk8^ymFZ9P&#dJC#T9LQ;DehlHIT*-XiIs?@nF=beCmfu*(_RC}x6I zY$^O{G-SGLE@~-V_~UWHOiX4mScT(8M(49@o|j&;+y$b%K1>&6B@ z>iA@?90u^z%l|og!;w5G>giro+J&CW&!_Z_!5qTXGno&)d_UyX#_U*Vl3sLFCEnTv6)sb?0&ss^)Tkgb3CN8L1q??Y5NRqHEhK zR;hC(Fl)7NU>B!&WP{S-tCb~u${)0!u3|g|N#&vZUs5+^@^ziw1jxQc$wzDDl{kYX z)I$?AA8lZb%%@8eF)b-2e!GkhlF$$Kz(EB7GkqISU+Xr+`OBr;2)CX{{k69#)66#~ znoW)j)@a^cu3r7=mzbqEdx$FKExs&zoHwobUfoM68;P>&C8VnMmeFr6706mS9Cb+F z^ZI*}wT&z)mK{*_>}XRW(L&Z28_R0R4p!d7627Iz9|{R2Z=22A>jogaSI2T$;JQjO zO>qgmMO3spzlU{MgH`JM2i*YO5IR$1Hs}<0o`kvMJynzw;?(wdBYl@Lz%Dd7DJbTH zaRx;R&7fA?@E!4+s%_eBp9OPE(OZe=1aIGL{q-?O66@+=J>qzSV}L8QWO0K%@Xqtq zV%Md!UqQUcfUT{=CUkSBw(ZG{eTG*jYas@o!)V*L2_MQ!RJO zZ(;P`5SyOhw%U(#!__P^06m+-w5_;eg>i5|iWpW*<`?T`fBoiy0&L|}qLA4-^xHNt zm0w4&{IGl{<P6shH0+*kPoVVo%jNCSzH z4U&C~ipOdA0bS{9xW0ri`*ilZITxXbX{A>jmYE?Q8CxhKncEsGJBk!^6e@S4)q&RDV*U z*mVXI1op>`L@IIv76uL`r4kZ*Oc>Bu-miwvK4IYx#DH3?4ye}fh_uf|lEK15fOY=m zP0wQE=sRoEd(PB5qh-h2N!Lz$?x;z7CG6^b0qbGX0!BEx3ZPND9G$ zxiaLpc;lhtlw6(IM|iDR{RLr=9kk(18j`F@V3=!X(mh}H*>=D5@SY3mlZF)%E+d#K=d}hlrd_L~W})=4WLd;js+H)gU!^zCLU#<&d4Fv=^bS=U6IC3IyJoxL7`U|C6i(=! zJ{t4D#QUNnSZz4dEInYBp68D&O`kA1R$j)))2Fj2$9M9hX?1z(a%#!jiga;`sampv-kBjiWD>PFk8i6m(EfPSQ*`*f6* z@7&u^L>)h#q*>~bw*jVCwqn)wt#vJ zuebp+V-W<`24%nM9h84{R44Cngf;DGVEt-05b4O+fKeFv{Y_@-5H48r#H*fHdWt&U z1#&}(3xCK;DHKK=M|5quV>FcX>Qy9;*mK!>tvH>QHZ3N4PuyGh#XGQVE!Z=eTJ?%= zv*~rH(ethEjPlEfPBU(=Z=`4G;CmnTAt-JR$CCN9MdRhc^Xf)Q$MIo($?Jw+Sr? zYT^LcW=@KR5ZUgu{K24=jwZXP_V2j_PeLKXoJ4|(L#I4Gn5Fhj=b~wogS@fJN;f*T zO|mj=5^vi6&YOx2I!R>EZ%jVDkm6ugDO3*_Ghcb>@?3VJa-O+)u9kOqMxM#nIp}bQ zb1Bu^VySvys>LPA`-j!O!+D>WPS6o&xj=;p%zwbN;nwxi.map(i=>d[i]); -import{j as u}from"./vendor-markdown-Dek94WS0.js";import{a as v,R as p}from"./vendor-react-V04_Axys.js";import{w}from"./message-components-yQk9DI7R.js";const R="modulepreload",b=function(e){return"/"+e},m={},P=function(a,s,S){let d=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),t=r?.nonce||r?.getAttribute("nonce");d=Promise.allSettled(s.map(o=>{if(o=b(o),o in m)return;m[o]=!0;const c=o.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${h}`))return;const n=document.createElement("link");if(n.rel=c?"stylesheet":R,c||(n.as="script"),n.crossOrigin="",n.href=o,t&&n.setAttribute("nonce",t),document.head.appendChild(n),c)return new Promise((y,E)=>{n.addEventListener("load",y),n.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${o}`)))})}))}function l(r){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=r,window.dispatchEvent(t),!t.defaultPrevented)throw r}return d.then(r=>{for(const t of r||[])t.status==="rejected"&&l(t.reason);return a().catch(l)})};var i={},f=v;i.createRoot=f.createRoot,i.hydrateRoot=f.hydrateRoot;const _=p.lazy(()=>P(async()=>{const{default:e}=await import("./App-By_5x9Zk.js").then(a=>a.A);return{default:e}},__vite__mapDeps([0,1,2,3])).then(({default:e})=>({default:e})));function A(){return new Promise(e=>{if(document.body)return e(document.body);document.addEventListener("DOMContentLoaded",()=>{e(document.body)})})}A().then(()=>w()).then(()=>{const e=document.createElement("div");e.id="comfyui-copilot-plugin",document.body.append(e),i.createRoot(e).render(u.jsx(p.StrictMode,{children:u.jsx(_,{})}))});export{P as _}; diff --git a/dist/copilot_web/message-components-yQk9DI7R.js b/dist/copilot_web/message-components-yQk9DI7R.js deleted file mode 100644 index a130867..0000000 --- a/dist/copilot_web/message-components-yQk9DI7R.js +++ /dev/null @@ -1,153 +0,0 @@ -import{r as Ve,R as eI}from"./vendor-react-V04_Axys.js";import{j as O,M as tI,r as rI,a as iI,b as nI,c as aI}from"./vendor-markdown-Dek94WS0.js";let Mt=null;const mp=location.pathname.split("/").slice(0,-1).join("/");let oI=null;async function Mpe(){try{await Promise.all([import(mp+"/scripts/api.js").then(i=>{oI=i?.api}),import(mp+"/scripts/app.js").then(i=>{Mt=i?.app})])}catch(i){console.error("waitForApp error",i)}}const W$={messages:[],selectedNode:null,installedNodes:[],loading:!1,sessionId:null,showChat:!1,activeTab:"chat",screenState:null};function sI(i,r){switch(r.type){case"SET_MESSAGES":return{...i,messages:r.payload};case"ADD_MESSAGE":return{...i,messages:[...i.messages,r.payload]};case"UPDATE_MESSAGE":return{...i,messages:i.messages.map(e=>e.id===r.payload.id&&!e.finished?r.payload:e)};case"SET_SELECTED_NODE":return{...i,selectedNode:r.payload};case"SET_INSTALLED_NODES":return{...i,installedNodes:r.payload};case"SET_LOADING":return{...i,loading:r.payload};case"SET_SESSION_ID":return{...i,sessionId:r.payload};case"SET_SHOW_CHAT":return{...i,showChat:r.payload};case"SET_ACTIVE_TAB":return{...i,activeTab:r.payload};case"SET_SCREEN_STATE":return{...i,screenState:r.payload};case"CLEAR_MESSAGES":return{...i,messages:[]};default:return i}}const U$=Ve.createContext({state:W$,dispatch:()=>null});function Bpe({children:i}){const[r,e]=Ve.useReducer(sI,W$);return eI.useEffect(()=>{r.sessionId&&r.messages.length>0&&localStorage.setItem(`messages_${r.sessionId}`,JSON.stringify(r.messages))},[r.messages,r.sessionId]),O.jsx(U$.Provider,{value:{state:r,dispatch:e},children:i})}function uI(){const i=Ve.useContext(U$);if(!i)throw new Error("useChatContext must be used within a ChatProvider");return i}const Ff={apiBaseUrl:"https://comfyui-copilot-server.onrender.com"};function Sr(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){const r=Math.random()*16|0;return(i==="x"?r:r&3|8).toString(16)})}var lI="0123456789abcdefghijklmnopqrstuvwxyz";function Or(i){return lI.charAt(i)}function hI(i,r){return i&r}function ys(i,r){return i|r}function bp(i,r){return i^r}function $p(i,r){return i&~r}function cI(i){if(i==0)return-1;var r=0;return i&65535||(i>>=16,r+=16),i&255||(i>>=8,r+=8),i&15||(i>>=4,r+=4),i&3||(i>>=2,r+=2),i&1||++r,r}function dI(i){for(var r=0;i!=0;)i&=i-1,++r;return r}var Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",K$="=";function Iu(i){var r,e,t="";for(r=0;r+3<=i.length;r+=3)e=parseInt(i.substring(r,r+3),16),t+=Pn.charAt(e>>6)+Pn.charAt(e&63);for(r+1==i.length?(e=parseInt(i.substring(r,r+1),16),t+=Pn.charAt(e<<2)):r+2==i.length&&(e=parseInt(i.substring(r,r+2),16),t+=Pn.charAt(e>>2)+Pn.charAt((e&3)<<4));(t.length&3)>0;)t+=K$;return t}function wp(i){var r="",e,t=0,n=0;for(e=0;e>2),n=a&3,t=1):t==1?(r+=Or(n<<2|a>>4),n=a&15,t=2):t==2?(r+=Or(n),r+=Or(a>>2),n=a&3,t=3):(r+=Or(n<<2|a>>4),r+=Or(a&15),t=0))}return t==1&&(r+=Or(n<<2)),r}var pn,fI={decode:function(i){var r;if(pn===void 0){var e="0123456789ABCDEF",t=` \f -\r  \u2028\u2029`;for(pn={},r=0;r<16;++r)pn[e.charAt(r)]=r;for(e=e.toLowerCase(),r=10;r<16;++r)pn[e.charAt(r)]=r;for(r=0;r=2?(n[n.length]=a,a=0,o=0):a<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n}},Ei,wd={decode:function(i){var r;if(Ei===void 0){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=`= \f -\r  \u2028\u2029`;for(Ei=Object.create(null),r=0;r<64;++r)Ei[e.charAt(r)]=r;for(Ei["-"]=62,Ei._=63,r=0;r=4?(n[n.length]=a>>16,n[n.length]=a>>8&255,n[n.length]=a&255,a=0,o=0):a<<=6}}switch(o){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=a>>10;break;case 3:n[n.length]=a>>16,n[n.length]=a>>8&255;break}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(i){var r=wd.re.exec(i);if(r)if(r[1])i=r[1];else if(r[2])i=r[2];else throw new Error("RegExp out of sync");return wd.decode(i)}},gn=1e13,Ua=function(){function i(r){this.buf=[+r||0]}return i.prototype.mulAdd=function(r,e){var t=this.buf,n=t.length,a,o;for(a=0;a0&&(t[a]=e)},i.prototype.sub=function(r){var e=this.buf,t=e.length,n,a;for(n=0;n=0;--n)t+=(gn+e[n]).toString().substring(1);return t},i.prototype.valueOf=function(){for(var r=this.buf,e=0,t=r.length-1;t>=0;--t)e=e*gn+r[t];return e},i.prototype.simplify=function(){var r=this.buf;return r.length==1?r[0]:this},i}(),G$="…",vI=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,pI=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function Wn(i,r){return i.length>r&&(i=i.substring(0,r)+G$),i}var nh=function(){function i(r,e){this.hexDigits="0123456789ABCDEF",r instanceof i?(this.enc=r.enc,this.pos=r.pos):(this.enc=r,this.pos=e)}return i.prototype.get=function(r){if(r===void 0&&(r=this.pos++),r>=this.enc.length)throw new Error("Requesting byte offset ".concat(r," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(r):this.enc[r]},i.prototype.hexByte=function(r){return this.hexDigits.charAt(r>>4&15)+this.hexDigits.charAt(r&15)},i.prototype.hexDump=function(r,e,t){for(var n="",a=r;a176)return!1}return!0},i.prototype.parseStringISO=function(r,e){for(var t="",n=r;n191&&a<224?t+=String.fromCharCode((a&31)<<6|this.get(n++)&63):t+=String.fromCharCode((a&15)<<12|(this.get(n++)&63)<<6|this.get(n++)&63)}return t},i.prototype.parseStringBMP=function(r,e){for(var t="",n,a,o=r;o127,a=n?255:0,o,s="";t==a&&++r4){for(s=t,o<<=3;!((+s^a)&128);)s=+s<<1,--o;s="("+o+` bit) -`}n&&(t=t-256);for(var u=new Ua(t),l=r+1;l=h;--d)s+=l>>d&1?"1":"0";if(s.length>t)return o+Wn(s,t)}return o+s},i.prototype.parseOctetString=function(r,e,t){if(this.isASCII(r,e))return Wn(this.parseStringISO(r,e),t);var n=e-r,a="("+n+` byte) -`;t/=2,n>t&&(e=r+t);for(var o=r;ot&&(a+=G$),a},i.prototype.parseOID=function(r,e,t){for(var n="",a=new Ua,o=0,s=r;st)return Wn(n,t);a=new Ua,o=0}}return o>0&&(n+=".incomplete"),n},i}(),gI=function(){function i(r,e,t,n,a){if(!(n instanceof _p))throw new Error("Invalid tag value.");this.stream=r,this.header=e,this.length=t,this.tag=n,this.sub=a}return i.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},i.prototype.content=function(r){if(this.tag===void 0)return null;r===void 0&&(r=1/0);var e=this.posContent(),t=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+t,r);switch(this.tag.tagNumber){case 1:return this.stream.get(e)===0?"false":"true";case 2:return this.stream.parseInteger(e,e+t);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+t,r);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+t,r);case 6:return this.stream.parseOID(e,e+t,r);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return Wn(this.stream.parseStringUTF(e,e+t),r);case 18:case 19:case 20:case 21:case 22:case 26:return Wn(this.stream.parseStringISO(e,e+t),r);case 30:return Wn(this.stream.parseStringBMP(e,e+t),r);case 23:case 24:return this.stream.parseTime(e,e+t,this.tag.tagNumber==23)}return null},i.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},i.prototype.toPrettyString=function(r){r===void 0&&(r="");var e=r+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(e+=" (encapsulates)"),e+=` -`,this.sub!==null){r+=" ";for(var t=0,n=this.sub.length;t6)throw new Error("Length over 48 bits not supported at position "+(r.pos-1));if(t===0)return null;e=0;for(var n=0;n>6,this.tagConstructed=(e&32)!==0,this.tagNumber=e&31,this.tagNumber==31){var t=new Ua;do e=r.get(),t.mulAdd(128,e&127);while(e&128);this.tagNumber=t.simplify()}}return i.prototype.isUniversal=function(){return this.tagClass===0},i.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},i}(),ti,yI=0xdeadbeefcafe,Ep=(yI&16777215)==15715070,ct=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],mI=(1<<26)/ct[ct.length-1],Q=function(){function i(r,e,t){r!=null&&(typeof r=="number"?this.fromNumber(r,e,t):e==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,e))}return i.prototype.toString=function(r){if(this.s<0)return"-"+this.negate().toString(r);var e;if(r==16)e=4;else if(r==8)e=3;else if(r==2)e=1;else if(r==32)e=5;else if(r==4)e=2;else return this.toRadix(r);var t=(1<0)for(u>u)>0&&(a=!0,o=Or(n));s>=0;)u>(u+=this.DB-e)):(n=this[s]>>(u-=e)&t,u<=0&&(u+=this.DB,--s)),n>0&&(a=!0),a&&(o+=Or(n));return a?o:"0"},i.prototype.negate=function(){var r=re();return i.ZERO.subTo(this,r),r},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(r){var e=this.s-r.s;if(e!=0)return e;var t=this.t;if(e=t-r.t,e!=0)return this.s<0?-e:e;for(;--t>=0;)if((e=this[t]-r[t])!=0)return e;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+ms(this[this.t-1]^this.s&this.DM)},i.prototype.mod=function(r){var e=re();return this.abs().divRemTo(r,null,e),this.s<0&&e.compareTo(i.ZERO)>0&&r.subTo(e,e),e},i.prototype.modPowInt=function(r,e){var t;return r<256||e.isEven()?t=new Sp(e):t=new Op(e),this.exp(r,t)},i.prototype.clone=function(){var r=re();return this.copyTo(r),r},i.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},i.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},i.prototype.toByteArray=function(){var r=this.t,e=[];e[0]=this.s;var t=this.DB-r*this.DB%8,n,a=0;if(r-- >0)for(t>t)!=(this.s&this.DM)>>t&&(e[a++]=n|this.s<=0;)t<8?(n=(this[r]&(1<>(t+=this.DB-8)):(n=this[r]>>(t-=8)&255,t<=0&&(t+=this.DB,--r)),n&128&&(n|=-256),a==0&&(this.s&128)!=(n&128)&&++a,(a>0||n!=this.s)&&(e[a++]=n);return e},i.prototype.equals=function(r){return this.compareTo(r)==0},i.prototype.min=function(r){return this.compareTo(r)<0?this:r},i.prototype.max=function(r){return this.compareTo(r)>0?this:r},i.prototype.and=function(r){var e=re();return this.bitwiseTo(r,hI,e),e},i.prototype.or=function(r){var e=re();return this.bitwiseTo(r,ys,e),e},i.prototype.xor=function(r){var e=re();return this.bitwiseTo(r,bp,e),e},i.prototype.andNot=function(r){var e=re();return this.bitwiseTo(r,$p,e),e},i.prototype.not=function(){for(var r=re(),e=0;e=this.t?this.s!=0:(this[e]&1<1){var d=re();for(o.sqrTo(s[1],d);u<=h;)s[u]=re(),o.mulTo(d,s[u-2],s[u]),u+=2}var c=r.t-1,f,v=!0,p=re(),g;for(t=ms(r[c])-1;c>=0;){for(t>=l?f=r[c]>>t-l&h:(f=(r[c]&(1<0&&(f|=r[c-1]>>this.DB+t-l)),u=n;!(f&1);)f>>=1,--u;if((t-=u)<0&&(t+=this.DB,--c),v)s[f].copyTo(a),v=!1;else{for(;u>1;)o.sqrTo(a,p),o.sqrTo(p,a),u-=2;u>0?o.sqrTo(a,p):(g=a,a=p,p=g),o.mulTo(p,s[f],a)}for(;c>=0&&!(r[c]&1<=0?(t.subTo(n,t),e&&a.subTo(s,a),o.subTo(u,o)):(n.subTo(t,n),e&&s.subTo(a,s),u.subTo(o,u))}if(n.compareTo(i.ONE)!=0)return i.ZERO;if(u.compareTo(r)>=0)return u.subtract(r);if(u.signum()<0)u.addTo(r,u);else return u;return u.signum()<0?u.add(r):u},i.prototype.pow=function(r){return this.exp(r,new bI)},i.prototype.gcd=function(r){var e=this.s<0?this.negate():this.clone(),t=r.s<0?r.negate():r.clone();if(e.compareTo(t)<0){var n=e;e=t,t=n}var a=e.getLowestSetBit(),o=t.getLowestSetBit();if(o<0)return e;for(a0&&(e.rShiftTo(o,e),t.rShiftTo(o,t));e.signum()>0;)(a=e.getLowestSetBit())>0&&e.rShiftTo(a,e),(a=t.getLowestSetBit())>0&&t.rShiftTo(a,t),e.compareTo(t)>=0?(e.subTo(t,e),e.rShiftTo(1,e)):(t.subTo(e,t),t.rShiftTo(1,t));return o>0&&t.lShiftTo(o,t),t},i.prototype.isProbablePrime=function(r){var e,t=this.abs();if(t.t==1&&t[0]<=ct[ct.length-1]){for(e=0;e=0;--e)r[e]=this[e];r.t=this.t,r.s=this.s},i.prototype.fromInt=function(r){this.t=1,this.s=r<0?-1:0,r>0?this[0]=r:r<-1?this[0]=r+this.DV:this.t=0},i.prototype.fromString=function(r,e){var t;if(e==16)t=4;else if(e==8)t=3;else if(e==256)t=8;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else{this.fromRadix(r,e);return}this.t=0,this.s=0;for(var n=r.length,a=!1,o=0;--n>=0;){var s=t==8?+r[n]&255:Ip(r,n);if(s<0){r.charAt(n)=="-"&&(a=!0);continue}a=!1,o==0?this[this.t++]=s:o+t>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB)}t==8&&+r[0]&128&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==r;)--this.t},i.prototype.dlShiftTo=function(r,e){var t;for(t=this.t-1;t>=0;--t)e[t+r]=this[t];for(t=r-1;t>=0;--t)e[t]=0;e.t=this.t+r,e.s=this.s},i.prototype.drShiftTo=function(r,e){for(var t=r;t=0;--u)e[u+o+1]=this[u]>>n|s,s=(this[u]&a)<=0;--u)e[u]=0;e[o]=s,e.t=this.t+o+1,e.s=this.s,e.clamp()},i.prototype.rShiftTo=function(r,e){e.s=this.s;var t=Math.floor(r/this.DB);if(t>=this.t){e.t=0;return}var n=r%this.DB,a=this.DB-n,o=(1<>n;for(var s=t+1;s>n;n>0&&(e[this.t-t-1]|=(this.s&o)<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n-=r.s}e.s=n<0?-1:0,n<-1?e[t++]=this.DV+n:n>0&&(e[t++]=n),e.t=t,e.clamp()},i.prototype.multiplyTo=function(r,e){var t=this.abs(),n=r.abs(),a=t.t;for(e.t=a+n.t;--a>=0;)e[a]=0;for(a=0;a=0;)r[t]=0;for(t=0;t=e.DV&&(r[t+e.t]-=e.DV,r[t+e.t+1]=1)}r.t>0&&(r[r.t-1]+=e.am(t,e[t],r,2*t,0,1)),r.s=0,r.clamp()},i.prototype.divRemTo=function(r,e,t){var n=r.abs();if(!(n.t<=0)){var a=this.abs();if(a.t0?(n.lShiftTo(l,o),a.lShiftTo(l,t)):(n.copyTo(o),a.copyTo(t));var h=o.t,d=o[h-1];if(d!=0){var c=d*(1<1?o[h-2]>>this.F2:0),f=this.FV/c,v=(1<=0&&(t[t.t++]=1,t.subTo(m,t)),i.ONE.dlShiftTo(h,m),m.subTo(o,o);o.t=0;){var b=t[--g]==d?this.DM:Math.floor(t[g]*f+(t[g-1]+p)*v);if((t[g]+=o.am(0,b,t,y,0,h))0&&t.rShiftTo(l,t),s<0&&i.ZERO.subTo(t,t)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var r=this[0];if(!(r&1))return 0;var e=r&3;return e=e*(2-(r&15)*e)&15,e=e*(2-(r&255)*e)&255,e=e*(2-((r&65535)*e&65535))&65535,e=e*(2-r*e%this.DV)%this.DV,e>0?this.DV-e:-e},i.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},i.prototype.exp=function(r,e){if(r>4294967295||r<1)return i.ONE;var t=re(),n=re(),a=e.convert(this),o=ms(r)-1;for(a.copyTo(t);--o>=0;)if(e.sqrTo(t,n),(r&1<0)e.mulTo(n,a,t);else{var s=t;t=n,n=s}return e.revert(t)},i.prototype.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},i.prototype.toRadix=function(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var e=this.chunkSize(r),t=Math.pow(r,e),n=qr(t),a=re(),o=re(),s="";for(this.divRemTo(n,a,o);a.signum()>0;)s=(t+o.intValue()).toString(r).substr(1)+s,a.divRemTo(n,a,o);return o.intValue().toString(r)+s},i.prototype.fromRadix=function(r,e){this.fromInt(0),e==null&&(e=10);for(var t=this.chunkSize(e),n=Math.pow(e,t),a=!1,o=0,s=0,u=0;u=t&&(this.dMultiply(n),this.dAddOffset(s,0),o=0,s=0)}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),a&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(r,e,t){if(typeof e=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(i.ONE.shiftLeft(r-1),this);else{var n=[],a=r&7;n.length=(r>>3)+1,e.nextBytes(n),a>0?n[0]&=(1<>=this.DB;if(r.t>=this.DB;n+=this.s}else{for(n+=this.s;t>=this.DB;n+=r.s}e.s=n<0?-1:0,n>0?e[t++]=n:n<-1&&(e[t++]=this.DV+n),e.t=t,e.clamp()},i.prototype.dMultiply=function(r){this[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(r,e){if(r!=0){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=r;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},i.prototype.multiplyLowerTo=function(r,e,t){var n=Math.min(this.t+r.t,e);for(t.s=0,t.t=n;n>0;)t[--n]=0;for(var a=t.t-this.t;n=0;)t[n]=0;for(n=Math.max(e-this.t,0);n0)if(e==0)t=this[0]%r;else for(var n=this.t-1;n>=0;--n)t=(e*t+this[n])%r;return t},i.prototype.millerRabin=function(r){var e=this.subtract(i.ONE),t=e.getLowestSetBit();if(t<=0)return!1;var n=e.shiftRight(t);r=r+1>>1,r>ct.length&&(r=ct.length);for(var a=re(),o=0;o0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));var u=function(){(o=t.getLowestSetBit())>0&&t.rShiftTo(o,t),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n)),t.signum()>0?setTimeout(u,0):(s>0&&n.lShiftTo(s,n),setTimeout(function(){e(n)},0))};setTimeout(u,10)},i.prototype.fromNumberAsync=function(r,e,t,n){if(typeof e=="number")if(r<2)this.fromInt(1);else{this.fromNumber(r,t),this.testBit(r-1)||this.bitwiseTo(i.ONE.shiftLeft(r-1),ys,this),this.isEven()&&this.dAddOffset(1,0);var a=this,o=function(){a.dAddOffset(2,0),a.bitLength()>r&&a.subTo(i.ONE.shiftLeft(r-1),a),a.isProbablePrime(e)?setTimeout(function(){n()},0):setTimeout(o,0)};setTimeout(o,0)}else{var s=[],u=r&7;s.length=(r>>3)+1,e.nextBytes(s),u>0?s[0]&=(1<=0?r.mod(this.m):r},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){r.divRemTo(this.m,null,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),Op=function(){function i(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},i.prototype.revert=function(r){var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.reduce=function(r){for(;r.t<=this.mt2;)r[r.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&r.DM;for(t=e+this.m.t,r[t]+=this.m.am(0,n,r,e,0,this.m.t);r[t]>=r.DV;)r[t]-=r.DV,r[++t]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}(),$I=function(){function i(r){this.m=r,this.r2=re(),this.q3=re(),Q.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r)}return i.prototype.convert=function(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var e=re();return r.copyTo(e),this.reduce(e),e},i.prototype.revert=function(r){return r},i.prototype.reduce=function(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)},i.prototype.mulTo=function(r,e,t){r.multiplyTo(e,t),this.reduce(t)},i.prototype.sqrTo=function(r,e){r.squareTo(e),this.reduce(e)},i}();function re(){return new Q(null)}function _e(i,r){return new Q(i,r)}var Tp=typeof navigator<"u";Tp&&Ep&&navigator.appName=="Microsoft Internet Explorer"?(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&32767,u=e>>15;--o>=0;){var l=this[r]&32767,h=this[r++]>>15,d=u*l+h*s;l=s*l+((d&32767)<<15)+t[n]+(a&1073741823),a=(l>>>30)+(d>>>15)+u*h+(a>>>30),t[n++]=l&1073741823}return a},ti=30):Tp&&Ep&&navigator.appName!="Netscape"?(Q.prototype.am=function(r,e,t,n,a,o){for(;--o>=0;){var s=e*this[r++]+t[n]+a;a=Math.floor(s/67108864),t[n++]=s&67108863}return a},ti=26):(Q.prototype.am=function(r,e,t,n,a,o){for(var s=e&16383,u=e>>14;--o>=0;){var l=this[r]&16383,h=this[r++]>>14,d=u*l+h*s;l=s*l+((d&16383)<<14)+t[n]+a,a=(l>>28)+(d>>14)+u*h,t[n++]=l&268435455}return a},ti=28);Q.prototype.DB=ti;Q.prototype.DM=(1<>>16)!=0&&(i=e,r+=16),(e=i>>8)!=0&&(i=e,r+=8),(e=i>>4)!=0&&(i=e,r+=4),(e=i>>2)!=0&&(i=e,r+=2),(e=i>>1)!=0&&(i=e,r+=1),r}Q.ZERO=qr(0);Q.ONE=qr(1);var wI=function(){function i(){this.i=0,this.j=0,this.S=[]}return i.prototype.init=function(r){var e,t,n;for(e=0;e<256;++e)this.S[e]=e;for(t=0,e=0;e<256;++e)t=t+this.S[e]+r[e%r.length]&255,n=this.S[e],this.S[e]=this.S[t],this.S[t]=n;this.i=0,this.j=0},i.prototype.next=function(){var r;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,r=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=r,this.S[r+this.S[this.i]&255]},i}();function _I(){return new wI}var q$=256,bs,Jr=null,er;if(Jr==null){Jr=[],er=0;var $s=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var ah=new Uint32Array(256);for(window.crypto.getRandomValues(ah),$s=0;$s=256||er>=q$){window.removeEventListener?window.removeEventListener("mousemove",_s,!1):window.detachEvent&&window.detachEvent("onmousemove",_s);return}try{var r=i.x+i.y;Jr[er++]=r&255,ws+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",_s,!1):window.attachEvent&&window.attachEvent("onmousemove",_s))}function EI(){if(bs==null){for(bs=_I();er=0&&r>0;){var n=i.charCodeAt(t--);n<128?e[--r]=n:n>127&&n<2048?(e[--r]=n&63|128,e[--r]=n>>6|192):(e[--r]=n&63|128,e[--r]=n>>6&63|128,e[--r]=n>>12|224)}e[--r]=0;for(var a=new _d,o=[];r>2;){for(o[0]=0;o[0]==0;)a.nextBytes(o);e[--r]=o[0]}return e[--r]=2,e[--r]=0,new Q(e)}var TI=function(){function i(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return i.prototype.doPublic=function(r){return r.modPowInt(this.e,this.n)},i.prototype.doPrivate=function(r){if(this.p==null||this.q==null)return r.modPow(this.d,this.n);for(var e=r.mod(this.p).modPow(this.dmp1,this.p),t=r.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(t)<0;)e=e.add(this.p);return e.subtract(t).multiply(this.coeff).mod(this.p).multiply(this.q).add(t)},i.prototype.setPublic=function(r,e){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},i.prototype.encrypt=function(r){var e=this.n.bitLength()+7>>3,t=OI(r,e);if(t==null)return null;var n=this.doPublic(t);if(n==null)return null;for(var a=n.toString(16),o=a.length,s=0;s0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16),this.d=_e(t,16)):console.error("Invalid RSA private key")},i.prototype.setPrivateEx=function(r,e,t,n,a,o,s,u){r!=null&&e!=null&&r.length>0&&e.length>0?(this.n=_e(r,16),this.e=parseInt(e,16),this.d=_e(t,16),this.p=_e(n,16),this.q=_e(a,16),this.dmp1=_e(o,16),this.dmq1=_e(s,16),this.coeff=_e(u,16)):console.error("Invalid RSA private key")},i.prototype.generate=function(r,e){var t=new _d,n=r>>1;this.e=parseInt(e,16);for(var a=new Q(e,16);;){for(;this.p=new Q(r-n,1,t),!(this.p.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Q(n,1,t),!(this.q.subtract(Q.ONE).gcd(a).compareTo(Q.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var s=this.p.subtract(Q.ONE),u=this.q.subtract(Q.ONE),l=s.multiply(u);if(l.gcd(a).compareTo(Q.ONE)==0){this.n=this.p.multiply(this.q),this.d=a.modInverse(l),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}},i.prototype.decrypt=function(r){var e=_e(r,16),t=this.doPrivate(e);return t==null?null:II(t,this.n.bitLength()+7>>3)},i.prototype.generateAsync=function(r,e,t){var n=new _d,a=r>>1;this.e=parseInt(e,16);var o=new Q(e,16),s=this,u=function(){var l=function(){if(s.p.compareTo(s.q)<=0){var c=s.p;s.p=s.q,s.q=c}var f=s.p.subtract(Q.ONE),v=s.q.subtract(Q.ONE),p=f.multiply(v);p.gcd(o).compareTo(Q.ONE)==0?(s.n=s.p.multiply(s.q),s.d=o.modInverse(p),s.dmp1=s.d.mod(f),s.dmq1=s.d.mod(v),s.coeff=s.q.modInverse(s.p),setTimeout(function(){t()},0)):setTimeout(u,0)},h=function(){s.q=re(),s.q.fromNumberAsync(a,1,n,function(){s.q.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(l,0):setTimeout(h,0)})})},d=function(){s.p=re(),s.p.fromNumberAsync(r-a,1,n,function(){s.p.subtract(Q.ONE).gcda(o,function(c){c.compareTo(Q.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(h,0):setTimeout(d,0)})})};setTimeout(d,0)};setTimeout(u,0)},i.prototype.sign=function(r,e,t){var n=kI(t),a=n+e(r).toString(),o=SI(a,this.n.bitLength()/4);if(o==null)return null;var s=this.doPrivate(o);if(s==null)return null;var u=s.toString(16);return u.length&1?"0"+u:u},i.prototype.verify=function(r,e,t){var n=_e(e,16),a=this.doPublic(n);if(a==null)return null;var o=a.toString(16).replace(/^1f+00/,""),s=PI(o);return s==t(r).toString()},i}();function II(i,r){for(var e=i.toByteArray(),t=0;t=e.length)return null;for(var n="";++t191&&a<224?(n+=String.fromCharCode((a&31)<<6|e[t+1]&63),++t):(n+=String.fromCharCode((a&15)<<12|(e[t+1]&63)<<6|e[t+2]&63),t+=2)}return n}var uu={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function kI(i){return uu[i]||""}function PI(i){for(var r in uu)if(uu.hasOwnProperty(r)){var e=uu[r],t=e.length;if(i.substr(0,t)==e)return i.substr(t)}return i}/*! -Copyright (c) 2011, Yahoo! Inc. All rights reserved. -Code licensed under the BSD License: -http://developer.yahoo.com/yui/license.html -version: 2.9.0 -*/var De={};De.lang={extend:function(i,r,e){if(!r||!i)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var t=function(){};if(t.prototype=r.prototype,i.prototype=new t,i.prototype.constructor=i,i.superclass=r.prototype,r.prototype.constructor==Object.prototype.constructor&&(r.prototype.constructor=r),e){var n;for(n in e)i.prototype[n]=e[n];var a=function(){},o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(a=function(s,u){for(n=0;nMIT License - */var T={};(typeof T.asn1>"u"||!T.asn1)&&(T.asn1={});T.asn1.ASN1Util=new function(){this.integerToByteHex=function(i){var r=i.toString(16);return r.length%2==1&&(r="0"+r),r},this.bigIntToMinTwosComplementsHex=function(i){var r=i.toString(16);if(r.substr(0,1)!="-")r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{var e=r.substr(1),t=e.length;t%2==1?t+=1:r.match(/^[0-7]/)||(t+=2);for(var n="",a=0;a"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+i.length+",v="+this.hV;var r=this.hV.length/2,e=r.toString(16);if(e.length%2==1&&(e="0"+e),r<128)return e;var t=e.length/2;if(t>15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);var n=128+t;return n.toString(16)+e},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};T.asn1.DERAbstractString=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(this.s)},this.setStringHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i=="string"?this.setString(i):typeof i.str<"u"?this.setString(i.str):typeof i.hex<"u"&&this.setStringHex(i.hex))};De.lang.extend(T.asn1.DERAbstractString,T.asn1.ASN1Object);T.asn1.DERAbstractTime=function(i){T.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(r){utc=r.getTime()+r.getTimezoneOffset()*6e4;var e=new Date(utc);return e},this.formatDate=function(r,e,t){var n=this.zeroPadding,a=this.localDateToUTC(r),o=String(a.getFullYear());e=="utc"&&(o=o.substr(2,2));var s=n(String(a.getMonth()+1),2),u=n(String(a.getDate()),2),l=n(String(a.getHours()),2),h=n(String(a.getMinutes()),2),d=n(String(a.getSeconds()),2),c=o+s+u+l+h+d;if(t===!0){var f=a.getMilliseconds();if(f!=0){var v=n(String(f),3);v=v.replace(/[0]+$/,""),c=c+"."+v}}return c+"Z"},this.zeroPadding=function(r,e){return r.length>=e?r:new Array(e-r.length+1).join("0")+r},this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(r)},this.setByDateValue=function(r,e,t,n,a,o){var s=new Date(Date.UTC(r,e-1,t,n,a,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};De.lang.extend(T.asn1.DERAbstractTime,T.asn1.ASN1Object);T.asn1.DERAbstractStructured=function(i){T.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array=r},this.appendASN1Object=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array.push(r)},this.asn1Array=new Array,typeof i<"u"&&typeof i.array<"u"&&(this.asn1Array=i.array)};De.lang.extend(T.asn1.DERAbstractStructured,T.asn1.ASN1Object);T.asn1.DERBoolean=function(){T.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};De.lang.extend(T.asn1.DERBoolean,T.asn1.ASN1Object);T.asn1.DERInteger=function(i){T.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(r){this.hTLV=null,this.isModified=!0,this.hV=T.asn1.ASN1Util.bigIntToMinTwosComplementsHex(r)},this.setByInteger=function(r){var e=new Q(String(r),10);this.setByBigInteger(e)},this.setValueHex=function(r){this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof i<"u"&&(typeof i.bigint<"u"?this.setByBigInteger(i.bigint):typeof i.int<"u"?this.setByInteger(i.int):typeof i=="number"?this.setByInteger(i):typeof i.hex<"u"&&this.setValueHex(i.hex))};De.lang.extend(T.asn1.DERInteger,T.asn1.ASN1Object);T.asn1.DERBitString=function(i){if(i!==void 0&&typeof i.obj<"u"){var r=T.asn1.ASN1Util.newObject(i.obj);i.hex="00"+r.getEncodedHex()}T.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{12}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date))};De.lang.extend(T.asn1.DERUTCTime,T.asn1.DERAbstractTime);T.asn1.DERGeneralizedTime=function(i){T.asn1.DERGeneralizedTime.superclass.constructor.call(this,i),this.hT="18",this.withMillis=!1,this.setByDate=function(r){this.hTLV=null,this.isModified=!0,this.date=r,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},i!==void 0&&(i.str!==void 0?this.setString(i.str):typeof i=="string"&&i.match(/^[0-9]{14}Z$/)?this.setString(i):i.hex!==void 0?this.setStringHex(i.hex):i.date!==void 0&&this.setByDate(i.date),i.millis===!0&&(this.withMillis=!0))};De.lang.extend(T.asn1.DERGeneralizedTime,T.asn1.DERAbstractTime);T.asn1.DERSequence=function(i){T.asn1.DERSequence.superclass.constructor.call(this,i),this.hT="30",this.getFreshValueHex=function(){for(var r="",e=0;elocalStorage.getItem("chatApiKey"),Ba=()=>{const i=localStorage.getItem("openaiApiKey"),r=localStorage.getItem("openaiBaseUrl")||"https://api.openai.com/v1",e=localStorage.getItem("rsaPublicKey");return{openaiApiKey:i||"",openaiBaseUrl:r,rsaPublicKey:e}},Ti=()=>navigator.language||"zh-CN",yn=i=>{const r=i.headers.get("User-Api-Key");r&&!localStorage.getItem("chatApiKey")&&localStorage.setItem("chatApiKey",r)};var Vi;(i=>{async function r(u){try{const l=Oi(),h=Ti();u.session_id=localStorage.getItem("sessionId")||null,fetch(`${Si}/api/chat/track_event`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h},body:JSON.stringify(u)}).catch(d=>{console.warn("Track event failed:",d)})}catch(l){console.warn("Error preparing track event:",l)}return Promise.resolve()}i.trackEvent=r;async function*e(u,l,h=[],d=null,c=null,f){try{const v=Oi(),p=Ti(),{openaiApiKey:g,openaiBaseUrl:y,rsaPublicKey:m}=Ba(),b=Sr(),$=(h||[]).map(F=>new Promise((X,K)=>{const oe=new FileReader;oe.onloadend=()=>X(oe.result),oe.onerror=K,oe.readAsDataURL(F)})),S=await Promise.all($);let _=c?Array.isArray(c)?c:[c]:[];const C={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${v}`,"trace-id":f||Sr(),"Accept-Language":p};if(g&&g.trim()!==""&&m)try{const F=await xn(g,m);C["Encrypted-Openai-Api-Key"]=F,C["Openai-Base-Url"]=y}catch(F){console.error("Error encrypting OpenAI API key:",F)}const R=await fetch(`${Si}/api/chat/invoke`,{method:"POST",headers:C,body:JSON.stringify({session_id:u,prompt:l,mock:!1,intent:d,ext:_,images:S.map((F,X)=>({filename:h[X].name,data:F}))})});yn(R);const x=R.body.getReader();let B="";for(;;){const{done:F,value:X}=await x.read();if(F)break;B+=new TextDecoder().decode(X);const K=B.split(` -`);B=K.pop()||"";for(const oe of K)oe.trim()&&(yield{...JSON.parse(oe),message_id:b})}B.trim()&&(yield{...JSON.parse(B),message_id:b})}catch(v){throw console.error("Error in streamInvokeServer:",v),alert(v instanceof Error?v.message:"An error occurred while streaming, please refresh the page and try again."),v}}i.streamInvokeServer=e;async function t(u,l){try{const h=Oi(),d=Ti(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const m=await xn(c,v);p["Encrypted-Openai-Api-Key"]=m,p["Openai-Base-Url"]=f}catch(m){console.error("Error encrypting OpenAI API key:",m)}const g=await fetch(`${Si}/api/chat/get_optimized_workflow`,{method:"POST",headers:p,body:JSON.stringify({workflow_id:u,prompt:l})});yn(g);const y=await g.json();if(!y.success){const m=y.message||"Failed to get optimized workflow";throw alert(m),new Error(m)}return y.data}catch(h){throw console.error("Error getting optimized workflow:",h),alert(h instanceof Error?h.message:"Failed to get optimized workflow"),h}}i.getOptimizedWorkflow=t;async function n(u){const l=Oi(),h=Ti(),{openaiApiKey:d,openaiBaseUrl:c,rsaPublicKey:f}=Ba(),v={"Content-Type":"application/json",Authorization:`Bearer ${l}`,"trace-id":Sr(),"Accept-Language":h};if(d&&d.trim()!==""&&f)try{const y=await xn(d,f);v["Encrypted-Openai-Api-Key"]=y,v["Openai-Base-Url"]=c}catch(y){console.error("Error encrypting OpenAI API key:",y)}const p=await fetch(`${Si}/api/chat/get_node_info_by_types`,{method:"POST",headers:v,body:JSON.stringify({node_types:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to get node info by types";throw alert(y),new Error(y)}return g.data}i.batchGetNodeInfo=n;async function a(u){try{const l=localStorage.getItem(`messages_${u}`);if(l)return console.log("Using cached messages from localStorage"),JSON.parse(l);const h=Oi(),d=Ti(),{openaiApiKey:c,openaiBaseUrl:f,rsaPublicKey:v}=Ba(),p={accept:"application/json",Authorization:`Bearer ${h}`,"trace-id":Sr(),"Accept-Language":d};if(c&&c.trim()!==""&&v)try{const b=await xn(c,v);p["Encrypted-Openai-Api-Key"]=b,p["Openai-Base-Url"]=f}catch(b){console.error("Error encrypting OpenAI API key:",b)}const g=await fetch(`${Si}/api/chat/get_messages_by_session_id?session_id=${u}`,{method:"GET",headers:p});yn(g);const y=await g.json();if(!y.success){const b=y.message||"Failed to fetch messages";throw alert(b+", please refresh the page and try again."),new Error(b)}const m=y.data.map(b=>(console.log("msg.ext",b.ext),{id:b.id.toString(),content:b.role==="ai"?JSON.stringify({session_id:u,text:b.content,finished:b.finished||!1,format:b.format||"markdown",ext:b.ext}):b.content,role:b.role,name:b.role==="ai"?"Assistant":void 0,format:b.format||"markdown",finished:b.finished}));return localStorage.setItem(`messages_${u}`,JSON.stringify(m)),m}catch(l){throw console.error("Error fetching messages:",l),alert(l instanceof Error?l.message:"Failed to fetch messages, please refresh the page and try again."),l}}i.fetchMessages=a;async function o(){try{const u=Oi(),l=Ti(),{openaiApiKey:h,openaiBaseUrl:d,rsaPublicKey:c}=Ba(),f={accept:"application/json",Authorization:`Bearer ${u}`,"trace-id":Sr(),"Accept-Language":l};if(h&&h.trim()!==""&&c)try{const g=await xn(h,c);f["Encrypted-Openai-Api-Key"]=g,f["Openai-Base-Url"]=d}catch(g){console.error("Error encrypting OpenAI API key:",g)}const v=await fetch(`${Si}/api/chat/announcement`,{method:"GET",headers:f});yn(v);const p=await v.json();if(!p.success){const g=p.message||"Failed to fetch announcement";return console.error(g),""}return p.data}catch(u){return console.error("Error fetching announcement:",u),""}}i.fetchAnnouncement=o;async function s(u){let h=0,d;for(;h<3;)try{const c=Oi(),f=Ti(),v={"Content-Type":"application/json",accept:"application/json",Authorization:`Bearer ${c}`,"trace-id":Sr(),"Accept-Language":f},p=await fetch(`${Si}/api/param_debug/generate_sd_prompts`,{method:"POST",headers:v,body:JSON.stringify({text:u})});yn(p);const g=await p.json();if(!g.success){const y=g.message||"Failed to generate SD prompts";throw new Error(y)}return g.data}catch(c){if(d=c,h++,h>=3)throw console.error("Error generating SD prompts after 3 attempts:",c),c;console.warn(`Attempt ${h} failed, retrying... Error: ${c instanceof Error?c.message:"Unknown error"}`),await new Promise(f=>setTimeout(f,500*Math.pow(2,h-1)))}throw d}i.generateSDPrompts=s})(Vi||(Vi={}));function Y$({name:i,isUser:r=!1,children:e}){return O.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:O.jsx("div",{className:"w-full",children:e})})}function NI({title:i,titleId:r,...e},t){return Ve.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":r},e),i?Ve.createElement("title",{id:r},i):null,Ve.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const MI=Ve.forwardRef(NI);function Lpe({content:i,trace_id:r}){const[e,t]=Ve.useState(!1),[n,a]=Ve.useState(!1),o=async()=>{r&&(await navigator.clipboard.writeText(r),a(!0),setTimeout(()=>a(!1),2e3))};return O.jsx(Y$,{name:"User",isUser:!0,children:O.jsxs("div",{className:"w-full rounded-lg border border-gray-700 py-4 px-4 text-gray-700 text-sm break-words relative",children:[O.jsx("p",{className:"whitespace-pre-wrap leading-snug",children:i}),r&&O.jsxs("div",{className:"absolute bottom-1 right-1.5 cursor-pointer opacity-40 hover:opacity-100 transition-opacity",onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onClick:o,children:[O.jsx(MI,{className:"h-3.5 w-3.5 text-gray-500 hover:text-gray-700"}),e&&O.jsx("div",{className:"absolute right-0 -top-6 bg-gray-700 text-white text-[10px] py-0.5 px-1.5 rounded shadow-sm whitespace-nowrap",children:n?"Copied!":"Copy trace ID"})]})]})})}const BI=Ve.memo(tI,(i,r)=>i.children===r.children&&i.className===r.className),FI=({content:i})=>O.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50 p-1 shadow-sm",children:[O.jsxs("div",{className:"flex items-center mb-1",children:[O.jsx("div",{className:"bg-blue-100 rounded-full p-1 mr-1",children:O.jsx("svg",{className:"h-4 w-4 text-blue-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),O.jsx("h3",{className:"text-sm font-medium text-blue-800",children:"Node Usage Guide"})]}),O.jsx("div",{className:"markdown-content text-blue-900",children:i})]}),jI=({content:i})=>O.jsxs("div",{className:"rounded-lg border border-green-200 bg-green-50 p-1 shadow-sm",children:[O.jsxs("div",{className:"flex items-center mb-1",children:[O.jsx("div",{className:"bg-green-100 rounded-full p-1 mr-1",children:O.jsxs("svg",{className:"h-4 w-4 text-green-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),O.jsx("h3",{className:"text-sm font-medium text-green-800",children:"Node Parameter Reference"})]}),O.jsx("div",{className:"markdown-content text-green-900",children:i})]});function zpe({content:i,name:r="Assistant",avatar:e,format:t,onOptionClick:n,extComponent:a,metadata:o}){const s=Ve.useRef(),u=(h,d)=>O.jsx(BI,{rehypePlugins:[[rI,{target:"_blank"}],iI],remarkPlugins:[nI,aI],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs - prose-headings:font-semibold - prose-h1:text-base - prose-h2:text-sm - prose-h3:text-xs - prose-h4:text-xs - prose-p:text-xs - prose-ul:text-xs - prose-ol:text-xs - prose-li:text-xs - prose-code:text-xs - prose-pre:text-xs - `,components:{p:({children:c})=>O.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:c}),h1:({children:c})=>O.jsx("h1",{className:"text-base font-semibold !my-1",children:c}),h2:({children:c})=>O.jsx("h2",{className:"text-sm font-semibold !my-1",children:c}),h3:({children:c})=>O.jsx("h3",{className:"text-xs font-semibold !my-1",children:c}),h4:({children:c})=>O.jsx("h4",{className:"text-xs font-semibold !my-1",children:c}),table:({children:c})=>O.jsx("table",{className:"border-solid border border-[#979797] w-[100%] text-xs",children:c}),th:({children:c})=>O.jsx("th",{className:"border-solid bg-[#E5E7ED] dark:bg-[#FFFFFF] dark:text-[#000000] border border-[#979797] text-center pt-2 text-xs",children:c}),td:({children:c})=>{if(Array.isArray(c)&&c?.length>0){const f=[],v=c.length;for(let p=0;p"?f.push(O.jsx("br",{})):f.push(c[p]);c=f}return O.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:c})},code:({children:c})=>{const[f,v]=Ve.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(c),v(!0),setTimeout(()=>v(!1),2e3)}catch(g){console.error("Failed to copy text:",g)}};return O.jsxs("span",{className:"relative group inline-flex items-center",children:[O.jsx("code",{className:"text-xs bg-gray-100 text-gray-800 rounded px-1",children:c}),O.jsx("button",{onClick:p,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:f?O.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:O.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):O.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[O.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),O.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:c})=>O.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:c}),img:({node:c,...f})=>O.jsx("div",{className:"w-1/2 mx-auto",children:O.jsx("img",{...f,loading:"lazy",className:"w-full h-auto block",onError:v=>{console.warn("Image failed to load:",f.src,"Error:",v),v.currentTarget.style.opacity="0"}})}),a:({href:c,children:f})=>{let v="markdown",p=null;try{const g=JSON.parse(i);v=g.ext?.[0]?.type||"markdown",p=g?.message_id}catch(g){console.error("Error parsing content:",g)}return O.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",onClick:()=>{Vi.trackEvent({event_type:"markdown_link_click",message_type:v,message_id:p,data:{link_url:c,link_text:f}})},children:f})}},children:h}),l=()=>{try{const h=JSON.parse(i),d=h.ext?.find(c=>c.type==="guides")?.data||[];if(o?.intent){const c=o.intent;if(c==="node_explain")return O.jsx(FI,{content:u(h.text||"")});if(c==="node_params")return O.jsx(jI,{content:u(h.text||"")})}return O.jsxs("div",{className:"space-y-3",children:[t==="markdown"&&h.text?O.jsx("div",{ref:s,children:u(h.text)}):h.text?O.jsx("p",{className:"whitespace-pre-wrap text-left",children:h.text}):null,d.length>0&&O.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:d.map((c,f)=>O.jsx("button",{className:"px-3 py-1.5 bg-white text-gray-700 rounded-md hover:bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)]",onClick:()=>n?.(c),children:c},f))}),a]})}catch{return O.jsx("p",{className:"whitespace-pre-wrap text-left",children:i})}};return O.jsx(Y$,{name:r,children:O.jsx("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-700 text-sm break-words overflow-hidden",children:l()})})}const LI=LiteGraph;function X$(i,r={}){const e=LI.createNode(i,"",r);if(!r.pos){const t=Mt.canvas.canvas.getBoundingClientRect(),n=t.width/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[0]/Mt.canvas.ds.scale,a=t.height/2/Mt.canvas.ds.scale+-Mt.canvas.ds.offset[1]/Mt.canvas.ds.scale;e.pos=[n-e.size[0]/2,a-e.size[1]/2]}return Mt.graph.add(e),e}function zI({content:i,name:r="Assistant",avatar:e,installedNodes:t}){const n=JSON.parse(i),[a,o]=Ve.useState(null),s=n.ext?.find(c=>c.type==="node")?.data||[],u=c=>t.some(f=>f===c),l=s.filter(c=>u(c.name)),h=s.filter(c=>!u(c.name)),d=c=>c>=1e4?`${(c/1e4).toFixed(1)}w`:c>=1e3?`${(c/1e3).toFixed(1)}k`:c.toString();return O.jsxs("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[l.length>0&&O.jsxs("div",{className:"space-y-3",children:[O.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const f=X$(c.name);f&&(f.connect(c.from_index,f,c.to_index),Vi.trackEvent({event_type:"node_add_to_canvas",message_type:"node",message_id:n.message_id,data:{node_name:c.name}}))},children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 - bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},c.name))})]}),h.length>0&&O.jsxs("div",{className:`space-y-3 ${l.length>0?"mt-4":""}`,children:[O.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:h.map(c=>O.jsxs("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>o(c.name),onMouseLeave:()=>o(null),children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:c.name}),O.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[O.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[O.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:O.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),O.jsx("span",{children:d(c.github_stars||0)})]}),O.jsxs("a",{href:c.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md - border border-gray-900 hover:bg-gray-100 - transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{Vi.trackEvent({event_type:"node_download",message_type:"node",message_id:n.message_id,data:{node_name:c.name,github_url:c.github_url}})},children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]})]}),a===c.name&&c.description&&O.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 - bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[c.description,O.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 - border-4 border-transparent border-t-gray-800`})]})]},c.name))})]})]})}const Hpe=Object.freeze(Object.defineProperty({__proto__:null,NodeSearch:zI},Symbol.toStringTag,{value:"Module"}));/** - * vis-data - * http://visjs.org/ - * - * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data. - * - * @version 7.1.9 - * @date 2023-11-24T17:53:34.179Z - * - * @copyright (c) 2011-2017 Almende B.V, http://almende.com - * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs - * - * @license - * vis.js is dual licensed under both - * - * 1. The Apache 2.0 License - * http://www.apache.org/licenses/LICENSE-2.0 - * - * and - * - * 2. The MIT License - * http://opensource.org/licenses/MIT - * - * vis.js may be distributed under either license. - */function tl(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}var sh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var J$={exports:{}},Es=function(i){return i&&i.Math===Math&&i},be=Es(typeof globalThis=="object"&&globalThis)||Es(typeof window=="object"&&window)||Es(typeof self=="object"&&self)||Es(typeof sh=="object"&&sh)||function(){return this}()||sh||Function("return this")(),le=function(i){try{return!!i()}catch{return!0}},HI=le,Oo=!HI(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")}),VI=Oo,Z$=Function.prototype,Pp=Z$.apply,xp=Z$.call,ha=typeof Reflect=="object"&&Reflect.apply||(VI?xp.bind(Pp):function(){return xp.apply(Pp,arguments)}),Q$=Oo,e0=Function.prototype,Ed=e0.call,WI=Q$&&e0.bind.bind(Ed,Ed),me=Q$?WI:function(i){return function(){return Ed.apply(i,arguments)}},t0=me,UI=t0({}.toString),KI=t0("".slice),fi=function(i){return KI(UI(i),8,-1)},GI=fi,qI=me,r0=function(i){if(GI(i)==="Function")return qI(i)},Sd=typeof document=="object"&&document.all,YI=typeof Sd>"u"&&Sd!==void 0,i0={all:Sd,IS_HTMLDDA:YI},n0=i0,XI=n0.all,Oe=n0.IS_HTMLDDA?function(i){return typeof i=="function"||i===XI}:function(i){return typeof i=="function"},Qi={},JI=le,Ke=!JI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ZI=Oo,Ss=Function.prototype.call,Ge=ZI?Ss.bind(Ss):function(){return Ss.apply(Ss,arguments)},rl={},a0={}.propertyIsEnumerable,o0=Object.getOwnPropertyDescriptor,QI=o0&&!a0.call({1:2},1);rl.f=QI?function(r){var e=o0(this,r);return!!e&&e.enumerable}:a0;var en=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},ek=me,tk=le,rk=fi,uh=Object,ik=ek("".split),il=tk(function(){return!uh("z").propertyIsEnumerable(0)})?function(i){return rk(i)==="String"?ik(i,""):uh(i)}:uh,ca=function(i){return i==null},nk=ca,ak=TypeError,Lf=function(i){if(nk(i))throw new ak("Can't call method on "+i);return i},ok=il,sk=Lf,br=function(i){return ok(sk(i))},Cp=Oe,s0=i0,uk=s0.all,it=s0.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Cp(i)||i===uk}:function(i){return typeof i=="object"?i!==null:Cp(i)},$e={},lh=$e,hh=be,lk=Oe,Ap=function(i){return lk(i)?i:void 0},yt=function(i,r){return arguments.length<2?Ap(lh[i])||Ap(hh[i]):lh[i]&&lh[i][r]||hh[i]&&hh[i][r]},hk=me,Le=hk({}.isPrototypeOf),vi=typeof navigator<"u"&&String(navigator.userAgent)||"",u0=be,ch=vi,Dp=u0.process,Rp=u0.Deno,Np=Dp&&Dp.versions||Rp&&Rp.version,Mp=Np&&Np.v8,tr,ku;Mp&&(tr=Mp.split("."),ku=tr[0]>0&&tr[0]<4?1:+(tr[0]+tr[1]));!ku&&ch&&(tr=ch.match(/Edge\/(\d+)/),(!tr||tr[1]>=74)&&(tr=ch.match(/Chrome\/(\d+)/),tr&&(ku=+tr[1])));var da=ku,Bp=da,ck=le,dk=be,fk=dk.String,fa=!!Object.getOwnPropertySymbols&&!ck(function(){var i=Symbol("symbol detection");return!fk(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Bp&&Bp<41}),vk=fa,l0=vk&&!Symbol.sham&&typeof Symbol.iterator=="symbol",pk=yt,gk=Oe,yk=Le,mk=l0,bk=Object,To=mk?function(i){return typeof i=="symbol"}:function(i){var r=pk("Symbol");return gk(r)&&yk(r.prototype,bk(i))},$k=String,va=function(i){try{return $k(i)}catch{return"Object"}},wk=Oe,_k=va,Ek=TypeError,kt=function(i){if(wk(i))return i;throw new Ek(_k(i)+" is not a function")},Sk=kt,Ok=ca,zf=function(i,r){var e=i[r];return Ok(e)?void 0:Sk(e)},dh=Ge,fh=Oe,vh=it,Tk=TypeError,Ik=function(i,r){var e,t;if(r==="string"&&fh(e=i.toString)&&!vh(t=dh(e,i))||fh(e=i.valueOf)&&!vh(t=dh(e,i))||r!=="string"&&fh(e=i.toString)&&!vh(t=dh(e,i)))return t;throw new Tk("Can't convert object to primitive value")},h0={exports:{}},kk=!0,Fp=be,Pk=Object.defineProperty,xk=function(i,r){try{Pk(Fp,i,{value:r,configurable:!0,writable:!0})}catch{Fp[i]=r}return r},Ck=be,Ak=xk,jp="__core-js_shared__",Dk=Ck[jp]||Ak(jp,{}),Hf=Dk,Lp=Hf;(h0.exports=function(i,r){return Lp[i]||(Lp[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var pa=h0.exports,Rk=Lf,Nk=Object,Pt=function(i){return Nk(Rk(i))},Mk=me,Bk=Pt,Fk=Mk({}.hasOwnProperty),ze=Object.hasOwn||function(r,e){return Fk(Bk(r),e)},jk=me,Lk=0,zk=Math.random(),Hk=jk(1 .toString),nl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+Hk(++Lk+zk,36)},Vk=be,Wk=pa,zp=ze,Uk=nl,Kk=fa,Gk=l0,An=Vk.Symbol,ph=Wk("wks"),qk=Gk?An.for||An:An&&An.withoutSetter||Uk,we=function(i){return zp(ph,i)||(ph[i]=Kk&&zp(An,i)?An[i]:qk("Symbol."+i)),ph[i]},Yk=Ge,Hp=it,Vp=To,Xk=zf,Jk=Ik,Zk=we,Qk=TypeError,eP=Zk("toPrimitive"),tP=function(i,r){if(!Hp(i)||Vp(i))return i;var e=Xk(i,eP),t;if(e){if(r===void 0&&(r="default"),t=Yk(e,i,r),!Hp(t)||Vp(t))return t;throw new Qk("Can't convert object to primitive value")}return r===void 0&&(r="number"),Jk(i,r)},rP=tP,iP=To,al=function(i){var r=rP(i,"string");return iP(r)?r:r+""},nP=be,Wp=it,Od=nP.document,aP=Wp(Od)&&Wp(Od.createElement),Vf=function(i){return aP?Od.createElement(i):{}},oP=Ke,sP=le,uP=Vf,c0=!oP&&!sP(function(){return Object.defineProperty(uP("div"),"a",{get:function(){return 7}}).a!==7}),lP=Ke,hP=Ge,cP=rl,dP=en,fP=br,vP=al,pP=ze,gP=c0,Up=Object.getOwnPropertyDescriptor;Qi.f=lP?Up:function(r,e){if(r=fP(r),e=vP(e),gP)try{return Up(r,e)}catch{}if(pP(r,e))return dP(!hP(cP.f,r,e),r[e])};var yP=le,mP=Oe,bP=/#|\.prototype\./,Io=function(i,r){var e=wP[$P(i)];return e===EP?!0:e===_P?!1:mP(r)?yP(r):!!r},$P=Io.normalize=function(i){return String(i).replace(bP,".").toLowerCase()},wP=Io.data={},_P=Io.NATIVE="N",EP=Io.POLYFILL="P",d0=Io,Kp=r0,SP=kt,OP=Oo,TP=Kp(Kp.bind),pi=function(i,r){return SP(i),r===void 0?i:OP?TP(i,r):function(){return i.apply(r,arguments)}},xt={},IP=Ke,kP=le,f0=IP&&kP(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),PP=it,xP=String,CP=TypeError,jt=function(i){if(PP(i))return i;throw new CP(xP(i)+" is not an object")},AP=Ke,DP=c0,RP=f0,Os=jt,Gp=al,NP=TypeError,gh=Object.defineProperty,MP=Object.getOwnPropertyDescriptor,yh="enumerable",mh="configurable",bh="writable";xt.f=AP?RP?function(r,e,t){if(Os(r),e=Gp(e),Os(t),typeof r=="function"&&e==="prototype"&&"value"in t&&bh in t&&!t[bh]){var n=MP(r,e);n&&n[bh]&&(r[e]=t.value,t={configurable:mh in t?t[mh]:n[mh],enumerable:yh in t?t[yh]:n[yh],writable:!1})}return gh(r,e,t)}:gh:function(r,e,t){if(Os(r),e=Gp(e),Os(t),DP)try{return gh(r,e,t)}catch{}if("get"in t||"set"in t)throw new NP("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var BP=Ke,FP=xt,jP=en,Lr=BP?function(i,r,e){return FP.f(i,r,jP(1,e))}:function(i,r,e){return i[r]=e,i},Ts=be,LP=ha,zP=r0,HP=Oe,VP=Qi.f,WP=d0,mn=$e,UP=pi,bn=Lr,qp=ze,KP=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return LP(i,this,arguments)};return r.prototype=i.prototype,r},U=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Ts:n?Ts[e]:(Ts[e]||{}).prototype,s=t?mn:mn[e]||bn(mn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=WP(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&qp(o,c),v=s[c],h&&(i.dontCallGetSet?(y=VP(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=UP(f,Ts):i.wrap&&h?g=KP(f):a&&HP(f)?g=zP(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&bn(g,"sham",!0),bn(s,c,g),a&&(d=e+"Prototype",qp(mn,d)||bn(mn,d,{}),bn(mn[d],c,f),i.real&&u&&(l||!u[c])&&bn(u,c,f)))},GP=U,qP=Ke,Yp=xt.f;GP({target:"Object",stat:!0,forced:Object.defineProperty!==Yp,sham:!qP},{defineProperty:Yp});var YP=$e,v0=YP.Object,XP=J$.exports=function(r,e,t){return v0.defineProperty(r,e,t)};v0.defineProperty.sham&&(XP.sham=!0);var JP=J$.exports,ZP=JP,p0=ZP,QP=p0,ex=QP,tx=ex,rx=tx,g0=rx,ol=Y(g0),ix=fi,gi=Array.isArray||function(r){return ix(r)==="Array"},nx=Math.ceil,ax=Math.floor,ox=Math.trunc||function(r){var e=+r;return(e>0?ax:nx)(e)},sx=ox,sl=function(i){var r=+i;return r!==r||r===0?0:sx(r)},ux=sl,lx=Math.min,hx=function(i){return i>0?lx(ux(i),9007199254740991):0},cx=hx,Lt=function(i){return cx(i.length)},dx=TypeError,fx=9007199254740991,ul=function(i){if(i>fx)throw dx("Maximum allowed index exceeded");return i},vx=al,px=xt,gx=en,ga=function(i,r,e){var t=vx(r);t in i?px.f(i,t,gx(0,e)):i[t]=e},yx=we,mx=yx("toStringTag"),y0={};y0[mx]="z";var Wf=String(y0)==="[object z]",bx=Wf,$x=Oe,lu=fi,wx=we,_x=wx("toStringTag"),Ex=Object,Sx=lu(function(){return arguments}())==="Arguments",Ox=function(i,r){try{return i[r]}catch{}},zr=bx?lu:function(i){var r,e,t;return i===void 0?"Undefined":i===null?"Null":typeof(e=Ox(r=Ex(i),_x))=="string"?e:Sx?lu(r):(t=lu(r))==="Object"&&$x(r.callee)?"Arguments":t},Tx=me,Ix=Oe,Td=Hf,kx=Tx(Function.toString);Ix(Td.inspectSource)||(Td.inspectSource=function(i){return kx(i)});var m0=Td.inspectSource,Px=me,xx=le,b0=Oe,Cx=zr,Ax=yt,Dx=m0,$0=function(){},Rx=[],w0=Ax("Reflect","construct"),Uf=/^\s*(?:class|function)\b/,Nx=Px(Uf.exec),Mx=!Uf.test($0),Fa=function(r){if(!b0(r))return!1;try{return w0($0,Rx,r),!0}catch{return!1}},_0=function(r){if(!b0(r))return!1;switch(Cx(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mx||!!Nx(Uf,Dx(r))}catch{return!0}};_0.sham=!0;var ll=!w0||xx(function(){var i;return Fa(Fa.call)||!Fa(Object)||!Fa(function(){i=!0})||i})?_0:Fa,Xp=gi,Bx=ll,Fx=it,jx=we,Lx=jx("species"),Jp=Array,zx=function(i){var r;return Xp(i)&&(r=i.constructor,Bx(r)&&(r===Jp||Xp(r.prototype))?r=void 0:Fx(r)&&(r=r[Lx],r===null&&(r=void 0))),r===void 0?Jp:r},Hx=zx,hl=function(i,r){return new(Hx(i))(r===0?0:r)},Vx=le,Wx=we,Ux=da,Kx=Wx("species"),ko=function(i){return Ux>=51||!Vx(function(){var r=[],e=r.constructor={};return e[Kx]=function(){return{foo:1}},r[i](Boolean).foo!==1})},Gx=U,qx=le,Yx=gi,Xx=it,Jx=Pt,Zx=Lt,Zp=ul,Qp=ga,Qx=hl,eC=ko,tC=we,rC=da,E0=tC("isConcatSpreadable"),iC=rC>=51||!qx(function(){var i=[];return i[E0]=!1,i.concat()[0]!==i}),nC=function(i){if(!Xx(i))return!1;var r=i[E0];return r!==void 0?!!r:Yx(i)},aC=!iC||!eC("concat");Gx({target:"Array",proto:!0,arity:1,forced:aC},{concat:function(r){var e=Jx(this),t=Qx(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ao;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},vC={includes:eg(!0),indexOf:eg(!1)},Po={},pC=me,$h=ze,gC=br,yC=vC.indexOf,mC=Po,tg=pC([].push),S0=function(i,r){var e=gC(i),t=0,n=[],a;for(a in e)!$h(mC,a)&&$h(e,a)&&tg(n,a);for(;r.length>t;)$h(e,a=r[t++])&&(~yC(n,a)||tg(n,a));return n},Kf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bC=S0,$C=Kf,fl=Object.keys||function(r){return bC(r,$C)},wC=Ke,_C=f0,EC=xt,SC=jt,OC=br,TC=fl;cl.f=wC&&!_C?Object.defineProperties:function(r,e){SC(r);for(var t=OC(e),n=TC(e),a=n.length,o=0,s;a>o;)EC.f(r,s=n[o++],t[s]);return r};var IC=yt,O0=IC("document","documentElement"),kC=pa,PC=nl,rg=kC("keys"),vl=function(i){return rg[i]||(rg[i]=PC(i))},xC=jt,CC=cl,ig=Kf,AC=Po,DC=O0,RC=Vf,NC=vl,ng=">",ag="<",Id="prototype",kd="script",T0=NC("IE_PROTO"),wh=function(){},I0=function(i){return ag+kd+ng+i+ag+"/"+kd+ng},og=function(i){i.write(I0("")),i.close();var r=i.parentWindow.Object;return i=null,r},MC=function(){var i=RC("iframe"),r="java"+kd+":",e;return i.style.display="none",DC.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(I0("document.F=Object")),e.close(),e.F},Is,hu=function(){try{Is=new ActiveXObject("htmlfile")}catch{}hu=typeof document<"u"?document.domain&&Is?og(Is):MC():og(Is);for(var i=ig.length;i--;)delete hu[Id][ig[i]];return hu()};AC[T0]=!0;var rn=Object.create||function(r,e){var t;return r!==null?(wh[Id]=xC(r),t=new wh,wh[Id]=null,t[T0]=r):t=hu(),e===void 0?t:CC.f(t,e)},xo={},BC=S0,FC=Kf,jC=FC.concat("length","prototype");xo.f=Object.getOwnPropertyNames||function(r){return BC(r,jC)};var Gf={},sg=dl,LC=Lt,zC=ga,HC=Array,VC=Math.max,k0=function(i,r,e){for(var t=LC(i),n=sg(r,t),a=sg(e===void 0?t:e,t),o=HC(VC(a-n,0)),s=0;ng;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:dg(m,b)}else switch(i){case 4:return!1;case 7:dg(m,b)}return a?-1:t||n?n:m}},ba={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)},pl=U,Do=be,Yf=Ge,x2=me,Yn=Ke,Xn=fa,C2=le,We=ze,A2=Le,xd=jt,gl=br,Xf=al,D2=tn,Cd=en,uo=rn,D0=fl,R2=xo,R0=Gf,N2=Co,N0=Qi,M0=xt,M2=cl,B0=rl,fg=ya,B2=qf,Jf=pa,F2=vl,F0=Po,vg=nl,j2=we,L2=Ao,z2=Te,H2=C0,V2=nn,j0=ma,yl=ba.forEach,_t=F2("hidden"),ml="Symbol",lo="prototype",W2=j0.set,pg=j0.getterFor(ml),ar=Object[lo],Di=Do.Symbol,Ka=Di&&Di[lo],U2=Do.RangeError,K2=Do.TypeError,Sh=Do.QObject,L0=N0.f,Ri=M0.f,z0=R0.f,G2=B0.f,H0=x2([].push),Mr=Jf("symbols"),Ro=Jf("op-symbols"),q2=Jf("wks"),Ad=!Sh||!Sh[lo]||!Sh[lo].findChild,V0=function(i,r,e){var t=L0(ar,r);t&&delete ar[r],Ri(i,r,e),t&&i!==ar&&Ri(ar,r,t)},Dd=Yn&&C2(function(){return uo(Ri({},"a",{get:function(){return Ri(this,"a",{value:7}).a}})).a!==7})?V0:Ri,Oh=function(i,r){var e=Mr[i]=uo(Ka);return W2(e,{type:ml,tag:i,description:r}),Yn||(e.description=r),e},bl=function(r,e,t){r===ar&&bl(Ro,e,t),xd(r);var n=Xf(e);return xd(t),We(Mr,n)?(t.enumerable?(We(r,_t)&&r[_t][n]&&(r[_t][n]=!1),t=uo(t,{enumerable:Cd(0,!1)})):(We(r,_t)||Ri(r,_t,Cd(1,{})),r[_t][n]=!0),Dd(r,n,t)):Ri(r,n,t)},Zf=function(r,e){xd(r);var t=gl(e),n=D0(t).concat(G0(t));return yl(n,function(a){(!Yn||Yf(W0,t,a))&&bl(r,a,t[a])}),r},Y2=function(r,e){return e===void 0?uo(r):Zf(uo(r),e)},W0=function(r){var e=Xf(r),t=Yf(G2,this,e);return this===ar&&We(Mr,e)&&!We(Ro,e)?!1:t||!We(this,e)||!We(Mr,e)||We(this,_t)&&this[_t][e]?t:!0},U0=function(r,e){var t=gl(r),n=Xf(e);if(!(t===ar&&We(Mr,n)&&!We(Ro,n))){var a=L0(t,n);return a&&We(Mr,n)&&!(We(t,_t)&&t[_t][n])&&(a.enumerable=!0),a}},K0=function(r){var e=z0(gl(r)),t=[];return yl(e,function(n){!We(Mr,n)&&!We(F0,n)&&H0(t,n)}),t},G0=function(i){var r=i===ar,e=z0(r?Ro:gl(i)),t=[];return yl(e,function(n){We(Mr,n)&&(!r||We(ar,n))&&H0(t,Mr[n])}),t};Xn||(Di=function(){if(A2(Ka,this))throw new K2("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:D2(arguments[0]),e=vg(r),t=function(n){var a=this===void 0?Do:this;a===ar&&Yf(t,Ro,n),We(a,_t)&&We(a[_t],e)&&(a[_t][e]=!1);var o=Cd(1,n);try{Dd(a,e,o)}catch(s){if(!(s instanceof U2))throw s;V0(a,e,o)}};return Yn&&Ad&&Dd(ar,e,{configurable:!0,set:t}),Oh(e,r)},Ka=Di[lo],fg(Ka,"toString",function(){return pg(this).tag}),fg(Di,"withoutSetter",function(i){return Oh(vg(i),i)}),B0.f=W0,M0.f=bl,M2.f=Zf,N0.f=U0,R2.f=R0.f=K0,N2.f=G0,L2.f=function(i){return Oh(j2(i),i)},Yn&&B2(Ka,"description",{configurable:!0,get:function(){return pg(this).description}}));pl({global:!0,constructor:!0,wrap:!0,forced:!Xn,sham:!Xn},{Symbol:Di});yl(D0(q2),function(i){z2(i)});pl({target:ml,stat:!0,forced:!Xn},{useSetter:function(){Ad=!0},useSimple:function(){Ad=!1}});pl({target:"Object",stat:!0,forced:!Xn,sham:!Yn},{create:Y2,defineProperty:bl,defineProperties:Zf,getOwnPropertyDescriptor:U0});pl({target:"Object",stat:!0,forced:!Xn},{getOwnPropertyNames:K0});H2();V2(Di,ml);F0[_t]=!0;var X2=fa,q0=X2&&!!Symbol.for&&!!Symbol.keyFor,J2=U,Z2=yt,Q2=ze,eA=tn,Y0=pa,tA=q0,Th=Y0("string-to-symbol-registry"),rA=Y0("symbol-to-string-registry");J2({target:"Symbol",stat:!0,forced:!tA},{for:function(i){var r=eA(i);if(Q2(Th,r))return Th[r];var e=Z2("Symbol")(r);return Th[r]=e,rA[e]=r,e}});var iA=U,nA=ze,aA=To,oA=va,sA=pa,uA=q0,gg=sA("symbol-to-string-registry");iA({target:"Symbol",stat:!0,forced:!uA},{keyFor:function(r){if(!aA(r))throw new TypeError(oA(r)+" is not a symbol");if(nA(gg,r))return gg[r]}});var lA=me,No=lA([].slice),hA=me,yg=gi,cA=Oe,mg=fi,dA=tn,bg=hA([].push),fA=function(i){if(cA(i))return i;if(yg(i)){for(var r=i.length,e=[],t=0;t=r.length)return i.target=void 0,Cs(void 0,!0);switch(i.kind){case"keys":return Cs(e,!1);case"values":return Cs(r[e],!1)}return Cs([e,r[e]],!1)},"values");Dg.Arguments=Dg.Array;var KD={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},GD=KD,qD=be,YD=zr,XD=Lr,Rg=$a,JD=we,Ng=JD("toStringTag");for(var xh in GD){var Mg=qD[xh],Ch=Mg&&Mg.prototype;Ch&&YD(Ch)!==Ng&&XD(Ch,Ng,xh),Rg[xh]=Rg.Array}var ZD=YA,uw=ZD,QD=we,eR=xt.f,Bg=QD("metadata"),Fg=Function.prototype;Fg[Bg]===void 0&&eR(Fg,Bg,{value:null});var tR=Te;tR("asyncDispose");var rR=Te;rR("dispose");var iR=Te;iR("metadata");var nR=uw,aR=nR,oR=yt,sR=me,rv=oR("Symbol"),uR=rv.keyFor,lR=sR(rv.prototype.valueOf),lw=rv.isRegisteredSymbol||function(r){try{return uR(lR(r))!==void 0}catch{return!1}},hR=U,cR=lw;hR({target:"Symbol",stat:!0},{isRegisteredSymbol:cR});var dR=pa,hw=yt,fR=me,vR=To,pR=we,Cu=hw("Symbol"),jg=Cu.isWellKnownSymbol,cw=hw("Object","getOwnPropertyNames"),gR=fR(Cu.prototype.valueOf),Lg=dR("wks");for(var Ah=0,zg=cw(Cu),yR=zg.length;Ah=a?i?"":void 0:(o=Vg(t,n),o<55296||o>56319||n+1===a||(s=Vg(t,n+1))<56320||s>57343?i?RR(t,n):o:i?NR(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},MR={codeAt:Wg(!1),charAt:Wg(!0)},BR=MR.charAt,FR=tn,fw=ma,jR=ev,Ug=tv,vw="String Iterator",LR=fw.set,zR=fw.getterFor(vw);jR(String,"String",function(i){LR(this,{type:vw,string:FR(i),index:0})},function(){var r=zR(this),e=r.string,t=r.index,n;return t>=e.length?Ug(void 0,!0):(n=BR(e,t),r.index+=n.length,Ug(n,!1))});var HR=Ao,VR=HR.f("iterator"),WR=VR,pw=WR,UR=pw,KR=UR,GR=KR,qR=GR,gw=qR,YR=Y(gw);function Jn(i){"@babel/helpers - typeof";return Jn=typeof Dn=="function"&&typeof YR=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Dn=="function"&&r.constructor===Dn&&r!==Dn.prototype?"symbol":typeof r},Jn(i)}var XR=Ao,JR=XR.f("toPrimitive"),ZR=JR,QR=ZR,eN=QR,tN=eN,rN=tN,iN=rN,nN=iN,aN=Y(nN);function oN(i,r){if(Jn(i)!=="object"||i===null)return i;var e=i[aN];if(e!==void 0){var t=e.call(i,r||"default");if(Jn(t)!=="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(i)}function yw(i){var r=oN(i,"string");return Jn(r)==="symbol"?r:String(r)}function Kg(i,r){for(var e=0;e=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},PN={left:Yg(!1),right:Yg(!0)},xN=le,_l=function(i,r){var e=[][i];return!!e&&xN(function(){e.call(null,r||function(){return 1},1)})},CN=be,AN=fi,Bo=AN(CN.process)==="process",DN=U,RN=PN.left,NN=_l,Xg=da,MN=Bo,BN=!MN&&Xg>79&&Xg<83,FN=BN||!NN("reduce");DN({target:"Array",proto:!0,forced:FN},{reduce:function(r){var e=arguments.length;return RN(this,r,e,e>1?arguments[1]:void 0)}});var jN=ut,LN=jN("Array","reduce"),zN=Le,HN=LN,Nh=Array.prototype,VN=function(i){var r=i.reduce;return i===Nh||zN(Nh,i)&&r===Nh.reduce?HN:r},WN=VN,UN=WN,KN=UN,GN=Y(KN),qN=U,YN=ba.filter,XN=ko,JN=XN("filter");qN({target:"Array",proto:!0,forced:!JN},{filter:function(r){return YN(this,r,arguments.length>1?arguments[1]:void 0)}});var ZN=ut,QN=ZN("Array","filter"),eM=Le,tM=QN,Mh=Array.prototype,rM=function(i){var r=i.filter;return i===Mh||eM(Mh,i)&&r===Mh.filter?tM:r},iM=rM,nM=iM,aM=nM,Rn=Y(aM),oM=U,sM=ba.map,uM=ko,lM=uM("map");oM({target:"Array",proto:!0,forced:!lM},{map:function(r){return sM(this,r,arguments.length>1?arguments[1]:void 0)}});var hM=ut,cM=hM("Array","map"),dM=Le,fM=cM,Bh=Array.prototype,vM=function(i){var r=i.map;return i===Bh||dM(Bh,i)&&r===Bh.map?fM:r},pM=vM,gM=pM,yM=gM,rr=Y(yM),mM=gi,bM=Lt,$M=ul,wM=pi,Ew=function(i,r,e,t,n,a,o,s){for(var u=n,l=0,h=o?wM(o,s):!1,d,c;l0&&mM(d)?(c=bM(d),u=Ew(i,r,d,c,u,a-1)-1):($M(u+1),i[u]=d),u++),l++;return u},_M=Ew,EM=U,SM=_M,OM=kt,TM=Pt,IM=Lt,kM=hl;EM({target:"Array",proto:!0},{flatMap:function(r){var e=TM(this),t=IM(e),n;return OM(r),n=kM(e,0),n.length=SM(n,e,e,t,0,1,r,arguments.length>1?arguments[1]:void 0),n}});var PM=ut;PM("Array","flatMap");var xM=Ge,Jg=jt,CM=zf,Sw=function(i,r,e){var t,n;Jg(i);try{if(t=CM(i,"return"),!t){if(r==="throw")throw e;return e}t=xM(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return Jg(t),e},AM=jt,DM=Sw,RM=function(i,r,e,t){try{return t?r(AM(e)[0],e[1]):r(e)}catch(n){DM(i,"throw",n)}},NM=we,MM=$a,BM=NM("iterator"),FM=Array.prototype,Ow=function(i){return i!==void 0&&(MM.Array===i||FM[BM]===i)},jM=zr,Zg=zf,LM=ca,zM=$a,HM=we,VM=HM("iterator"),El=function(i){if(!LM(i))return Zg(i,VM)||Zg(i,"@@iterator")||zM[jM(i)]},WM=Ge,UM=kt,KM=jt,GM=va,qM=El,YM=TypeError,av=function(i,r){var e=arguments.length<2?qM(i):r;if(UM(e))return KM(WM(e,i));throw new YM(GM(i)+" is not iterable")},XM=pi,JM=Ge,ZM=Pt,QM=RM,eB=Ow,tB=ll,rB=Lt,Qg=ga,iB=av,nB=El,ey=Array,aB=function(r){var e=ZM(r),t=tB(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=XM(a,n>2?arguments[2]:void 0));var s=nB(e),u=0,l,h,d,c,f,v;if(s&&!(this===ey&&eB(s)))for(c=iB(e,s),f=c.next,h=t?new this:[];!(d=JM(f,c)).done;u++)v=o?QM(c,a,[d.value,u],!0):d.value,Qg(h,u,v);else for(l=rB(e),h=t?new this(l):ey(l);l>u;u++)v=o?a(e[u],u):e[u],Qg(h,u,v);return h.length=u,h},oB=we,Tw=oB("iterator"),Iw=!1;try{var sB=0,ty={next:function(){return{done:!!sB++}},return:function(){Iw=!0}};ty[Tw]=function(){return this},Array.from(ty,function(){throw 2})}catch{}var kw=function(i,r){try{if(!r&&!Iw)return!1}catch{return!1}var e=!1;try{var t={};t[Tw]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},uB=U,lB=aB,hB=kw,cB=!hB(function(i){Array.from(i)});uB({target:"Array",stat:!0,forced:cB},{from:lB});var dB=$e,fB=dB.Array.from,vB=fB,Pw=vB,pB=Pw,ov=Y(pB),gB=El,yB=gB,mB=yB,bB=mB,$B=bB,wB=$B,_B=wB,EB=_B,xw=EB,Cw=Y(xw),SB=xw,sv=Y(SB),OB=U,TB=gi;OB({target:"Array",stat:!0},{isArray:TB});var IB=$e,kB=IB.Array.isArray,PB=kB,Aw=PB,xB=Aw,CB=xB,AB=CB,DB=AB,RB=DB,Dw=Y(RB);function NB(i){if(Dw(i))return i}var MB=Ke,BB=gi,FB=TypeError,jB=Object.getOwnPropertyDescriptor,LB=MB&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(i){return i instanceof TypeError}}(),Rw=LB?function(i,r){if(BB(i)&&!jB(i,"length").writable)throw new FB("Cannot set read only .length");return i.length=r}:function(i,r){return i.length=r},zB=U,HB=Pt,VB=Lt,WB=Rw,UB=ul,KB=le,GB=KB(function(){return[].push.call({length:4294967296},1)!==4294967297}),qB=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(i){return i instanceof TypeError}},YB=GB||!qB();zB({target:"Array",proto:!0,arity:1,forced:YB},{push:function(r){var e=HB(this),t=VB(e),n=arguments.length;UB(t+n);for(var a=0;ai.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?arguments[1]:void 0)},Oj=U,ny=Sj;Oj({target:"Array",proto:!0,forced:[].forEach!==ny},{forEach:ny});var Tj=ut,Ij=Tj("Array","forEach"),kj=Ij,Pj=kj,xj=zr,Cj=ze,Aj=Le,Dj=Pj,Hh=Array.prototype,Rj={DOMTokenList:!0,NodeList:!0},zw=function(i){var r=i.forEach;return i===Hh||Aj(Hh,i)&&r===Hh.forEach||Cj(Rj,xj(i))?Dj:r},Nj=zw,Wi=Y(Nj),Mj=U,Bj=me,Fj=gi,jj=Bj([].reverse),ay=[1,2];Mj({target:"Array",proto:!0,forced:String(ay)===String(ay.reverse())},{reverse:function(){return Fj(this)&&(this.length=this.length),jj(this)}});var Lj=ut,zj=Lj("Array","reverse"),Hj=Le,Vj=zj,Vh=Array.prototype,Wj=function(i){var r=i.reverse;return i===Vh||Hj(Vh,i)&&r===Vh.reverse?Vj:r},Uj=Wj,Hw=Uj,Kj=Hw,Gj=Y(Kj),oy=va,qj=TypeError,Vw=function(i,r){if(!delete i[r])throw new qj("Cannot delete property "+oy(r)+" of "+oy(i))},Yj=U,Xj=Pt,Jj=dl,Zj=sl,Qj=Lt,e3=Rw,t3=ul,r3=hl,i3=ga,Wh=Vw,n3=ko,a3=n3("splice"),o3=Math.max,s3=Math.min;Yj({target:"Array",proto:!0,forced:!a3},{splice:function(r,e){var t=Xj(this),n=Qj(t),a=Jj(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=s3(o3(Zj(e),0),n-a)),t3(n+s-u),l=r3(t,u),h=0;hn-u+s;h--)Wh(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:Wh(t,c);for(h=0;ha;)for(var u=_3(arguments[a++]),l=o?E3(Kh(u),o(u)):Kh(u),h=l.length,d=0,c;h>d;)c=l[d++],(!sy||y3(s,u,c))&&(t[c]=u[c]);return t}:wn,O3=U,ly=S3;O3({target:"Object",stat:!0,arity:2,forced:Object.assign!==ly},{assign:ly});var T3=$e,I3=T3.Object.assign,k3=I3,P3=k3,x3=P3,C3=Y(x3),A3=U,D3=le,R3=Pt,Uw=$l,N3=rw,M3=D3(function(){Uw(1)});A3({target:"Object",stat:!0,forced:M3,sham:!N3},{getPrototypeOf:function(r){return Uw(R3(r))}});var B3=$e,F3=B3.Object.getPrototypeOf,j3=F3,L3=j3,z3=U,H3=Ke,V3=rn;z3({target:"Object",stat:!0,sham:!H3},{create:V3});var W3=$e,U3=W3.Object,K3=function(r,e){return U3.create(r,e)},G3=K3,Kw=G3,q3=Kw,Y3=Y(q3),Fd=$e,X3=ha;Fd.JSON||(Fd.JSON={stringify:JSON.stringify});var J3=function(r,e,t){return X3(Fd.JSON.stringify,null,arguments)},Z3=J3,Q3=Z3,eL=Q3,tL=Y(eL),rL=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",iL=TypeError,Gw=function(i,r){if(ie,o=aL(t)?t:hL(t),s=a?uL(arguments,e):[],u=a?function(){nL(o,this,s)}:o;return r?i(u,n):i(u)}:i},dL=U,Xw=be,fL=Yw,hy=fL(Xw.setInterval,!0);dL({global:!0,bind:!0,forced:Xw.setInterval!==hy},{setInterval:hy});var vL=U,Jw=be,pL=Yw,cy=pL(Jw.setTimeout,!0);vL({global:!0,bind:!0,forced:Jw.setTimeout!==cy},{setTimeout:cy});var gL=$e,yL=gL.setTimeout,mL=yL,bL=Y(mL),Zw={exports:{}};(function(i){function r(t){if(t)return e(t);this._callbacks=new Map}function e(t){return Object.assign(t,r.prototype),t._callbacks=new Map,t}r.prototype.on=function(t,n){const a=this._callbacks.get(t)??[];return a.push(n),this._callbacks.set(t,a),this},r.prototype.once=function(t,n){const a=(...o)=>{this.off(t,a),n.apply(this,o)};return a.fn=n,this.on(t,a),this},r.prototype.off=function(t,n){if(t===void 0&&n===void 0)return this._callbacks.clear(),this;if(n===void 0)return this._callbacks.delete(t),this;const a=this._callbacks.get(t);if(a){for(const[o,s]of a.entries())if(s===n||s.fn===n){a.splice(o,1);break}a.length===0?this._callbacks.delete(t):this._callbacks.set(t,a)}return this},r.prototype.emit=function(t,...n){const a=this._callbacks.get(t);if(a){const o=[...a];for(const s of o)s.apply(this,n)}return this},r.prototype.listeners=function(t){return this._callbacks.get(t)??[]},r.prototype.listenerCount=function(t){if(t)return this.listeners(t).length;let n=0;for(const a of this._callbacks.values())n+=a.length;return n},r.prototype.hasListeners=function(t){return this.listenerCount(t)>0},r.prototype.addEventListener=r.prototype.on,r.prototype.removeListener=r.prototype.off,r.prototype.removeEventListener=r.prototype.off,r.prototype.removeAllListeners=r.prototype.off,i.exports=r})(Zw);var $L=Zw.exports,wL=Y($L);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function sr(){return sr=Object.assign||function(i){for(var r=1;r"u"?{style:{}}:document.createElement("div"),EL="function",Nn=Math.round,Ki=Math.abs,hv=Date.now;function Il(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?kr={}:kr=window;var Qw=Il(_L.style,"touchAction"),e_=Qw!==void 0;function SL(){if(!e_)return!1;var i={},r=kr.CSS&&kr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?kr.CSS.supports("touch-action",e):!0}),i}var t_="compute",r_="auto",Ld="manipulation",Ni="none",ho="pan-x",co="pan-y",Ds=SL(),OL=/mobile|tablet|ip(ad|hone|od)|android/i,i_="ontouchstart"in kr,TL=Il(kr,"PointerEvent")!==void 0,IL=i_&&OL.test(navigator.userAgent),Fo="touch",kL="pen",cv="mouse",PL="kinect",xL=25,pt=1,an=2,Be=4,Tt=8,Au=1,jo=2,Lo=4,zo=8,Zn=16,gr=jo|Lo,Mi=zo|Zn,n_=gr|Mi,a_=["x","y"],Du=["clientX","clientY"];function Pr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function CL(i){if(xi(i,Ni))return Ni;var r=xi(i,ho),e=xi(i,co);return r&&e?Ni:r||e?r?ho:co:xi(i,Ld)?Ld:r_}var o_=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===t_&&(t=this.compute()),e_&&this.manager.element.style&&Ds[t]&&(this.manager.element.style[Qw]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Pr(this.manager.recognizers,function(n){kl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),CL(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=xi(o,Ni)&&!Ds[Ni],u=xi(o,co)&&!Ds[co],l=xi(o,ho)&&!Ds[ho];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&gr||l&&a&Mi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function dv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function s_(i){var r=i.length;if(r===1)return{x:Nn(i[0].clientX),y:Nn(i[0].clientY)};for(var e=0,t=0,n=0;n=Ki(r)?i<0?jo:Lo:r<0?zo:Zn}function AL(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===pt||a.eventType===Be)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function l_(i,r,e){return{x:r/i||0,y:e/i||0}}function DL(i,r){return Ru(r[0],r[1],Du)/Ru(i[0],i[1],Du)}function RL(i,r){return zd(r[1],r[0],Du)+zd(i[1],i[0],Du)}function NL(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==Tt&&(t>xL||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=l_(t,u,l);a=h.x,o=h.y,n=Ki(h.x)>Ki(h.y)?h.x:h.y,s=u_(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function ML(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=fy(r)),n>1&&!e.firstMultiple?e.firstMultiple=fy(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=s_(t);r.timeStamp=hv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=zd(s,u),r.distance=Ru(s,u),AL(e,r),r.offsetDirection=u_(r.deltaX,r.deltaY);var l=l_(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Ki(l.x)>Ki(l.y)?l.x:l.y,r.scale=o?DL(o.pointers,t):1,r.rotation=o?RL(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,NL(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,dv(c,h)&&(h=c),r.target=h}function BL(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r&pt&&t-n===0,o=r&(Be|Tt)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,ML(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function fo(i){return i.trim().split(/\s+/g)}function Xa(i,r,e){Pr(fo(r),function(t){i.addEventListener(t,e,!1)})}function Ja(i,r,e){Pr(fo(r),function(t){i.removeEventListener(t,e,!1)})}function vy(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var wa=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){kl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&Xa(this.element,this.evEl,this.domHandler),this.evTarget&&Xa(this.target,this.evTarget,this.domHandler),this.evWin&&Xa(vy(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&Ja(this.element,this.evEl,this.domHandler),this.evTarget&&Ja(this.target,this.evTarget,this.domHandler),this.evWin&&Ja(vy(this.element),this.evWin,this.domHandler)},i}();function Gi(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var LL={touchstart:pt,touchmove:an,touchend:Be,touchcancel:Tt},zL="touchstart touchmove touchend touchcancel",vv=function(i){Xt(r,i);function r(){var t;return r.prototype.evTarget=zL,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=LL[n.type],o=HL.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Fo,srcEvent:n})},r}(wa);function HL(i,r){var e=vo(i.touches),t=this.targetIds;if(r&(pt|an)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=vo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return dv(l.target,u)}),r===pt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,KL)}}function GL(i,r){i&pt?(this.primaryTouch=r.changedPointers[0].identifier,gy.call(this,r)):i&(Be|Tt)&&gy.call(this,r)}function qL(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=ni&&o(n.options.event+yy(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=fr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return ea.prototype.attrTest.call(this,n)&&(this.state&qt||!(this.state&qt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=v_(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(ea),p_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"swipe",threshold:10,velocity:.3,direction:gr|Mi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return gv.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(gr|Mi)?o=n.overallVelocity:a&gr?o=n.overallVelocityX:a&Mi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Ki(o)>this.options.velocity&&n.eventType&Be},e.emit=function(n){var a=v_(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(ea),g_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Ni]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&qt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(ea),y_=function(i){Xt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,sr({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[Ni]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&qt)},r}(ea),m_=function(i){Xt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,sr({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[r_]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(Be|Tt)&&!l)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=xr,a.tryEmit()},o.time);else if(n.eventType&Be)return xr;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===xr&&(n&&n.eventType&Be?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=hv(),this.manager.emit(this.options.event,this._input)))},r}(Ho),b_={domEvents:!1,touchAction:t_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},my=[[y_,{enable:!1}],[g_,{enable:!1},["rotate"]],[p_,{direction:gr}],[gv,{direction:gr},["swipe"]],[Hd],[Hd,{event:"doubletap",taps:2},["tap"]],[m_]],ZL=1,by=2;function $y(i,r){var e=i.element;if(e.style){var t;Pr(i.options.cssProps,function(n,a){t=Il(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function QL(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var wy=function(){function i(e,t){var n=this;this.options=Ui({},b_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=YL(this),this.touchAction=new o_(this,this.options.touchAction),$y(this,!0),Pr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Ui(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?by:ZL},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&xr)&&(n.curRecognizer=null,s=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var w_=$_(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function l5(i,r){var e;if(i){if(typeof i=="string")return Ey(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ey(i,r)}}function Ey(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?e-1:0),n=1;n2){var t;return Nu.apply(void 0,Ol(t=[S_(r[0],r[1])]).call(t,Et(Tl(r).call(r,2))))}var n=r[0],a=r[1];if(n instanceof Date&&a instanceof Date)return n.setTime(a.getTime()),n;var o=__(hj(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===E_?delete n[u]:n[u]!==null&&a[u]!==null&&typeof n[u]=="object"&&typeof a[u]=="object"&&!Bt(n[u])&&!Bt(a[u])?n[u]=Nu(n[u],a[u]):n[u]=O_(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function O_(i){return Bt(i)?rr(i).call(i,function(r){return O_(r)}):typeof i=="object"&&i!==null?i instanceof Date?new Date(i.getTime()):Nu({},i):i}function T_(i){for(var r=0,e=lv(i);ro;)u=t(e,s=n[o++]),u!==void 0&&Y5(a,s,u);return a}});var X5=$e,J5=X5.Object.getOwnPropertyDescriptors,Z5=J5,Q5=Z5,ez=Q5,ky=Y(ez),M_={exports:{}},tz=U,rz=Ke,Py=cl.f;tz({target:"Object",stat:!0,forced:Object.defineProperties!==Py,sham:!rz},{defineProperties:Py});var iz=$e,B_=iz.Object,nz=M_.exports=function(r,e){return B_.defineProperties(r,e)};B_.defineProperties.sham&&(nz.sham=!0);var az=M_.exports,oz=az,sz=oz,uz=sz,lz=Y(uz),hz=p0,cz=Y(hz);function F_(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var dz=Kw,fz=dz,vz=fz,pz=vz,j_=pz,gz=Y(j_),yz=U,mz=aw;yz({target:"Object",stat:!0},{setPrototypeOf:mz});var bz=$e,$z=bz.Object.setPrototypeOf,wz=$z,_z=wz,Ez=_z,Sz=Ez,Oz=Sz,Tz=Oz,L_=Tz,Vd=Y(L_),Iz=ww,kz=Iz,Pz=kz,xz=Pz,Cz=xz,z_=Y(Cz);function Wd(i,r){var e;return Wd=Vd?z_(e=Vd).call(e):function(n,a){return n.__proto__=a,n},Wd(i,r)}function Az(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=gz(r.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),ol(i,"prototype",{writable:!1}),Wd(i,r)}function Dz(i,r){if(r&&(Jn(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F_(i)}var Rz=L3,Nz=Rz,Mz=Nz,Bz=Mz,H_=Bz,xy=Y(H_);function Mu(i){var r;return Mu=Vd?z_(r=xy).call(r):function(t){return t.__proto__||xy(t)},Mu(i)}var V_={exports:{}},W_={exports:{}};(function(i){var r=iv,e=gw;function t(n){"@babel/helpers - typeof";return i.exports=t=typeof r=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof r=="function"&&a.constructor===r&&a!==r.prototype?"symbol":typeof a},i.exports.__esModule=!0,i.exports.default=i.exports,t(n)}i.exports=t,i.exports.__esModule=!0,i.exports.default=i.exports})(W_);var Fz=W_.exports,jz=zw,Lz=jz,zz=Lz,Hz=zz,Vz=Hz,Cy=ze,Wz=uv,Uz=Qi,Kz=xt,Gz=function(i,r,e){for(var t=Wz(r),n=Kz.f,a=Uz.f,o=0;od;d++)if(f=y(i[d]),f&&Dy(Ny,f))return f;return new fu(!1)}l=p4(i,h)}for(v=a?i.next:l.next;!(p=h4(v,l)).done;){try{f=y(p.value)}catch(m){Ry(l,"throw",m)}if(typeof f=="object"&&f&&Dy(Ny,f))return f}return new fu(!1)},m4=tn,b4=function(i,r){return i===void 0?arguments.length<2?"":r:m4(i)},$4=U,w4=Le,_4=$l,Bu=aw,E4=Gz,G_=rn,qh=Lr,Yh=en,S4=Xz,O4=u4,T4=on,I4=b4,k4=we,P4=k4("toStringTag"),Fu=Error,x4=[].push,ta=function(r,e){var t=w4(Xh,this),n;Bu?n=Bu(new Fu,t?_4(this):Xh):(n=t?this:G_(Xh),qh(n,P4,"Error")),e!==void 0&&qh(n,"message",I4(e)),O4(n,ta,n.stack,1),arguments.length>2&&S4(n,arguments[2]);var a=[];return T4(r,x4,{that:a}),qh(n,"errors",a),n};Bu?Bu(ta,Fu):E4(ta,Fu,{name:!0});var Xh=ta.prototype=G_(Fu.prototype,{constructor:Yh(1,ta),message:Yh(1,""),name:Yh(1,"AggregateError")});$4({global:!0,constructor:!0,arity:2},{AggregateError:ta});var C4=yt,A4=qf,D4=we,R4=Ke,My=D4("species"),q_=function(i){var r=C4(i);R4&&r&&!r[My]&&A4(r,My,{configurable:!0,get:function(){return this}})},N4=Le,M4=TypeError,mv=function(i,r){if(N4(r,i))return i;throw new M4("Incorrect invocation")},By=jt,B4=I_,F4=ca,j4=we,L4=j4("species"),Y_=function(i,r){var e=By(i).constructor,t;return e===void 0||F4(t=By(e)[L4])?r:B4(t)},z4=vi,X_=/(?:ipad|iphone|ipod).*applewebkit/i.test(z4),Ft=be,H4=ha,V4=pi,Fy=Oe,W4=ze,J_=le,jy=O0,U4=No,Ly=Vf,K4=Gw,G4=X_,q4=Bo,Ud=Ft.setImmediate,Kd=Ft.clearImmediate,Y4=Ft.process,Jh=Ft.Dispatch,X4=Ft.Function,zy=Ft.MessageChannel,J4=Ft.String,Zh=0,Za={},Hy="onreadystatechange",go,Ii,Qh,ec;J_(function(){go=Ft.location});var bv=function(i){if(W4(Za,i)){var r=Za[i];delete Za[i],r()}},tc=function(i){return function(){bv(i)}},Vy=function(i){bv(i.data)},Wy=function(i){Ft.postMessage(J4(i),go.protocol+"//"+go.host)};(!Ud||!Kd)&&(Ud=function(r){K4(arguments.length,1);var e=Fy(r)?r:X4(r),t=U4(arguments,1);return Za[++Zh]=function(){H4(e,void 0,t)},Ii(Zh),Zh},Kd=function(r){delete Za[r]},q4?Ii=function(i){Y4.nextTick(tc(i))}:Jh&&Jh.now?Ii=function(i){Jh.now(tc(i))}:zy&&!G4?(Qh=new zy,ec=Qh.port2,Qh.port1.onmessage=Vy,Ii=V4(ec.postMessage,ec)):Ft.addEventListener&&Fy(Ft.postMessage)&&!Ft.importScripts&&go&&go.protocol!=="file:"&&!J_(Wy)?(Ii=Wy,Ft.addEventListener("message",Vy,!1)):Hy in Ly("script")?Ii=function(i){jy.appendChild(Ly("script"))[Hy]=function(){jy.removeChild(this),bv(i)}}:Ii=function(i){setTimeout(tc(i),0)});var Z_={set:Ud,clear:Kd},Q_=function(){this.head=null,this.tail=null};Q_.prototype={add:function(i){var r={item:i,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var i=this.head;if(i){var r=this.head=i.next;return r===null&&(this.tail=null),i.item}}};var eE=Q_,Z4=vi,Q4=/ipad|iphone|ipod/i.test(Z4)&&typeof Pebble<"u",e6=vi,t6=/web0s(?!.*chrome)/i.test(e6),qi=be,Uy=pi,r6=Qi.f,rc=Z_.set,i6=eE,n6=X_,a6=Q4,o6=t6,ic=Bo,Ky=qi.MutationObserver||qi.WebKitMutationObserver,Gy=qi.document,qy=qi.process,Ns=qi.Promise,Yy=r6(qi,"queueMicrotask"),Gd=Yy&&Yy.value,_n,nc,ac,Ms,Xy;if(!Gd){var Bs=new i6,Fs=function(){var i,r;for(ic&&(i=qy.domain)&&i.exit();r=Bs.get();)try{r()}catch(e){throw Bs.head&&_n(),e}i&&i.enter()};!n6&&!ic&&!o6&&Ky&&Gy?(nc=!0,ac=Gy.createTextNode(""),new Ky(Fs).observe(ac,{characterData:!0}),_n=function(){ac.data=nc=!nc}):!a6&&Ns&&Ns.resolve?(Ms=Ns.resolve(void 0),Ms.constructor=Ns,Xy=Uy(Ms.then,Ms),_n=function(){Xy(Fs)}):ic?_n=function(){qy.nextTick(Fs)}:(rc=Uy(rc,qi),_n=function(){rc(Fs)}),Gd=function(i){Bs.head||_n(),Bs.add(i)}}var s6=Gd,u6=function(i,r){try{arguments.length===1?console.error(i):console.error(i,r)}catch{}},_a=function(i){try{return{error:!1,value:i()}}catch(r){return{error:!0,value:r}}},l6=be,Ea=l6.Promise,tE=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",h6=tE,c6=Bo,d6=!h6&&!c6&&typeof window=="object"&&typeof document=="object",f6=be,Qa=Ea,v6=Oe,p6=d0,g6=m0,y6=we,m6=d6,b6=tE,oc=da,Jy=Qa&&Qa.prototype,$6=y6("species"),qd=!1,rE=v6(f6.PromiseRejectionEvent),w6=p6("Promise",function(){var i=g6(Qa),r=i!==String(Qa);if(!r&&oc===66||!(Jy.catch&&Jy.finally))return!0;if(!oc||oc<51||!/native code/.test(i)){var e=new Qa(function(a){a(1)}),t=function(a){a(function(){},function(){})},n=e.constructor={};if(n[$6]=t,qd=e.then(function(){})instanceof t,!qd)return!0}return!r&&(m6||b6)&&!rE}),Vo={CONSTRUCTOR:w6,REJECTION_EVENT:rE,SUBCLASSING:qd},$r={},Zy=kt,_6=TypeError,E6=function(i){var r,e;this.promise=new i(function(t,n){if(r!==void 0||e!==void 0)throw new _6("Bad Promise constructor");r=t,e=n}),this.resolve=Zy(r),this.reject=Zy(e)};$r.f=function(i){return new E6(i)};var S6=U,ju=Bo,li=be,Wo=Ge,O6=ya,T6=nn,I6=q_,k6=kt,Yd=Oe,P6=it,x6=mv,C6=Y_,iE=Z_.set,$v=s6,A6=u6,D6=_a,R6=eE,nE=ma,Xd=Ea,aE=Vo,oE=$r,Pl="Promise",sE=aE.CONSTRUCTOR,N6=aE.REJECTION_EVENT,sc=nE.getterFor(Pl),M6=nE.set,B6=Xd&&Xd.prototype,Bn=Xd,uc=B6,uE=li.TypeError,Jd=li.document,wv=li.process,Zd=oE.f,F6=Zd,j6=!!(Jd&&Jd.createEvent&&li.dispatchEvent),lE="unhandledrejection",L6="rejectionhandled",Qy=0,hE=1,z6=2,_v=1,cE=2,js,em,H6,dE=function(i){var r;return P6(i)&&Yd(r=i.then)?r:!1},fE=function(i,r){var e=r.value,t=r.state===hE,n=t?i.ok:i.fail,a=i.resolve,o=i.reject,s=i.domain,u,l,h;try{n?(t||(r.rejection===cE&&W6(r),r.rejection=_v),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),h=!0)),u===i.promise?o(new uE("Promise-chain cycle")):(l=dE(u))?Wo(l,u,a,o):a(u)):o(e)}catch(d){s&&!h&&s.exit(),o(d)}},vE=function(i,r){i.notified||(i.notified=!0,$v(function(){for(var e=i.reactions,t;t=e.get();)fE(t,i);i.notified=!1,r&&!i.rejection&&V6(i)}))},pE=function(i,r,e){var t,n;j6?(t=Jd.createEvent("Event"),t.promise=r,t.reason=e,t.initEvent(i,!1,!0),li.dispatchEvent(t)):t={promise:r,reason:e},!N6&&(n=li["on"+i])?n(t):i===lE&&A6("Unhandled promise rejection",e)},V6=function(i){Wo(iE,li,function(){var r=i.facade,e=i.value,t=tm(i),n;if(t&&(n=D6(function(){ju?wv.emit("unhandledRejection",e,r):pE(lE,r,e)}),i.rejection=ju||tm(i)?cE:_v,n.error))throw n.value})},tm=function(i){return i.rejection!==_v&&!i.parent},W6=function(i){Wo(iE,li,function(){var r=i.facade;ju?wv.emit("rejectionHandled",r):pE(L6,r,i.value)})},Fn=function(i,r,e){return function(t){i(r,t,e)}},Un=function(i,r,e){i.done||(i.done=!0,e&&(i=e),i.value=r,i.state=z6,vE(i,!0))},Qd=function(i,r,e){if(!i.done){i.done=!0,e&&(i=e);try{if(i.facade===r)throw new uE("Promise can't be resolved itself");var t=dE(r);t?$v(function(){var n={done:!1};try{Wo(t,r,Fn(Qd,n,i),Fn(Un,n,i))}catch(a){Un(n,a,i)}}):(i.value=r,i.state=hE,vE(i,!1))}catch(n){Un({done:!1},n,i)}}};sE&&(Bn=function(r){x6(this,uc),k6(r),Wo(js,this);var e=sc(this);try{r(Fn(Qd,e),Fn(Un,e))}catch(t){Un(e,t)}},uc=Bn.prototype,js=function(r){M6(this,{type:Pl,done:!1,notified:!1,parent:!1,reactions:new R6,rejection:!1,state:Qy,value:void 0})},js.prototype=O6(uc,"then",function(r,e){var t=sc(this),n=Zd(C6(this,Bn));return t.parent=!0,n.ok=Yd(r)?r:!0,n.fail=Yd(e)&&e,n.domain=ju?wv.domain:void 0,t.state===Qy?t.reactions.add(n):$v(function(){fE(n,t)}),n.promise}),em=function(){var i=new js,r=sc(i);this.promise=i,this.resolve=Fn(Qd,r),this.reject=Fn(Un,r)},oE.f=Zd=function(i){return i===Bn||i===H6?new em(i):F6(i)});S6({global:!0,constructor:!0,wrap:!0,forced:sE},{Promise:Bn});T6(Bn,Pl,!1,!0);I6(Pl);var U6=Ea,K6=kw,G6=Vo.CONSTRUCTOR,xl=G6||!K6(function(i){U6.all(i).then(void 0,function(){})}),q6=U,Y6=Ge,X6=kt,J6=$r,Z6=_a,Q6=on,eH=xl;q6({target:"Promise",stat:!0,forced:eH},{all:function(r){var e=this,t=J6.f(e),n=t.resolve,a=t.reject,o=Z6(function(){var s=X6(e.resolve),u=[],l=0,h=1;Q6(r,function(d){var c=l++,f=!1;h++,Y6(s,e,d).then(function(v){f||(f=!0,u[c]=v,--h||n(u))},a)}),--h||n(u)});return o.error&&a(o.value),t.promise}});var tH=U,rH=Vo.CONSTRUCTOR,rm=Ea;rm&&rm.prototype;tH({target:"Promise",proto:!0,forced:rH,real:!0},{catch:function(i){return this.then(void 0,i)}});var iH=U,nH=Ge,aH=kt,oH=$r,sH=_a,uH=on,lH=xl;iH({target:"Promise",stat:!0,forced:lH},{race:function(r){var e=this,t=oH.f(e),n=t.reject,a=sH(function(){var o=aH(e.resolve);uH(r,function(s){nH(o,e,s).then(t.resolve,n)})});return a.error&&n(a.value),t.promise}});var hH=U,cH=Ge,dH=$r,fH=Vo.CONSTRUCTOR;hH({target:"Promise",stat:!0,forced:fH},{reject:function(r){var e=dH.f(this);return cH(e.reject,void 0,r),e.promise}});var vH=jt,pH=it,gH=$r,gE=function(i,r){if(vH(i),pH(r)&&r.constructor===i)return r;var e=gH.f(i),t=e.resolve;return t(r),e.promise},yH=U,mH=yt,bH=kk,$H=Ea,wH=Vo.CONSTRUCTOR,_H=gE,EH=mH("Promise"),SH=!wH;yH({target:"Promise",stat:!0,forced:bH},{resolve:function(r){return _H(SH&&this===EH?$H:this,r)}});var OH=U,TH=Ge,IH=kt,kH=$r,PH=_a,xH=on,CH=xl;OH({target:"Promise",stat:!0,forced:CH},{allSettled:function(r){var e=this,t=kH.f(e),n=t.resolve,a=t.reject,o=PH(function(){var s=IH(e.resolve),u=[],l=0,h=1;xH(r,function(d){var c=l++,f=!1;h++,TH(s,e,d).then(function(v){f||(f=!0,u[c]={status:"fulfilled",value:v},--h||n(u))},function(v){f||(f=!0,u[c]={status:"rejected",reason:v},--h||n(u))})}),--h||n(u)});return o.error&&a(o.value),t.promise}});var AH=U,DH=Ge,RH=kt,NH=yt,MH=$r,BH=_a,FH=on,jH=xl,im="No one promise resolved";AH({target:"Promise",stat:!0,forced:jH},{any:function(r){var e=this,t=NH("AggregateError"),n=MH.f(e),a=n.resolve,o=n.reject,s=BH(function(){var u=RH(e.resolve),l=[],h=0,d=1,c=!1;FH(r,function(f){var v=h++,p=!1;d++,DH(u,e,f).then(function(g){p||c||(c=!0,a(g))},function(g){p||c||(p=!0,l[v]=g,--d||o(new t(l,im)))})}),--d||o(new t(l,im))});return s.error&&o(s.value),n.promise}});var LH=U,ef=Ea,zH=le,HH=yt,VH=Oe,WH=Y_,nm=gE,UH=ef&&ef.prototype,KH=!!ef&&zH(function(){UH.finally.call({then:function(){}},function(){})});LH({target:"Promise",proto:!0,real:!0,forced:KH},{finally:function(i){var r=WH(this,HH("Promise")),e=VH(i);return this.then(e?function(t){return nm(r,i()).then(function(){return t})}:i,e?function(t){return nm(r,i()).then(function(){throw t})}:i)}});var GH=$e,qH=GH.Promise,YH=qH,XH=YH,JH=U,ZH=$r;JH({target:"Promise",stat:!0},{withResolvers:function(){var r=ZH.f(this);return{promise:r.promise,resolve:r.resolve,reject:r.reject}}});var QH=XH,e8=QH,t8=U,r8=$r,i8=_a;t8({target:"Promise",stat:!0,forced:!0},{try:function(i){var r=r8.f(this),e=i8(i);return(e.error?r.reject:r.resolve)(e.value),r.promise}});var n8=e8,a8=n8,o8=a8,s8=Hw,u8=s8,l8=u8,h8=l8,c8=h8;(function(i){var r=Fz.default,e=g0,t=iv,n=j_,a=H_,o=Vz,s=Nw,u=L_,l=o8,h=c8,d=Bw;function c(){i.exports=c=function(){return v},i.exports.__esModule=!0,i.exports.default=i.exports;var f,v={},p=Object.prototype,g=p.hasOwnProperty,y=e||function(j,P,A){j[P]=A.value},m=typeof t=="function"?t:{},b=m.iterator||"@@iterator",$=m.asyncIterator||"@@asyncIterator",S=m.toStringTag||"@@toStringTag";function _(j,P,A){return e(j,P,{value:A,enumerable:!0,configurable:!0,writable:!0}),j[P]}try{_({},"")}catch{_=function(A,W,Z){return A[W]=Z}}function C(j,P,A,W){var Z=P&&P.prototype instanceof oe?P:oe,J=n(Z.prototype),Ce=new Rt(W||[]);return y(J,"_invoke",{value:Me(j,A,Ce)}),J}function R(j,P,A){try{return{type:"normal",arg:j.call(P,A)}}catch(W){return{type:"throw",arg:W}}}v.wrap=C;var x="suspendedStart",B="suspendedYield",F="executing",X="completed",K={};function oe(){}function Qe(){}function Ne(){}var At={};_(At,b,function(){return this});var lt=a,nt=lt&<(lt(st([])));nt&&nt!==p&&g.call(nt,b)&&(At=nt);var Dt=Ne.prototype=oe.prototype=n(At);function at(j){var P;o(P=["next","throw","return"]).call(P,function(A){_(j,A,function(W){return this._invoke(A,W)})})}function ye(j,P){function A(Z,J,Ce,ht){var mt=R(j[Z],j,J);if(mt.type!=="throw"){var wi=mt.arg,Vr=wi.value;return Vr&&r(Vr)=="object"&&g.call(Vr,"__await")?P.resolve(Vr.__await).then(function(_i){A("next",_i,Ce,ht)},function(_i){A("throw",_i,Ce,ht)}):P.resolve(Vr).then(function(_i){wi.value=_i,Ce(wi)},function(_i){return A("throw",_i,Ce,ht)})}ht(mt.arg)}var W;y(this,"_invoke",{value:function(J,Ce){function ht(){return new P(function(mt,wi){A(J,Ce,mt,wi)})}return W=W?W.then(ht,ht):ht()}})}function Me(j,P,A){var W=x;return function(Z,J){if(W===F)throw new Error("Generator is already running");if(W===X){if(Z==="throw")throw J;return{value:f,done:!0}}for(A.method=Z,A.arg=J;;){var Ce=A.delegate;if(Ce){var ht=xe(Ce,A);if(ht){if(ht===K)continue;return ht}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(W===x)throw W=X,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);W=F;var mt=R(j,P,A);if(mt.type==="normal"){if(W=A.done?X:B,mt.arg===K)continue;return{value:mt.arg,done:A.done}}mt.type==="throw"&&(W=X,A.method="throw",A.arg=mt.arg)}}}function xe(j,P){var A=P.method,W=j.iterator[A];if(W===f)return P.delegate=null,A==="throw"&&j.iterator.return&&(P.method="return",P.arg=f,xe(j,P),P.method==="throw")||A!=="return"&&(P.method="throw",P.arg=new TypeError("The iterator does not provide a '"+A+"' method")),K;var Z=R(W,j.iterator,P.arg);if(Z.type==="throw")return P.method="throw",P.arg=Z.arg,P.delegate=null,K;var J=Z.arg;return J?J.done?(P[j.resultName]=J.value,P.next=j.nextLoc,P.method!=="return"&&(P.method="next",P.arg=f),P.delegate=null,K):J:(P.method="throw",P.arg=new TypeError("iterator result is not an object"),P.delegate=null,K)}function ot(j){var P,A={tryLoc:j[0]};1 in j&&(A.catchLoc=j[1]),2 in j&&(A.finallyLoc=j[2],A.afterLoc=j[3]),s(P=this.tryEntries).call(P,A)}function Er(j){var P=j.completion||{};P.type="normal",delete P.arg,j.completion=P}function Rt(j){this.tryEntries=[{tryLoc:"root"}],o(j).call(j,ot,this),this.reset(!0)}function st(j){if(j||j===""){var P=j[b];if(P)return P.call(j);if(typeof j.next=="function")return j;if(!isNaN(j.length)){var A=-1,W=function Z(){for(;++A=0;--Z){var J=this.tryEntries[Z],Ce=J.completion;if(J.tryLoc==="root")return W("end");if(J.tryLoc<=this.prev){var ht=g.call(J,"catchLoc"),mt=g.call(J,"finallyLoc");if(ht&&mt){if(this.prev=0;--W){var Z=this.tryEntries[W];if(Z.tryLoc<=this.prev&&g.call(Z,"finallyLoc")&&this.prev=0;--A){var W=this.tryEntries[A];if(W.finallyLoc===P)return this.complete(W.completion,W.afterLoc),Er(W),K}},catch:function(P){for(var A=this.tryEntries.length-1;A>=0;--A){var W=this.tryEntries[A];if(W.tryLoc===P){var Z=W.completion;if(Z.type==="throw"){var J=Z.arg;Er(W)}return J}}throw new Error("illegal catch attempt")},delegateYield:function(P,A,W){return this.delegate={iterator:st(P),resultName:A,nextLoc:W},this.method==="next"&&(this.arg=f),K}},v}i.exports=c,i.exports.__esModule=!0,i.exports.default=i.exports})(V_);var d8=V_.exports,vu=d8(),f8=vu;try{regeneratorRuntime=vu}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=vu:Function("r","regeneratorRuntime = r")(vu)}var $t=Y(f8),yE={exports:{}},v8=le,p8=v8(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),g8=le,y8=it,m8=fi,am=p8,pu=Object.isExtensible,b8=g8(function(){pu(1)}),$8=b8||am?function(r){return!y8(r)||am&&m8(r)==="ArrayBuffer"?!1:pu?pu(r):!0}:pu,w8=le,_8=!w8(function(){return Object.isExtensible(Object.preventExtensions({}))}),E8=U,S8=me,O8=Po,T8=it,Ev=ze,I8=xt.f,om=xo,k8=Gf,Sv=$8,P8=nl,x8=_8,mE=!1,Br=P8("meta"),C8=0,Ov=function(i){I8(i,Br,{value:{objectID:"O"+C8++,weakData:{}}})},A8=function(i,r){if(!T8(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!Ev(i,Br)){if(!Sv(i))return"F";if(!r)return"E";Ov(i)}return i[Br].objectID},D8=function(i,r){if(!Ev(i,Br)){if(!Sv(i))return!0;if(!r)return!1;Ov(i)}return i[Br].weakData},R8=function(i){return x8&&mE&&Sv(i)&&!Ev(i,Br)&&Ov(i),i},N8=function(){M8.enable=function(){},mE=!0;var i=om.f,r=S8([].splice),e={};e[Br]=1,i(e).length&&(om.f=function(t){for(var n=i(t),a=0,o=n.length;a1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),sm(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),ja&&r7(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(i,r,e){var t=r+" Iterator",n=lc(r),a=lc(t);s7(i,r,function(o,s){lm(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,Ls(void 0,!0)):Ls(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},e?"entries":"values",!e,!0),u7(r)}},l7=wE,h7=EE;l7("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},h7);var c7=$e,d7=c7.Map,f7=d7,v7=f7,p7=v7,SE=Y(p7),g7=U,y7=ba.some,m7=_l,b7=m7("some");g7({target:"Array",proto:!0,forced:!b7},{some:function(r){return y7(this,r,arguments.length>1?arguments[1]:void 0)}});var $7=ut,w7=$7("Array","some"),_7=Le,E7=w7,hc=Array.prototype,S7=function(i){var r=i.some;return i===hc||_7(hc,i)&&r===hc.some?E7:r},O7=S7,T7=O7,I7=T7,k7=Y(I7),P7=ut,x7=P7("Array","keys"),C7=x7,A7=C7,D7=zr,R7=ze,N7=Le,M7=A7,cc=Array.prototype,B7={DOMTokenList:!0,NodeList:!0},F7=function(i){var r=i.keys;return i===cc||N7(cc,i)&&r===cc.keys||R7(B7,D7(i))?M7:r},j7=F7,En=Y(j7),hm=k0,L7=Math.floor,tf=function(i,r){var e=i.length,t=L7(e/2);return e<8?z7(i,r):H7(i,tf(hm(i,0,t),r),tf(hm(i,t),r),r)},z7=function(i,r){for(var e=i.length,t=1,n,a;t0;)i[a]=i[--a];a!==t++&&(i[a]=n)}return i},H7=function(i,r,e,t){for(var n=r.length,a=e.length,o=0,s=0;o3)){if(rV)return!0;if(ym)return ym<603;var i="",r,e,t,n;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Zr.push({k:e+n,v:t})}for(Zr.sort(function(a,o){return o.v-a.v}),n=0;nvm(e)?1:-1}};X7({target:"Array",proto:!0,forced:sV},{sort:function(r){r!==void 0&&J7(r);var e=Z7(this);if(TE)return r===void 0?mm(e):mm(e,r);var t=[],n=fm(e),a,o;for(o=0;othis.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=bL(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;Wi(e=Ww(t=this._queue).call(t,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,t){var n=new i(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function cW(i,r){var e;if(i){if(typeof i=="string")return _m(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return _m(i,r)}}function _m(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);es&&(s=d,o=h)}return o}},{key:"min",value:function(t){var n=gc(this._pairs),a=n.next();if(a.done)return null;for(var o=a.value[1],s=t(a.value[1],a.value[0]);!(a=n.next()).done;){var u=bt(a.value,2),l=u[0],h=u[1],d=t(h,l);d=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function dW(i,r){var e;if(i){if(typeof i=="string")return Tm(i,r);var t=Tl(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return ov(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Tm(i,r)}}function Tm(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e"u"||!du||du.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(du(Boolean,[],function(){})),!0}catch{return!1}}function pW(i,r){return i[r]==null&&(i[r]=UV()),i}var Lu=function(i){Az(e,i);var r=fW(e);function e(t,n){var a;return tl(this,e),a=r.call(this),ii(F_(a),"_queue",null),t&&!Bt(t)&&(n=t,t=[]),a._options=n||{},a._data=new SE,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(n),a}return wl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=KV.extend(this,{replace:["add","update","remove"]})),n.queue&&typeof n.queue=="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(Bt(n)){var l=rr(n).call(n,function(c){return c[o._idProp]});if(k7(l).call(l,function(c){return o._data.has(c)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=n.length;hh?1:ls)&&(o=h,s=d)}}catch(c){u.e(c)}finally{u.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,u=yc(bm(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[n];typeof d=="number"&&(s==null||d"u"&&af!==void 0,AE={all:af,IS_HTMLDDA:SW},DE=AE,OW=DE.all,qe=DE.IS_HTMLDDA?function(i){return typeof i=="function"||i===OW}:function(i){return typeof i=="function"},Sa={},TW=ne,Ye=!TW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),IW=Uo,Vs=Function.prototype.call,zt=IW?Vs.bind(Vs):function(){return Vs.apply(Vs,arguments)},Cl={},RE={}.propertyIsEnumerable,NE=Object.getOwnPropertyDescriptor,kW=NE&&!RE.call({1:2},1);Cl.f=kW?function(r){var e=NE(this,r);return!!e&&e.enumerable}:RE;var Go=function(i,r){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:r}},PW=se,xW=ne,CW=Hr,bc=Object,AW=PW("".split),Al=xW(function(){return!bc("z").propertyIsEnumerable(0)})?function(i){return CW(i)==="String"?AW(i,""):bc(i)}:bc,Oa=function(i){return i==null},DW=Oa,RW=TypeError,qo=function(i){if(DW(i))throw new RW("Can't call method on "+i);return i},NW=Al,MW=qo,wr=function(i){return NW(MW(i))},Pm=qe,ME=AE,BW=ME.all,Xe=ME.IS_HTMLDDA?function(i){return typeof i=="object"?i!==null:Pm(i)||i===BW}:function(i){return typeof i=="object"?i!==null:Pm(i)},ae={},$c=ae,wc=Ie,FW=qe,xm=function(i){return FW(i)?i:void 0},Jt=function(i,r){return arguments.length<2?xm($c[i])||xm(wc[i]):$c[i]&&$c[i][r]||wc[i]&&wc[i][r]},jW=se,Re=jW({}.isPrototypeOf),Yo=typeof navigator<"u"&&String(navigator.userAgent)||"",BE=Ie,_c=Yo,Cm=BE.process,Am=BE.Deno,Dm=Cm&&Cm.versions||Am&&Am.version,Rm=Dm&&Dm.v8,ir,zu;Rm&&(ir=Rm.split("."),zu=ir[0]>0&&ir[0]<4?1:+(ir[0]+ir[1]));!zu&&_c&&(ir=_c.match(/Edge\/(\d+)/),(!ir||ir[1]>=74)&&(ir=_c.match(/Chrome\/(\d+)/),ir&&(zu=+ir[1])));var Xo=zu,Nm=Xo,LW=ne,zW=Ie,HW=zW.String,Ta=!!Object.getOwnPropertySymbols&&!LW(function(){var i=Symbol("symbol detection");return!HW(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&Nm&&Nm<41}),VW=Ta,FE=VW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",WW=Jt,UW=qe,KW=Re,GW=FE,qW=Object,Jo=GW?function(i){return typeof i=="symbol"}:function(i){var r=WW("Symbol");return UW(r)&&KW(r.prototype,qW(i))},YW=String,Ia=function(i){try{return YW(i)}catch{return"Object"}},XW=qe,JW=Ia,ZW=TypeError,sn=function(i){if(XW(i))return i;throw new ZW(JW(i)+" is not a function")},QW=sn,e9=Oa,kv=function(i,r){var e=i[r];return e9(e)?void 0:QW(e)},Ec=zt,Sc=qe,Oc=Xe,t9=TypeError,r9=function(i,r){var e,t;if(r==="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i))||Sc(e=i.valueOf)&&!Oc(t=Ec(e,i))||r!=="string"&&Sc(e=i.toString)&&!Oc(t=Ec(e,i)))return t;throw new t9("Can't convert object to primitive value")},jE={exports:{}},Mm=Ie,i9=Object.defineProperty,n9=function(i,r){try{i9(Mm,i,{value:r,configurable:!0,writable:!0})}catch{Mm[i]=r}return r},a9=Ie,o9=n9,Bm="__core-js_shared__",s9=a9[Bm]||o9(Bm,{}),Pv=s9,Fm=Pv;(jE.exports=function(i,r){return Fm[i]||(Fm[i]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var ka=jE.exports,u9=qo,l9=Object,Ct=function(i){return l9(u9(i))},h9=se,c9=Ct,d9=h9({}.hasOwnProperty),Je=Object.hasOwn||function(r,e){return d9(c9(r),e)},f9=se,v9=0,p9=Math.random(),g9=f9(1 .toString),Dl=function(i){return"Symbol("+(i===void 0?"":i)+")_"+g9(++v9+p9,36)},y9=Ie,m9=ka,jm=Je,b9=Dl,$9=Ta,w9=FE,Ln=y9.Symbol,Tc=m9("wks"),_9=w9?Ln.for||Ln:Ln&&Ln.withoutSetter||b9,ke=function(i){return jm(Tc,i)||(Tc[i]=$9&&jm(Ln,i)?Ln[i]:_9("Symbol."+i)),Tc[i]},E9=zt,Lm=Xe,zm=Jo,S9=kv,O9=r9,T9=ke,I9=TypeError,k9=T9("toPrimitive"),P9=function(i,r){if(!Lm(i)||zm(i))return i;var e=S9(i,k9),t;if(e){if(r===void 0&&(r="default"),t=E9(e,i,r),!Lm(t)||zm(t))return t;throw new I9("Can't convert object to primitive value")}return r===void 0&&(r="number"),O9(i,r)},x9=P9,C9=Jo,Rl=function(i){var r=x9(i,"string");return C9(r)?r:r+""},A9=Ie,Hm=Xe,of=A9.document,D9=Hm(of)&&Hm(of.createElement),LE=function(i){return D9?of.createElement(i):{}},R9=Ye,N9=ne,M9=LE,zE=!R9&&!N9(function(){return Object.defineProperty(M9("div"),"a",{get:function(){return 7}}).a!==7}),B9=Ye,F9=zt,j9=Cl,L9=Go,z9=wr,H9=Rl,V9=Je,W9=zE,Vm=Object.getOwnPropertyDescriptor;Sa.f=B9?Vm:function(r,e){if(r=z9(r),e=H9(e),W9)try{return Vm(r,e)}catch{}if(V9(r,e))return L9(!F9(j9.f,r,e),r[e])};var U9=ne,K9=qe,G9=/#|\.prototype\./,Zo=function(i,r){var e=Y9[q9(i)];return e===J9?!0:e===X9?!1:K9(r)?U9(r):!!r},q9=Zo.normalize=function(i){return String(i).replace(G9,".").toLowerCase()},Y9=Zo.data={},X9=Zo.NATIVE="N",J9=Zo.POLYFILL="P",Z9=Zo,Wm=Iv,Q9=sn,eU=Uo,tU=Wm(Wm.bind),Qo=function(i,r){return Q9(i),r===void 0?i:eU?tU(i,r):function(){return i.apply(r,arguments)}},Ht={},rU=Ye,iU=ne,HE=rU&&iU(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),nU=Xe,aU=String,oU=TypeError,Vt=function(i){if(nU(i))return i;throw new oU(aU(i)+" is not an object")},sU=Ye,uU=zE,lU=HE,Ws=Vt,Um=Rl,hU=TypeError,Ic=Object.defineProperty,cU=Object.getOwnPropertyDescriptor,kc="enumerable",Pc="configurable",xc="writable";Ht.f=sU?lU?function(r,e,t){if(Ws(r),e=Um(e),Ws(t),typeof r=="function"&&e==="prototype"&&"value"in t&&xc in t&&!t[xc]){var n=cU(r,e);n&&n[xc]&&(r[e]=t.value,t={configurable:Pc in t?t[Pc]:n[Pc],enumerable:kc in t?t[kc]:n[kc],writable:!1})}return Ic(r,e,t)}:Ic:function(r,e,t){if(Ws(r),e=Um(e),Ws(t),uU)try{return Ic(r,e,t)}catch{}if("get"in t||"set"in t)throw new hU("Accessors not supported");return"value"in t&&(r[e]=t.value),r};var dU=Ye,fU=Ht,vU=Go,Pa=dU?function(i,r,e){return fU.f(i,r,vU(1,e))}:function(i,r,e){return i[r]=e,i},Us=Ie,pU=Ko,gU=Iv,yU=qe,mU=Sa.f,bU=Z9,Sn=ae,$U=Qo,On=Pa,Km=Je,wU=function(i){var r=function(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return pU(i,this,arguments)};return r.prototype=i.prototype,r},q=function(i,r){var e=i.target,t=i.global,n=i.stat,a=i.proto,o=t?Us:n?Us[e]:(Us[e]||{}).prototype,s=t?Sn:Sn[e]||On(Sn,e,{})[e],u=s.prototype,l,h,d,c,f,v,p,g,y;for(c in r)l=bU(t?c:e+(n?".":"#")+c,i.forced),h=!l&&o&&Km(o,c),v=s[c],h&&(i.dontCallGetSet?(y=mU(o,c),p=y&&y.value):p=o[c]),f=h&&p?p:r[c],!(h&&typeof v==typeof f)&&(i.bind&&h?g=$U(f,Us):i.wrap&&h?g=wU(f):a&&yU(f)?g=gU(f):g=f,(i.sham||f&&f.sham||v&&v.sham)&&On(g,"sham",!0),On(s,c,g),a&&(d=e+"Prototype",Km(Sn,d)||On(Sn,d,{}),On(Sn[d],c,f),i.real&&u&&(l||!u[c])&&On(u,c,f)))},_U=Math.ceil,EU=Math.floor,SU=Math.trunc||function(r){var e=+r;return(e>0?EU:_U)(e)},OU=SU,Nl=function(i){var r=+i;return r!==r||r===0?0:OU(r)},TU=Nl,IU=Math.max,kU=Math.min,es=function(i,r){var e=TU(i);return e<0?IU(e+r,0):kU(e,r)},PU=Nl,xU=Math.min,CU=function(i){return i>0?xU(PU(i),9007199254740991):0},AU=CU,Zt=function(i){return AU(i.length)},DU=wr,RU=es,NU=Zt,Gm=function(i){return function(r,e,t){var n=DU(r),a=NU(n),o=RU(t,a),s;if(i&&e!==e){for(;a>o;)if(s=n[o++],s!==s)return!0}else for(;a>o;o++)if((i||o in n)&&n[o]===e)return i||o||0;return!i&&-1}},xv={includes:Gm(!0),indexOf:Gm(!1)},ts={},MU=se,Cc=Je,BU=wr,FU=xv.indexOf,jU=ts,qm=MU([].push),VE=function(i,r){var e=BU(i),t=0,n=[],a;for(a in e)!Cc(jU,a)&&Cc(e,a)&&qm(n,a);for(;r.length>t;)Cc(e,a=r[t++])&&(~FU(n,a)||qm(n,a));return n},Cv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],LU=VE,zU=Cv,Ml=Object.keys||function(r){return LU(r,zU)},rs={};rs.f=Object.getOwnPropertySymbols;var Ym=Ye,HU=se,VU=zt,WU=ne,Ac=Ml,UU=rs,KU=Cl,GU=Ct,qU=Al,Tn=Object.assign,Xm=Object.defineProperty,YU=HU([].concat),XU=!Tn||WU(function(){if(Ym&&Tn({b:1},Tn(Xm({},"a",{enumerable:!0,get:function(){Xm(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var i={},r={},e=Symbol("assign detection"),t="abcdefghijklmnopqrst";return i[e]=7,t.split("").forEach(function(n){r[n]=n}),Tn({},i)[e]!==7||Ac(Tn({},r)).join("")!==t})?function(r,e){for(var t=GU(r),n=arguments.length,a=1,o=UU.f,s=KU.f;n>a;)for(var u=qU(arguments[a++]),l=o?YU(Ac(u),o(u)):Ac(u),h=l.length,d=0,c;h>d;)c=l[d++],(!Ym||VU(s,u,c))&&(t[c]=u[c]);return t}:Tn,JU=q,Jm=XU;JU({target:"Object",stat:!0,arity:2,forced:Object.assign!==Jm},{assign:Jm});var ZU=ae,QU=ZU.Object.assign,eK=QU,tK=eK,rK=tK,Fe=V(rK),iK=se,Bl=iK([].slice),WE=se,nK=sn,aK=Xe,oK=Je,Zm=Bl,sK=Uo,UE=Function,uK=WE([].concat),lK=WE([].join),Dc={},hK=function(i,r,e){if(!oK(Dc,r)){for(var t=[],n=0;n=.1;)v=+a[d++%o],v>h&&(v=h),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,r+=f,e+=l*f,c===!0?i.lineTo(r,e):i.moveTo(r,e),h-=v,c=!c}function OK(i,r,e,t){i.beginPath();var n=6,a=Math.PI*2/n;i.moveTo(r+t,e);for(var o=1;o1?e-1:0),n=1;n=a?i?"":void 0:(o=tb(t,n),o<55296||o>56319||n+1===a||(s=tb(t,n+1))<56320||s>57343?i?HK(t,n):o:i?VK(t,n,n+2):(o-55296<<10)+(s-56320)+65536)}},WK={codeAt:rb(!1),charAt:rb(!0)},UK=Ie,KK=qe,ib=UK.WeakMap,eS=KK(ib)&&/native code/.test(String(ib)),GK=ka,qK=Dl,nb=GK("keys"),Fl=function(i){return nb[i]||(nb[i]=qK(i))},YK=eS,tS=Ie,XK=Xe,JK=Pa,Nc=Je,Mc=Pv,ZK=Fl,QK=ts,ab="Object already initialized",uf=tS.TypeError,eG=tS.WeakMap,Hu,yo,Vu,tG=function(i){return Vu(i)?yo(i):Hu(i,{})},rG=function(i){return function(r){var e;if(!XK(r)||(e=yo(r)).type!==i)throw new uf("Incompatible receiver, "+i+" required");return e}};if(YK||Mc.state){var cr=Mc.state||(Mc.state=new eG);cr.get=cr.get,cr.has=cr.has,cr.set=cr.set,Hu=function(i,r){if(cr.has(i))throw new uf(ab);return r.facade=i,cr.set(i,r),r},yo=function(i){return cr.get(i)||{}},Vu=function(i){return cr.has(i)}}else{var In=ZK("state");QK[In]=!0,Hu=function(i,r){if(Nc(i,In))throw new uf(ab);return r.facade=i,JK(i,In,r),r},yo=function(i){return Nc(i,In)?i[In]:{}},Vu=function(i){return Nc(i,In)}}var ln={set:Hu,get:yo,has:Vu,enforce:tG,getterFor:rG},lf=Ye,iG=Je,rS=Function.prototype,nG=lf&&Object.getOwnPropertyDescriptor,Nv=iG(rS,"name"),aG=Nv&&function(){}.name==="something",oG=Nv&&(!lf||lf&&nG(rS,"name").configurable),sG={EXISTS:Nv,PROPER:aG,CONFIGURABLE:oG},jl={},uG=Ye,lG=HE,hG=Ht,cG=Vt,dG=wr,fG=Ml;jl.f=uG&&!lG?Object.defineProperties:function(r,e){cG(r);for(var t=dG(e),n=fG(e),a=n.length,o=0,s;a>o;)hG.f(r,s=n[o++],t[s]);return r};var vG=Jt,pG=vG("document","documentElement"),gG=Vt,yG=jl,ob=Cv,mG=ts,bG=pG,$G=LE,wG=Fl,sb=">",ub="<",hf="prototype",cf="script",iS=wG("IE_PROTO"),Bc=function(){},nS=function(i){return ub+cf+sb+i+ub+"/"+cf+sb},lb=function(i){i.write(nS("")),i.close();var r=i.parentWindow.Object;return i=null,r},_G=function(){var i=$G("iframe"),r="java"+cf+":",e;return i.style.display="none",bG.appendChild(i),i.src=String(r),e=i.contentWindow.document,e.open(),e.write(nS("document.F=Object")),e.close(),e.F},Ks,yu=function(){try{Ks=new ActiveXObject("htmlfile")}catch{}yu=typeof document<"u"?document.domain&&Ks?lb(Ks):_G():lb(Ks);for(var i=ob.length;i--;)delete yu[hf][ob[i]];return yu()};mG[iS]=!0;var xa=Object.create||function(r,e){var t;return r!==null?(Bc[hf]=gG(r),t=new Bc,Bc[hf]=null,t[iS]=r):t=yu(),e===void 0?t:yG.f(t,e)},EG=ne,aS=!EG(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}),SG=Je,OG=qe,TG=Ct,IG=Fl,kG=aS,hb=IG("IE_PROTO"),df=Object,PG=df.prototype,Ll=kG?df.getPrototypeOf:function(i){var r=TG(i);if(SG(r,hb))return r[hb];var e=r.constructor;return OG(e)&&r instanceof e?e.prototype:r instanceof df?PG:null},xG=Pa,is=function(i,r,e,t){return t&&t.enumerable?i[r]=e:xG(i,r,e),i},CG=ne,AG=qe,DG=Xe,RG=xa,cb=Ll,NG=is,MG=ke,ff=MG("iterator"),oS=!1,Cr,Fc,jc;[].keys&&(jc=[].keys(),"next"in jc?(Fc=cb(cb(jc)),Fc!==Object.prototype&&(Cr=Fc)):oS=!0);var BG=!DG(Cr)||CG(function(){var i={};return Cr[ff].call(i)!==i});BG?Cr={}:Cr=RG(Cr);AG(Cr[ff])||NG(Cr,ff,function(){return this});var sS={IteratorPrototype:Cr,BUGGY_SAFARI_ITERATORS:oS},FG=Dv,jG=un,LG=FG?{}.toString:function(){return"[object "+jG(this)+"]"},zG=Dv,HG=Ht.f,VG=Pa,WG=Je,UG=LG,KG=ke,db=KG("toStringTag"),Ca=function(i,r,e,t){if(i){var n=e?i:i.prototype;WG(n,db)||HG(n,db,{configurable:!0,value:r}),t&&!zG&&VG(n,"toString",UG)}},Aa={},GG=sS.IteratorPrototype,qG=xa,YG=Go,XG=Ca,JG=Aa,ZG=function(){return this},QG=function(i,r,e,t){var n=r+" Iterator";return i.prototype=qG(GG,{next:YG(+!t,e)}),XG(i,n,!1,!0),JG[n]=ZG,i},eq=se,tq=sn,rq=function(i,r,e){try{return eq(tq(Object.getOwnPropertyDescriptor(i,r)[e]))}catch{}},iq=qe,nq=String,aq=TypeError,oq=function(i){if(typeof i=="object"||iq(i))return i;throw new aq("Can't set "+nq(i)+" as a prototype")},sq=rq,uq=Vt,lq=oq,hq=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,r={},e;try{e=sq(Object.prototype,"__proto__","set"),e(r,[]),i=r instanceof Array}catch{}return function(n,a){return uq(n),lq(a),i?e(n,a):n.__proto__=a,n}}():void 0),cq=q,dq=zt,fq=sG,vq=QG,pq=Ll,gq=Ca,fb=is,yq=ke,vb=Aa,mq=sS,bq=fq.PROPER,Gs=mq.BUGGY_SAFARI_ITERATORS,Lc=yq("iterator"),pb="keys",qs="values",gb="entries",$q=function(){return this},Mv=function(i,r,e,t,n,a,o){vq(e,r,t);var s=function(y){if(y===n&&c)return c;if(!Gs&&y&&y in h)return h[y];switch(y){case pb:return function(){return new e(this,y)};case qs:return function(){return new e(this,y)};case gb:return function(){return new e(this,y)}}return function(){return new e(this)}},u=r+" Iterator",l=!1,h=i.prototype,d=h[Lc]||h["@@iterator"]||n&&h[n],c=!Gs&&d||s(n),f=r==="Array"&&h.entries||d,v,p,g;if(f&&(v=pq(f.call(new i)),v!==Object.prototype&&v.next&&(gq(v,u,!0,!0),vb[u]=$q)),bq&&n===qs&&d&&d.name!==qs&&(l=!0,c=function(){return dq(d,this)}),n)if(p={values:s(qs),keys:a?c:s(pb),entries:s(gb)},o)for(g in p)(Gs||l||!(g in h))&&fb(h,g,p[g]);else cq({target:r,proto:!0,forced:Gs||l},p);return o&&h[Lc]!==c&&fb(h,Lc,c,{name:n}),vb[r]=c,p},Bv=function(i,r){return{value:i,done:r}},wq=WK.charAt,_q=_r,uS=ln,Eq=Mv,yb=Bv,lS="String Iterator",Sq=uS.set,Oq=uS.getterFor(lS);Eq(String,"String",function(i){Sq(this,{type:lS,string:_q(i),index:0})},function(){var r=Oq(this),e=r.string,t=r.index,n;return t>=e.length?yb(void 0,!0):(n=wq(e,t),r.index+=n.length,yb(n,!1))});var Tq=zt,mb=Vt,Iq=kv,hS=function(i,r,e){var t,n;mb(i);try{if(t=Iq(i,"return"),!t){if(r==="throw")throw e;return e}t=Tq(t,i)}catch(a){n=!0,t=a}if(r==="throw")throw e;if(n)throw t;return mb(t),e},kq=Vt,Pq=hS,xq=function(i,r,e,t){try{return t?r(kq(e)[0],e[1]):r(e)}catch(n){Pq(i,"throw",n)}},Cq=ke,Aq=Aa,Dq=Cq("iterator"),Rq=Array.prototype,cS=function(i){return i!==void 0&&(Aq.Array===i||Rq[Dq]===i)},Nq=se,Mq=qe,vf=Pv,Bq=Nq(Function.toString);Mq(vf.inspectSource)||(vf.inspectSource=function(i){return Bq(i)});var Fq=vf.inspectSource,jq=se,Lq=ne,dS=qe,zq=un,Hq=Jt,Vq=Fq,fS=function(){},Wq=[],vS=Hq("Reflect","construct"),Fv=/^\s*(?:class|function)\b/,Uq=jq(Fv.exec),Kq=!Fv.test(fS),La=function(r){if(!dS(r))return!1;try{return vS(fS,Wq,r),!0}catch{return!1}},pS=function(r){if(!dS(r))return!1;switch(zq(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Kq||!!Uq(Fv,Vq(r))}catch{return!0}};pS.sham=!0;var zl=!vS||Lq(function(){var i;return La(La.call)||!La(Object)||!La(function(){i=!0})||i})?pS:La,Gq=Rl,qq=Ht,Yq=Go,Da=function(i,r,e){var t=Gq(r);t in i?qq.f(i,t,Yq(0,e)):i[t]=e},Xq=un,bb=kv,Jq=Oa,Zq=Aa,Qq=ke,eY=Qq("iterator"),Hl=function(i){if(!Jq(i))return bb(i,eY)||bb(i,"@@iterator")||Zq[Xq(i)]},tY=zt,rY=sn,iY=Vt,nY=Ia,aY=Hl,oY=TypeError,gS=function(i,r){var e=arguments.length<2?aY(i):r;if(rY(e))return iY(tY(e,i));throw new oY(nY(i)+" is not iterable")},sY=Qo,uY=zt,lY=Ct,hY=xq,cY=cS,dY=zl,fY=Zt,$b=Da,vY=gS,pY=Hl,wb=Array,gY=function(r){var e=lY(r),t=dY(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=sY(a,n>2?arguments[2]:void 0));var s=pY(e),u=0,l,h,d,c,f,v;if(s&&!(this===wb&&cY(s)))for(c=vY(e,s),f=c.next,h=t?new this:[];!(d=uY(f,c)).done;u++)v=o?hY(c,a,[d.value,u],!0):d.value,$b(h,u,v);else for(l=fY(e),h=t?new this(l):wb(l);l>u;u++)v=o?a(e[u],u):e[u],$b(h,u,v);return h.length=u,h},yY=ke,yS=yY("iterator"),mS=!1;try{var mY=0,_b={next:function(){return{done:!!mY++}},return:function(){mS=!0}};_b[yS]=function(){return this},Array.from(_b,function(){throw 2})}catch{}var bY=function(i,r){try{if(!r&&!mS)return!1}catch{return!1}var e=!1;try{var t={};t[yS]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},$Y=q,wY=gY,_Y=bY,EY=!_Y(function(i){Array.from(i)});$Y({target:"Array",stat:!0,forced:EY},{from:wY});var SY=ae,OY=SY.Array.from,TY=OY,bS=TY,IY=bS,hn=V(IY),kY=wr,Eb=Aa,$S=ln;Ht.f;var PY=Mv,Ys=Bv,wS="Array Iterator",xY=$S.set,CY=$S.getterFor(wS);PY(Array,"Array",function(i,r){xY(this,{type:wS,target:kY(i),index:0,kind:r})},function(){var i=CY(this),r=i.target,e=i.kind,t=i.index++;if(!r||t>=r.length)return i.target=void 0,Ys(void 0,!0);switch(e){case"keys":return Ys(t,!1);case"values":return Ys(r[t],!1)}return Ys([t,r[t]],!1)},"values");Eb.Arguments=Eb.Array;var AY=Hl,DY=AY,RY={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},NY=RY,MY=Ie,BY=un,FY=Pa,Sb=Aa,jY=ke,Ob=jY("toStringTag");for(var zc in NY){var Tb=MY[zc],Hc=Tb&&Tb.prototype;Hc&&BY(Hc)!==Ob&&FY(Hc,Ob,zc),Sb[zc]=Sb.Array}var LY=DY,zY=LY,HY=zY,VY=HY,WY=VY,UY=WY,_S=UY,ES=V(_S),KY=_S,cn=V(KY);function N(i,r){if(!(i instanceof r))throw new TypeError("Cannot call a class as a function")}var SS={exports:{}},GY=q,qY=Ye,Ib=Ht.f;GY({target:"Object",stat:!0,forced:Object.defineProperty!==Ib,sham:!qY},{defineProperty:Ib});var YY=ae,OS=YY.Object,XY=SS.exports=function(r,e,t){return OS.defineProperty(r,e,t)};OS.defineProperty.sham&&(XY.sham=!0);var JY=SS.exports,ZY=JY,TS=ZY,QY=TS,eX=QY,tX=eX,rX=tX,iX=rX,Vl=V(iX),nX=Hr,dn=Array.isArray||function(r){return nX(r)==="Array"},aX=TypeError,oX=9007199254740991,jv=function(i){if(i>oX)throw aX("Maximum allowed index exceeded");return i},kb=dn,sX=zl,uX=Xe,lX=ke,hX=lX("species"),Pb=Array,cX=function(i){var r;return kb(i)&&(r=i.constructor,sX(r)&&(r===Pb||kb(r.prototype))?r=void 0:uX(r)&&(r=r[hX],r===null&&(r=void 0))),r===void 0?Pb:r},dX=cX,Lv=function(i,r){return new(dX(i))(r===0?0:r)},fX=ne,vX=ke,pX=Xo,gX=vX("species"),ns=function(i){return pX>=51||!fX(function(){var r=[],e=r.constructor={};return e[gX]=function(){return{foo:1}},r[i](Boolean).foo!==1})},yX=q,mX=ne,bX=dn,$X=Xe,wX=Ct,_X=Zt,xb=jv,Cb=Da,EX=Lv,SX=ns,OX=ke,TX=Xo,IS=OX("isConcatSpreadable"),IX=TX>=51||!mX(function(){var i=[];return i[IS]=!1,i.concat()[0]!==i}),kX=function(i){if(!$X(i))return!1;var r=i[IS];return r!==void 0?!!r:bX(i)},PX=!IX||!SX("concat");yX({target:"Array",proto:!0,arity:1,forced:PX},{concat:function(r){var e=wX(this),t=EX(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;ag;g++)if((s||g in f)&&(b=f[g],$=v(b,g,c),i))if(r)m[g]=$;else if($)switch(i){case 3:return!0;case 5:return b;case 6:return g;case 2:Rb(m,b)}else switch(i){case 4:return!1;case 7:Rb(m,b)}return a?-1:t||n?n:m}},yi={forEach:Ur(0),map:Ur(1),filter:Ur(2),some:Ur(3),every:Ur(4),find:Ur(5),findIndex:Ur(6),filterReject:Ur(7)},Ul=q,Kl=Ie,Hv=zt,rJ=se,ra=Ye,ia=Ta,iJ=ne,Ue=Je,nJ=Re,pf=Vt,Gl=wr,Vv=Rl,aJ=_r,gf=Go,mo=xa,AS=Ml,oJ=as,DS=Wl,sJ=rs,RS=Sa,NS=Ht,uJ=jl,MS=Cl,Nb=is,lJ=zv,Wv=ka,hJ=Fl,BS=ts,Mb=Dl,cJ=ke,dJ=os,fJ=Pe,vJ=CS,pJ=Ca,FS=ln,ql=yi.forEach,St=hJ("hidden"),Yl="Symbol",bo="prototype",gJ=FS.set,Bb=FS.getterFor(Yl),or=Object[bo],Bi=Kl.Symbol,Ga=Bi&&Bi[bo],yJ=Kl.RangeError,mJ=Kl.TypeError,Vc=Kl.QObject,jS=RS.f,Fi=NS.f,LS=DS.f,bJ=MS.f,zS=rJ([].push),Fr=Wv("symbols"),ss=Wv("op-symbols"),$J=Wv("wks"),yf=!Vc||!Vc[bo]||!Vc[bo].findChild,HS=function(i,r,e){var t=jS(or,r);t&&delete or[r],Fi(i,r,e),t&&i!==or&&Fi(or,r,t)},mf=ra&&iJ(function(){return mo(Fi({},"a",{get:function(){return Fi(this,"a",{value:7}).a}})).a!==7})?HS:Fi,Wc=function(i,r){var e=Fr[i]=mo(Ga);return gJ(e,{type:Yl,tag:i,description:r}),ra||(e.description=r),e},Xl=function(r,e,t){r===or&&Xl(ss,e,t),pf(r);var n=Vv(e);return pf(t),Ue(Fr,n)?(t.enumerable?(Ue(r,St)&&r[St][n]&&(r[St][n]=!1),t=mo(t,{enumerable:gf(0,!1)})):(Ue(r,St)||Fi(r,St,gf(1,{})),r[St][n]=!0),mf(r,n,t)):Fi(r,n,t)},Uv=function(r,e){pf(r);var t=Gl(e),n=AS(t).concat(KS(t));return ql(n,function(a){(!ra||Hv(VS,t,a))&&Xl(r,a,t[a])}),r},wJ=function(r,e){return e===void 0?mo(r):Uv(mo(r),e)},VS=function(r){var e=Vv(r),t=Hv(bJ,this,e);return this===or&&Ue(Fr,e)&&!Ue(ss,e)?!1:t||!Ue(this,e)||!Ue(Fr,e)||Ue(this,St)&&this[St][e]?t:!0},WS=function(r,e){var t=Gl(r),n=Vv(e);if(!(t===or&&Ue(Fr,n)&&!Ue(ss,n))){var a=jS(t,n);return a&&Ue(Fr,n)&&!(Ue(t,St)&&t[St][n])&&(a.enumerable=!0),a}},US=function(r){var e=LS(Gl(r)),t=[];return ql(e,function(n){!Ue(Fr,n)&&!Ue(BS,n)&&zS(t,n)}),t},KS=function(i){var r=i===or,e=LS(r?ss:Gl(i)),t=[];return ql(e,function(n){Ue(Fr,n)&&(!r||Ue(or,n))&&zS(t,Fr[n])}),t};ia||(Bi=function(){if(nJ(Ga,this))throw new mJ("Symbol is not a constructor");var r=!arguments.length||arguments[0]===void 0?void 0:aJ(arguments[0]),e=Mb(r),t=function(n){this===or&&Hv(t,ss,n),Ue(this,St)&&Ue(this[St],e)&&(this[St][e]=!1);var a=gf(1,n);try{mf(this,e,a)}catch(o){if(!(o instanceof yJ))throw o;HS(this,e,a)}};return ra&&yf&&mf(or,e,{configurable:!0,set:t}),Wc(e,r)},Ga=Bi[bo],Nb(Ga,"toString",function(){return Bb(this).tag}),Nb(Bi,"withoutSetter",function(i){return Wc(Mb(i),i)}),MS.f=VS,NS.f=Xl,uJ.f=Uv,RS.f=WS,oJ.f=DS.f=US,sJ.f=KS,dJ.f=function(i){return Wc(cJ(i),i)},ra&&lJ(Ga,"description",{configurable:!0,get:function(){return Bb(this).description}}));Ul({global:!0,constructor:!0,wrap:!0,forced:!ia,sham:!ia},{Symbol:Bi});ql(AS($J),function(i){fJ(i)});Ul({target:Yl,stat:!0,forced:!ia},{useSetter:function(){yf=!0},useSimple:function(){yf=!1}});Ul({target:"Object",stat:!0,forced:!ia,sham:!ra},{create:wJ,defineProperty:Xl,defineProperties:Uv,getOwnPropertyDescriptor:WS});Ul({target:"Object",stat:!0,forced:!ia},{getOwnPropertyNames:US});vJ();pJ(Bi,Yl);BS[St]=!0;var _J=Ta,GS=_J&&!!Symbol.for&&!!Symbol.keyFor,EJ=q,SJ=Jt,OJ=Je,TJ=_r,qS=ka,IJ=GS,Uc=qS("string-to-symbol-registry"),kJ=qS("symbol-to-string-registry");EJ({target:"Symbol",stat:!0,forced:!IJ},{for:function(i){var r=TJ(i);if(OJ(Uc,r))return Uc[r];var e=SJ("Symbol")(r);return Uc[r]=e,kJ[e]=r,e}});var PJ=q,xJ=Je,CJ=Jo,AJ=Ia,DJ=ka,RJ=GS,Fb=DJ("symbol-to-string-registry");PJ({target:"Symbol",stat:!0,forced:!RJ},{keyFor:function(r){if(!CJ(r))throw new TypeError(AJ(r)+" is not a symbol");if(xJ(Fb,r))return Fb[r]}});var NJ=se,jb=dn,MJ=qe,Lb=Hr,BJ=_r,zb=NJ([].push),FJ=function(i){if(MJ(i))return i;if(jb(i)){for(var r=i.length,e=[],t=0;ti.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?arguments[1]:void 0)}});var ute=Ze,lte=ute("Array").map,hte=Re,cte=lte,Jc=Array.prototype,dte=function(i){var r=i.map;return i===Jc||hte(Jc,i)&&r===Jc.map?cte:r},fte=dte,vte=fte,pte=vte,na=V(pte),gte=q,yte=Ct,dO=Ml,mte=ne,bte=mte(function(){dO(1)});gte({target:"Object",stat:!0,forced:bte},{keys:function(r){return dO(yte(r))}});var $te=ae,wte=$te.Object.keys,_te=wte,Ete=_te,Ste=Ete,Ee=V(Ste),Ote=q,Tte=se,fO=Date,Ite=Tte(fO.prototype.getTime);Ote({target:"Date",stat:!0},{now:function(){return Ite(new fO)}});var kte=ae,Pte=kte.Date.now,xte=Pte,Cte=xte,Ate=Cte,Uu=V(Ate),Dte=ne,Ra=function(i,r){var e=[][i];return!!e&&Dte(function(){e.call(null,r||function(){return 1},1)})},Rte=yi.forEach,Nte=Ra,Mte=Nte("forEach"),Bte=Mte?[].forEach:function(r){return Rte(this,r,arguments.length>1?arguments[1]:void 0)},Fte=q,n1=Bte;Fte({target:"Array",proto:!0,forced:[].forEach!==n1},{forEach:n1});var jte=Ze,Lte=jte("Array").forEach,zte=Lte,Hte=zte,Vte=un,Wte=Je,Ute=Re,Kte=Hte,Zc=Array.prototype,Gte={DOMTokenList:!0,NodeList:!0},qte=function(i){var r=i.forEach;return i===Zc||Ute(Zc,i)&&r===Zc.forEach||Wte(Gte,Vte(i))?Kte:r},Yte=qte,fe=V(Yte),Xte=q,Jte=se,Zte=dn,Qte=Jte([].reverse),a1=[1,2];Xte({target:"Array",proto:!0,forced:String(a1)===String(a1.reverse())},{reverse:function(){return Zte(this)&&(this.length=this.length),Qte(this)}});var ere=Ze,tre=ere("Array").reverse,rre=Re,ire=tre,Qc=Array.prototype,nre=function(i){var r=i.reverse;return i===Qc||rre(Qc,i)&&r===Qc.reverse?ire:r},are=nre,ore=are,sre=ore,ji=V(sre),o1=Ia,ure=TypeError,vO=function(i,r){if(!delete i[r])throw new ure("Cannot delete property "+o1(r)+" of "+o1(i))},lre=q,hre=Ct,cre=es,dre=Nl,fre=Zt,vre=uO,pre=jv,gre=Lv,yre=Da,ed=vO,mre=ns,bre=mre("splice"),$re=Math.max,wre=Math.min;lre({target:"Array",proto:!0,forced:!bre},{splice:function(r,e){var t=hre(this),n=fre(t),a=cre(r,n),o=arguments.length,s,u,l,h,d,c;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=wre($re(dre(e),0),n-a)),pre(n+s-u),l=gre(t,u),h=0;hn-u+s;h--)ed(t,h-1)}else if(s>u)for(h=n-u;h>a;h--)d=h+u-1,c=h+s-1,d in t?t[c]=t[d]:ed(t,c);for(h=0;h1?arguments[1]:void 0)}});var Rre=Ze,Nre=Rre("Array").includes,Mre=Xe,Bre=Hr,Fre=ke,jre=Fre("match"),Lre=function(i){var r;return Mre(i)&&((r=i[jre])!==void 0?!!r:Bre(i)==="RegExp")},zre=Lre,Hre=TypeError,Vre=function(i){if(zre(i))throw new Hre("The method doesn't accept regular expressions");return i},Wre=ke,Ure=Wre("match"),Kre=function(i){var r=/./;try{"/./"[i](r)}catch{try{return r[Ure]=!1,"/./"[i](r)}catch{}}return!1},Gre=q,qre=se,Yre=Vre,Xre=qo,s1=_r,Jre=Kre,Zre=qre("".indexOf);Gre({target:"String",proto:!0,forced:!Jre("includes")},{includes:function(r){return!!~Zre(s1(Xre(this)),s1(Yre(r)),arguments.length>1?arguments[1]:void 0)}});var Qre=Ze,eie=Qre("String").includes,u1=Re,tie=Nre,rie=eie,rd=Array.prototype,id=String.prototype,iie=function(i){var r=i.includes;return i===rd||u1(rd,i)&&r===rd.includes?tie:typeof i=="string"||i===id||u1(id,i)&&r===id.includes?rie:r},nie=iie,aie=nie,oie=aie,oi=V(oie),sie=q,uie=ne,lie=Ct,pO=Ll,hie=aS,cie=uie(function(){pO(1)});sie({target:"Object",stat:!0,forced:cie,sham:!hie},{getPrototypeOf:function(r){return pO(lie(r))}});var die=ae,fie=die.Object.getPrototypeOf,vie=fie,gO=vie,pie=gO,l1=V(pie),gie=q,yie=yi.filter,mie=ns,bie=mie("filter");gie({target:"Array",proto:!0,forced:!bie},{filter:function(r){return yie(this,r,arguments.length>1?arguments[1]:void 0)}});var $ie=Ze,wie=$ie("Array").filter,_ie=Re,Eie=wie,nd=Array.prototype,Sie=function(i){var r=i.filter;return i===nd||_ie(nd,i)&&r===nd.filter?Eie:r},Oie=Sie,Tie=Oie,Iie=Tie,Ot=V(Iie),qv=` -\v\f\r                 \u2028\u2029\uFEFF`,kie=se,Pie=qo,xie=_r,$f=qv,h1=kie("".replace),Cie=RegExp("^["+$f+"]+"),Aie=RegExp("(^|[^"+$f+"])["+$f+"]+$"),ad=function(i){return function(r){var e=xie(Pie(r));return i&1&&(e=h1(e,Cie,"")),i&2&&(e=h1(e,Aie,"$1")),e}},yO={start:ad(1),end:ad(2),trim:ad(3)},mO=Ie,Die=ne,Rie=se,Nie=_r,Mie=yO.trim,c1=qv,eo=mO.parseInt,d1=mO.Symbol,f1=d1&&d1.iterator,bO=/^[+-]?0x/i,Bie=Rie(bO.exec),Fie=eo(c1+"08")!==8||eo(c1+"0x16")!==22||f1&&!Die(function(){eo(Object(f1))}),jie=Fie?function(r,e){var t=Mie(Nie(r));return eo(t,e>>>0||(Bie(bO,t)?16:10))}:eo,Lie=q,v1=jie;Lie({global:!0,forced:parseInt!==v1},{parseInt:v1});var zie=ae,Hie=zie.parseInt,Vie=Hie,Wie=Vie,Uie=Wie,nr=V(Uie),Kie=q,Gie=Iv,qie=xv.indexOf,Yie=Ra,wf=Gie([].indexOf),$O=!!wf&&1/wf([1],1,-0)<0,Xie=$O||!Yie("indexOf");Kie({target:"Array",proto:!0,forced:Xie},{indexOf:function(r){var e=arguments.length>1?arguments[1]:void 0;return $O?wf(this,r,e)||0:qie(this,r,e)}});var Jie=Ze,Zie=Jie("Array").indexOf,Qie=Re,ene=Zie,od=Array.prototype,tne=function(i){var r=i.indexOf;return i===od||Qie(od,i)&&r===od.indexOf?ene:r},rne=tne,ine=rne,nne=ine,ie=V(nne),ane=q,one=Ye,sne=xa;ane({target:"Object",stat:!0,sham:!one},{create:sne});var une=ae,lne=une.Object,hne=function(r,e){return lne.create(r,e)},cne=hne,wO=cne,dne=wO,Li=V(dne),_f=ae,fne=Ko;_f.JSON||(_f.JSON={stringify:JSON.stringify});var vne=function(r,e,t){return fne(_f.JSON.stringify,null,arguments)},pne=vne,gne=pne,yne=gne,ls=V(yne),mne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bne=TypeError,$ne=function(i,r){if(ie,o=_ne(t)?t:Ine(t),s=a?One(arguments,e):[],u=a?function(){wne(o,this,s)}:o;return r?i(u,n):i(u)}:i},Pne=q,SO=Ie,xne=EO,p1=xne(SO.setInterval,!0);Pne({global:!0,bind:!0,forced:SO.setInterval!==p1},{setInterval:p1});var Cne=q,OO=Ie,Ane=EO,g1=Ane(OO.setTimeout,!0);Cne({global:!0,bind:!0,forced:OO.setTimeout!==g1},{setTimeout:g1});var Dne=ae,Rne=Dne.setTimeout,Nne=Rne,yr=V(Nne),Mne=Ct,y1=es,Bne=Zt,Fne=function(r){for(var e=Mne(this),t=Bne(e),n=arguments.length,a=y1(n>1?arguments[1]:void 0,t),o=n>2?arguments[2]:void 0,s=o===void 0?t:y1(o,t);s>a;)e[a++]=r;return e},jne=q,Lne=Fne;jne({target:"Array",proto:!0},{fill:Lne});var zne=Ze,Hne=zne("Array").fill,Vne=Re,Wne=Hne,sd=Array.prototype,Une=function(i){var r=i.fill;return i===sd||Vne(sd,i)&&r===sd.fill?Wne:r},Kne=Une,Gne=Kne,qne=Gne,hs=V(qne);/*! Hammer.JS - v2.0.17-rc - 2019-12-16 - * http://naver.github.io/egjs - * - * Forked By Naver egjs - * Copyright (c) hammerjs - * Licensed under the MIT license */function ur(){return ur=Object.assign||function(i){for(var r=1;r"u"?{style:{}}:document.createElement("div"),Xne="function",Hn=Math.round,Xi=Math.abs,Yv=Date.now;function Jl(i,r){for(var e,t,n=r[0].toUpperCase()+r.slice(1),a=0;a"u"?Dr={}:Dr=window;var TO=Jl(Yne.style,"touchAction"),IO=TO!==void 0;function Jne(){if(!IO)return!1;var i={},r=Dr.CSS&&Dr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=r?Dr.CSS.supports("touch-action",e):!0}),i}var kO="compute",PO="auto",Sf="manipulation",zi="none",$o="pan-x",wo="pan-y",Zs=Jne(),Zne=/mobile|tablet|ip(ad|hone|od)|android/i,xO="ontouchstart"in Dr,Qne=Jl(Dr,"PointerEvent")!==void 0,eae=xO&&Zne.test(navigator.userAgent),cs="touch",tae="pen",Xv="mouse",rae="kinect",iae=25,gt=1,fn=2,je=4,It=8,Ku=1,ds=2,fs=4,vs=8,aa=16,mr=ds|fs,Hi=vs|aa,CO=mr|Hi,AO=["x","y"],Gu=["clientX","clientY"];function Rr(i,r,e){var t;if(i)if(i.forEach)i.forEach(r,e);else if(i.length!==void 0)for(t=0;t-1}function nae(i){if(Ci(i,zi))return zi;var r=Ci(i,$o),e=Ci(i,wo);return r&&e?zi:r||e?r?$o:wo:Ci(i,Sf)?Sf:PO}var DO=function(){function i(e,t){this.manager=e,this.set(t)}var r=i.prototype;return r.set=function(t){t===kO&&(t=this.compute()),IO&&this.manager.element.style&&Zs[t]&&(this.manager.element.style[TO]=t),this.actions=t.toLowerCase().trim()},r.update=function(){this.set(this.manager.options.touchAction)},r.compute=function(){var t=[];return Rr(this.manager.recognizers,function(n){Zl(n.options.enable,[n])&&(t=t.concat(n.getTouchAction()))}),nae(t.join(" "))},r.preventDefaults=function(t){var n=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Ci(o,zi)&&!Zs[zi],u=Ci(o,wo)&&!Zs[wo],l=Ci(o,$o)&&!Zs[$o];if(s){var h=t.pointers.length===1,d=t.distance<2,c=t.deltaTime<250;if(h&&d&&c)return}if(!(l&&u)&&(s||u&&a&mr||l&&a&Hi))return this.preventSrc(n)},r.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function Jv(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}function RO(i){var r=i.length;if(r===1)return{x:Hn(i[0].clientX),y:Hn(i[0].clientY)};for(var e=0,t=0,n=0;n=Xi(r)?i<0?ds:fs:r<0?vs:aa}function aae(i,r){var e=r.center,t=i.offsetDelta||{},n=i.prevDelta||{},a=i.prevInput||{};(r.eventType===gt||a.eventType===je)&&(n=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),r.deltaX=n.x+(e.x-t.x),r.deltaY=n.y+(e.y-t.y)}function MO(i,r,e){return{x:r/i||0,y:e/i||0}}function oae(i,r){return qu(r[0],r[1],Gu)/qu(i[0],i[1],Gu)}function sae(i,r){return Of(r[1],r[0],Gu)+Of(i[1],i[0],Gu)}function uae(i,r){var e=i.lastInterval||r,t=r.timeStamp-e.timeStamp,n,a,o,s;if(r.eventType!==It&&(t>iae||e.velocity===void 0)){var u=r.deltaX-e.deltaX,l=r.deltaY-e.deltaY,h=MO(t,u,l);a=h.x,o=h.y,n=Xi(h.x)>Xi(h.y)?h.x:h.y,s=NO(u,l),i.lastInterval=r}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;r.velocity=n,r.velocityX=a,r.velocityY=o,r.direction=s}function lae(i,r){var e=i.session,t=r.pointers,n=t.length;e.firstInput||(e.firstInput=b1(r)),n>1&&!e.firstMultiple?e.firstMultiple=b1(r):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=r.center=RO(t);r.timeStamp=Yv(),r.deltaTime=r.timeStamp-a.timeStamp,r.angle=Of(s,u),r.distance=qu(s,u),aae(e,r),r.offsetDirection=NO(r.deltaX,r.deltaY);var l=MO(r.deltaTime,r.deltaX,r.deltaY);r.overallVelocityX=l.x,r.overallVelocityY=l.y,r.overallVelocity=Xi(l.x)>Xi(l.y)?l.x:l.y,r.scale=o?oae(o.pointers,t):1,r.rotation=o?sae(o.pointers,t):0,r.maxPointers=e.prevInput?r.pointers.length>e.prevInput.maxPointers?r.pointers.length:e.prevInput.maxPointers:r.pointers.length,uae(e,r);var h=i.element,d=r.srcEvent,c;d.composedPath?c=d.composedPath()[0]:d.path?c=d.path[0]:c=d.target,Jv(c,h)&&(h=c),r.target=h}function hae(i,r,e){var t=e.pointers.length,n=e.changedPointers.length,a=r>&&t-n===0,o=r&(je|It)&&t-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=r,lae(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function _o(i){return i.trim().split(/\s+/g)}function to(i,r,e){Rr(_o(r),function(t){i.addEventListener(t,e,!1)})}function ro(i,r,e){Rr(_o(r),function(t){i.removeEventListener(t,e,!1)})}function $1(i){var r=i.ownerDocument||i;return r.defaultView||r.parentWindow||window}var Na=function(){function i(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Zl(e.options.enable,[e])&&n.handler(a)},this.init()}var r=i.prototype;return r.handler=function(){},r.init=function(){this.evEl&&to(this.element,this.evEl,this.domHandler),this.evTarget&&to(this.target,this.evTarget,this.domHandler),this.evWin&&to($1(this.element),this.evWin,this.domHandler)},r.destroy=function(){this.evEl&&ro(this.element,this.evEl,this.domHandler),this.evTarget&&ro(this.target,this.evTarget,this.domHandler),this.evWin&&ro($1(this.element),this.evWin,this.domHandler)},i}();function Ji(i,r,e){if(i.indexOf&&!e)return i.indexOf(r);for(var t=0;tu[r]}):t=t.sort()),t}var fae={touchstart:gt,touchmove:fn,touchend:je,touchcancel:It},vae="touchstart touchmove touchend touchcancel",Qv=function(i){Qt(r,i);function r(){var t;return r.prototype.evTarget=vae,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=r.prototype;return e.handler=function(n){var a=fae[n.type],o=pae.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:cs,srcEvent:n})},r}(Na);function pae(i,r){var e=Eo(i.touches),t=this.targetIds;if(r&(gt|fn)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var n,a,o=Eo(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Jv(l.target,u)}),r===gt)for(n=0;n-1&&n.splice(s,1)};setTimeout(a,bae)}}function $ae(i,r){i>?(this.primaryTouch=r.changedPointers[0].identifier,_1.call(this,r)):i&(je|It)&&_1.call(this,r)}function wae(i){for(var r=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t-1&&this.requireFail.splice(n,1),this},r.hasRequireFailures=function(){return this.requireFail.length>0},r.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},r.emit=function(t){var n=this,a=this.state;function o(s){n.manager.emit(s,t)}a=si&&o(n.options.event+E1(a))},r.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=vr},r.canEmit=function(){for(var t=0;ta.threshold&&u&a.direction},e.attrTest=function(n){return sa.prototype.attrTest.call(this,n)&&(this.state&Yt||!(this.state&Yt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zO(n.direction);a&&(n.additionalEvent=this.options.event+a),i.prototype.emit.call(this,n)},r}(sa),HO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"swipe",threshold:10,velocity:.3,direction:mr|Hi,pointers:1},t))||this}var e=r.prototype;return e.getTouchAction=function(){return tp.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(mr|Hi)?o=n.overallVelocity:a&mr?o=n.overallVelocityX:a&Hi&&(o=n.overallVelocityY),i.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Xi(o)>this.options.velocity&&n.eventType&je},e.emit=function(n){var a=zO(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},r}(sa),VO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"pinch",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[zi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Yt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}i.prototype.emit.call(this,n)},r}(sa),WO=function(i){Qt(r,i);function r(t){return t===void 0&&(t={}),i.call(this,ur({event:"rotate",threshold:0,pointers:2},t))||this}var e=r.prototype;return e.getTouchAction=function(){return[zi]},e.attrTest=function(n){return i.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Yt)},r}(sa),UO=function(i){Qt(r,i);function r(t){var n;return t===void 0&&(t={}),n=i.call(this,ur({event:"press",pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var e=r.prototype;return e.getTouchAction=function(){return[PO]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distanceo.time;if(this._input=n,!u||!s||n.eventType&(je|It)&&!l)this.reset();else if(n.eventType>)this.reset(),this._timer=setTimeout(function(){a.state=Nr,a.tryEmit()},o.time);else if(n.eventType&je)return Nr;return vr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Nr&&(n&&n.eventType&je?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Yv(),this.manager.emit(this.options.event,this._input)))},r}(ps),KO={domEvents:!1,touchAction:kO,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},S1=[[WO,{enable:!1}],[VO,{enable:!1},["rotate"]],[HO,{direction:mr}],[tp,{direction:mr},["swipe"]],[Tf],[Tf,{event:"doubletap",taps:2},["tap"]],[UO]],Oae=1,O1=2;function T1(i,r){var e=i.element;if(e.style){var t;Rr(i.options.cssProps,function(n,a){t=Jl(e.style,a),r?(i.oldCssProps[t]=e.style[t],e.style[t]=n):e.style[t]=i.oldCssProps[t]||""}),r||(i.oldCssProps={})}}function Tae(i,r){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=r,r.target.dispatchEvent(e)}var I1=function(){function i(e,t){var n=this;this.options=Yi({},KO,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=_ae(this),this.touchAction=new DO(this,this.options.touchAction),T1(this,!0),Rr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var r=i.prototype;return r.set=function(t){return Yi(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},r.stop=function(t){this.session.stopped=t?O1:Oae},r.recognize=function(t){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Nr)&&(n.curRecognizer=null,s=null);for(var u=0;u\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var qO=GO(function(i,r,e){for(var t=Object.keys(r),n=0;n=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Nae(i,r){var e;if(i){if(typeof i=="string")return P1(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P1(i,r)}}function P1(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e>>0,n-=i,n*=i,i=n>>>0,n-=i,i+=n*4294967296}return(i>>>0)*23283064365386963e-26}}function jae(){var i=function(){};return{on:i,off:i,destroy:i,emit:i,get:function(){return{set:i}}}}var rp=typeof window<"u"?window.Hammer||Rae:function(){return jae()};function pr(i){var r=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:i,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){r._dom.overlay.parentNode.removeChild(r._dom.overlay)});var t=rp(this._dom.overlay);t.on("tap",k(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];fe(n).call(n,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){Lae(a.target,i)||r.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",r._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&r.deactivate()}}ZE(pr.prototype);pr.current=null;pr.prototype.destroy=function(){var i,r;this.deactivate();var e=XO(ji(i=Ar(r=this._cleanupQueue).call(r,0)).call(i)),t;try{for(e.s();!(t=e.n()).done;){var n=t.value;n()}}catch(a){e.e(a)}finally{e.f()}};pr.prototype.activate=function(){pr.current&&pr.current.deactivate(),pr.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};pr.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};pr.prototype._onTapOverlay=function(i){this.activate(),i.srcEvent.stopPropagation()};function Lae(i,r){for(;i;){if(i===r)return!0;i=i.parentNode}return!1}var zae=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Hae=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Vae=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Wae=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Yr(i){if(i)for(;i.hasChildNodes()===!0;){var r=i.firstChild;r&&(Yr(r),i.removeChild(r))}}function Kn(i){return i instanceof String||typeof i=="string"}function x1(i){return de(i)==="object"&&i!==null}function Zi(i,r,e,t){var n=!1;t===!0&&(n=r[e]===null&&i[e]!==void 0),n?delete i[e]:i[e]=r[e]}function JO(i,r){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in i)if(r[t]!==void 0)if(r[t]===null||de(r[t])!=="object")Zi(i,r,t,e);else{var n=i[t],a=r[t];x1(n)&&x1(a)&&JO(n,a,e)}}function Ma(i,r,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;if(he(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!oi(i).call(i,n))if(e[n]&&e[n].constructor===Object)r[n]===void 0&&(r[n]={}),r[n].constructor===Object?pe(r[n],e[n]):Zi(r,e,n,t);else if(he(e[n])){r[n]=[];for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)||e===!0)if(de(r[n])==="object"&&r[n]!==null&&l1(r[n])===Object.prototype)i[n]===void 0?i[n]=pe({},r[n],e):de(i[n])==="object"&&i[n]!==null&&l1(i[n])===Object.prototype?pe(i[n],r[n],e):Zi(i,r,n,t);else if(he(r[n])){var a;i[n]=rt(a=r[n]).call(a)}else Zi(i,r,n,t);return i}function Xu(i,r){var e;return Gv(e=[]).call(e,dr(i),[r])}function Uae(i){return rt(i).call(i)}function Kae(i){return i.getBoundingClientRect().left}function Gae(i){return i.getBoundingClientRect().top}function te(i,r){if(he(i))for(var e=i.length,t=0;t3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&de(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))return!1;return!0};if(!a(i))throw new Error("Parameter mergeTarget must be an object");if(!a(r))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,p,g){a(v[g])||(v[g]={});var y=p[g],m=v[g];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(m[b]=y[b])},u=r[e],l=a(t)&&!o(t),h=l?t[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(i[e])||(i[e]={}),i[e].enabled=u;return}if(u===null&&!a(i[e]))if(n(h))i[e]=Li(h);else return;if(a(u)){var c=!0;u.enabled!==void 0?c=u.enabled:d!==void 0&&(c=h.enabled),s(i,r,e),i[e].enabled=c}}}var Xae={linear:function(r){return r},easeInQuad:function(r){return r*r},easeOutQuad:function(r){return r*(2-r)},easeInOutQuad:function(r){return r<.5?2*r*r:-1+(4-2*r)*r},easeInCubic:function(r){return r*r*r},easeOutCubic:function(r){return--r*r*r+1},easeInOutCubic:function(r){return r<.5?4*r*r*r:(r-1)*(2*r-2)*(2*r-2)+1},easeInQuart:function(r){return r*r*r*r},easeOutQuart:function(r){return 1- --r*r*r*r},easeInOutQuart:function(r){return r<.5?8*r*r*r*r:1-8*--r*r*r*r},easeInQuint:function(r){return r*r*r*r*r},easeOutQuint:function(r){return 1+--r*r*r*r*r},easeInOutQuint:function(r){return r<.5?16*r*r*r*r*r:1+16*--r*r*r*r*r}};function Xr(i,r){var e;he(r)||(r=[r]);var t=XO(i),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;if(a){e=a[r[0]];for(var o=1;o0&&arguments[0]!==void 0?arguments[0]:1;N(this,i),this.pixelRatio=r,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return M(i,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return Jae[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Kn(e)===!0){if(eT(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(Yae(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(QO(e)===!0){var u=ip(e);n={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:l}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ls(e));this._setColor(n,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Fe({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",yr(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Fe({},e)),this.color=e;var n=qa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),u=this.centerCoordinates.y+o*Math.cos(a*n.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=qa(this.color.r,this.color.g,this.color.b);t.v=e/100;var n=bu(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=qa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),hs(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,n,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=k(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=k(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=k(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=k(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new rp(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);var a,o,s,u;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;var l=2*Math.PI/360,h=1/360,d=1/this.r,c;for(s=0;s<360;s++)for(u=0;u3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};N(this,i),this.parent=r,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Fe(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Zae(n),this.wrapper=void 0}return M(i,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(he(e))this.options.filter=e.join();else if(de(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Ot(e)!==void 0&&(this.options.filter=Ot(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);Ot(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=Ot(this.options),t=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ie(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e1?n-1:0),o=1;o2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Pf("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&ie(e).call(e,t)!==-1&&(o=ie(e).call(e,t));for(var s=0;ss&&s!==1&&(l.max=Math.ceil(t*c),d=l.max,h="range increased"),l.value=t}else l.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;var v=this;l.onchange=function(){f.value=this.value,v._update(Number(this.value),n)},l.oninput=function(){f.value=this.value};var p=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,p,l,f);h!==""&&this.popupHistory[g]!==d&&(this.popupHistory[g]=d,this._setupPopup(h,g))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var n=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=Ot(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],h=Xu(t,u);if(typeof o=="function"&&(a=o(u,t),a===!1&&!he(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,h,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var d=this._getValue(h);if(he(l))this._handleArray(l,d,h);else if(typeof l=="string")this._makeTextInput(l,d,h);else if(typeof l=="boolean")this._makeCheckbox(l,d,h);else if(l instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(l.enabled!==void 0){var c=Xu(h,"enabled"),f=this._getValue(c);if(f===!0){var v=this._makeLabel(u,h,!0);this._makeItem(h,v),s=this._handleObject(l,h)||s}else this._makeCheckbox(l,f,h)}else{var p=this._makeLabel(u,h,!0);this._makeItem(h,p),s=this._handleObject(l,h)||s}}else console.error("dont know how to handle",l,u,h)}}return s}},{key:"_handleArray",value:function(e,t,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){var n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;oo-this.padding&&(l=!0),l?s=this.x-n:s=this.x,h?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>a&&(u=a-t-this.padding),uo&&(s=o-n-this.padding),so.distance?l=" in "+i.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+i.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+i.printLocation(a.path,e):l=". Did you mean one of these: "+i.print(Ee(t))+i.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+l,xf),za=!0}},{key:"findInOptions",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),h=void 0;for(var d in t){var c=void 0;if(t[d].__type__!==void 0&&a===!0){var f=i.findInOptions(e,t[d],Xu(n,d));o>f.distance&&(s=f.closestMatch,u=f.path,o=f.distance,h=f.indexMatch)}else{var v;ie(v=d.toLowerCase()).call(v,l)!==-1&&(h=d),c=i.levenshteinDistance(e,d),o>c&&(s=d,u=Uae(n),o=c)}}return{closestMatch:s,path:u,distance:o,indexMatch:h}}},{key:"printLocation",value:function(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: -`,a=` - -`+n+`options = { -`,o=0;o":!0,"--":!0},Qr="",ua=0,ee="",G="",wt=dt.NULL;function soe(){ua=0,ee=Qr.charAt(0)}function He(){ua++,ee=Qr.charAt(ua)}function kn(){return Qr.charAt(ua+1)}function D1(i){var r=i.charCodeAt(0);return r<47?r===35||r===46:r<59?r>47:r<91?r>64:r<96?r===95:r<123?r>96:!1}function hi(i,r){if(i||(i={}),r)for(var e in r)r.hasOwnProperty(e)&&(i[e]=r[e]);return i}function uoe(i,r,e){for(var t=r.split("."),n=i;t.length;){var a=t.shift();t.length?(n[a]||(n[a]={}),n=n[a]):n[a]=e}}function iT(i,r){for(var e,t,n=null,a=[i],o=i;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),ie(s=u.nodes).call(s,n)===-1&&u.nodes.push(n)}r.attr&&(n.attr=hi(n.attr,r.attr))}function loe(i,r){if(i.edges||(i.edges=[]),i.edges.push(r),i.edge){var e=hi({},i.edge);r.attr=hi(e,r.attr)}}function nT(i,r,e,t,n){var a={from:r,to:e,type:t};return i.edge&&(a.attr=hi({},i.edge)),a.attr=hi(a.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(a.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),a}function ge(){for(wt=dt.NULL,G="";ee===" "||ee===" "||ee===` -`||ee==="\r";)He();do{var i=!1;if(ee==="#"){for(var r=ua-1;Qr.charAt(r)===" "||Qr.charAt(r)===" ";)r--;if(Qr.charAt(r)===` -`||Qr.charAt(r)===""){for(;ee!=""&&ee!=` -`;)He();i=!0}}if(ee==="/"&&kn()==="/"){for(;ee!=""&&ee!=` -`;)He();i=!0}if(ee==="/"&&kn()==="*"){for(;ee!="";)if(ee==="*"&&kn()==="/"){He(),He();break}else He();i=!0}for(;ee===" "||ee===" "||ee===` -`||ee==="\r";)He()}while(i);if(ee===""){wt=dt.DELIMITER;return}var e=ee+kn();if(A1[e]){wt=dt.DELIMITER,G=e,He(),He();return}if(A1[ee]){wt=dt.DELIMITER,G=ee,He();return}if(D1(ee)||ee==="-"){for(G+=ee,He();D1(ee);)G+=ee,He();G==="false"?G=!1:G==="true"?G=!0:isNaN(Number(G))||(G=Number(G)),wt=dt.IDENTIFIER;return}if(ee==='"'){for(He();ee!=""&&(ee!='"'||ee==='"'&&kn()==='"');)ee==='"'?(G+=ee,He()):ee==="\\"&&kn()==="n"?(G+=` -`,He()):G+=ee,He();if(ee!='"')throw ft('End of string " expected');He(),wt=dt.IDENTIFIER;return}for(wt=dt.UNKNOWN;ee!="";)G+=ee,He();throw new SyntaxError('Syntax error in part "'+uT(G,30)+'"')}function hoe(){var i={};if(soe(),ge(),G==="strict"&&(i.strict=!0,ge()),(G==="graph"||G==="digraph")&&(i.type=G,ge()),wt===dt.IDENTIFIER&&(i.id=G,ge()),G!="{")throw ft("Angle bracket { expected");if(ge(),aT(i),G!="}")throw ft("Angle bracket } expected");if(ge(),G!=="")throw ft("End of file expected");return ge(),delete i.node,delete i.edge,delete i.graph,i}function aT(i){for(;G!==""&&G!="}";)coe(i),G===";"&&ge()}function coe(i){var r=oT(i);if(r){sT(i,r);return}var e=doe(i);if(!e){if(wt!=dt.IDENTIFIER)throw ft("Identifier expected");var t=G;if(ge(),G==="="){if(ge(),wt!=dt.IDENTIFIER)throw ft("Identifier expected");i[t]=G,ge()}else foe(i,t)}}function oT(i){var r=null;if(G==="subgraph"&&(r={},r.type="subgraph",ge(),wt===dt.IDENTIFIER&&(r.id=G,ge())),G==="{"){if(ge(),r||(r={}),r.parent=i,r.node=i.node,r.edge=i.edge,r.graph=i.graph,aT(r),G!="}")throw ft("Angle bracket } expected");ge(),delete r.node,delete r.edge,delete r.graph,delete r.parent,i.subgraphs||(i.subgraphs=[]),i.subgraphs.push(r)}return r}function doe(i){return G==="node"?(ge(),i.node=io(),"node"):G==="edge"?(ge(),i.edge=io(),"edge"):G==="graph"?(ge(),i.graph=io(),"graph"):null}function foe(i,r){var e={id:r},t=io();t&&(e.attr=t),iT(i,e),sT(i,r)}function sT(i,r){for(;G==="->"||G==="--";){var e,t=G;ge();var n=oT(i);if(n)e=n;else{if(wt!=dt.IDENTIFIER)throw ft("Identifier or subgraph expected");e=G,iT(i,{id:e}),ge()}var a=io(),o=nT(i,r,e,t,a);loe(i,o),r=e}}function io(){for(var i,r=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,a=new Array;G==="[";){for(ge(),r={};G!==""&&G!="]";){if(wt!=dt.IDENTIFIER)throw ft("Attribute name expected");var o=G;if(ge(),G!="=")throw ft("Equal sign = expected");if(ge(),wt!=dt.IDENTIFIER)throw ft("Attribute value expected");var s=G;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=t[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=t[s],o="arrows",s={from:{enabled:!0,type:u}}),n.push({attr:r,name:o,value:s}),a.push(o),ge(),G==","&&ge()}if(G!="]")throw ft("Bracket ] expected");ge()}if(oi(a).call(a,"dir")){var l={};for(l.arrows={},i=0;i"&&(u.arrows="to"),u};fe(n=r.edges).call(n,function(o){var s,u;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;fe(l=o.from.edges).call(l,function(d){var c=a(d);e.edges.push(c)})}if(voe(s,u,function(d,c){var f=nT(e,d.id,c.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var h;fe(h=o.to.edges).call(h,function(d){var c=a(d);e.edges.push(c)})}})}return r.attr&&(e.options=r.attr),e}function goe(i,r){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};r!=null&&(r.fixed!=null&&(t.nodes.fixed=r.fixed),r.parseColor!=null&&(t.nodes.parseColor=r.parseColor),r.inheritColor!=null&&(t.edges.inheritColor=r.inheritColor));var n=i.edges,a=na(n).call(n,function(s){var u={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.type==="Directed"&&(u.arrows="to"),s.color&&t.edges.inheritColor===!1&&(u.color=s.color),u}),o=na(e=i.nodes).call(e,function(s){var u={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.size!=null&&(u.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.title!=null&&(u.title=s.title),s.x!=null&&(u.x=s.x),s.y!=null&&(u.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?u.color=s.color:u.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),u});return{nodes:o,edges:a}}var yoe={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},moe={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},boe={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},$oe={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},woe={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},_oe={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},Eoe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Soe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Ooe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Toe={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},Ioe={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},koe=Object.freeze({__proto__:null,cn:Soe,cs:Ioe,de:moe,en:yoe,es:boe,fr:Toe,it:$oe,nl:woe,pt:_oe,ru:Eoe,uk:Ooe});function Poe(i,r){try{var e=r.split(/[-_ /]/,2),t=Se(e,2),n=t[0],a=t[1],o=n!=null?n.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(i,u))return u;var l;console.warn(Gv(l="Unknown variant ".concat(s," of language ")).call(l,o,"."))}if(o){var h=o;if(Object.prototype.hasOwnProperty.call(i,h))return h;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(r,", falling back to English.")),"en"}catch(d){return console.error(d),console.warn("Unexpected error while normalizing locale ".concat(r,", falling back to English.")),"en"}}var xoe=function(){function i(){N(this,i),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return M(i,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var n=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),u=Math.floor(e/2),l=Math.floor(e/4),h=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=n,this.coordinates=[[0,0,u,n],[u,0,l,a],[u,a,h,o],[5*h,a,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var n=1;n2){t*=.5;for(var u=0;t>2&&u=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);var l=this.coordinates[u];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],n,a,o,s)}else e.drawImage(this.image,n,a,o,s)}}]),i}(),Coe=function(){function i(r){N(this,i),this.images={},this.imageBroken={},this.callback=r}return M(i,[{key:"_tryloadBrokenUrl",value:function(e,t,n){if(!(e===void 0||n===void 0)){if(t===void 0){console.warn("No broken url image defined");return}n.image.onerror=function(){console.error("Could not load brokenImage:",t)},n.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var n=this,a=this.images[e];if(a)return a;var o=new xoe;return this.images[e]=o,o.image.onload=function(){n._fixImageCoordinates(o.image),o.init(),n._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),i}(),lT={exports:{}},Aoe=ne,Doe=Aoe(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),Roe=ne,Noe=Xe,Moe=Hr,N1=Doe,$u=Object.isExtensible,Boe=Roe(function(){$u(1)}),Foe=Boe||N1?function(r){return!Noe(r)||N1&&Moe(r)==="ArrayBuffer"?!1:$u?$u(r):!0}:$u,joe=ne,hT=!joe(function(){return Object.isExtensible(Object.preventExtensions({}))}),Loe=q,zoe=se,Hoe=ts,Voe=Xe,ap=Je,Woe=Ht.f,M1=as,Uoe=Wl,op=Foe,Koe=Dl,Goe=hT,cT=!1,jr=Koe("meta"),qoe=0,sp=function(i){Woe(i,jr,{value:{objectID:"O"+qoe++,weakData:{}}})},Yoe=function(i,r){if(!Voe(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!ap(i,jr)){if(!op(i))return"F";if(!r)return"E";sp(i)}return i[jr].objectID},Xoe=function(i,r){if(!ap(i,jr)){if(!op(i))return!0;if(!r)return!1;sp(i)}return i[jr].weakData},Joe=function(i){return Goe&&cT&&op(i)&&!ap(i,jr)&&sp(i),i},Zoe=function(){Qoe.enable=function(){},cT=!0;var i=M1.f,r=zoe([].splice),e={};e[jr]=1,i(e).length&&(M1.f=function(t){for(var n=i(t),a=0,o=n.length;ad;d++)if(f=y(i[d]),f&&B1(j1,f))return f;return new wu(!1)}l=ose(i,h)}for(v=a?i.next:l.next;!(p=tse(v,l)).done;){try{f=y(p.value)}catch(m){F1(l,"throw",m)}if(typeof f=="object"&&f&&B1(j1,f))return f}return new wu(!1)},lse=Re,hse=TypeError,lp=function(i,r){if(lse(r,i))return i;throw new hse("Incorrect invocation")},cse=q,dse=Ie,fse=eh,vse=ne,pse=Pa,gse=up,yse=lp,mse=qe,bse=Xe,$se=Oa,wse=Ca,_se=Ht.f,Ese=yi.forEach,Sse=Ye,dT=ln,Ose=dT.set,Tse=dT.getterFor,hp=function(i,r,e){var t=i.indexOf("Map")!==-1,n=i.indexOf("Weak")!==-1,a=t?"set":"add",o=dse[i],s=o&&o.prototype,u={},l;if(!Sse||!mse(o)||!(n||s.forEach&&!vse(function(){new o().entries().next()})))l=e.getConstructor(r,i,t,a),fse.enable();else{l=r(function(c,f){Ose(yse(c,h),{type:i,collection:new o}),$se(f)||gse(f,c[a],{that:c,AS_ENTRIES:t})});var h=l.prototype,d=Tse(i);Ese(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(c){var f=c==="add"||c==="set";c in s&&!(n&&c==="clear")&&pse(h,c,function(v,p){var g=d(this).collection;if(!f&&n&&!bse(v))return c==="get"?void 0:!1;var y=g[c](v===0?0:v,p);return f?this:y})}),n||_se(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return wse(l,i,!1,!0),u[i]=l,cse({global:!0,forced:!0},u),n||e.setStrong(l,i,t),l},Ise=is,cp=function(i,r,e){for(var t in r)e&&e.unsafe&&i[t]?i[t]=r[t]:Ise(i,t,r[t],e);return i},kse=Jt,Pse=zv,xse=ke,Cse=Ye,L1=xse("species"),Ase=function(i){var r=kse(i);Cse&&r&&!r[L1]&&Pse(r,L1,{configurable:!0,get:function(){return this}})},Dse=xa,Rse=zv,z1=cp,Nse=Qo,Mse=lp,Bse=Oa,Fse=up,jse=Mv,eu=Bv,Lse=Ase,Ha=Ye,H1=eh.fastKey,fT=ln,V1=fT.set,ld=fT.getterFor,vT={getConstructor:function(i,r,e,t){var n=i(function(l,h){Mse(l,a),V1(l,{type:r,index:Dse(null),first:void 0,last:void 0,size:0}),Ha||(l.size=0),Bse(h)||Fse(h,l[t],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=ld(r),s=function(l,h,d){var c=o(l),f=u(l,h),v,p;return f?f.value=d:(c.last=f={index:p=H1(h,!0),key:h,value:d,previous:v=c.last,next:void 0,removed:!1},c.first||(c.first=f),v&&(v.next=f),Ha?c.size++:l.size++,p!=="F"&&(c.index[p]=f)),l},u=function(l,h){var d=o(l),c=H1(h),f;if(c!=="F")return d.index[c];for(f=d.first;f;f=f.next)if(f.key===h)return f};return z1(a,{clear:function(){for(var h=this,d=o(h),c=d.index,f=d.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete c[f.index],f=f.next;d.first=d.last=void 0,Ha?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),c=u(h,l);if(c){var f=c.next,v=c.previous;delete d.index[c.index],c.removed=!0,v&&(v.next=f),f&&(f.previous=v),d.first===c&&(d.first=f),d.last===c&&(d.last=v),Ha?d.size--:h.size--}return!!c},forEach:function(h){for(var d=o(this),c=Nse(h,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:d.first;)for(c(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(h){return!!u(this,h)}}),z1(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Ha&&Rse(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(i,r,e){var t=r+" Iterator",n=ld(r),a=ld(t);jse(i,r,function(o,s){V1(this,{type:t,target:o,state:n(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,eu(void 0,!0)):eu(s==="keys"?u.key:s==="values"?u.value:[u.key,u.value],!1)},e?"entries":"values",!e,!0),Lse(r)}},zse=hp,Hse=vT;zse("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},Hse);var Vse=ae,Wse=Vse.Map,Use=Wse,Kse=Use,Gse=Kse,pT=V(Gse),qse=function(){function i(){N(this,i),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Fe(this.options,this.defaultOptions)}return M(i,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ie(t).call(t,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new pT,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[a]),this._groups.set(e,n)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[o],this._groups.set(e,n)}return n}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),i}(),Yse=q;Yse({target:"Number",stat:!0},{isNaN:function(r){return r!==r}});var Xse=ae,Jse=Xse.Number.isNaN,Zse=Jse,Qse=Zse,eue=Qse,Cf=V(eue),tue=Ie,rue=tue.isFinite,iue=Number.isFinite||function(r){return typeof r=="number"&&rue(r)},nue=q,aue=iue;nue({target:"Number",stat:!0},{isFinite:aue});var oue=ae,sue=oue.Number.isFinite,uue=sue,lue=uue,hue=lue,Ai=V(hue),cue=q,due=yi.some,fue=Ra,vue=fue("some");cue({target:"Array",proto:!0,forced:!vue},{some:function(r){return due(this,r,arguments.length>1?arguments[1]:void 0)}});var pue=Ze,gue=pue("Array").some,yue=Re,mue=gue,hd=Array.prototype,bue=function(i){var r=i.some;return i===hd||yue(hd,i)&&r===hd.some?mue:r},$ue=bue,wue=$ue,_ue=wue,Eue=V(_ue),Sue=ae,Oue=Sue.Object.getOwnPropertySymbols,Tue=Oue,Iue=Tue,kue=Iue,ci=V(kue),gT={exports:{}},Pue=q,xue=ne,Cue=wr,yT=Sa.f,mT=Ye,Aue=!mT||xue(function(){yT(1)});Pue({target:"Object",stat:!0,forced:Aue,sham:!mT},{getOwnPropertyDescriptor:function(r,e){return yT(Cue(r),e)}});var Due=ae,bT=Due.Object,Rue=gT.exports=function(r,e){return bT.getOwnPropertyDescriptor(r,e)};bT.getOwnPropertyDescriptor.sham&&(Rue.sham=!0);var Nue=gT.exports,Mue=Nue,$T=Mue,Bue=$T,bi=V(Bue),Fue=q,jue=Ye,Lue=rte,zue=wr,Hue=Sa,Vue=Da;Fue({target:"Object",stat:!0,sham:!jue},{getOwnPropertyDescriptors:function(r){for(var e=zue(r),t=Hue.f,n=Lue(e),a={},o=0,s,u;n.length>o;)u=t(e,s=n[o++]),u!==void 0&&Vue(a,s,u);return a}});var Wue=ae,Uue=Wue.Object.getOwnPropertyDescriptors,Kue=Uue,Gue=Kue,que=Gue,di=V(que),wT={exports:{}},Yue=q,Xue=Ye,W1=jl.f;Yue({target:"Object",stat:!0,forced:Object.defineProperties!==W1,sham:!Xue},{defineProperties:W1});var Jue=ae,_T=Jue.Object,Zue=wT.exports=function(r,e){return _T.defineProperties(r,e)};_T.defineProperties.sham&&(Zue.sham=!0);var Que=wT.exports,ele=Que,tle=ele,rle=tle,th=V(rle),ile=TS,rh=V(ile);function ih(i,r,e){return r=aO(r),r in i?Vl(i,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[r]=e,i}var ET=Ie,nle=ne,ale=se,ole=_r,sle=yO.trim,ule=qv,lle=ale("".charAt),Ju=ET.parseFloat,U1=ET.Symbol,K1=U1&&U1.iterator,hle=1/Ju(ule+"-0")!==-1/0||K1&&!nle(function(){Ju(Object(K1))}),cle=hle?function(r){var e=sle(ole(r)),t=Ju(e);return t===0&&lle(e,0)==="-"?-0:t}:Ju,dle=q,G1=cle;dle({global:!0,forced:parseFloat!==G1},{parseFloat:G1});var fle=ae,vle=fle.parseFloat,ple=vle,gle=ple,yle=gle,ST=V(yle),mle=q,ble=ne,$le=Wl.f,wle=ble(function(){return!Object.getOwnPropertyNames(1)});mle({target:"Object",stat:!0,forced:wle},{getOwnPropertyNames:$le});var _le=ae,Ele=_le.Object,Sle=function(r){return Ele.getOwnPropertyNames(r)},Ole=Sle,Tle=Ole,Ile=Tle,kle=V(Ile);function dp(i,r){var e=["node","edge","label"],t=!0,n=Xr(r,"chosen");if(typeof n=="boolean")t=n;else if(de(n)==="object"){if(ie(e).call(e,i)===-1)throw new Error("choosify: subOption '"+i+"' should be one of '"+e.join("', '")+"'");var a=Xr(r,["chosen",i]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function Af(i,r,e){if(i.width<=0||i.height<=0)return!1;if(e!==void 0){var t={x:r.x-e.x,y:r.y-e.y};if(e.angle!==0){var n=-e.angle,a={x:Math.cos(n)*t.x-Math.sin(n)*t.y,y:Math.sin(n)*t.x+Math.cos(n)*t.y};r=a}else r=t}var o=i.x+i.width,s=i.y+i.width;return i.leftr.x&&i.topr.y}function Zu(i){return typeof i=="string"&&i!==""}function OT(i,r,e,t){var n=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(i,r),s=Math.sin(r)*o,u=Math.cos(r)*o;u===o?(n+=o,a=t.y):s===o?(n=t.x,a-=o):(n+=u,a-=s)}else t.shape.width>t.shape.height?(n=t.x+t.shape.width*.5,a=t.y-e):(n=t.x+e,a=t.y-t.shape.height*.5);return{x:n,y:a}}var Ple=Ze,xle=Ple("Array").values,Cle=xle,Ale=Cle,Dle=un,Rle=Je,Nle=Re,Mle=Ale,cd=Array.prototype,Ble={DOMTokenList:!0,NodeList:!0},Fle=function(i){var r=i.values;return i===cd||Nle(cd,i)&&r===cd.values||Rle(Ble,Dle(i))?Mle:r},jle=Fle,TT=V(jle),Lle=function(){function i(r){N(this,i),this.measureText=r,this.current=0,this.width=0,this.height=0,this.lines=[]}return M(i,[{key:"_add",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,n),s=Fe({},TT(o));s.text=t,s.width=o.width,s.mod=n,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;ee&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t"://,""://,""://,"":/<\/b>/,"":/<\/i>/,"":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},q1=function(){function i(r){N(this,i),this.text=r,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return M(i,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),a=Se(n,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&t&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,t,n){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,n;if(e instanceof RegExp)n=e,t=1;else{var a=zle[e];a!==void 0?n=a:n=new RegExp(e),t=e.length}return[n,t]}}]),i}(),Hle=function(){function i(r,e,t,n){var a=this;N(this,i),this.ctx=r,this.parent=e,this.selected=t,this.hover=n;var o=function(u,l){if(u===void 0)return 0;var h=a.parent.getFormattingValues(r,t,n,l),d=0;if(u!==""){var c=a.ctx.measureText(u);d=c.width}return{width:d,values:h}};this.lines=new Lle(o)}return M(i,[{key:"process",value:function(e){if(!Zu(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,` -`),e=e.replace(/\r/g,` -`);var n=String(e).split(` -`),a=n.length;if(t.multi)for(var o=0;o0)for(var u=0;u0)for(var v=0;v")||t.parseStartTag("ital","")||t.parseStartTag("mono","")||t.parseEndTag("bold","")||t.parseEndTag("ital","")||t.parseEndTag("mono",""))||n(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,n=new q1(e),a=!0,o=function(h){return/\\/.test(h)?(n.positionthis.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],u=this.getLongestFitWord(s);this.lines.newLine(rt(s).call(s,0,u),t),a[0]=rt(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var h=rt(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(h,t):this.lines.newLine(h,t),a=rt(a).call(a,l)}}}}]),i}(),Va=["bold","ital","boldital","mono"],IT=function(){function i(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;N(this,i),this.body=r,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=t}return M(i,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Zu(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(de(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(te(Va,function(n){t.fontOptions[n]={}}),i.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(e,function(n,a){n!=null&&de(n)!=="object"&&(t.fontOptions[a]=n)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Xr(e,"widthConstraint");if(typeof n=="number")t.maxWdt=Number(n),t.minWdt=Number(n);else if(de(n)==="object"){var a=Xr(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Xr(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Xr(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(de(s)==="object"){var u=Xr(e,["heightConstraint","minimum"]);typeof u=="number"&&(t.minHgt=Number(u));var l=Xr(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(t.valign=l)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),pe(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=dp("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,n,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,u))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,n,a),u=Se(s,2);t=u[0],n=u[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(var l=0;l0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=y,e.lineJoin="round"),e.fillStyle=g,f.strokeWidth>0&&e.strokeText(f.text,t+d,n+f.vadjust),e.fillText(f.text,t+d,n+f.vadjust),d+=f.width}n+=h.height}}}},{key:"_setAlignment",value:function(e,t,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,n=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,n]}},{key:"_getColor",value:function(e,t,n){var a=e||"#000000",o=n||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=Kt(a,s),o=Kt(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,n=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,n=-this.size.height*.5;break;case"top":t=a,n=-(this.size.height+e);break;case"bottom":t=a,n=e;break}}var o={left:t,top:n,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,n),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,n,a){var o=function(h,d,c){return d==="normal"?c==="mod"?"":h[c]:h[d][c]!==void 0?h[d][c]:h[c]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,n));var u="";return s.mod!==void 0&&s.mod!==""&&(u+=s.mod+" "),u+=s.size+"px "+s.face,e.font=u.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,n,a){var o=new Hle(e,this,t,n);return o.process(a)}},{key:"_processLabel",value:function(e,t,n){if(!(this.labelDirty===!1&&!this.differentState(t,n))){var a=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width0&&a.height0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),hs(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,t,n,a,o){n!==void 0&&this.resize(n,a,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,n,a,o){this._updateBoundingBox(e,t,n,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),i}();function Dhe(i){var r=Rhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Rhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Nhe=function(i){ue(e,i);var r=Dhe(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._setMargins(a),o}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,l),qE(n,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(n,a,o,s,u){this._updateBoundingBox(n,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(vn);function Mhe(i){var r=Bhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Bhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var pp=function(i){ue(e,i);var r=Mhe(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o.labelOffset=0,o.selected=!1,o}return M(e,[{key:"setOptions",value:function(n,a,o){this.options=n,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(n,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=n):(this.imageObj=n,this.imageObjAlt=a)}},{key:"switchImages",value:function(n){var a=n&&!this.selected||!n&&this.selected;if(this.selected=n,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var n={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;de(a)=="object"?(n.top=a.top,n.right=a.right,n.bottom=a.bottom,n.left=a.left):(n.top=a,n.right=a,n.bottom=a,n.left=a)}return n}},{key:"_resizeImage",value:function(){var n,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),n=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();n=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=n,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(n,a,o,s){this.initContextForDraw(n,s),Av(n,a,o,s.size),this.performFill(n,s)}},{key:"_drawImageAtPosition",value:function(n,a){if(this.imageObj.width!=0){n.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(n,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),u=this.left+s.left,l=this.top+s.top,h=this.width-s.left-s.right,d=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(n,o,u,l,h,d),this.disableShadow(n,a)}}},{key:"_drawImageLabel",value:function(n,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var h=this.labelModule.getTextSize(n,s,u);h.lineCount>=1&&(l+=h.height/2)}var d=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(n,a,d,s,u,"hanging")}}]),e}(vn);function Fhe(i){var r=jhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function jhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Lhe=function(i){ue(e,i);var r=Fhe(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._setMargins(a),o}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o),u=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=u/2,this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(n,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(pp);function zhe(i){var r=Hhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Hhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Vhe=function(i){ue(e,i);var r=zhe(e);function e(t,n,a,o,s){var u;return N(this,e),u=r.call(this,t,n,a),u.setImages(o,s),u}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,u,l){this.switchImages(s),this.resize();var h=a,d=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(n,h,d,l),n.save(),n.clip(),this._drawImageAtPosition(n,l),n.restore(),this._drawImageLabel(n,h,d,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(n,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=n,this.boundingBox.right=n+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(pp);function Whe(i){var r=Uhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Uhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var $i=function(i){ue(e,i);var r=Whe(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var u,l;this.labelModule.getTextSize(n,a,o);var h=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:h,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:h,this.radius=.5*this.width}}},{key:"_drawShape",value:function(n,a,o,s,u,l,h,d){var c=this;return this.resize(n,l,h,d),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(n,d),TK(a)(n,s,u,d.size),this.performFill(n,d),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(n.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",n.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(c.options.label!==void 0){c.labelModule.calculateLabelSize(n,l,h,s,u,"hanging");var v=u+.5*c.height+.5*c.labelModule.size.height;c.labelModule.draw(n,s,v,l,h,"hanging")}c.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(vn);function Q1(i,r){var e=Ee(i);if(ci){var t=ci(i);r&&(t=Ot(t).call(t,function(n){return bi(i,n).enumerable})),e.push.apply(e,t)}return e}function Khe(i){for(var r=1;r"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Yhe=function(i){ue(e,i);var r=Ghe(e);function e(t,n,a,o){var s;return N(this,e),s=r.call(this,t,n,a,o),s.ctxRenderer=o,s}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var h=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:Khe({},l),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),n.restore(),h.drawExternalLabel){var d=h.drawExternalLabel;h.drawExternalLabel=function(){n.save(),d(),n.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function Xhe(i){var r=Jhe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Jhe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Zhe=function(i){ue(e,i);var r=Xhe(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._setMargins(a),o}return M(e,[{key:"resize",value:function(n,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o),u=s.width+this.margin.right+this.margin.left;this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,l),YE(n,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(vn);function Qhe(i){var r=ece();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function ece(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var tce=function(i){ue(e,i);var r=Qhe(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function rce(i){var r=ice();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function ice(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var nce=function(i){ue(e,i);var r=rce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}($i);function ace(i){var r=oce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function oce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var e$=function(i){ue(e,i);var r=ace(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(n,l),sf(n,this.left,this.top,this.width,this.height),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,a,o,s,u)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);var o=this.width*.5,s=this.height*.5,u=Math.sin(a)*o,l=Math.cos(a)*s;return o*s/Math.sqrt(u*u+l*l)}}]),e}(vn);function sce(i){var r=uce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function uce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var lce=function(i){ue(e,i);var r=sce(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._setMargins(a),o}return M(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(n,a,o,s,u,l){var h=this;return this.resize(n,s,u),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(n,a,o,s,u,l),{drawExternalLabel:function(){if(h.options.label!==void 0){var c=5;h.labelModule.draw(n,h.left+h.iconSize.width/2+h.margin.left,o+h.height/2+c,s)}h.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(n,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=n-this.options.icon.size*.5,this.boundingBox.right=n+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(n,a,o,s,u,l){var h=Number(this.options.icon.size);this.options.icon.code!==void 0?(n.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+h+"px",this.options.icon.face].join(" "),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",this.enableShadow(n,l),n.fillText(this.options.icon.code,a,o),this.disableShadow(n,l)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(vn);function hce(i){var r=cce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function cce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var dce=function(i){ue(e,i);var r=hce(e);function e(t,n,a,o,s){var u;return N(this,e),u=r.call(this,t,n,a),u.setImages(o,s),u}return M(e,[{key:"resize",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(n,a,o,s,u,l){n.save(),this.switchImages(s),this.resize();var h=a,d=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var c=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:c)/this.body.view.scale;n.lineWidth=Math.min(this.width,v),n.beginPath();var p=s?this.options.color.highlight.border:u?this.options.color.hover.border:this.options.color.border,g=s?this.options.color.highlight.background:u?this.options.color.hover.background:this.options.color.background;l.opacity!==void 0&&(p=Kt(p,l.opacity),g=Kt(g,l.opacity)),n.strokeStyle=p,n.fillStyle=g,n.rect(this.left-.5*n.lineWidth,this.top-.5*n.lineWidth,this.width+n.lineWidth,this.height+n.lineWidth),hs(n).call(n),this.performStroke(n,l),n.closePath()}this._drawImageAtPosition(n,l),this._drawImageLabel(n,h,d,s,u),this.updateBoundingBox(a,o),n.restore()}},{key:"updateBoundingBox",value:function(n,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=n,this.top=a):(this.left=n-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(pp);function fce(i){var r=vce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function vce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var pce=function(i){ue(e,i);var r=fce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function gce(i){var r=yce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function yce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var mce=function(i){ue(e,i);var r=gce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function bce(i){var r=$ce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function $ce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var wce=function(i){ue(e,i);var r=bce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function _ce(i){var r=Ece();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Ece(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Sce=function(i){ue(e,i);var r=_ce(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._setMargins(a),o}return M(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(n,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(n,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(n,l),this.updateBoundingBox(a,o,n,s,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(vn);function Oce(i){var r=Tce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Tce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Ice=function(i){ue(e,i);var r=Oce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function kce(i){var r=Pce();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Pce(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var xce=function(i){ue(e,i);var r=kce(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}($i);function t$(i,r){var e=Ee(i);if(ci){var t=ci(i);r&&(t=Ot(t).call(t,function(n){return bi(i,n).enumerable})),e.push.apply(e,t)}return e}function r$(i){for(var r=1;re.left&&this.shape.tope.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.lefte.left&&this.shape.boundingBox.tope.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,t,n){var a;if(n!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var u=n.get(o);u.opacity!==void 0&&t.opacity===void 0&&(i.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));var l=Ot(a=kle(t)).call(a,function(h){return t[h]!=null});l.push("font"),Yu(l,e,u),e.color=If(e.color)}}}},{key:"parseOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(Yu(s,e,t,n),i.checkMass(t),e.opacity!==void 0&&(i.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(i.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!i.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Ut(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var u=If(t.color);JO(e.color,u)}else n===!0&&t.color===null&&(e.color=ui(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),n===!0&&t.font===null&&(e.font=ui(a.font)),i.updateGroupOptions(e,t,o),t.scaling!==void 0&&Ut(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var n="";t!==void 0&&(n=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",tT),e.mass=1}}}]),i}();function Cce(i,r){var e=typeof mi<"u"&&cn(i)||i["@@iterator"];if(!e){if(he(i)||(e=Ace(i))||r){e&&(i=e);var t=0,n=function(){};return{s:n,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ace(i,r){var e;if(i){if(typeof i=="string")return i$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i$(i,r)}}function i$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var n=0,a=Ee(this.body.nodes);n1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.data.nodes;if(IE("id",e))this.body.data.nodes=e;else if(he(e))this.body.data.nodes=new Lu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Lu;else throw new TypeError("Array or DataSet expected");if(n&&te(this.nodesListeners,function(s,u){n.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(this.nodesListeners,function(s,u){a.body.data.nodes.on(u,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,a=[],o=0;o1&&arguments[1]!==void 0?arguments[1]:Nt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;te(this.body.nodes,function(n,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(he(e)===!0){for(var n=0;n0?(u=s/o,t+=u*u):t+=s;return o===1/0?1/0:o*ode(t)}});var ude=ae,lde=ude.Math.hypot,hde=lde,cde=hde,dde=cde,fde=V(dde);function AT(i){var r=vde();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function vde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Ae=function(){function i(){N(this,i)}return M(i,null,[{key:"transform",value:function(e,t){he(e)||(e=[e]);for(var n=t.point.x,a=t.point.y,o=t.angle,s=t.length,u=0;u4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,n,a,o){if(this.from!=this.to)this._line(e,t,n,a,o);else{var s=this._getCircleData(e),u=Se(s,3),l=u[0],h=u[1],d=u[2];this._circle(e,t,l,h,d)}}},{key:"_drawDashedLine",value:function(e,t,n,a,o){e.lineCap="round";var s=he(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{var u=this._getCircleData(e),l=Se(u,3),h=l[0],d=l[1],c=l[2];this._circle(e,t,h,d,c)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)XE(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=Se(f,3),p=v[0],g=v[1],y=v[2];this._circle(e,t,p,g,y)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,n=rt(t=this._getCircleData(e)).call(t,0,2),a=Se(n,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var n=OT(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}},{key:"_pointOnCircle",value:function(e,t,n,a){var o=a*2*Math.PI;return{x:e+n*Math.cos(o),y:t-n*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,n){var a=n.x,o=n.y,s=n.low,u=n.high,l=n.direction,h=10,d=this.options.selfReference.size,c=.05,f,v=(s+u)*.5,p=0;this.options.arrowStrikethrough===!0&&(l===-1?p=this.options.endPointOffset.from:l===1&&(p=this.options.endPointOffset.to));var g=0;do{v=(s+u)*.5,f=this._pointOnCircle(a,o,d,v);var y=Math.atan2(e.y-f.y,e.x-f.x),m=e.distanceToBorder(t,y)+p,b=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),$=m-b;if(Math.abs($)0?l>0?s=v:u=v:l>0?u=v:s=v,++g}while(s<=u&&g1?d=1:d<0&&(d=0);var c=e+d*u,f=t+d*l,v=c-o,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,t,n,a,o,s){var u,l,h,d,c,f,v,p=s.width;t==="from"?(h=this.from,d=this.to,c=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(h=this.to,d=this.from,c=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(h=this.to,d=this.from,c=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var g=15*f+3*p;if(h!=d){var y=fde(h.x-d.x,h.y-d.y),m=g/y;if(t!=="middle")if(this.options.smooth.enabled===!0){var b=this._findBorderPosition(h,e,{via:n}),$=this.getPoint(b.t+m*(t==="from"?1:-1),n);u=Math.atan2(b.y-$.y,b.x-$.x),l=b}else u=Math.atan2(h.y-d.y,h.x-d.x),l=this._findBorderPosition(h,e);else{var S=(c?-m:m)/2,_=this.getPoint(.5+S,n),C=this.getPoint(.5-S,n);u=Math.atan2(_.y-C.y,_.x-C.x),l=this.getPoint(.5,n)}}else{var R=this._getCircleData(e),x=Se(R,3),B=x[0],F=x[1],X=x[2];if(t==="from"){var K=this.options.selfReference.angle,oe=this.options.selfReference.angle+Math.PI,Qe=this._findBorderPositionCircle(this.from,e,{x:B,y:F,low:K,high:oe,direction:-1});u=Qe.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=Qe}else if(t==="to"){var Ne=this.options.selfReference.angle,At=this.options.selfReference.angle+Math.PI,lt=this._findBorderPositionCircle(this.from,e,{x:B,y:F,low:Ne,high:At,direction:1});u=lt.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=lt}else{var nt=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(B,F,X,nt),u=nt*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var Dt=l.x-g*.9*Math.cos(u),at=l.y-g*.9*Math.sin(u),ye={x:Dt,y:at};return{point:l,core:ye,angle:u,length:g,type:v}}},{key:"drawArrowHead",value:function(e,t,n,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=DT.draw(e,o);s&&(this.enableShadow(e,t),hs(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var n=he(t)?t:[5,5];e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),i}();function l$(i,r){var e=Ee(i);if(ci){var t=ci(i);r&&(t=Ot(t).call(t,function(n){return bi(i,n).enumerable})),e.push.apply(e,t)}return e}function h$(i){for(var r=1;r"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var gp=function(i){ue(e,i);var r=Ide(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_findBorderPositionBezier",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,h=1,d=0,c=this.to,f,v,p=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(c=this.from,l=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var g=0;do{v=(d+h)*.5,f=this.getPoint(v,o);var y=Math.atan2(c.y-f.y,c.x-f.x),m=c.distanceToBorder(a,y)+p,b=Math.sqrt(Math.pow(f.x-c.x,2)+Math.pow(f.y-c.y,2)),$=m-b;if(Math.abs($)0&&(c=this._getDistanceToLine(y,m,p,g,u,l),d=c"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var c$=function(i){ue(e,i);var r=Pde(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return M(e,[{key:"setOptions",value:function(n){_u(L(e.prototype),"setOptions",this).call(this,n);var a=!1;this.options.physics!==n.physics&&(a=!0),this.options=n,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var n="edgeId:"+this.id,a=this._body.functions.createNode({id:n,shape:"circle",physics:!0,hidden:!0});this._body.nodes[n]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=Se(o,3),u=s[0],l=s[1],h=s[2],d=2*Math.PI*(1-n);return{x:u+h*Math.sin(d),y:l+h-h*(1-Math.cos(d))}}else return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*a.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*a.y+Math.pow(n,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a,this.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){return this._getDistanceToBezierEdge(n,a,o,s,u,l,this.via)}}]),e}(gp);function Cde(i){var r=Ade();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Ade(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var d$=function(i){ue(e,i);var r=Cde(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var n=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var u,l;o<=s?u=l=n*s:u=l=n*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var h=this.from.x+u,d=this.from.y+l;return a==="discrete"&&(o<=s?h=othis.to.x&&(R=-R),this.from.y>=this.to.y&&(x=-x);var B=this.from.x+R,F=this.from.y+x;return o<=s?this.from.x<=this.to.x?B=this.to.xB?this.to.x:B:this.from.y>=this.to.y?F=this.to.y>F?this.to.y:F:F=this.to.y2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(n,a,o.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(n,a,o,s,u,l,h)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=n,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,u=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:u}}}]),e}(gp);function Dde(i){var r=Rde();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function Rde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Nde=function(i){ue(e,i);var r=Dde(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_getDistanceToBezierEdge2",value:function(n,a,o,s,u,l,h,d){for(var c=1e9,f=n,v=a,p=[0,0,0,0],g=1;g<10;g++){var y=.1*g;p[0]=Math.pow(1-y,3),p[1]=3*y*Math.pow(1-y,2),p[2]=3*Math.pow(y,2)*(1-y),p[3]=Math.pow(y,3);var m=p[0]*n+p[1]*h.x+p[2]*d.x+p[3]*o,b=p[0]*a+p[1]*h.y+p[2]*d.y+p[3]*s;if(g>0){var $=this._getDistanceToLine(f,v,m,b,u,l);c=$"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var f$=function(i){ue(e,i);var r=Mde(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_line",value:function(n,a,o){var s=o[0],u=o[1];this._bezierCurve(n,a,s,u)}},{key:"_getViaCoordinates",value:function(){var n=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,h=this.options.smooth.roundness;return(Math.abs(n)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,l=this.to.y,o=this.from.x-h*n,u=this.to.x+h*n):(s=this.from.y-h*a,l=this.to.y+h*a,o=this.from.x,u=this.to.x),[{x:o,y:s},{x:u,y:l}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),d=Se(h,2),c=d[0],f=d[1];return this._getDistanceToBezierEdge2(n,a,o,s,u,l,c,f)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=Se(a,2),s=o[0],u=o[1],l=n,h=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],d=h[0]*this.fromPoint.x+h[1]*s.x+h[2]*u.x+h[3]*this.toPoint.x,c=h[0]*this.fromPoint.y+h[1]*s.y+h[2]*u.y+h[3]*this.toPoint.y;return{x:d,y:c}}}]),e}(Nde);function Fde(i){var r=jde();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function jde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var v$=function(i){ue(e,i);var r=Fde(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_line",value:function(n,a){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),n.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(n){return{x:(1-n)*this.fromPoint.x+n*this.toPoint.x,y:(1-n)*this.fromPoint.y+n*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){var o=this.to,s=this.from;n.id===this.from.id&&(o=this.from,s=this.to);var u=Math.atan2(o.y-s.y,o.x-s.x),l=o.x-s.x,h=o.y-s.y,d=Math.sqrt(l*l+h*h),c=n.distanceToBorder(a,u),f=(d-c)/d;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){return this._getDistanceToLine(n,a,o,s,u,l)}}]),e}(RT),qn=function(){function i(r,e,t,n,a){if(N(this,i),e===void 0)throw new Error("No body provided");this.options=ui(n),this.globalOptions=n,this.defaultOptions=a,this.body=e,this.imagelist=t,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new IT(this.body,this.options,!0),this.setOptions(r)}return M(i,[{key:"setOptions",value:function(e){if(e){var t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;i.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=ST(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=dp("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var u=this.options.hoverWidth;typeof u=="function"?o.width=u(o.width):typeof u=="number"&&(o.width+=u),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof c$&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof f$&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof d$&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof v$&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new c$(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new f$(this.options,this.body,this.labelModule):this.edgeType=new d$(this.options,this.body,this.labelModule):this.edgeType=new v$(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,t,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,n,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(n.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var u=OT(e,this.options.selfReference.angle,this.options.selfReference.size,n);o=this._pointOnCircle(u.x,u.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var n=this._getRotation();Af(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,n=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,h=this.edgeType.getDistanceToEdge(n,a,o,s,u,l);return h0&&s<0)&&(u+=Math.PI),a.angle=u,a}},{key:"_pointOnCircle",value:function(e,t,n,a){return{x:e+n*Math.cos(a),y:t-n*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(Ma(s,e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Ai(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Ai(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Zu(t.label)?e.label=t.label:Zu(e.label)||(e.label=void 0),Ut(e,t,"smooth",a),Ut(e,t,"shadow",a),Ut(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=Li(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),Ut(e.scaling,t.scaling,"label",a.scaling)):n===!0&&t.scaling===null&&(e.scaling=Li(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var u=t.arrows.toLowerCase();e.arrows.to.enabled=ie(u).call(u,"to")!=-1,e.arrows.middle.enabled=ie(u).call(u,"middle")!=-1,e.arrows.from.enabled=ie(u).call(u,"from")!=-1}else if(de(t.arrows)==="object")Ut(e.arrows,t.arrows,"to",a.arrows),Ut(e.arrows,t.arrows,"middle",a.arrows),Ut(e.arrows,t.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+ls(t.arrows));else n===!0&&t.arrows===null&&(e.arrows=Li(a.arrows));if(t.color!==void 0&&t.color!==null){var l=Kn(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,h=e.color;if(o)pe(h,a.color,!1,n);else for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&delete h[d];if(Kn(h))h.color=h,h.highlight=h,h.hover=h,h.inherit=!1,l.opacity===void 0&&(h.opacity=1);else{var c=!1;l.color!==void 0&&(h.color=l.color,c=!0),l.highlight!==void 0&&(h.highlight=l.highlight,c=!0),l.hover!==void 0&&(h.hover=l.hover,c=!0),l.inherit!==void 0&&(h.inherit=l.inherit),l.opacity!==void 0&&(h.opacity=Math.min(1,Math.max(0,l.opacity))),c===!0?h.inherit=!1:h.inherit===void 0&&(h.inherit="from")}}else n===!0&&t.color===null&&(e.color=ui(a.color));n===!0&&t.font===null&&(e.font=ui(a.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),i}(),Lde=function(){function i(r,e,t){var n,a=this;N(this,i),this.body=r,this.images=e,this.groups=t,this.body.functions.createEdge=k(n=this.create).call(n,this),this.edgesListeners={add:function(s,u){a.add(u.items)},update:function(s,u){a.update(u.items)},remove:function(s,u){a.remove(u.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,u,l,h){if(u===s)return .5;var d=1/(u-s);return Math.max(0,(h-s)*d)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},pe(this.options,this.defaultOptions),this.bindEventListeners()}return M(i,[{key:"bindEventListeners",value:function(){var e=this,t,n;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){var l=e.body.edges[u],h=e.body.data.edges.get(u);if(h!=null){var d=h.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",k(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",k(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",function(){te(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){qn.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(IE("id",e))this.body.data.edges=e;else if(he(e))this.body.data.edges=new Lu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Lu;else throw new TypeError("Array or DataSet expected");if(a&&te(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){te(this.edgesListeners,function(s,u){t.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.edges,a=this.body.data.edges,o=0;o1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var n=this.body.edges;te(e,function(a){var o=n[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;te(this.body.edges,function(t,n){var a=e.body.data.edges.get(n);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new qn(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var a=n[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];te(this.body.edges,function(n,a){var o=e.body.nodes[n.toId],s=e.body.nodes[n.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,n=[];fe(e).call(e,function(a,o){var s=t[o];s===void 0&&n.push(o)}),this.add(n,!0)}}}]),i}(),NT=function(){function i(r,e,t){N(this,i),this.body=r,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=Ql("BARNES HUT SOLVER")}return M(i,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,o=this._formBarnesHutTree(t,n);this.barnesHutTree=o;for(var s=0;s0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var n=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(n*n+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,n,a,t,e)}}},{key:"_calculateForces",value:function(e,t,n,a,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),u=t*s,l=n*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,t){for(var n,a=t.length,o=e[t[0]].x,s=e[t[0]].y,u=e[t[0]].x,l=e[t[0]].y,h=1;h0&&(cu&&(u=c),fl&&(l=f))}var v=Math.abs(u-o)-Math.abs(l-s);v>0?(s-=.5*v,l+=.5*v):(o+=.5*v,u-=.5*v);var p=1e-5,g=Math.max(p,Math.abs(u-o)),y=.5*g,m=.5*(o+u),b=.5*(s+l),$={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:m-y,maxX:m+y,minY:b-y,maxY:b+y},size:g,calcSize:1/g,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch($.root);for(var S=0;S0&&this._placeInTree($.root,n);return $}},{key:"_updateBranchMass",value:function(e,t){var n=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=o,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidtht.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var n,a,o,s,u=.5*e.size;switch(t){case"NW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),i}(),zde=function(){function i(r,e,t){N(this,i),this._rng=Ql("REPULSION SOLVER"),this.body=r,this.physicsBody=e,this.setOptions(t)}return M(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,a,o,s,u,l,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,p=4/3,g=0;g"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Kde=function(i){ue(e,i);var r=Wde(e);function e(t,n,a){var o;return N(this,e),o=r.call(this,t,n,a),o._rng=Ql("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return M(e,[{key:"_calculateForces",value:function(n,a,o,s,u){n===0&&(n=.1*this._rng(),a=n),this.overlapAvoidanceFactor<1&&s.shape.radius&&(n=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,n-s.shape.radius));var l=s.edges.length+1,h=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(n,2),d=a*h,c=o*h;this.physicsBody.forces[s.id].x+=d,this.physicsBody.forces[s.id].y+=c}}]),e}(NT);function Gde(i){var r=qde();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function qde(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var Yde=function(i){ue(e,i);var r=Gde(e);function e(t,n,a){return N(this,e),r.call(this,t,n,a)}return M(e,[{key:"_calculateForces",value:function(n,a,o,s,u){if(n>0){var l=u.edges.length+1,h=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*h,s[u.id].y=o*h}}}]),e}(Eu),Xde=function(){function i(r){N(this,i),this.body=r,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Fe(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return M(i,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,Yu(["stabilization"],this.options,e),Ut(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||Cf(t.x))&&(t.x=0),(typeof t.y!="number"||Cf(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new Kde(this.body,this.physicsBody,e),this.edgesSolver=new fd(this.body,this.physicsBody,e),this.gravitySolver=new Yde(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new zde(this.body,this.physicsBody,e),this.edgesSolver=new fd(this.body,this.physicsBody,e),this.gravitySolver=new Eu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new Hde(this.body,this.physicsBody,e),this.edgesSolver=new Vde(this.body,this.physicsBody,e),this.gravitySolver=new Eu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new NT(this.body,this.physicsBody,e),this.edgesSolver=new fd(this.body,this.physicsBody,e),this.gravitySolver=new Eu(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=k(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=Uu();this.physicsTick();var t=Uu()-e;(t<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&yr(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/es))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,n=0,a=5,o=0;os&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,t.options.mass),t.x+=a.x*this.timestep):(n.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,t.options.mass),t.y+=a.y*this.timestep):(n.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,yr(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,t=function(){return e.stabilized===!1&&e.stabilizationIterations1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;lu.shape.boundingBox.left&&(o=u.shape.boundingBox.left),su.shape.boundingBox.top&&(n=u.shape.boundingBox.top),a1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;lu.x&&(o=u.x),su.y&&(n=u.y),a"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var ife=function(i){ue(e,i);var r=tfe(e);function e(t,n,a,o,s,u){var l;return N(this,e),l=r.call(this,t,n,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return M(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},te(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(u){var l,h,d=ie(l=u.clusteringEdgeReplacingIds).call(l,s.id);d!==-1&&(te(s.clusteringEdgeReplacingIds,function(c){u.clusteringEdgeReplacingIds.push(c),a.body.edges[c].edgeReplacedById=u.id}),Ar(h=u.clusteringEdgeReplacingIds).call(h,d,1))})}),o.edges=[]}}]),e}(Nt),nfe=function(){function i(r){var e=this;N(this,i),this.body=r,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Fe(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return M(i,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():de(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],a=0;a=e&&n.push(o.id)}for(var s=0;s0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};te(this.body.nodes,function(s,u){s.options&&t.joinCondition(s.options)===!0&&(a[u]=s,te(s.edges,function(l){e.clusteredEdges[l.id]===void 0&&(o[l.id]=l)}))}),this._cluster(a,o,t,n)}},{key:"clusterByEdgeCount",value:function(e,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},u,l,h,d=function(){var p={},g={},y=n.body.nodeIndices[c],m=n.body.nodes[y];if(s[y]===void 0){h=0,l=[];for(var b=0;b0&&Ee(g).length>0&&S===!0){var R=function(){for(var K=0;K1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var n,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},u={},l=o.id,h=vt.cloneOptions(o);s[l]=o;for(var d=0;d-1&&(u[b.id]=b)}this._cluster(s,u,t,a)}},{key:"_createClusterEdges",value:function(e,t,n,a){for(var o,s,u,l,h,d,c=Ee(e),f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;ua?u.x:a,o=u.ys?u.y:s;return{x:.5*(n+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=ie(o).call(o,e)-1;if(s>=0){var u=o[s],l=this.body.nodes[u];l._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}var h=a.containedNodes,d=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var c={},f={x:a.x,y:a.y};for(var v in h)if(Object.prototype.hasOwnProperty.call(h,v)){var p=this.body.nodes[v];c[v]={x:p.x,y:p.y}}var g=t.releaseFunction(f,c);for(var y in h)if(Object.prototype.hasOwnProperty.call(h,y)){var m=this.body.nodes[y];g[y]!==void 0&&(m.x=g[y].x===void 0?a.x:g[y].x,m.y=g[y].y===void 0?a.y:g[y].y)}}else te(h,function(lt){lt.options.fixed.x===!1&&(lt.x=a.x),lt.options.fixed.y===!1&&(lt.y=a.y)});for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var $=this.body.nodes[b];$.vx=a.vx,$.vy=a.vy,$.setOptions({physics:!0}),delete this.clusteredNodes[b]}for(var S=[],_=0;_0&&sa&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),n+=1}e=e/n,t=t/n;var u=t-Math.pow(e,2),l=Math.sqrt(u),h=Math.floor(e+2*l);return h>a&&(h=a),h}},{key:"_createClusteredEdge",value:function(e,t,n,a,o){var s=vt.cloneOptions(n,"edge");pe(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+no(),o!==void 0&&pe(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[n.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,t,n,a){if(t instanceof qn){var o=t,s={};s[o.id]=o,t=s}if(e instanceof Nt){var u=e,l={};l[u.id]=u,e=l}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,a);for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&this.body.edges[h]!==void 0){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var c in e)Object.prototype.hasOwnProperty.call(e,c)&&(this.clusteredNodes[c]={clusterId:n.id,node:this.body.nodes[c]},this.body.nodes[c].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}}}},{key:"_filter",value:function(e,t){var n=[];return te(e,function(a){t(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,t,n=[],a={},o=function(v){te(e.body.nodes,function(p){p.isCluster===!0&&v(p)})};for(t in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)){var s=this.body.nodes[t];s===void 0&&n.push(t)}o(function(f){for(var v=0;v0}(!f.endPointsValid()||!p)&&(a[v]=v)}),o(function(f){te(a,function(v){delete f.containedEdges[v],te(f.edges,function(p,g){if(p.id===v){f.edges[g]=null;return}p.clusteringEdgeReplacingIds=e._filter(p.clusteringEdgeReplacingIds,function(y){return!a[y]})}),f.edges=e._filter(f.edges,function(p){return p!==null})})}),te(a,function(f){delete e.clusteredEdges[f]}),te(a,function(f){delete e.body.edges[f]});var l=Ee(this.body.edges);te(l,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var g=e._getClusterNodeForNode(v.fromId);g!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,g);var y=e._getClusterNodeForNode(v.toId);y!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,y)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var h=!1,d=!0,c=function(){var v=[];o(function(g){var y=Ee(g.containedNodes).length,m=g.options.allowSingleNodeCluster===!0;(m&&y<1||!m&&y<2)&&v.push(g.id)});for(var p=0;p0,h=h||d};d;)c();h&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),i}();function afe(){var i;window!==void 0&&(i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),i===void 0?window.requestAnimationFrame=function(r){r()}:window.requestAnimationFrame=i}var ofe=function(){function i(r,e){N(this,i),afe(),this.body=r,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Fe(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return M(i,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=yr(function(){var n;e.zooming=!1,k(n=e._requestRedraw).call(n,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",k(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];Ma(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=yr(e,t):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(k(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(n,e),u=s.drawExternalLabels;t.drawExternalLabels=u}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,n;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(n=t[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,h=this.canvas.DOMtoCanvas({x:-20,y:-20}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),c={top:h.y,left:h.x,bottom:d.y,right:d.x},f=[],v=0;v0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e!=1?n=this.cameraState.scale*e:t!=1&&(n=this.cameraState.scale*t),this.body.view.scale=n;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(ie(e).call(e,"%")!==-1||ie(e).call(e,"px")!==-1)return e;if(ie(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Gn(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Gn.DIRECTION_ALL}),Qu(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Gn(this.frame),MT(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var n=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{var u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==l)&&this._getCameraState(s),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,n=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,n=!0)}return n===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),i}();function dfe(i,r){var e=Fe({nodes:r,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},i??{});if(!he(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=r),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var ffe=function(){function i(r,e){var t,n=this,a;N(this,i),this.body=r,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",k(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",k(a=this.releaseNode).call(a,this))}return M(i,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=dfe(e,this.body.nodeIndices);var n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(n===0||a===0)s=1,o=vt.getRange(this.body.nodes,e.nodes);else if(t===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var h=this.body.nodes[l];h.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=vt.getRange(this.body.nodes,e.nodes);var d=this.body.nodeIndices.length;s=12.662/(d+7.4147)+.0964822;var c=Math.min(n/600,a/600);s*=c}else{this.body.emitter.emit("_resizeNodes"),o=vt.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,p=n/f,g=a/v;s=p<=g?p:g}s>e.maxZoomLevel?s=e.maxZoomLevel:s1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=n,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Ai(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Ai(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Ai(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Ai(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=k(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=k(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=Xae[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=k(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),i}();function g$(i){var r=i&&i.preventDefault||!1,e=i&&i.container||window,t={},n={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(h){l(h,"keydown")},u=function(h){l(h,"keyup")},l=function(h,d){if(n[d][h.keyCode]!==void 0){for(var c=n[d][h.keyCode],f=0;f700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=g$({container:window,preventDefault:!0}):this.keycharm=g$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,n,a,o,s,u,l,h,d,c,f,v,p,g,y,m,b,$,S,_,C,R,x,B;k(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),k(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),k(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),k(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),k(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(h=this.keycharm).call(h,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(d=this.keycharm).call(d,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(c=this.keycharm).call(c,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),k(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),k(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),k(g=this.keycharm).call(g,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),k(y=this.keycharm).call(y,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),k(m=this.keycharm).call(m,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),k(b=this.keycharm).call(b,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k($=this.keycharm).call($,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(S=this.keycharm).call(S,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(_=this.keycharm).call(_,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(C=this.keycharm).call(C,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),k(R=this.keycharm).call(R,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(x=this.keycharm).call(x,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),k(B=this.keycharm).call(B,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),i}();function pfe(i,r){var e=typeof mi<"u"&&cn(i)||i["@@iterator"];if(!e){if(he(i)||(e=gfe(i))||r){e&&(i=e);var t=0,n=function(){};return{s:n,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function gfe(i,r){var e;if(i){if(typeof i=="string")return y$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return y$(i,r)}}function y$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var n=function(o,s){for(var u=[],l=0;l=o.minX&&d.x<=o.maxX&&d.y>=o.minY&&d.y<=o.maxY});fe(s).call(s,function(h){return t.selectionHandler.selectObject(t.body.nodes[h])});var u=this.getPointer(e.center);this.selectionHandler.commitAndEmit(u,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var l=this.drag.selection;l&&l.length?(fe(l).call(l,function(h){h.node.options.fixed.x=h.xFixed,h.node.options.fixed.y=h.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var n=this.pinch.scale*e.scale;this.zoom(n,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/n,u=(1-s)*t.x+o.x*s,l=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},a!=null){var h=this.canvas.canvasToDOM(a);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),n0&&(this.popupObj=h[c[c.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,p=this.body.edges,g,y=[],m=0;m0&&(this.popupObj=p[y[y.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new noe(this.canvas.frame)),this.popup.popupTargetType=u,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),n===!0)){var a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),i}(),mfe=hp,bfe=vT;mfe("Set",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},bfe);var $fe=ae,wfe=$fe.Set,_fe=wfe,Efe=_fe,Sfe=Efe,Pi=V(Sfe),Ofe=se,m$=cp,ru=eh.getWeakData,Tfe=lp,Ife=Vt,kfe=Oa,vd=Xe,Pfe=up,BT=yi,b$=Je,FT=ln,xfe=FT.set,Cfe=FT.getterFor,Afe=BT.find,Dfe=BT.findIndex,Rfe=Ofe([].splice),Nfe=0,iu=function(i){return i.frozen||(i.frozen=new jT)},jT=function(){this.entries=[]},pd=function(i,r){return Afe(i.entries,function(e){return e[0]===r})};jT.prototype={get:function(i){var r=pd(this,i);if(r)return r[1]},has:function(i){return!!pd(this,i)},set:function(i,r){var e=pd(this,i);e?e[1]=r:this.entries.push([i,r])},delete:function(i){var r=Dfe(this.entries,function(e){return e[0]===i});return~r&&Rfe(this.entries,r,1),!!~r}};var Mfe={getConstructor:function(i,r,e,t){var n=i(function(u,l){Tfe(u,a),xfe(u,{type:r,id:Nfe++,frozen:void 0}),kfe(l)||Pfe(l,u[t],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Cfe(r),s=function(u,l,h){var d=o(u),c=ru(Ife(l),!0);return c===!0?iu(d).set(l,h):c[d.id]=h,u};return m$(a,{delete:function(u){var l=o(this);if(!vd(u))return!1;var h=ru(u);return h===!0?iu(l).delete(u):h&&b$(h,l.id)&&delete h[l.id]},has:function(l){var h=o(this);if(!vd(l))return!1;var d=ru(l);return d===!0?iu(h).has(l):d&&b$(d,h.id)}}),m$(a,e?{get:function(l){var h=o(this);if(vd(l)){var d=ru(l);return d===!0?iu(h).get(l):d?d[h.id]:void 0}},set:function(l,h){return s(this,l,h)}}:{add:function(l){return s(this,l,!0)}}),n}},Bfe=hT,$$=Ie,Su=se,w$=cp,Ffe=eh,jfe=hp,LT=Mfe,nu=Xe,au=ln.enforce,Lfe=ne,zfe=eS,gs=Object,Hfe=Array.isArray,ou=gs.isExtensible,zT=gs.isFrozen,Vfe=gs.isSealed,HT=gs.freeze,Wfe=gs.seal,_$={},E$={},Ufe=!$$.ActiveXObject&&"ActiveXObject"in $$,Wa,VT=function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},WT=jfe("WeakMap",VT,LT),Cn=WT.prototype,Ou=Su(Cn.set),Kfe=function(){return Bfe&&Lfe(function(){var i=HT([]);return Ou(new WT,i,1),!zT(i)})};if(zfe)if(Ufe){Wa=LT.getConstructor(VT,"WeakMap",!0),Ffe.enable();var S$=Su(Cn.delete),su=Su(Cn.has),O$=Su(Cn.get);w$(Cn,{delete:function(i){if(nu(i)&&!ou(i)){var r=au(this);return r.frozen||(r.frozen=new Wa),S$(this,i)||r.frozen.delete(i)}return S$(this,i)},has:function(r){if(nu(r)&&!ou(r)){var e=au(this);return e.frozen||(e.frozen=new Wa),su(this,r)||e.frozen.has(r)}return su(this,r)},get:function(r){if(nu(r)&&!ou(r)){var e=au(this);return e.frozen||(e.frozen=new Wa),su(this,r)?O$(this,r):e.frozen.get(r)}return O$(this,r)},set:function(r,e){if(nu(r)&&!ou(r)){var t=au(this);t.frozen||(t.frozen=new Wa),su(this,r)?Ou(this,r,e):t.frozen.set(r,e)}else Ou(this,r,e);return this}})}else Kfe()&&w$(Cn,{set:function(r,e){var t;return Hfe(r)&&(zT(r)?t=_$:Vfe(r)&&(t=E$)),Ou(this,r,e),t===_$&&HT(r),t===E$&&Wfe(r),this}});var Gfe=ae,qfe=Gfe.WeakMap,Yfe=qfe,Xfe=Yfe,Jfe=Xfe,ao=V(Jfe);function ve(i,r,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?i!==r||!t:!r.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(i):t?t.value:r.get(i)}function Nf(i,r,e,t,n){if(typeof r=="function"?i!==r||!0:!r.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r.set(i,e),e}function Mf(i,r){var e=typeof mi<"u"&&cn(i)||i["@@iterator"];if(!e){if(he(i)||(e=Zfe(i))||r){e&&(i=e);var t=0,n=function(){};return{s:n,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Zfe(i,r){var e;if(i){if(typeof i=="string")return T$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return T$(i,r)}}function T$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,i),Kr.set(this,new k$),Gr.set(this,new k$),Tu.set(this,void 0),Nf(this,Tu,r)}return M(i,[{key:"sizeNodes",get:function(){return ve(this,Kr,"f").size}},{key:"sizeEdges",get:function(){return ve(this,Gr,"f").size}},{key:"getNodes",value:function(){return ve(this,Kr,"f").getSelection()}},{key:"getEdges",value:function(){return ve(this,Gr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ve(this,Kr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ve(this,Gr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ve(this,Kr,"f").delete(e)}},{key:"deleteEdges",value:function(e){ve(this,Gr,"f").delete(e)}},{key:"clear",value:function(){ve(this,Kr,"f").clear(),ve(this,Gr,"f").clear()}},{key:"commit",value:function(){for(var e,t,n={nodes:ve(this,Kr,"f").commit(),edges:ve(this,Gr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function eve(i,r){var e;if(i){if(typeof i=="string")return x$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return x$(i,r)}}function x$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,n);if(o===!0)s.nodes=[],s.edges=[];else{var u=this.getSelection();s.nodes=u.nodes,s.edges=u.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof Nt){if(t===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,dr(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],n=this.body.nodes,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var n=this.body.edges,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,u=0;u0&&(this.generateClickEvent("deselectEdge",t,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),n=!0),n===!0&&this.generateClickEvent("select",t,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return na(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return na(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=P$(e.nodes),a;try{for(n.s();!(a=n.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,t.highlightEdges)}}catch(c){n.e(c)}finally{n.f()}}if(e.edges){var u=P$(e.edges),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=this.body.edges[h];if(!d)throw new RangeError('Edge with id "'+h+'" not found');this.selectObject(d)}}catch(c){u.e(c)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(t);n.push.apply(n,l)}for(var h=this.body.edgeIndices,d=this.body.edges,c=h.length-1;c>=0;c--){var f=d[h[c]],v=f.getItemsOnPoint(t);n.push.apply(n,v)}return n}}]),i}(),C$=kS,rve=Math.floor,Bf=function(i,r){var e=i.length,t=rve(e/2);return e<8?ive(i,r):nve(i,Bf(C$(i,0,t),r),Bf(C$(i,t),r),r)},ive=function(i,r){for(var e=i.length,t=1,n,a;t0;)i[a]=i[--a];a!==t++&&(i[a]=n)}return i},nve=function(i,r,e,t){for(var n=r.length,a=e.length,o=0,s=0;o3)){if(mve)return!0;if(F$)return F$<603;var i="",r,e,t,n;for(r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)ei.push({k:e+n,v:t})}for(ei.sort(function(a,o){return o.v-a.v}),n=0;nN$(e)?1:-1}};dve({target:"Array",proto:!0,forced:Eve},{sort:function(r){r!==void 0&&fve(r);var e=vve(this);if(KT)return r===void 0?j$(e):j$(e,r);var t=[],n=R$(e),a,o;for(o=0;o=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},Fve={left:L$(!1),right:L$(!0)},jve=Ie,Lve=Hr,zve=Lve(jve.process)==="process",Hve=q,Vve=Fve.left,Wve=Ra,z$=Xo,Uve=zve,Kve=!Uve&&z$>79&&z$<83,Gve=Kve||!Wve("reduce");Hve({target:"Array",proto:!0,forced:Gve},{reduce:function(r){var e=arguments.length;return Vve(this,r,e,e>1?arguments[1]:void 0)}});var qve=Ze,Yve=qve("Array").reduce,Xve=Re,Jve=Yve,yd=Array.prototype,Zve=function(i){var r=i.reduce;return i===yd||Xve(yd,i)&&r===yd.reduce?Jve:r},Qve=Zve,epe=Qve,tpe=epe,GT=V(tpe);function qT(i){var r=rpe();return function(){var t=L(i),n;if(r){var a=L(this).constructor;n=E(t,arguments,a)}else n=t.apply(this,arguments);return ce(this,n)}}function rpe(){if(typeof Reflect>"u"||!E||E.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(E(Boolean,[],function(){})),!0}catch{return!1}}var YT=function(){function i(){N(this,i)}return M(i,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),i}(),ipe=function(i){ue(e,i);var r=qT(e);function e(t){var n;return N(this,e),n=r.call(this),n.layout=t,n}return M(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){oo(n).call(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(YT),npe=function(i){ue(e,i);var r=qT(e);function e(t){var n;return N(this,e),n=r.call(this),n.layout=t,n}return M(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){oo(n).call(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(YT),ape=q,ope=yi.every,spe=Ra,upe=spe("every");ape({target:"Array",proto:!0,forced:!upe},{every:function(r){return ope(this,r,arguments.length>1?arguments[1]:void 0)}});var lpe=Ze,hpe=lpe("Array").every,cpe=Re,dpe=hpe,md=Array.prototype,fpe=function(i){var r=i.every;return i===md||cpe(md,i)&&r===md.every?dpe:r},vpe=fpe,ppe=vpe,gpe=ppe,XT=V(gpe);function ype(i,r){var e=typeof mi<"u"&&cn(i)||i["@@iterator"];if(!e){if(he(i)||(e=mpe(i))||r){e&&(i=e);var t=0,n=function(){};return{s:n,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function mpe(i,r){var e;if(i){if(typeof i=="string")return H$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return H$(i,r)}}function H$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e=r[a])&&(r[a]=r[n]+1)}),r}function $pe(i){return JT(function(r){var e,t;return XT(e=Ot(t=r.edges).call(t,function(n){return i.has(n.toId)})).call(e,function(n){return n.to===r})},function(r,e){return e>r},"from",i)}function wpe(i){return JT(function(r){var e,t;return XT(e=Ot(t=r.edges).call(t,function(n){return i.has(n.toId)})).call(e,function(n){return n.from===r})},function(r,e){return eo)return{v:{v:bpe(t,a)}};++m},S;b=y.pop();)if(S=$(),S!==0&&S)return S.v},c;for(l.s();!(h=l.n()).done;)if(c=d(),c!==0&&c)return c.v}catch(f){l.e(f)}finally{l.f()}return a}var _pe=function(){function i(){N(this,i),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return M(i,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var u=t.levels[s];if(t.childrenReference[s]){var l=t.childrenReference[s];if(l.length>0)for(var h=0;h0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),pe(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=Ql(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):de(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;nu){for(var h=e.length;e.length>u&&s<=o;){s+=1;var d=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var c=e.length;if(d==c&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*h)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var f=70,v=0;v0){var e,t,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new _pe;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(n=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&n===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var u=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(u),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,n={},a=function(){for(var b=s(),$=0,S=0;S0)for(var _=0;_1&&arguments[1]!==void 0?arguments[1]:1e9,S=1e9,_=1e9,C=1e9,R=-1e9;for(var x in b)if(Object.prototype.hasOwnProperty.call(b,x)){var B=e.body.nodes[x],F=e.hierarchical.levels[B.id],X=e.direction.getPosition(B),K=e._getSpaceAroundNode(B,b),oe=Se(K,2),Qe=oe[0],Ne=oe[1];S=Math.min(Qe,S),_=Math.min(Ne,_),F<=$&&(C=Math.min(X,C),R=Math.max(X,R))}return[C,R,S,_]},h=function(b,$){var S=e.hierarchical.getMaxLevel(b.id),_=e.hierarchical.getMaxLevel($.id);return Math.min(S,_)},d=function(b,$,S){for(var _=e.hierarchical,C=0;C<$.length;C++){var R=$[C],x=_.distributionOrdering[R];if(x.length>1)for(var B=0;B2&&arguments[2]!==void 0?arguments[2]:!1,_=e.direction.getPosition(b),C=e.direction.getPosition($),R=Math.abs(C-_),x=e.options.hierarchical.nodeSpacing;if(R>x){var B={},F={};u(b,B),u($,F);var X=h(b,$),K=l(B,X),oe=l(F,X),Qe=K[1],Ne=oe[0],At=oe[2],lt=Math.abs(Qe-Ne);if(lt>x){var nt=Qe-Ne+x;nt<-At+x&&(nt=-At+x),nt<0&&(e._shiftBlock($.id,nt),t=!0,S===!0&&e._centerParent($))}}},f=function(b,$){for(var S=$.id,_=$.edges,C=e.hierarchical.levels[$.id],R=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,x={},B=[],F=0;F<_.length;F++){var X=_[F];if(X.toId!=X.fromId){var K=X.toId==S?X.from:X.to;x[_[F].id]=K,e.hierarchical.levels[K.id]0?st=Math.min(Rt,Er-e.options.hierarchical.nodeSpacing):Rt<0&&(st=-Math.min(-Rt,ot-e.options.hierarchical.nodeSpacing)),st!=0&&(e._shiftBlock($.id,st),t=!0)},lt=function(at){var ye=e.direction.getPosition($),Me=e._getSpaceAroundNode($),xe=Se(Me,2),ot=xe[0],Er=xe[1],Rt=at-ye,st=ye;Rt>0?st=Math.min(ye+(Er-e.options.hierarchical.nodeSpacing),at):Rt<0&&(st=Math.max(ye-(ot-e.options.hierarchical.nodeSpacing),at)),st!==ye&&(e.direction.setPosition($,st),t=!0)},nt=Ne(b,B);At(nt),nt=Ne(b,_),lt(nt)},v=function(b){var $=e.hierarchical.getLevels();$=ji($).call($);for(var S=0;S0&&Math.abs(v)0&&(h=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,h,t),this._validatePositionAndContinue(u,t,h),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var n,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;st&&this.positionedNodes[l.id]===void 0){var d=this.options.hierarchical.nodeSpacing,c=void 0;u===0?c=this.direction.getPosition(this.body.nodes[e]):c=this.direction.getPosition(o[u-1])+d,this.direction.setPosition(l,c,h),this._validatePositionAndContinue(l,h,c)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-ae.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function c(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var p,g=e._getActiveEdges(f),y=0;y=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Ope(i,r){var e;if(i){if(typeof i=="string")return V$(i,r);var t=rt(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return hn(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return V$(i,r)}}function V$(i,r){(r==null||r>i.length)&&(r=i.length);for(var e=0,t=new Array(r);e0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,k(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",k(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",k(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var n=pe({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length===2)this.options.editNode(n,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,n,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,k(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",k(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",k(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",k(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",k(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",k(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",de(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,k(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(l.from.x,l.from.y),d=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",k(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",k(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",k(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",k(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(c){var f=l.edgeType.findBorderPositions(c);h.selected===!1&&(h.x=f.from.x,h.y=f.from.y),d.selected===!1&&(d.x=f.to.x,d.y=f.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:n};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var n=pe({},this.options.controlNodeStyle);n.id="targetNode"+no(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Yr(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,k(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Yr(this.editModeDiv),Yr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=Spe(Ar(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(t.s();!(n=t.n()).done;){var a=n.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Yr(this.manipulationDiv),Yr(this.editModeDiv),Yr(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,k(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,k(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+ls(Ee(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Fe({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+no(),from:n.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ie(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(t.x),h.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),s=void 0,u=o.length-1;u>=0;u--){var l;if(ie(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,n={id:no(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(n,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var n=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(de(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),i}(),D="string",I="boolean",w="number",Ya="array",H="object",ZT="dom",Ipe="any",bd=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],$d={borderWidth:{number:w},borderWidthSelected:{number:w,undefined:"undefined"},brokenImage:{string:D,undefined:"undefined"},chosen:{label:{boolean:I,function:"function"},node:{boolean:I,function:"function"},__type__:{object:H,boolean:I}},color:{border:{string:D},background:{string:D},highlight:{border:{string:D},background:{string:D},__type__:{object:H,string:D}},hover:{border:{string:D},background:{string:D},__type__:{object:H,string:D}},__type__:{object:H,string:D}},opacity:{number:w,undefined:"undefined"},fixed:{x:{boolean:I},y:{boolean:I},__type__:{object:H,boolean:I}},font:{align:{string:D},color:{string:D},size:{number:w},face:{string:D},background:{string:D},strokeWidth:{number:w},strokeColor:{string:D},vadjust:{number:w},multi:{boolean:I,string:D},bold:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},boldital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},ital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},mono:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},__type__:{object:H,string:D}},group:{string:D,number:w,undefined:"undefined"},heightConstraint:{minimum:{number:w},valign:{string:D},__type__:{object:H,boolean:I,number:w}},hidden:{boolean:I},icon:{face:{string:D},code:{string:D},size:{number:w},color:{string:D},weight:{string:D,number:w},__type__:{object:H}},id:{string:D,number:w},image:{selected:{string:D,undefined:"undefined"},unselected:{string:D,undefined:"undefined"},__type__:{object:H,string:D}},imagePadding:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:H,number:w}},label:{string:D,undefined:"undefined"},labelHighlightBold:{boolean:I},level:{number:w,undefined:"undefined"},margin:{top:{number:w},right:{number:w},bottom:{number:w},left:{number:w},__type__:{object:H,number:w}},mass:{number:w},physics:{boolean:I},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:I},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:H,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:H}},shadow:{enabled:{boolean:I},color:{string:D},size:{number:w},x:{number:w},y:{number:w},__type__:{object:H,boolean:I}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:I,array:Ya},borderRadius:{number:w},interpolation:{boolean:I},useImageSize:{boolean:I},useBorderWithImage:{boolean:I},coordinateOrigin:{string:["center","top-left"]},__type__:{object:H}},size:{number:w},title:{string:D,dom:ZT,undefined:"undefined"},value:{number:w,undefined:"undefined"},widthConstraint:{minimum:{number:w},maximum:{number:w},__type__:{object:H,boolean:I,number:w}},x:{number:w},y:{number:w},__type__:{object:H}},kpe={configure:{enabled:{boolean:I},filter:{boolean:I,string:D,array:Ya,function:"function"},container:{dom:ZT},showButton:{boolean:I},__type__:{object:H,boolean:I,string:D,array:Ya,function:"function"}},edges:{arrows:{to:{enabled:{boolean:I},scaleFactor:{number:w},type:{string:bd},imageHeight:{number:w},imageWidth:{number:w},src:{string:D},__type__:{object:H,boolean:I}},middle:{enabled:{boolean:I},scaleFactor:{number:w},type:{string:bd},imageWidth:{number:w},imageHeight:{number:w},src:{string:D},__type__:{object:H,boolean:I}},from:{enabled:{boolean:I},scaleFactor:{number:w},type:{string:bd},imageWidth:{number:w},imageHeight:{number:w},src:{string:D},__type__:{object:H,boolean:I}},__type__:{string:["from","to","middle"],object:H}},endPointOffset:{from:{number:w},to:{number:w},__type__:{object:H,number:w}},arrowStrikethrough:{boolean:I},background:{enabled:{boolean:I},color:{string:D},size:{number:w},dashes:{boolean:I,array:Ya},__type__:{object:H,boolean:I}},chosen:{label:{boolean:I,function:"function"},edge:{boolean:I,function:"function"},__type__:{object:H,boolean:I}},color:{color:{string:D},highlight:{string:D},hover:{string:D},inherit:{string:["from","to","both"],boolean:I},opacity:{number:w},__type__:{object:H,string:D}},dashes:{boolean:I,array:Ya},font:{color:{string:D},size:{number:w},face:{string:D},background:{string:D},strokeWidth:{number:w},strokeColor:{string:D},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:w},multi:{boolean:I,string:D},bold:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},boldital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},ital:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},mono:{color:{string:D},size:{number:w},face:{string:D},mod:{string:D},vadjust:{number:w},__type__:{object:H,string:D}},__type__:{object:H,string:D}},hidden:{boolean:I},hoverWidth:{function:"function",number:w},label:{string:D,undefined:"undefined"},labelHighlightBold:{boolean:I},length:{number:w,undefined:"undefined"},physics:{boolean:I},scaling:{min:{number:w},max:{number:w},label:{enabled:{boolean:I},min:{number:w},max:{number:w},maxVisible:{number:w},drawThreshold:{number:w},__type__:{object:H,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:H}},selectionWidth:{function:"function",number:w},selfReferenceSize:{number:w},selfReference:{size:{number:w},angle:{number:w},renderBehindTheNode:{boolean:I},__type__:{object:H}},shadow:{enabled:{boolean:I},color:{string:D},size:{number:w},x:{number:w},y:{number:w},__type__:{object:H,boolean:I}},smooth:{enabled:{boolean:I},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:w},forceDirection:{string:["horizontal","vertical","none"],boolean:I},__type__:{object:H,boolean:I}},title:{string:D,undefined:"undefined"},width:{number:w},widthConstraint:{maximum:{number:w},__type__:{object:H,boolean:I,number:w}},value:{number:w,undefined:"undefined"},__type__:{object:H}},groups:{useDefaultGroups:{boolean:I},__any__:$d,__type__:{object:H}},interaction:{dragNodes:{boolean:I},dragView:{boolean:I},hideEdgesOnDrag:{boolean:I},hideEdgesOnZoom:{boolean:I},hideNodesOnDrag:{boolean:I},hover:{boolean:I},keyboard:{enabled:{boolean:I},speed:{x:{number:w},y:{number:w},zoom:{number:w},__type__:{object:H}},bindToWindow:{boolean:I},autoFocus:{boolean:I},__type__:{object:H,boolean:I}},multiselect:{boolean:I},navigationButtons:{boolean:I},selectable:{boolean:I},selectConnectedEdges:{boolean:I},hoverConnectedEdges:{boolean:I},tooltipDelay:{number:w},zoomView:{boolean:I},zoomSpeed:{number:w},__type__:{object:H}},layout:{randomSeed:{undefined:"undefined",number:w,string:D},improvedLayout:{boolean:I},clusterThreshold:{number:w},hierarchical:{enabled:{boolean:I},levelSeparation:{number:w},nodeSpacing:{number:w},treeSpacing:{number:w},blockShifting:{boolean:I},edgeMinimization:{boolean:I},parentCentralization:{boolean:I},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:H,boolean:I}},__type__:{object:H}},manipulation:{enabled:{boolean:I},initiallyActive:{boolean:I},addNode:{boolean:I,function:"function"},addEdge:{boolean:I,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:H,boolean:I,function:"function"}},deleteNode:{boolean:I,function:"function"},deleteEdge:{boolean:I,function:"function"},controlNodeStyle:$d,__type__:{object:H,boolean:I}},nodes:$d,physics:{enabled:{boolean:I},barnesHut:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},forceAtlas2Based:{theta:{number:w},gravitationalConstant:{number:w},centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},repulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},__type__:{object:H}},hierarchicalRepulsion:{centralGravity:{number:w},springLength:{number:w},springConstant:{number:w},nodeDistance:{number:w},damping:{number:w},avoidOverlap:{number:w},__type__:{object:H}},maxVelocity:{number:w},minVelocity:{number:w},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:I},iterations:{number:w},updateInterval:{number:w},onlyDynamicEdges:{boolean:I},fit:{boolean:I},__type__:{object:H,boolean:I}},timestep:{number:w},adaptiveTimestep:{boolean:I},wind:{x:{number:w},y:{number:w},__type__:{object:H}},__type__:{object:H,boolean:I}},autoResize:{boolean:I},clickToUse:{boolean:I},locale:{string:D},locales:{__any__:{any:Ipe},__type__:{object:H}},height:{string:D},width:{string:D},__type__:{object:H}},QT={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Ppe=function(r,e,t){var n;return!!(oi(r).call(r,"physics")&&oi(n=QT.physics.solver).call(n,e)&&t.physics.solver!==e&&e!=="wind")},xpe=function(){function i(){N(this,i)}return M(i,[{key:"getDistances",value:function(e,t,n){for(var a={},o=e.edges,s=0;s2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,c=0,f=0,v=0,p=0,g=0;d>o&&us&&gy.type==="downstream_subgraph_search")?.data||[],f=y=>{const m=y.json.nodes.map($=>({id:$.id,label:$.type,color:{background:"#2B7CE9",border:"#1B5BB1"},font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},margin:12,padding:10,shape:"box",widthConstraint:{minimum:100,maximum:200}})),b=y.json.links.map($=>({from:$.origin_id,to:$.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#FFFFFF",width:2}));return{nodes:m,edges:b}};Ve.useEffect(()=>()=>{d.current&&(d.current.destroy(),d.current=null)},[]);const v=Ve.useCallback((y,m)=>{d.current&&d.current.destroy();const b=f(m),$=new z(y,b,{nodes:{shape:"box",margin:12,padding:10,font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},borderWidth:2,shadow:{enabled:!0,color:"rgba(0,0,0,0.2)",size:5}},edges:{arrows:"to",color:"#FFFFFF",width:2,smooth:{enabled:!0,type:"straightCross"}},physics:{enabled:!0,solver:"hierarchicalRepulsion",hierarchicalRepulsion:{nodeDistance:200,springLength:200}},layout:{hierarchical:{enabled:!0,direction:"UD",sortMethod:"directed",nodeSpacing:200,levelSeparation:150}},interaction:{dragNodes:!1,zoomView:!1,dragView:!1}});d.current=$},[]),p=async y=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",y),Vi.trackEvent({event_type:"subgraph_accept",message_type:"subgraph",message_id:u.message_id,data:{subgraph_name:y.name,subgraph_tags:y.tags}});const m=y.json.nodes,b=Object.values(Mt.canvas.selected_nodes)[0];if(!b){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const $=m.map(C=>C.type),S=s;console.log("[DownstreamSubgraphs] Required node types:",$),console.log("[DownstreamSubgraphs] Installed node types:",S);const _=$.filter(C=>!S.includes(C));if(console.log("[DownstreamSubgraphs] Missing node types:",_),_.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const C=await Vi.batchGetNodeInfo(_);console.log("[DownstreamSubgraphs] Received node infos:",C);const R={text:"",ext:[{type:"node_install_guide",data:C.map(B=>({name:B.name,repository_url:B.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",R);const x={id:Sr(),role:"ai",content:JSON.stringify(R),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:y}};console.log("[DownstreamSubgraphs] Created AI message:",x),t?.(x);return}catch(C){console.error("[DownstreamSubgraphs] Error fetching node info:",C),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),g(y,b)},g=(y,m)=>{const b=y.json.nodes,$=y.json.links,S=b.find(R=>R.id===0),_=S?.id;console.log("[DownstreamSubgraphs] Entry node ID:",_);const C={};_!==null&&(C[_]=m),Mt.canvas.emitBeforeChange();try{for(const R of b)if(R.id!==_){const x=S?.pos,B=[m._pos[0],m._pos[1]],F=[R.pos[0]+B[0]-x[0],R.pos[1]+B[1]-x[1]];C[R.id]=X$(R.type,{pos:F})}for(const R of $){const x=C[R.origin_id],B=C[R.target_id];x&&B&&x.connect(R.origin_slot,B,R.target_slot)}}finally{Mt.canvas.emitAfterChange()}};return Ve.useEffect(()=>{const y=()=>{const m=Mt.canvas.selected_nodes;if(Object.keys(m??{}).length){const b=Object.values(m)[0];a({type:"SET_SELECTED_NODE",payload:b})}else a({type:"SET_SELECTED_NODE",payload:null})};return document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}},[]),O.jsx("div",{className:"rounded-lg bg-green-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:c.length>0&&O.jsx("div",{className:"space-y-3",children:O.jsx("div",{className:"flex flex-wrap gap-2",children:c.map(y=>O.jsxs("div",{className:"relative group",children:[O.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-xs`,onClick:()=>p(y),onMouseEnter:()=>h(y.name),onMouseLeave:()=>h(null),children:y.name}),O.jsxs("p",{className:"text-xs ml-3 text-gray-500",children:["[",y.tags.join(", "),"]"]}),l===y.name&&O.jsx("div",{className:`fixed -translate-y-full - z-[9999] w-[500px] p-4 bg-gray-800 text-white text-xs - rounded-md shadow-lg mb-2 border border-gray-700`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:O.jsx("div",{style:{width:"100%",height:"300px"},ref:m=>{m&&v(m,y)}})})]},y.name))})})})}const Vpe=Object.freeze(Object.defineProperty({__proto__:null,DownstreamSubgraphs:Ape},Symbol.toStringTag,{value:"Module"}));function Dpe({content:i,onLoadSubgraph:r}){const t=JSON.parse(i).ext?.find(n=>n.type==="node_install_guide")?.data||[];return O.jsxs("div",{children:[O.jsx("p",{children:"Before loading the graph to canvas, the following nodes need to be installed. Please visit the corresponding GitHub repositories to install them:"}),O.jsx("div",{className:"grid grid-cols-2 gap-3",children:t.map((n,a)=>O.jsx("div",{className:`w-full p-3 bg-white rounded-lg border border-gray-200 - hover:shadow-sm transition-all duration-200`,children:O.jsxs("div",{className:"flex flex-col",children:[O.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:n.name}),O.jsx("div",{className:"flex justify-end",children:n.repository_url?O.jsxs("a",{href:n.repository_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-white text-gray-900 rounded-md - border border-gray-900 hover:bg-gray-100 - transition-colors text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}):O.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(n.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md - border border-gray-300 text-[10px] flex items-center gap-1`,children:[O.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:O.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},a))}),O.jsx("p",{className:"mt-4"}),O.jsx("p",{children:"After installation, please click the continue loading graph button to load the graph to the canvas:"}),O.jsx("div",{className:"mt-4",children:O.jsx("button",{className:`px-3 py-2 bg-blue-500 text-white rounded-md - hover:bg-blue-600 transition-colors text-xs block mx-auto`,onClick:r,children:"Loading graph directly"})})]})}const Wpe=Object.freeze(Object.defineProperty({__proto__:null,NodeInstallGuide:Dpe},Symbol.toStringTag,{value:"Module"}));export{zpe as A,Y$ as B,Bpe as C,Vpe as D,BI as M,Hpe as N,Lpe as U,Vi as W,Mt as a,X$ as b,oI as c,Wpe as d,Fpe as f,Sr as g,uI as u,jpe as v,Mpe as w}; diff --git a/dist/copilot_web/vendor-markdown-Dek94WS0.js b/dist/copilot_web/vendor-markdown-Dek94WS0.js deleted file mode 100644 index e939edf..0000000 --- a/dist/copilot_web/vendor-markdown-Dek94WS0.js +++ /dev/null @@ -1,302 +0,0 @@ -import{r as so,c as ri,g as oo}from"./vendor-react-V04_Axys.js";var $a={exports:{}},tn={};/** - * @license React - * react-jsx-runtime.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var uo=so,co=Symbol.for("react.element"),ho=Symbol.for("react.fragment"),mo=Object.prototype.hasOwnProperty,fo=uo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,po={key:!0,ref:!0,__self:!0,__source:!0};function Ua(e,t,r){var n,i={},a=null,l=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)mo.call(t,n)&&!po.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:co,type:e,key:a,ref:l,props:i,_owner:fo.current}}tn.Fragment=ho;tn.jsx=Ua;tn.jsxs=Ua;$a.exports=tn;var vn=$a.exports;function ni(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const l=r.slice(i,n).trim();(l||!a)&&t.push(l),i=n+1,n=r.indexOf(",",i)}return t}function go(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const yo=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vo=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bo={};function ii(e,t){return(bo.jsx?vo:yo).test(e)}const xo=/[ \t\n\f\r]/g;function wo(e){return typeof e=="object"?e.type==="text"?ai(e.value):!1:ai(e)}function ai(e){return e.replace(xo,"")===""}class kr{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}kr.prototype.property={};kr.prototype.normal={};kr.prototype.space=null;function _a(e,t){const r={},n={};let i=-1;for(;++i4&&r.slice(0,4)==="data"&&To.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(si,Eo);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!si.test(a)){let l=a.replace(Mo,Co);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=y0}return new i(n,t)}function Co(e){return"-"+e.toLowerCase()}function Eo(e){return e.charAt(1).toUpperCase()}const Do={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},el=_a([Ya,Wa,Za,Qa,Ao],"html"),rn=_a([Ya,Wa,Za,Qa,zo],"svg");function Kn(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Io(e){return e.join(" ").trim()}var tl={},oi=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,No=/\n/g,Bo=/^\s*/,Fo=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Lo=/^:\s*/,Ro=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Po=/^[;\s]*/,Oo=/^\s+|\s+$/g,qo=` -`,ui="/",ci="*",Ot="",Ho="comment",Vo="declaration",jo=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function i(v){var x=v.match(No);x&&(r+=x.length);var M=v.lastIndexOf(qo);n=~M?v.length-M:n+v.length}function a(){var v={line:r,column:n};return function(x){return x.position=new l(v),u(),x}}function l(v){this.start=v,this.end={line:r,column:n},this.source=t.source}l.prototype.content=e;function s(v){var x=new Error(t.source+":"+r+":"+n+": "+v);if(x.reason=v,x.filename=t.source,x.line=r,x.column=n,x.source=e,!t.silent)throw x}function o(v){var x=v.exec(e);if(x){var M=x[0];return i(M),e=e.slice(M.length),x}}function u(){o(Bo)}function m(v){var x;for(v=v||[];x=h();)x!==!1&&v.push(x);return v}function h(){var v=a();if(!(ui!=e.charAt(0)||ci!=e.charAt(1))){for(var x=2;Ot!=e.charAt(x)&&(ci!=e.charAt(x)||ui!=e.charAt(x+1));)++x;if(x+=2,Ot===e.charAt(x-1))return s("End of comment missing");var M=e.slice(2,x-2);return n+=2,i(M),e=e.slice(x),n+=2,v({type:Ho,comment:M})}}function g(){var v=a(),x=o(Fo);if(x){if(h(),!o(Lo))return s("property missing ':'");var M=o(Ro),A=v({type:Vo,property:hi(x[0].replace(oi,Ot)),value:M?hi(M[0].replace(oi,Ot)):Ot});return o(Po),A}}function p(){var v=[];m(v);for(var x;x=g();)x!==!1&&(v.push(x),m(v));return v}return u(),p()};function hi(e){return e?e.replace(Oo,Ot):Ot}var $o=ri&&ri.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tl,"__esModule",{value:!0});var mi=tl.default=_o,Uo=$o(jo);function _o(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,Uo.default)(e),i=typeof t=="function";return n.forEach(function(a){if(a.type==="declaration"){var l=a.property,s=a.value;i?t(l,s,a):s&&(r=r||{},r[l]=s)}}),r}const Go=mi.default||mi,rl=nl("end"),v0=nl("start");function nl(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Wo(e){const t=v0(e),r=rl(e);if(t&&r)return{start:t,end:r}}function fr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fi(e.position):"start"in e||"end"in e?fi(e):"line"in e||"column"in e?Zn(e):""}function Zn(e){return pi(e&&e.line)+":"+pi(e&&e.column)}function fi(e){return Zn(e&&e.start)+"-"+Zn(e&&e.end)}function pi(e){return e&&typeof e=="number"?e:1}class Ee extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},l=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(l=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const o=n.indexOf(":");o===-1?a.ruleId=n:(a.source=n.slice(0,o),a.ruleId=n.slice(o+1))}if(!a.place&&a.ancestors&&a.ancestors){const o=a.ancestors[a.ancestors.length-1];o&&(a.place=o.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=fr(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Ee.prototype.file="";Ee.prototype.name="";Ee.prototype.reason="";Ee.prototype.message="";Ee.prototype.stack="";Ee.prototype.column=void 0;Ee.prototype.line=void 0;Ee.prototype.ancestors=void 0;Ee.prototype.cause=void 0;Ee.prototype.fatal=void 0;Ee.prototype.place=void 0;Ee.prototype.ruleId=void 0;Ee.prototype.source=void 0;const b0={}.hasOwnProperty,Yo=new Map,Xo=/[A-Z]/g,Ko=/-([a-z])/g,Zo=new Set(["table","tbody","thead","tfoot","tr"]),Qo=new Set(["td","th"]),il="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Jo(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=su(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=lu(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?rn:el,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=al(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function al(e,t,r){if(t.type==="element")return eu(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tu(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return nu(e,t,r);if(t.type==="mdxjsEsm")return ru(e,t);if(t.type==="root")return iu(e,t,r);if(t.type==="text")return au(e,t)}function eu(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=rn,e.schema=i),e.ancestors.push(t);const a=sl(e,t.tagName,!1),l=ou(e,t);let s=w0(e,t);return Zo.has(t.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!wo(o):!0})),ll(e,l,a,t),x0(l,s),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function tu(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}vr(e,t.position)}function ru(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);vr(e,t.position)}function nu(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=rn,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:sl(e,t.name,!0),l=uu(e,t),s=w0(e,t);return ll(e,l,a,t),x0(l,s),e.ancestors.pop(),e.schema=n,e.create(t,a,l,r)}function iu(e,t,r){const n={};return x0(n,w0(e,t)),e.create(t,e.Fragment,n,r)}function au(e,t){return t.value}function ll(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function x0(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function lu(e,t,r){return n;function n(i,a,l,s){const u=Array.isArray(l.children)?r:t;return s?u(a,l,s):u(a,l)}}function su(e,t){return r;function r(n,i,a,l){const s=Array.isArray(a.children),o=v0(n);return t(i,a,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function ou(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&b0.call(t.properties,i)){const a=cu(e,i,t.properties[i]);if(a){const[l,s]=a;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&Qo.has(t.tagName)?n=s:r[l]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function uu(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const l=a.expression;l.type;const s=l.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else vr(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else vr(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function w0(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:Yo;for(;++ni?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)l=Array.from(n),l.unshift(t,r),e.splice(...l);else for(r&&e.splice(t,r);a0?(Ue(e,e.length,0,t),e):t}const yi={}.hasOwnProperty;function ul(e){const t={};let r=-1;for(;++r13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function it(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Be=Dt(/[A-Za-z]/),Ce=Dt(/[\dA-Za-z]/),xu=Dt(/[#-'*+\--9=?A-Z^-~]/);function Gr(e){return e!==null&&(e<32||e===127)}const Qn=Dt(/\d/),wu=Dt(/[\dA-Fa-f]/),ku=Dt(/[!-/:-@[-`{-~]/);function W(e){return e!==null&&e<-2}function ce(e){return e!==null&&(e<0||e===32)}function ae(e){return e===-2||e===-1||e===32}const nn=Dt(/\p{P}|\p{S}/u),Ht=Dt(/\s/);function Dt(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function tr(e){const t=[];let r=-1,n=0,i=0;for(;++r55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(l=String.fromCharCode(a,s),i=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(n,r),encodeURIComponent(l)),n=r+i+1,l=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function ie(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(o){return ae(o)?(e.enter(r),s(o)):t(o)}function s(o){return ae(o)&&a++l))return;const $=t.events.length;let Z=$,_,I;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(_){I=t.events[Z][1].end;break}_=!0}for(A(n),E=$;ED;){const R=r[q];t.containerState=R[1],R[0].exit.call(t,e)}r.length=D}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mu(e,t,r){return ie(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Qt(e){if(e===null||ce(e)||Ht(e))return 1;if(nn(e))return 2}function an(e,t,r){const n=[];let i=-1;for(;++i1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const h={...e[n][1].end},g={...e[r][1].start};bi(h,-o),bi(g,o),l={type:o>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:g},a={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:o>1?"strong":"emphasis",start:{...l.start},end:{...s.end}},e[n][1].end={...l.start},e[r][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=We(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=We(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",a,t]]),u=We(u,an(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),u=We(u,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,u=We(u,[["enter",e[r][1],t],["exit",e[r][1],t]])):m=0,Ue(e,n-1,r-n+3,u),r=n+u.length-m-2;break}}for(r=-1;++r0&&ae(E)?ie(e,T,"linePrefix",a+1)(E):T(E)}function T(E){return E===null||W(E)?e.check(xi,x,q)(E):(e.enter("codeFlowValue"),D(E))}function D(E){return E===null||W(E)?(e.exit("codeFlowValue"),T(E)):(e.consume(E),D)}function q(E){return e.exit("codeFenced"),t(E)}function R(E,$,Z){let _=0;return I;function I(J){return E.enter("lineEnding"),E.consume(J),E.exit("lineEnding"),U}function U(J){return E.enter("codeFencedFence"),ae(J)?ie(E,V,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):V(J)}function V(J){return J===s?(E.enter("codeFencedFenceSequence"),le(J)):Z(J)}function le(J){return J===s?(_++,E.consume(J),le):_>=l?(E.exit("codeFencedFenceSequence"),ae(J)?ie(E,ne,"whitespace")(J):ne(J)):Z(J)}function ne(J){return J===null||W(J)?(E.exit("codeFencedFence"),$(J)):Z(J)}}}function qu(e,t,r){const n=this;return i;function i(l){return l===null?r(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}const wn={name:"codeIndented",tokenize:Vu},Hu={partial:!0,tokenize:ju};function Vu(e,t,r){const n=this;return i;function i(u){return e.enter("codeIndented"),ie(e,a,"linePrefix",5)(u)}function a(u){const m=n.events[n.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(u):r(u)}function l(u){return u===null?o(u):W(u)?e.attempt(Hu,l,o)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||W(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function o(u){return e.exit("codeIndented"),t(u)}}function ju(e,t,r){const n=this;return i;function i(l){return n.parser.lazy[n.now().line]?r(l):W(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ie(e,a,"linePrefix",5)(l)}function a(l){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):W(l)?i(l):r(l)}}const $u={name:"codeText",previous:_u,resolve:Uu,tokenize:Gu};function Uu(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ur(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ur(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ur(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(l):e.interrupt(n.parser.constructs.flow,r,t)(l)}}function dl(e,t,r,n,i,a,l,s,o){const u=o||Number.POSITIVE_INFINITY;let m=0;return h;function h(A){return A===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(A),e.exit(a),g):A===null||A===32||A===41||Gr(A)?r(A):(e.enter(n),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(A))}function g(A){return A===62?(e.enter(a),e.consume(A),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===62?(e.exit("chunkString"),e.exit(s),g(A)):A===null||A===60||W(A)?r(A):(e.consume(A),A===92?v:p)}function v(A){return A===60||A===62||A===92?(e.consume(A),p):p(A)}function x(A){return!m&&(A===null||A===41||ce(A))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(n),t(A)):m999||p===null||p===91||p===93&&!o||p===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?r(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(n),t):W(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||W(p)||s++>999?(e.exit("chunkString"),m(p)):(e.consume(p),o||(o=!ae(p)),p===92?g:h)}function g(p){return p===91||p===92||p===93?(e.consume(p),s++,h):h(p)}}function yl(e,t,r,n,i,a){let l;return s;function s(g){return g===34||g===39||g===40?(e.enter(n),e.enter(i),e.consume(g),e.exit(i),l=g===40?41:g,o):r(g)}function o(g){return g===l?(e.enter(i),e.consume(g),e.exit(i),e.exit(n),t):(e.enter(a),u(g))}function u(g){return g===l?(e.exit(a),o(l)):g===null?r(g):W(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),ie(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===l||g===null||W(g)?(e.exit("chunkString"),u(g)):(e.consume(g),g===92?h:m)}function h(g){return g===l||g===92?(e.consume(g),m):m(g)}}function pr(e,t){let r;return n;function n(i){return W(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):ae(i)?ie(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const e1={name:"definition",tokenize:r1},t1={partial:!0,tokenize:n1};function r1(e,t,r){const n=this;let i;return a;function a(p){return e.enter("definition"),l(p)}function l(p){return gl.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=it(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),o):r(p)}function o(p){return ce(p)?pr(e,u)(p):u(p)}function u(p){return dl(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function m(p){return e.attempt(t1,h,h)(p)}function h(p){return ae(p)?ie(e,g,"whitespace")(p):g(p)}function g(p){return p===null||W(p)?(e.exit("definition"),n.parser.defined.push(i),t(p)):r(p)}}function n1(e,t,r){return n;function n(s){return ce(s)?pr(e,i)(s):r(s)}function i(s){return yl(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return ae(s)?ie(e,l,"whitespace")(s):l(s)}function l(s){return s===null||W(s)?t(s):r(s)}}const i1={name:"hardBreakEscape",tokenize:a1};function a1(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return W(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const l1={name:"headingAtx",resolve:s1,tokenize:o1};function s1(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Ue(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function o1(e,t,r){let n=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&n++<6?(e.consume(m),l):m===null||ce(m)?(e.exit("atxHeadingSequence"),s(m)):r(m)}function s(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||W(m)?(e.exit("atxHeading"),t(m)):ae(m)?ie(e,s,"whitespace")(m):(e.enter("atxHeadingText"),u(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),s(m))}function u(m){return m===null||m===35||ce(m)?(e.exit("atxHeadingText"),s(m)):(e.consume(m),u)}}const u1=["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"],ki=["pre","script","style","textarea"],c1={concrete:!0,name:"htmlFlow",resolveTo:f1,tokenize:p1},h1={partial:!0,tokenize:g1},m1={partial:!0,tokenize:d1};function f1(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function p1(e,t,r){const n=this;let i,a,l,s,o;return u;function u(S){return m(S)}function m(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),h}function h(S){return S===33?(e.consume(S),g):S===47?(e.consume(S),a=!0,x):S===63?(e.consume(S),i=3,n.interrupt?t:k):Be(S)?(e.consume(S),l=String.fromCharCode(S),M):r(S)}function g(S){return S===45?(e.consume(S),i=2,p):S===91?(e.consume(S),i=5,s=0,v):Be(S)?(e.consume(S),i=4,n.interrupt?t:k):r(S)}function p(S){return S===45?(e.consume(S),n.interrupt?t:k):r(S)}function v(S){const De="CDATA[";return S===De.charCodeAt(s++)?(e.consume(S),s===De.length?n.interrupt?t:V:v):r(S)}function x(S){return Be(S)?(e.consume(S),l=String.fromCharCode(S),M):r(S)}function M(S){if(S===null||S===47||S===62||ce(S)){const De=S===47,Re=l.toLowerCase();return!De&&!a&&ki.includes(Re)?(i=1,n.interrupt?t(S):V(S)):u1.includes(l.toLowerCase())?(i=6,De?(e.consume(S),A):n.interrupt?t(S):V(S)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(S):a?T(S):D(S))}return S===45||Ce(S)?(e.consume(S),l+=String.fromCharCode(S),M):r(S)}function A(S){return S===62?(e.consume(S),n.interrupt?t:V):r(S)}function T(S){return ae(S)?(e.consume(S),T):I(S)}function D(S){return S===47?(e.consume(S),I):S===58||S===95||Be(S)?(e.consume(S),q):ae(S)?(e.consume(S),D):I(S)}function q(S){return S===45||S===46||S===58||S===95||Ce(S)?(e.consume(S),q):R(S)}function R(S){return S===61?(e.consume(S),E):ae(S)?(e.consume(S),R):D(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(e.consume(S),o=S,$):ae(S)?(e.consume(S),E):Z(S)}function $(S){return S===o?(e.consume(S),o=null,_):S===null||W(S)?r(S):(e.consume(S),$)}function Z(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||ce(S)?R(S):(e.consume(S),Z)}function _(S){return S===47||S===62||ae(S)?D(S):r(S)}function I(S){return S===62?(e.consume(S),U):r(S)}function U(S){return S===null||W(S)?V(S):ae(S)?(e.consume(S),U):r(S)}function V(S){return S===45&&i===2?(e.consume(S),pe):S===60&&i===1?(e.consume(S),de):S===62&&i===4?(e.consume(S),ke):S===63&&i===3?(e.consume(S),k):S===93&&i===5?(e.consume(S),He):W(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(h1,be,le)(S)):S===null||W(S)?(e.exit("htmlFlowData"),le(S)):(e.consume(S),V)}function le(S){return e.check(m1,ne,be)(S)}function ne(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),J}function J(S){return S===null||W(S)?le(S):(e.enter("htmlFlowData"),V(S))}function pe(S){return S===45?(e.consume(S),k):V(S)}function de(S){return S===47?(e.consume(S),l="",Me):V(S)}function Me(S){if(S===62){const De=l.toLowerCase();return ki.includes(De)?(e.consume(S),ke):V(S)}return Be(S)&&l.length<8?(e.consume(S),l+=String.fromCharCode(S),Me):V(S)}function He(S){return S===93?(e.consume(S),k):V(S)}function k(S){return S===62?(e.consume(S),ke):S===45&&i===2?(e.consume(S),k):V(S)}function ke(S){return S===null||W(S)?(e.exit("htmlFlowData"),be(S)):(e.consume(S),ke)}function be(S){return e.exit("htmlFlow"),t(S)}}function d1(e,t,r){const n=this;return i;function i(l){return W(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):r(l)}function a(l){return n.parser.lazy[n.now().line]?r(l):t(l)}}function g1(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Sr,t,r)}}const y1={name:"htmlText",tokenize:v1};function v1(e,t,r){const n=this;let i,a,l;return s;function s(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),u):k===47?(e.consume(k),R):k===63?(e.consume(k),D):Be(k)?(e.consume(k),Z):r(k)}function u(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),a=0,v):Be(k)?(e.consume(k),T):r(k)}function m(k){return k===45?(e.consume(k),p):r(k)}function h(k){return k===null?r(k):k===45?(e.consume(k),g):W(k)?(l=h,de(k)):(e.consume(k),h)}function g(k){return k===45?(e.consume(k),p):h(k)}function p(k){return k===62?pe(k):k===45?g(k):h(k)}function v(k){const ke="CDATA[";return k===ke.charCodeAt(a++)?(e.consume(k),a===ke.length?x:v):r(k)}function x(k){return k===null?r(k):k===93?(e.consume(k),M):W(k)?(l=x,de(k)):(e.consume(k),x)}function M(k){return k===93?(e.consume(k),A):x(k)}function A(k){return k===62?pe(k):k===93?(e.consume(k),A):x(k)}function T(k){return k===null||k===62?pe(k):W(k)?(l=T,de(k)):(e.consume(k),T)}function D(k){return k===null?r(k):k===63?(e.consume(k),q):W(k)?(l=D,de(k)):(e.consume(k),D)}function q(k){return k===62?pe(k):D(k)}function R(k){return Be(k)?(e.consume(k),E):r(k)}function E(k){return k===45||Ce(k)?(e.consume(k),E):$(k)}function $(k){return W(k)?(l=$,de(k)):ae(k)?(e.consume(k),$):pe(k)}function Z(k){return k===45||Ce(k)?(e.consume(k),Z):k===47||k===62||ce(k)?_(k):r(k)}function _(k){return k===47?(e.consume(k),pe):k===58||k===95||Be(k)?(e.consume(k),I):W(k)?(l=_,de(k)):ae(k)?(e.consume(k),_):pe(k)}function I(k){return k===45||k===46||k===58||k===95||Ce(k)?(e.consume(k),I):U(k)}function U(k){return k===61?(e.consume(k),V):W(k)?(l=U,de(k)):ae(k)?(e.consume(k),U):_(k)}function V(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),i=k,le):W(k)?(l=V,de(k)):ae(k)?(e.consume(k),V):(e.consume(k),ne)}function le(k){return k===i?(e.consume(k),i=void 0,J):k===null?r(k):W(k)?(l=le,de(k)):(e.consume(k),le)}function ne(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||ce(k)?_(k):(e.consume(k),ne)}function J(k){return k===47||k===62||ce(k)?_(k):r(k)}function pe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):r(k)}function de(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Me}function Me(k){return ae(k)?ie(e,He,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):He(k)}function He(k){return e.enter("htmlTextData"),l(k)}}const A0={name:"labelEnd",resolveAll:k1,resolveTo:S1,tokenize:A1},b1={tokenize:z1},x1={tokenize:T1},w1={tokenize:M1};function k1(e){let t=-1;const r=[];for(;++t=3&&(u===null||W(u))?(e.exit("thematicBreak"),t(u)):r(u)}function o(u){return u===i?(e.consume(u),n++,o):(e.exit("thematicBreakSequence"),ae(u)?ie(e,s,"whitespace")(u):s(u))}}const Pe={continuation:{tokenize:P1},exit:q1,name:"list",tokenize:R1},F1={partial:!0,tokenize:H1},L1={partial:!0,tokenize:O1};function R1(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(p){const v=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:Qn(p)){if(n.containerState.type||(n.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(jr,r,u)(p):u(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(p)}return r(p)}function o(p){return Qn(p)&&++l<10?(e.consume(p),o):(!n.interrupt||l<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):r(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Sr,n.interrupt?r:m,e.attempt(F1,g,h))}function m(p){return n.containerState.initialBlankLine=!0,a++,g(p)}function h(p){return ae(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),g):r(p)}function g(p){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function P1(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Sr,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,ie(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!ae(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,l(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(L1,t,l)(s))}function l(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,ie(e,e.attempt(Pe,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function O1(e,t,r){const n=this;return ie(e,i,"listItemIndent",n.containerState.size+1);function i(a){const l=n.events[n.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===n.containerState.size?t(a):r(a)}}function q1(e){e.exit(this.containerState.type)}function H1(e,t,r){const n=this;return ie(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const l=n.events[n.events.length-1];return!ae(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Si={name:"setextUnderline",resolveTo:V1,tokenize:j1};function V1(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",l,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=l,e.push(["exit",l,t]),e}function j1(e,t,r){const n=this;let i;return a;function a(u){let m=n.events.length,h;for(;m--;)if(n.events[m][1].type!=="lineEnding"&&n.events[m][1].type!=="linePrefix"&&n.events[m][1].type!=="content"){h=n.events[m][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(e.enter("setextHeadingLine"),i=u,l(u)):r(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ae(u)?ie(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||W(u)?(e.exit("setextHeadingLine"),t(u)):r(u)}}const $1={tokenize:U1};function U1(e){const t=this,r=e.attempt(Sr,n,e.attempt(this.parser.constructs.flowInitial,i,ie(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xu,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const _1={resolveAll:bl()},G1=vl("string"),W1=vl("text");function vl(e){return{resolveAll:bl(e==="text"?Y1:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,l,s);return l;function l(m){return u(m)?a(m):s(m)}function s(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),o}function o(m){return u(m)?(r.exit("data"),a(m)):(r.consume(m),o)}function u(m){if(m===null)return!0;const h=i[m];let g=-1;if(h)for(;++g-1){const s=l[0];typeof s=="string"?l[0]=s.slice(n):l.shift()}a>0&&l.push(e[i].slice(0,a))}return l}function sc(e,t){let r=-1;const n=[];let i;for(;++r0){const rt=ee.tokenStack[ee.tokenStack.length-1];(rt[1]||zi).call(ee,void 0,rt[0])}for(H.position={start:St(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:St(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);const u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}function Ac(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zc(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function kl(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=n:i.push({type:"text",value:n}),i}function Tc(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return kl(e,t);const i={src:tr(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Mc(e,t){const r={src:tr(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function Cc(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function Ec(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return kl(e,t);const i={href:tr(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Dc(e,t){const r={href:tr(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ic(e,t,r){const n=e.all(t),i=r?Nc(r):Sl(t),a={},l=[];if(typeof t.checked=="boolean"){const m=n[0];let h;m&&m.type==="element"&&m.tagName==="p"?h=m:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s1}function Bc(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=v0(t.children[1]),o=rl(t.children[t.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Oc(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",l=r&&r.type==="table"?r.align:void 0,s=l?l.length:t.children.length;let o=-1;const u=[];for(;++o0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(Ci(t.slice(i),i>0,!1)),a.join("")}function Ci(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===Ti||a===Mi;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===Ti||a===Mi;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function Vc(e,t){const r={type:"text",value:Hc(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function jc(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const $c={blockquote:vc,break:bc,code:xc,delete:wc,emphasis:kc,footnoteReference:Sc,heading:Ac,html:zc,imageReference:Tc,image:Mc,inlineCode:Cc,linkReference:Ec,link:Dc,listItem:Ic,list:Bc,paragraph:Fc,root:Lc,strong:Rc,table:Pc,tableCell:qc,tableRow:Oc,text:Vc,thematicBreak:jc,toml:Er,yaml:Er,definition:Er,footnoteDefinition:Er};function Er(){}const Al=-1,ln=0,Wr=1,Yr=2,z0=3,T0=4,M0=5,C0=6,zl=7,Tl=8,Ei=typeof self=="object"?self:globalThis,Uc=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,l]=t[i];switch(a){case ln:case Al:return r(l,i);case Wr:{const s=r([],i);for(const o of l)s.push(n(o));return s}case Yr:{const s=r({},i);for(const[o,u]of l)s[n(o)]=n(u);return s}case z0:return r(new Date(l),i);case T0:{const{source:s,flags:o}=l;return r(new RegExp(s,o),i)}case M0:{const s=r(new Map,i);for(const[o,u]of l)s.set(n(o),n(u));return s}case C0:{const s=r(new Set,i);for(const o of l)s.add(n(o));return s}case zl:{const{name:s,message:o}=l;return r(new Ei[s](o),i)}case Tl:return r(BigInt(l),i);case"BigInt":return r(Object(BigInt(l)),i)}return r(new Ei[a](l),i)};return n},Di=e=>Uc(new Map,e)(0),Wt="",{toString:_c}={},{keys:Gc}=Object,cr=e=>{const t=typeof e;if(t!=="object"||!e)return[ln,t];const r=_c.call(e).slice(8,-1);switch(r){case"Array":return[Wr,Wt];case"Object":return[Yr,Wt];case"Date":return[z0,Wt];case"RegExp":return[T0,Wt];case"Map":return[M0,Wt];case"Set":return[C0,Wt]}return r.includes("Array")?[Wr,r]:r.includes("Error")?[zl,r]:[Yr,r]},Dr=([e,t])=>e===ln&&(t==="function"||t==="symbol"),Wc=(e,t,r,n)=>{const i=(l,s)=>{const o=n.push(l)-1;return r.set(s,o),o},a=l=>{if(r.has(l))return r.get(l);let[s,o]=cr(l);switch(s){case ln:{let m=l;switch(o){case"bigint":s=Tl,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return i([Al],l)}return i([s,m],l)}case Wr:{if(o)return i([o,[...l]],l);const m=[],h=i([s,m],l);for(const g of l)m.push(a(g));return h}case Yr:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const m=[],h=i([s,m],l);for(const g of Gc(l))(e||!Dr(cr(l[g])))&&m.push([a(g),a(l[g])]);return h}case z0:return i([s,l.toISOString()],l);case T0:{const{source:m,flags:h}=l;return i([s,{source:m,flags:h}],l)}case M0:{const m=[],h=i([s,m],l);for(const[g,p]of l)(e||!(Dr(cr(g))||Dr(cr(p))))&&m.push([a(g),a(p)]);return h}case C0:{const m=[],h=i([s,m],l);for(const g of l)(e||!Dr(cr(g)))&&m.push(a(g));return h}}const{message:u}=l;return i([s,{name:o,message:u}],l)};return a},Ii=(e,{json:t,lossy:r}={})=>{const n=[];return Wc(!(t||r),!!t,new Map,n)(e),n},qt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Di(Ii(e,t)):structuredClone(e):(e,t)=>Di(Ii(e,t));function Yc(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function Xc(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Kc(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||Yc,n=e.options.footnoteBackLabel||Xc,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let o=-1;for(;++o0&&v.push({type:"text",value:" "});let T=typeof r=="string"?r:r(o,p);typeof T=="string"&&(T={type:"text",value:T}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(o,p),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const M=m[m.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const T=M.children[M.children.length-1];T&&T.type==="text"?T.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...v)}else m.push(...v);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(m,!0)};e.patch(u,A),s.push(A)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...qt(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:` -`}]}}const Ar=function(e){if(e==null)return eh;if(typeof e=="function")return sn(e);if(typeof e=="object")return Array.isArray(e)?Zc(e):Qc(e);if(typeof e=="string")return Jc(e);throw new Error("Expected function, string, or object as test")};function Zc(e){const t=[];let r=-1;for(;++r":""))+")"})}return g;function g(){let p=Ml,v,x,M;if((!t||a(o,u,m[m.length-1]||void 0))&&(p=nh(r(o,m)),p[0]===e0))return p;if("children"in o&&o.children){const A=o;if(A.children&&p[0]!==Cl)for(x=(n?A.children.length:-1)+l,M=m.concat(A);x>-1&&x0&&r.push({type:"text",value:` -`}),r}function Ni(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function Bi(e,t){const r=ah(e,t),n=r.one(e,void 0),i=Kc(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` -`},i),a}function ch(e,t){return e&&"run"in e?async function(r,n){const i=Bi(r,{file:n,...t});await e.run(i,n)}:function(r,n){return Bi(r,{file:n,...e||t})}}function Fi(e){if(e)throw e}var $r=Object.prototype.hasOwnProperty,El=Object.prototype.toString,Li=Object.defineProperty,Ri=Object.getOwnPropertyDescriptor,Pi=function(t){return typeof Array.isArray=="function"?Array.isArray(t):El.call(t)==="[object Array]"},Oi=function(t){if(!t||El.call(t)!=="[object Object]")return!1;var r=$r.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&$r.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var i;for(i in t);return typeof i>"u"||$r.call(t,i)},qi=function(t,r){Li&&r.name==="__proto__"?Li(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Hi=function(t,r){if(r==="__proto__")if($r.call(t,r)){if(Ri)return Ri(t,r).value}else return;return t[r]},hh=function e(){var t,r,n,i,a,l,s=arguments[0],o=1,u=arguments.length,m=!1;for(typeof s=="boolean"&&(m=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});ol.length;let o;s&&l.push(i);try{o=e.apply(this,l)}catch(u){const m=u;if(s&&r)throw m;return i(m)}s||(o&&o.then&&typeof o.then=="function"?o.then(a,i):o instanceof Error?i(o):a(o))}function i(l,...s){r||(r=!0,t(l,...s))}function a(l){i(null,l)}}const at={basename:ph,dirname:dh,extname:gh,join:yh,sep:"/"};function ph(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');zr(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else l<0&&(a=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=l));return r===n?n=l:n<0&&(n=e.length),e.slice(r,n)}function dh(e){if(zr(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gh(e){zr(e);let t=e.length,r=-1,n=0,i=-1,a=0,l;for(;t--;){const s=e.codePointAt(t);if(s===47){if(l){n=t+1;break}continue}r<0&&(l=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function yh(...e){let t=-1,r;for(;++t0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function bh(e,t){let r="",n=0,i=-1,a=0,l=-1,s,o;for(;++l<=e.length;){if(l2){if(o=r.lastIndexOf("/"),o!==r.length-1){o<0?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),i=l,a=0;continue}}else if(r.length>0){r="",n=0,i=l,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,l):r=e.slice(i+1,l),n=l-i-1;i=l,a=0}else s===46&&a>-1?a++:a=-1}return r}function zr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const xh={cwd:wh};function wh(){return"/"}function n0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kh(e){if(typeof e=="string")e=new URL(e);else if(!n0(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sh(e)}function Sh(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r0){let[p,...v]=m;const x=n[g][1];r0(x)&&r0(p)&&(p=Sn(!0,x,p)),n[g]=[u,p,...v]}}}}const Mh=new D0().freeze();function Mn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function En(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ji(e){if(!r0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $i(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ir(e){return Ch(e)?e:new Dl(e)}function Ch(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Eh(e){return typeof e=="string"||Dh(e)}function Dh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ih="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ui=[],_i={allowDangerousHtml:!0},Nh=/^(https?|ircs?|mailto|xmpp)$/i,Bh=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Lp(e){const t=e.allowedElements,r=e.allowElement,n=e.children||"",i=e.className,a=e.components,l=e.disallowedElements,s=e.rehypePlugins||Ui,o=e.remarkPlugins||Ui,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,..._i}:_i,m=e.skipHtml,h=e.unwrapDisallowed,g=e.urlTransform||Fh,p=Mh().use(yc).use(o).use(ch,u).use(s),v=new Dl;typeof n=="string"&&(v.value=n);for(const T of Bh)Object.hasOwn(e,T.from)&&(""+T.from+(T.to?"use `"+T.to+"` instead":"remove it")+Ih+T.id,void 0);const x=p.parse(v);let M=p.runSync(x,v);return i&&(M={type:"element",tagName:"div",properties:{className:i},children:M.type==="root"?M.children:[M]}),on(M,A),Jo(M,{Fragment:vn.Fragment,components:a,ignoreInvalidStyle:!0,jsx:vn.jsx,jsxs:vn.jsxs,passKeys:!0,passNode:!0});function A(T,D,q){if(T.type==="raw"&&q&&typeof D=="number")return m?q.children.splice(D,1):q.children[D]={type:"text",value:T.value},D;if(T.type==="element"){let R;for(R in xn)if(Object.hasOwn(xn,R)&&Object.hasOwn(T.properties,R)){const E=T.properties[R],$=xn[R];($===null||$.includes(T.tagName))&&(T.properties[R]=g(String(E||""),R,T))}}if(T.type==="element"){let R=t?!t.includes(T.tagName):l?l.includes(T.tagName):!1;if(!R&&r&&typeof D=="number"&&(R=!r(T,D,q)),R&&q&&typeof D=="number")return h&&T.children?q.children.splice(D,1,...T.children):q.children.splice(D,1),D}}}function Fh(e){const t=e.indexOf(":"),r=e.indexOf("?"),n=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||r>-1&&t>r||n>-1&&t>n||Nh.test(e.slice(0,t))?e:""}function Gi(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}function Lh(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Rh(e,t,r){const i=Ar(r.ignore||[]),a=Ph(t);let l=-1;for(;++l0?{type:"text",value:E}:void 0),E===!1?g.lastIndex=q+1:(v!==q&&T.push({type:"text",value:u.value.slice(v,q)}),Array.isArray(E)?T.push(...E):E&&T.push(E),v=q+D[0].length,A=!0),!g.global)break;D=g.exec(u.value)}return A?(v?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Gi(e,"(");let a=Gi(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function Il(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(r)||nn(r))&&(!t||r!==47)}Nl.peek=o4;function Qh(){return{enter:{gfmFootnoteDefinition:e4,gfmFootnoteDefinitionLabelString:t4,gfmFootnoteCall:i4,gfmFootnoteCallString:a4},exit:{gfmFootnoteDefinition:n4,gfmFootnoteDefinitionLabelString:r4,gfmFootnoteCall:s4,gfmFootnoteCallString:l4}}}function Jh(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:u4,footnoteReference:Nl}}}function e4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function t4(){this.buffer()}function r4(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=it(this.sliceSerialize(e)).toLowerCase()}function n4(e){this.exit(e)}function i4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function a4(){this.buffer()}function l4(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.label=t,r.identifier=it(this.sliceSerialize(e)).toLowerCase()}function s4(e){this.exit(e)}function Nl(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const l=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),l(),a+=i.move("]"),a}function o4(){return"["}function u4(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const l=r.enter("footnoteDefinition"),s=r.enter("label");return a+=i.move(r.safe(r.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(r.indentLines(r.containerFlow(e,i.current()),c4)),l(),a}function c4(e,t,r){return t===0?e:(r?"":" ")+e}const h4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Bl.peek=g4;function m4(){return{canContainEols:["delete"],enter:{strikethrough:p4},exit:{strikethrough:d4}}}function f4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:h4}],handlers:{delete:Bl}}}function p4(e){this.enter({type:"delete",children:[]},e)}function d4(e){this.exit(e)}function Bl(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let l=i.move("~~");return l+=r.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),a(),l}function g4(){return"~"}function y4(e){return e.length}function v4(e,t){const r=t,n=(r.align||[]).concat(),i=r.stringLength||y4,a=[],l=[],s=[],o=[];let u=0,m=-1;for(;++mu&&(u=e[m].length);++Ao[A])&&(o[A]=D)}x.push(T)}l[m]=x,s[m]=M}let h=-1;if(typeof n=="object"&&"length"in n)for(;++ho[h]&&(o[h]=T),p[h]=T),g[h]=D}l.splice(1,0,g),s.splice(1,0,p),m=-1;const v=[];for(;++m "),a.shift(2);const l=r.indentLines(r.containerFlow(e,a.current()),w4);return i(),l}function w4(e,t,r){return">"+(r?"":" ")+e}function k4(e,t){return Yi(e,t.inConstruct,!0)&&!Yi(e,t.notInConstruct,!1)}function Yi(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++nl&&(l=a):a=1,i=n+t.length,n=r.indexOf(t,i);return l}function S4(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function A4(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function z4(e,t,r,n){const i=A4(r),a=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(S4(e,r)){const h=r.enter("codeIndented"),g=r.indentLines(a,T4);return h(),g}const s=r.createTracker(n),o=i.repeat(Math.max(Fl(a,i)+1,3)),u=r.enter("codeFenced");let m=s.move(o);if(e.lang){const h=r.enter(`codeFencedLang${l}`);m+=s.move(r.safe(e.lang,{before:m,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){const h=r.enter(`codeFencedMeta${l}`);m+=s.move(" "),m+=s.move(r.safe(e.meta,{before:m,after:` -`,encode:["`"],...s.current()})),h()}return m+=s.move(` -`),a&&(m+=s.move(a+` -`)),m+=s.move(o),u(),m}function T4(e,t,r){return(r?"":" ")+e}function I0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function M4(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.enter("definition");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("[");return u+=o.move(r.safe(r.associationId(e),{before:u,after:"]",...o.current()})),u+=o.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":` -`,...o.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),l(),u}function C4(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function br(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xr(e,t,r){const n=Qt(e),i=Qt(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ll.peek=E4;function Ll(e,t,r,n){const i=C4(r),a=r.enter("emphasis"),l=r.createTracker(n),s=l.move(i);let o=l.move(r.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),m=Xr(n.before.charCodeAt(n.before.length-1),u,i);m.inside&&(o=br(u)+o.slice(1));const h=o.charCodeAt(o.length-1),g=Xr(n.after.charCodeAt(0),h,i);g.inside&&(o=o.slice(0,-1)+br(h));const p=l.move(i);return a(),r.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},s+o+p}function E4(e,t,r){return r.options.emphasis||"*"}function D4(e,t){let r=!1;return on(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,e0}),!!((!e.depth||e.depth<3)&&k0(e)&&(t.options.setext||r))}function I4(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(D4(e,r)){const m=r.enter("headingSetext"),h=r.enter("phrasing"),g=r.containerPhrasing(e,{...a.current(),before:` -`,after:` -`});return h(),m(),g+` -`+(i===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(` -`))+1))}const l="#".repeat(i),s=r.enter("headingAtx"),o=r.enter("phrasing");a.move(l+" ");let u=r.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(u)&&(u=br(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,r.options.closeAtx&&(u+=" "+l),o(),s(),u}Rl.peek=N4;function Rl(e){return e.value||""}function N4(){return"<"}Pl.peek=B4;function Pl(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.enter("image");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("![");return u+=o.move(r.safe(e.alt,{before:u,after:"]",...o.current()})),u+=o.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(r.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(s=r.enter("destinationRaw"),u+=o.move(r.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),s(),e.title&&(s=r.enter(`title${a}`),u+=o.move(" "+i),u+=o.move(r.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),s()),u+=o.move(")"),l(),u}function B4(){return"!"}Ol.peek=F4;function Ol(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let l=r.enter("label");const s=r.createTracker(n);let o=s.move("![");const u=r.safe(e.alt,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const m=r.stack;r.stack=[],l=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...s.current()});return l(),r.stack=m,a(),i==="full"||!u||u!==h?o+=s.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function F4(){return"!"}ql.peek=L4;function ql(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a\u007F]/.test(e.url))}Vl.peek=R4;function Vl(e,t,r,n){const i=I0(r),a=i==='"'?"Quote":"Apostrophe",l=r.createTracker(n);let s,o;if(Hl(e,r)){const m=r.stack;r.stack=[],s=r.enter("autolink");let h=l.move("<");return h+=l.move(r.containerPhrasing(e,{before:h,after:">",...l.current()})),h+=l.move(">"),s(),r.stack=m,h}s=r.enter("link"),o=r.enter("label");let u=l.move("[");return u+=l.move(r.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(r.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(o=r.enter("destinationRaw"),u+=l.move(r.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=r.enter(`title${a}`),u+=l.move(" "+i),u+=l.move(r.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),o()),u+=l.move(")"),s(),u}function R4(e,t,r){return Hl(e,r)?"<":"["}jl.peek=P4;function jl(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let l=r.enter("label");const s=r.createTracker(n);let o=s.move("[");const u=r.containerPhrasing(e,{before:o,after:"]",...s.current()});o+=s.move(u+"]["),l();const m=r.stack;r.stack=[],l=r.enter("reference");const h=r.safe(r.associationId(e),{before:o,after:"]",...s.current()});return l(),r.stack=m,a(),i==="full"||!u||u!==h?o+=s.move(h+"]"):i==="shortcut"?o=o.slice(0,-1):o+=s.move("]"),o}function P4(){return"["}function N0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function O4(e){const t=N0(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function q4(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function $l(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function H4(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let l=e.ordered?q4(r):N0(r);const s=e.ordered?l==="."?")":".":O4(r);let o=t&&r.bulletLastUsed?l===r.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(o=!0),$l(r)===l&&m){let h=-1;for(;++h-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(l-a.length)),s.shift(l);const o=r.enter("listItem"),u=r.indentLines(r.containerFlow(e,s.current()),m);return o(),u;function m(h,g,p){return g?(p?"":" ".repeat(l))+h:(p?a:a+" ".repeat(l-a.length))+h}}function $4(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),l=r.containerPhrasing(e,n);return a(),i(),l}const U4=Ar(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function _4(e,t,r,n){return(e.children.some(function(l){return U4(l)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function G4(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ul.peek=W4;function Ul(e,t,r,n){const i=G4(r),a=r.enter("strong"),l=r.createTracker(n),s=l.move(i+i);let o=l.move(r.containerPhrasing(e,{after:i,before:s,...l.current()}));const u=o.charCodeAt(0),m=Xr(n.before.charCodeAt(n.before.length-1),u,i);m.inside&&(o=br(u)+o.slice(1));const h=o.charCodeAt(o.length-1),g=Xr(n.after.charCodeAt(0),h,i);g.inside&&(o=o.slice(0,-1)+br(h));const p=l.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:g.outside,before:m.outside},s+o+p}function W4(e,t,r){return r.options.strong||"*"}function Y4(e,t,r,n){return r.safe(e.value,n)}function X4(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function K4(e,t,r){const n=($l(r)+(r.options.ruleSpaces?" ":"")).repeat(X4(r));return r.options.ruleSpaces?n.slice(0,-1):n}const _l={blockquote:x4,break:Xi,code:z4,definition:M4,emphasis:Ll,hardBreak:Xi,heading:I4,html:Rl,image:Pl,imageReference:Ol,inlineCode:ql,link:Vl,linkReference:jl,list:H4,listItem:j4,paragraph:$4,root:_4,strong:Ul,text:Y4,thematicBreak:K4};function Z4(){return{enter:{table:Q4,tableData:Ki,tableHeader:Ki,tableRow:em},exit:{codeText:tm,table:J4,tableData:Bn,tableHeader:Bn,tableRow:Bn}}}function Q4(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function J4(e){this.exit(e),this.data.inTable=void 0}function em(e){this.enter({type:"tableRow",children:[]},e)}function Bn(e){this.exit(e)}function Ki(e){this.enter({type:"tableCell",children:[]},e)}function tm(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,rm));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function rm(e,t){return t==="|"?t:e}function nm(e){const t=e,r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` -`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:l,tableCell:o,tableRow:s}};function l(p,v,x,M){return u(m(p,x,M),p.align)}function s(p,v,x,M){const A=h(p,x,M),T=u([A]);return T.slice(0,T.indexOf(` -`))}function o(p,v,x,M){const A=x.enter("tableCell"),T=x.enter("phrasing"),D=x.containerPhrasing(p,{...M,before:a,after:a});return T(),A(),D}function u(p,v){return v4(p,{align:v,alignDelimiters:n,padding:r,stringLength:i})}function m(p,v,x){const M=p.children;let A=-1;const T=[],D=v.enter("table");for(;++A0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const wm={tokenize:Em,partial:!0};function km(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tm,continuation:{tokenize:Mm},exit:Cm}},text:{91:{name:"gfmFootnoteCall",tokenize:zm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Sm,resolveTo:Am}}}}function Sm(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let l;for(;i--;){const o=n.events[i][1];if(o.type==="labelImage"){l=o;break}if(o.type==="gfmFootnoteCall"||o.type==="labelLink"||o.type==="label"||o.type==="image"||o.type==="link")break}return s;function s(o){if(!l||!l._balanced)return r(o);const u=it(n.sliceSerialize({start:l.end,end:n.now()}));return u.codePointAt(0)!==94||!a.includes(u.slice(1))?r(o):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o))}}function Am(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function zm(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,l;return s;function s(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),o}function o(h){return h!==94?r(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(a>999||h===93&&!l||h===null||h===91||ce(h))return r(h);if(h===93){e.exit("chunkString");const g=e.exit("gfmFootnoteCallString");return i.includes(it(n.sliceSerialize(g)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(h)}return ce(h)||(l=!0),a++,e.consume(h),h===92?m:u}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function Tm(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,l=0,s;return o;function o(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):r(v)}function m(v){if(l>999||v===93&&!s||v===null||v===91||ce(v))return r(v);if(v===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=it(n.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),g}return ce(v)||(s=!0),l++,e.consume(v),v===92?h:m}function h(v){return v===91||v===92||v===93?(e.consume(v),l++,m):m(v)}function g(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),i.includes(a)||i.push(a),ie(e,p,"gfmFootnoteDefinitionWhitespace")):r(v)}function p(v){return t(v)}}function Mm(e,t,r){return e.check(Sr,t,e.attempt(wm,t,r))}function Cm(e){e.exit("gfmFootnoteDefinition")}function Em(e,t,r){const n=this;return ie(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const l=n.events[n.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):r(a)}}function Dm(e){let r=e.singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(l,s){let o=-1;for(;++o1?o(v):(l.consume(v),h++,p);if(h<2&&!r)return o(v);const M=l.exit("strikethroughSequenceTemporary"),A=Qt(v);return M._open=!A||A===2&&!!x,M._close=!x||x===2&&!!A,s(v)}}}class Im{constructor(){this.map=[]}add(t,r,n){Nm(this,t,r,n)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let i=n.pop();for(;i;)t.push(...i),i=n.pop();this.map.length=0}}function Nm(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i-1;){const ne=n.events[U][1].type;if(ne==="lineEnding"||ne==="linePrefix")U--;else break}const V=U>-1?n.events[U][1].type:null,le=V==="tableHead"||V==="tableRow"?E:o;return le===E&&n.parser.lazy[n.now().line]?r(I):le(I)}function o(I){return e.enter("tableHead"),e.enter("tableRow"),u(I)}function u(I){return I===124||(l=!0,a+=1),m(I)}function m(I){return I===null?r(I):W(I)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),p):r(I):ae(I)?ie(e,m,"whitespace")(I):(a+=1,l&&(l=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),h(I)))}function h(I){return I===null||I===124||ce(I)?(e.exit("data"),m(I)):(e.consume(I),I===92?g:h)}function g(I){return I===92||I===124?(e.consume(I),h):h(I)}function p(I){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(I):(e.enter("tableDelimiterRow"),l=!1,ae(I)?ie(e,v,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):v(I))}function v(I){return I===45||I===58?M(I):I===124?(l=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),x):R(I)}function x(I){return ae(I)?ie(e,M,"whitespace")(I):M(I)}function M(I){return I===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),A):I===45?(a+=1,A(I)):I===null||W(I)?q(I):R(I)}function A(I){return I===45?(e.enter("tableDelimiterFiller"),T(I)):R(I)}function T(I){return I===45?(e.consume(I),T):I===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(I))}function D(I){return ae(I)?ie(e,q,"whitespace")(I):q(I)}function q(I){return I===124?v(I):I===null||W(I)?!l||i!==a?R(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):R(I)}function R(I){return r(I)}function E(I){return e.enter("tableRow"),$(I)}function $(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),$):I===null||W(I)?(e.exit("tableRow"),t(I)):ae(I)?ie(e,$,"whitespace")(I):(e.enter("data"),Z(I))}function Z(I){return I===null||I===124||ce(I)?(e.exit("data"),$(I)):(e.consume(I),I===92?_:Z)}function _(I){return I===92||I===124?(e.consume(I),Z):Z(I)}}function Rm(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],l=[0,0,0,0],s=!1,o=0,u,m,h;const g=new Im;for(;++rr[2]+1){const v=r[2]+1,x=r[3]-r[2]-1;e.add(v,x,[])}}e.add(r[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Xt(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Qi(e,t,r,n,i){const a=[],l=Xt(t.events,r);i&&(i.end=Object.assign({},l),a.push(["exit",i,t])),n.end=Object.assign({},l),a.push(["exit",n,t]),e.add(r+1,0,a)}function Xt(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const Pm={name:"tasklistCheck",tokenize:qm};function Om(){return{text:{91:Pm}}}function qm(e,t,r){const n=this;return i;function i(o){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(o):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),a)}function a(o){return ce(o)?(e.enter("taskListCheckValueUnchecked"),e.consume(o),e.exit("taskListCheckValueUnchecked"),l):o===88||o===120?(e.enter("taskListCheckValueChecked"),e.consume(o),e.exit("taskListCheckValueChecked"),l):r(o)}function l(o){return o===93?(e.enter("taskListCheckMarker"),e.consume(o),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(o)}function s(o){return W(o)?t(o):ae(o)?e.check({tokenize:Hm},t,r)(o):r(o)}}function Hm(e,t,r){return ie(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Vm(e){return ul([mm(),km(),Dm(e),Fm(),Om()])}const jm={};function Rp(e){const t=this,r=e||jm,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),l=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Vm(r)),a.push(om()),l.push(um(r))}function $m(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:s,mathText:l,mathTextData:s}};function e(o){const u={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[u]}},o)}function t(){this.buffer()}function r(){const o=this.resume(),u=this.stack[this.stack.length-1];u.type,u.meta=o}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(o){const u=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),m=this.stack[this.stack.length-1];m.type,this.exit(o),m.value=u;const h=m.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:u}),this.data.mathFlowInside=void 0}function a(o){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},o),this.buffer()}function l(o){const u=this.resume(),m=this.stack[this.stack.length-1];m.type,this.exit(o),m.value=u,m.data.hChildren.push({type:"text",value:u})}function s(o){this.config.enter.data.call(this,o),this.config.exit.data.call(this,o)}}function Um(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` -`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,l,s,o){const u=a.value||"",m=s.createTracker(o),h="$".repeat(Math.max(Fl(u,"$")+1,2)),g=s.enter("mathFlow");let p=m.move(h);if(a.meta){const v=s.enter("mathFlowMeta");p+=m.move(s.safe(a.meta,{after:` -`,before:p,encode:["$"],...m.current()})),v()}return p+=m.move(` -`),u&&(p+=m.move(u+` -`)),p+=m.move(h),g(),p}function n(a,l,s){let o=a.value||"",u=1;for(t||u++;new RegExp("(^|[^$])"+"\\$".repeat(u)+"([^$]|$)").test(o);)u++;const m="$".repeat(u);/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^\$|\$$/.test(o))&&(o=" "+o+" ");let h=-1;for(;++h15?u="…"+s.slice(i-15,i):u=s.slice(0,i);var m;a+15":">","<":"<",'"':""","'":"'"},nf=/[&><"']/g;function af(e){return String(e).replace(nf,t=>rf[t])}var es=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},lf=function(t){var r=es(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},sf=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},of=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Y={contains:Qm,deflt:Jm,escape:af,hyphenate:tf,getBaseElem:es,isCharacterBox:lf,protocolFromUrl:of},Ur={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function uf(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class F0{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in Ur)if(Ur.hasOwnProperty(r)){var n=Ur[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:uf(n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new L("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=Y.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class At{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return lt[cf[this.id]]}sub(){return lt[hf[this.id]]}fracNum(){return lt[mf[this.id]]}fracDen(){return lt[ff[this.id]]}cramp(){return lt[pf[this.id]]}text(){return lt[df[this.id]]}isTight(){return this.size>=2}}var L0=0,Kr=1,Zt=2,gt=3,xr=4,Xe=5,Jt=6,Fe=7,lt=[new At(L0,0,!1),new At(Kr,0,!0),new At(Zt,1,!1),new At(gt,1,!0),new At(xr,2,!1),new At(Xe,2,!0),new At(Jt,3,!1),new At(Fe,3,!0)],cf=[xr,Xe,xr,Xe,Jt,Fe,Jt,Fe],hf=[Xe,Xe,Xe,Xe,Fe,Fe,Fe,Fe],mf=[Zt,gt,xr,Xe,Jt,Fe,Jt,Fe],ff=[gt,gt,Xe,Xe,Fe,Fe,Fe,Fe],pf=[Kr,Kr,gt,gt,Xe,Xe,Fe,Fe],df=[L0,Kr,Zt,gt,Zt,gt,Zt,gt],K={DISPLAY:lt[L0],TEXT:lt[Zt],SCRIPT:lt[xr],SCRIPTSCRIPT:lt[Jt]},a0=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function gf(e){for(var t=0;t=i[0]&&e<=i[1])return r.name}return null}var _r=[];a0.forEach(e=>e.blocks.forEach(t=>_r.push(...t)));function ts(e){for(var t=0;t<_r.length;t+=2)if(e>=_r[t]&&e<=_r[t+1])return!0;return!1}var Yt=80,yf=function(t,r){return"M95,"+(622+t+r)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+t/2.075+" -"+t+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+t)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},vf=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+t/2.084+" -"+t+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+t)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},bf=function(t,r){return"M983 "+(10+t+r)+` -l`+t/3.13+" -"+t+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},xf=function(t,r){return"M424,"+(2398+t+r)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+t)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+` -h400000v`+(40+t)+"h-400000z"},wf=function(t,r){return"M473,"+(2713+t+r)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},kf=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},Sf=function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` -H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},Af=function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=yf(r,Yt);break;case"sqrtSize1":i=vf(r,Yt);break;case"sqrtSize2":i=bf(r,Yt);break;case"sqrtSize3":i=xf(r,Yt);break;case"sqrtSize4":i=wf(r,Yt);break;case"sqrtTall":i=Sf(r,Yt,n)}return i},zf=function(t,r){switch(t){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},ea={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Tf=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z -M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z -M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z -M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Tr{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return Y.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(t).join("")}}var st={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Br={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ta={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Mf(e,t){st[e]=t}function R0(e,t,r){if(!st[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=st[t][n];if(!i&&e[0]in ta&&(n=ta[e[0]].charCodeAt(0),i=st[t][n]),!i&&r==="text"&&ts(n)&&(i=st[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Fn={};function Cf(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!Fn[t]){var r=Fn[t]={cssEmPerMu:Br.quad[t]/18};for(var n in Br)Br.hasOwnProperty(n)&&(r[n]=Br[n][t])}return Fn[t]}var Ef=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],ra=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],na=function(t,r){return r.size<2?t:Ef[t-1][r.size-1]};class dt{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||dt.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=ra[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new dt(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:na(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:ra[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=na(dt.BASESIZE,t);return this.size===r&&this.textSize===dt.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==dt.BASESIZE?["sizing","reset-size"+this.size,"size"+dt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Cf(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}dt.BASESIZE=6;var l0={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Df={ex:!0,em:!0,mu:!0},rs=function(t){return typeof t!="string"&&(t=t.unit),t in l0||t in Df||t==="ex"},ve=function(t,r){var n;if(t.unit in l0)n=l0[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new L("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},O=function(t){return+t.toFixed(4)+"em"},Mt=function(t){return t.filter(r=>r).join(" ")},ns=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},is=function(t){var r=document.createElement(t);r.className=Mt(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a",r};class Mr{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ns.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Y.contains(this.classes,t)}toNode(){return is.call(this,"span")}toMarkup(){return as.call(this,"span")}}class P0{constructor(t,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ns.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return Y.contains(this.classes,t)}toNode(){return is.call(this,"a")}toMarkup(){return as.call(this,"a")}}class If{constructor(t,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return Y.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);return t}toMarkup(){var t=''+Y.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=O(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Mt(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Y.hyphenate(i)+":"+this.style[i]+";");n&&(t=!0,r+=' style="'+Y.escape(n)+'"');var a=Y.escape(this.text);return t?(r+=">",r+=a,r+="",r):a}}class vt{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}}class s0{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t=" but got "+String(e)+".")}var Ff={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Lf={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fe={math:{},text:{}};function c(e,t,r,n,i,a){fe[e][i]={font:t,group:r,replace:n},a&&n&&(fe[e][n]=fe[e][i])}var f="math",B="text",d="main",b="ams",ge="accent-token",G="bin",Le="close",rr="inner",X="mathord",ze="op-token",_e="open",un="punct",w="rel",kt="spacing",z="textord";c(f,d,w,"≡","\\equiv",!0);c(f,d,w,"≺","\\prec",!0);c(f,d,w,"≻","\\succ",!0);c(f,d,w,"∼","\\sim",!0);c(f,d,w,"⊥","\\perp");c(f,d,w,"⪯","\\preceq",!0);c(f,d,w,"⪰","\\succeq",!0);c(f,d,w,"≃","\\simeq",!0);c(f,d,w,"∣","\\mid",!0);c(f,d,w,"≪","\\ll",!0);c(f,d,w,"≫","\\gg",!0);c(f,d,w,"≍","\\asymp",!0);c(f,d,w,"∥","\\parallel");c(f,d,w,"⋈","\\bowtie",!0);c(f,d,w,"⌣","\\smile",!0);c(f,d,w,"⊑","\\sqsubseteq",!0);c(f,d,w,"⊒","\\sqsupseteq",!0);c(f,d,w,"≐","\\doteq",!0);c(f,d,w,"⌢","\\frown",!0);c(f,d,w,"∋","\\ni",!0);c(f,d,w,"∝","\\propto",!0);c(f,d,w,"⊢","\\vdash",!0);c(f,d,w,"⊣","\\dashv",!0);c(f,d,w,"∋","\\owns");c(f,d,un,".","\\ldotp");c(f,d,un,"⋅","\\cdotp");c(f,d,z,"#","\\#");c(B,d,z,"#","\\#");c(f,d,z,"&","\\&");c(B,d,z,"&","\\&");c(f,d,z,"ℵ","\\aleph",!0);c(f,d,z,"∀","\\forall",!0);c(f,d,z,"ℏ","\\hbar",!0);c(f,d,z,"∃","\\exists",!0);c(f,d,z,"∇","\\nabla",!0);c(f,d,z,"♭","\\flat",!0);c(f,d,z,"ℓ","\\ell",!0);c(f,d,z,"♮","\\natural",!0);c(f,d,z,"♣","\\clubsuit",!0);c(f,d,z,"℘","\\wp",!0);c(f,d,z,"♯","\\sharp",!0);c(f,d,z,"♢","\\diamondsuit",!0);c(f,d,z,"ℜ","\\Re",!0);c(f,d,z,"♡","\\heartsuit",!0);c(f,d,z,"ℑ","\\Im",!0);c(f,d,z,"♠","\\spadesuit",!0);c(f,d,z,"§","\\S",!0);c(B,d,z,"§","\\S");c(f,d,z,"¶","\\P",!0);c(B,d,z,"¶","\\P");c(f,d,z,"†","\\dag");c(B,d,z,"†","\\dag");c(B,d,z,"†","\\textdagger");c(f,d,z,"‡","\\ddag");c(B,d,z,"‡","\\ddag");c(B,d,z,"‡","\\textdaggerdbl");c(f,d,Le,"⎱","\\rmoustache",!0);c(f,d,_e,"⎰","\\lmoustache",!0);c(f,d,Le,"⟯","\\rgroup",!0);c(f,d,_e,"⟮","\\lgroup",!0);c(f,d,G,"∓","\\mp",!0);c(f,d,G,"⊖","\\ominus",!0);c(f,d,G,"⊎","\\uplus",!0);c(f,d,G,"⊓","\\sqcap",!0);c(f,d,G,"∗","\\ast");c(f,d,G,"⊔","\\sqcup",!0);c(f,d,G,"◯","\\bigcirc",!0);c(f,d,G,"∙","\\bullet",!0);c(f,d,G,"‡","\\ddagger");c(f,d,G,"≀","\\wr",!0);c(f,d,G,"⨿","\\amalg");c(f,d,G,"&","\\And");c(f,d,w,"⟵","\\longleftarrow",!0);c(f,d,w,"⇐","\\Leftarrow",!0);c(f,d,w,"⟸","\\Longleftarrow",!0);c(f,d,w,"⟶","\\longrightarrow",!0);c(f,d,w,"⇒","\\Rightarrow",!0);c(f,d,w,"⟹","\\Longrightarrow",!0);c(f,d,w,"↔","\\leftrightarrow",!0);c(f,d,w,"⟷","\\longleftrightarrow",!0);c(f,d,w,"⇔","\\Leftrightarrow",!0);c(f,d,w,"⟺","\\Longleftrightarrow",!0);c(f,d,w,"↦","\\mapsto",!0);c(f,d,w,"⟼","\\longmapsto",!0);c(f,d,w,"↗","\\nearrow",!0);c(f,d,w,"↩","\\hookleftarrow",!0);c(f,d,w,"↪","\\hookrightarrow",!0);c(f,d,w,"↘","\\searrow",!0);c(f,d,w,"↼","\\leftharpoonup",!0);c(f,d,w,"⇀","\\rightharpoonup",!0);c(f,d,w,"↙","\\swarrow",!0);c(f,d,w,"↽","\\leftharpoondown",!0);c(f,d,w,"⇁","\\rightharpoondown",!0);c(f,d,w,"↖","\\nwarrow",!0);c(f,d,w,"⇌","\\rightleftharpoons",!0);c(f,b,w,"≮","\\nless",!0);c(f,b,w,"","\\@nleqslant");c(f,b,w,"","\\@nleqq");c(f,b,w,"⪇","\\lneq",!0);c(f,b,w,"≨","\\lneqq",!0);c(f,b,w,"","\\@lvertneqq");c(f,b,w,"⋦","\\lnsim",!0);c(f,b,w,"⪉","\\lnapprox",!0);c(f,b,w,"⊀","\\nprec",!0);c(f,b,w,"⋠","\\npreceq",!0);c(f,b,w,"⋨","\\precnsim",!0);c(f,b,w,"⪹","\\precnapprox",!0);c(f,b,w,"≁","\\nsim",!0);c(f,b,w,"","\\@nshortmid");c(f,b,w,"∤","\\nmid",!0);c(f,b,w,"⊬","\\nvdash",!0);c(f,b,w,"⊭","\\nvDash",!0);c(f,b,w,"⋪","\\ntriangleleft");c(f,b,w,"⋬","\\ntrianglelefteq",!0);c(f,b,w,"⊊","\\subsetneq",!0);c(f,b,w,"","\\@varsubsetneq");c(f,b,w,"⫋","\\subsetneqq",!0);c(f,b,w,"","\\@varsubsetneqq");c(f,b,w,"≯","\\ngtr",!0);c(f,b,w,"","\\@ngeqslant");c(f,b,w,"","\\@ngeqq");c(f,b,w,"⪈","\\gneq",!0);c(f,b,w,"≩","\\gneqq",!0);c(f,b,w,"","\\@gvertneqq");c(f,b,w,"⋧","\\gnsim",!0);c(f,b,w,"⪊","\\gnapprox",!0);c(f,b,w,"⊁","\\nsucc",!0);c(f,b,w,"⋡","\\nsucceq",!0);c(f,b,w,"⋩","\\succnsim",!0);c(f,b,w,"⪺","\\succnapprox",!0);c(f,b,w,"≆","\\ncong",!0);c(f,b,w,"","\\@nshortparallel");c(f,b,w,"∦","\\nparallel",!0);c(f,b,w,"⊯","\\nVDash",!0);c(f,b,w,"⋫","\\ntriangleright");c(f,b,w,"⋭","\\ntrianglerighteq",!0);c(f,b,w,"","\\@nsupseteqq");c(f,b,w,"⊋","\\supsetneq",!0);c(f,b,w,"","\\@varsupsetneq");c(f,b,w,"⫌","\\supsetneqq",!0);c(f,b,w,"","\\@varsupsetneqq");c(f,b,w,"⊮","\\nVdash",!0);c(f,b,w,"⪵","\\precneqq",!0);c(f,b,w,"⪶","\\succneqq",!0);c(f,b,w,"","\\@nsubseteqq");c(f,b,G,"⊴","\\unlhd");c(f,b,G,"⊵","\\unrhd");c(f,b,w,"↚","\\nleftarrow",!0);c(f,b,w,"↛","\\nrightarrow",!0);c(f,b,w,"⇍","\\nLeftarrow",!0);c(f,b,w,"⇏","\\nRightarrow",!0);c(f,b,w,"↮","\\nleftrightarrow",!0);c(f,b,w,"⇎","\\nLeftrightarrow",!0);c(f,b,w,"△","\\vartriangle");c(f,b,z,"ℏ","\\hslash");c(f,b,z,"▽","\\triangledown");c(f,b,z,"◊","\\lozenge");c(f,b,z,"Ⓢ","\\circledS");c(f,b,z,"®","\\circledR");c(B,b,z,"®","\\circledR");c(f,b,z,"∡","\\measuredangle",!0);c(f,b,z,"∄","\\nexists");c(f,b,z,"℧","\\mho");c(f,b,z,"Ⅎ","\\Finv",!0);c(f,b,z,"⅁","\\Game",!0);c(f,b,z,"‵","\\backprime");c(f,b,z,"▲","\\blacktriangle");c(f,b,z,"▼","\\blacktriangledown");c(f,b,z,"■","\\blacksquare");c(f,b,z,"⧫","\\blacklozenge");c(f,b,z,"★","\\bigstar");c(f,b,z,"∢","\\sphericalangle",!0);c(f,b,z,"∁","\\complement",!0);c(f,b,z,"ð","\\eth",!0);c(B,d,z,"ð","ð");c(f,b,z,"╱","\\diagup");c(f,b,z,"╲","\\diagdown");c(f,b,z,"□","\\square");c(f,b,z,"□","\\Box");c(f,b,z,"◊","\\Diamond");c(f,b,z,"¥","\\yen",!0);c(B,b,z,"¥","\\yen",!0);c(f,b,z,"✓","\\checkmark",!0);c(B,b,z,"✓","\\checkmark");c(f,b,z,"ℶ","\\beth",!0);c(f,b,z,"ℸ","\\daleth",!0);c(f,b,z,"ℷ","\\gimel",!0);c(f,b,z,"ϝ","\\digamma",!0);c(f,b,z,"ϰ","\\varkappa");c(f,b,_e,"┌","\\@ulcorner",!0);c(f,b,Le,"┐","\\@urcorner",!0);c(f,b,_e,"└","\\@llcorner",!0);c(f,b,Le,"┘","\\@lrcorner",!0);c(f,b,w,"≦","\\leqq",!0);c(f,b,w,"⩽","\\leqslant",!0);c(f,b,w,"⪕","\\eqslantless",!0);c(f,b,w,"≲","\\lesssim",!0);c(f,b,w,"⪅","\\lessapprox",!0);c(f,b,w,"≊","\\approxeq",!0);c(f,b,G,"⋖","\\lessdot");c(f,b,w,"⋘","\\lll",!0);c(f,b,w,"≶","\\lessgtr",!0);c(f,b,w,"⋚","\\lesseqgtr",!0);c(f,b,w,"⪋","\\lesseqqgtr",!0);c(f,b,w,"≑","\\doteqdot");c(f,b,w,"≓","\\risingdotseq",!0);c(f,b,w,"≒","\\fallingdotseq",!0);c(f,b,w,"∽","\\backsim",!0);c(f,b,w,"⋍","\\backsimeq",!0);c(f,b,w,"⫅","\\subseteqq",!0);c(f,b,w,"⋐","\\Subset",!0);c(f,b,w,"⊏","\\sqsubset",!0);c(f,b,w,"≼","\\preccurlyeq",!0);c(f,b,w,"⋞","\\curlyeqprec",!0);c(f,b,w,"≾","\\precsim",!0);c(f,b,w,"⪷","\\precapprox",!0);c(f,b,w,"⊲","\\vartriangleleft");c(f,b,w,"⊴","\\trianglelefteq");c(f,b,w,"⊨","\\vDash",!0);c(f,b,w,"⊪","\\Vvdash",!0);c(f,b,w,"⌣","\\smallsmile");c(f,b,w,"⌢","\\smallfrown");c(f,b,w,"≏","\\bumpeq",!0);c(f,b,w,"≎","\\Bumpeq",!0);c(f,b,w,"≧","\\geqq",!0);c(f,b,w,"⩾","\\geqslant",!0);c(f,b,w,"⪖","\\eqslantgtr",!0);c(f,b,w,"≳","\\gtrsim",!0);c(f,b,w,"⪆","\\gtrapprox",!0);c(f,b,G,"⋗","\\gtrdot");c(f,b,w,"⋙","\\ggg",!0);c(f,b,w,"≷","\\gtrless",!0);c(f,b,w,"⋛","\\gtreqless",!0);c(f,b,w,"⪌","\\gtreqqless",!0);c(f,b,w,"≖","\\eqcirc",!0);c(f,b,w,"≗","\\circeq",!0);c(f,b,w,"≜","\\triangleq",!0);c(f,b,w,"∼","\\thicksim");c(f,b,w,"≈","\\thickapprox");c(f,b,w,"⫆","\\supseteqq",!0);c(f,b,w,"⋑","\\Supset",!0);c(f,b,w,"⊐","\\sqsupset",!0);c(f,b,w,"≽","\\succcurlyeq",!0);c(f,b,w,"⋟","\\curlyeqsucc",!0);c(f,b,w,"≿","\\succsim",!0);c(f,b,w,"⪸","\\succapprox",!0);c(f,b,w,"⊳","\\vartriangleright");c(f,b,w,"⊵","\\trianglerighteq");c(f,b,w,"⊩","\\Vdash",!0);c(f,b,w,"∣","\\shortmid");c(f,b,w,"∥","\\shortparallel");c(f,b,w,"≬","\\between",!0);c(f,b,w,"⋔","\\pitchfork",!0);c(f,b,w,"∝","\\varpropto");c(f,b,w,"◀","\\blacktriangleleft");c(f,b,w,"∴","\\therefore",!0);c(f,b,w,"∍","\\backepsilon");c(f,b,w,"▶","\\blacktriangleright");c(f,b,w,"∵","\\because",!0);c(f,b,w,"⋘","\\llless");c(f,b,w,"⋙","\\gggtr");c(f,b,G,"⊲","\\lhd");c(f,b,G,"⊳","\\rhd");c(f,b,w,"≂","\\eqsim",!0);c(f,d,w,"⋈","\\Join");c(f,b,w,"≑","\\Doteq",!0);c(f,b,G,"∔","\\dotplus",!0);c(f,b,G,"∖","\\smallsetminus");c(f,b,G,"⋒","\\Cap",!0);c(f,b,G,"⋓","\\Cup",!0);c(f,b,G,"⩞","\\doublebarwedge",!0);c(f,b,G,"⊟","\\boxminus",!0);c(f,b,G,"⊞","\\boxplus",!0);c(f,b,G,"⋇","\\divideontimes",!0);c(f,b,G,"⋉","\\ltimes",!0);c(f,b,G,"⋊","\\rtimes",!0);c(f,b,G,"⋋","\\leftthreetimes",!0);c(f,b,G,"⋌","\\rightthreetimes",!0);c(f,b,G,"⋏","\\curlywedge",!0);c(f,b,G,"⋎","\\curlyvee",!0);c(f,b,G,"⊝","\\circleddash",!0);c(f,b,G,"⊛","\\circledast",!0);c(f,b,G,"⋅","\\centerdot");c(f,b,G,"⊺","\\intercal",!0);c(f,b,G,"⋒","\\doublecap");c(f,b,G,"⋓","\\doublecup");c(f,b,G,"⊠","\\boxtimes",!0);c(f,b,w,"⇢","\\dashrightarrow",!0);c(f,b,w,"⇠","\\dashleftarrow",!0);c(f,b,w,"⇇","\\leftleftarrows",!0);c(f,b,w,"⇆","\\leftrightarrows",!0);c(f,b,w,"⇚","\\Lleftarrow",!0);c(f,b,w,"↞","\\twoheadleftarrow",!0);c(f,b,w,"↢","\\leftarrowtail",!0);c(f,b,w,"↫","\\looparrowleft",!0);c(f,b,w,"⇋","\\leftrightharpoons",!0);c(f,b,w,"↶","\\curvearrowleft",!0);c(f,b,w,"↺","\\circlearrowleft",!0);c(f,b,w,"↰","\\Lsh",!0);c(f,b,w,"⇈","\\upuparrows",!0);c(f,b,w,"↿","\\upharpoonleft",!0);c(f,b,w,"⇃","\\downharpoonleft",!0);c(f,d,w,"⊶","\\origof",!0);c(f,d,w,"⊷","\\imageof",!0);c(f,b,w,"⊸","\\multimap",!0);c(f,b,w,"↭","\\leftrightsquigarrow",!0);c(f,b,w,"⇉","\\rightrightarrows",!0);c(f,b,w,"⇄","\\rightleftarrows",!0);c(f,b,w,"↠","\\twoheadrightarrow",!0);c(f,b,w,"↣","\\rightarrowtail",!0);c(f,b,w,"↬","\\looparrowright",!0);c(f,b,w,"↷","\\curvearrowright",!0);c(f,b,w,"↻","\\circlearrowright",!0);c(f,b,w,"↱","\\Rsh",!0);c(f,b,w,"⇊","\\downdownarrows",!0);c(f,b,w,"↾","\\upharpoonright",!0);c(f,b,w,"⇂","\\downharpoonright",!0);c(f,b,w,"⇝","\\rightsquigarrow",!0);c(f,b,w,"⇝","\\leadsto");c(f,b,w,"⇛","\\Rrightarrow",!0);c(f,b,w,"↾","\\restriction");c(f,d,z,"‘","`");c(f,d,z,"$","\\$");c(B,d,z,"$","\\$");c(B,d,z,"$","\\textdollar");c(f,d,z,"%","\\%");c(B,d,z,"%","\\%");c(f,d,z,"_","\\_");c(B,d,z,"_","\\_");c(B,d,z,"_","\\textunderscore");c(f,d,z,"∠","\\angle",!0);c(f,d,z,"∞","\\infty",!0);c(f,d,z,"′","\\prime");c(f,d,z,"△","\\triangle");c(f,d,z,"Γ","\\Gamma",!0);c(f,d,z,"Δ","\\Delta",!0);c(f,d,z,"Θ","\\Theta",!0);c(f,d,z,"Λ","\\Lambda",!0);c(f,d,z,"Ξ","\\Xi",!0);c(f,d,z,"Π","\\Pi",!0);c(f,d,z,"Σ","\\Sigma",!0);c(f,d,z,"Υ","\\Upsilon",!0);c(f,d,z,"Φ","\\Phi",!0);c(f,d,z,"Ψ","\\Psi",!0);c(f,d,z,"Ω","\\Omega",!0);c(f,d,z,"A","Α");c(f,d,z,"B","Β");c(f,d,z,"E","Ε");c(f,d,z,"Z","Ζ");c(f,d,z,"H","Η");c(f,d,z,"I","Ι");c(f,d,z,"K","Κ");c(f,d,z,"M","Μ");c(f,d,z,"N","Ν");c(f,d,z,"O","Ο");c(f,d,z,"P","Ρ");c(f,d,z,"T","Τ");c(f,d,z,"X","Χ");c(f,d,z,"¬","\\neg",!0);c(f,d,z,"¬","\\lnot");c(f,d,z,"⊤","\\top");c(f,d,z,"⊥","\\bot");c(f,d,z,"∅","\\emptyset");c(f,b,z,"∅","\\varnothing");c(f,d,X,"α","\\alpha",!0);c(f,d,X,"β","\\beta",!0);c(f,d,X,"γ","\\gamma",!0);c(f,d,X,"δ","\\delta",!0);c(f,d,X,"ϵ","\\epsilon",!0);c(f,d,X,"ζ","\\zeta",!0);c(f,d,X,"η","\\eta",!0);c(f,d,X,"θ","\\theta",!0);c(f,d,X,"ι","\\iota",!0);c(f,d,X,"κ","\\kappa",!0);c(f,d,X,"λ","\\lambda",!0);c(f,d,X,"μ","\\mu",!0);c(f,d,X,"ν","\\nu",!0);c(f,d,X,"ξ","\\xi",!0);c(f,d,X,"ο","\\omicron",!0);c(f,d,X,"π","\\pi",!0);c(f,d,X,"ρ","\\rho",!0);c(f,d,X,"σ","\\sigma",!0);c(f,d,X,"τ","\\tau",!0);c(f,d,X,"υ","\\upsilon",!0);c(f,d,X,"ϕ","\\phi",!0);c(f,d,X,"χ","\\chi",!0);c(f,d,X,"ψ","\\psi",!0);c(f,d,X,"ω","\\omega",!0);c(f,d,X,"ε","\\varepsilon",!0);c(f,d,X,"ϑ","\\vartheta",!0);c(f,d,X,"ϖ","\\varpi",!0);c(f,d,X,"ϱ","\\varrho",!0);c(f,d,X,"ς","\\varsigma",!0);c(f,d,X,"φ","\\varphi",!0);c(f,d,G,"∗","*",!0);c(f,d,G,"+","+");c(f,d,G,"−","-",!0);c(f,d,G,"⋅","\\cdot",!0);c(f,d,G,"∘","\\circ",!0);c(f,d,G,"÷","\\div",!0);c(f,d,G,"±","\\pm",!0);c(f,d,G,"×","\\times",!0);c(f,d,G,"∩","\\cap",!0);c(f,d,G,"∪","\\cup",!0);c(f,d,G,"∖","\\setminus",!0);c(f,d,G,"∧","\\land");c(f,d,G,"∨","\\lor");c(f,d,G,"∧","\\wedge",!0);c(f,d,G,"∨","\\vee",!0);c(f,d,z,"√","\\surd");c(f,d,_e,"⟨","\\langle",!0);c(f,d,_e,"∣","\\lvert");c(f,d,_e,"∥","\\lVert");c(f,d,Le,"?","?");c(f,d,Le,"!","!");c(f,d,Le,"⟩","\\rangle",!0);c(f,d,Le,"∣","\\rvert");c(f,d,Le,"∥","\\rVert");c(f,d,w,"=","=");c(f,d,w,":",":");c(f,d,w,"≈","\\approx",!0);c(f,d,w,"≅","\\cong",!0);c(f,d,w,"≥","\\ge");c(f,d,w,"≥","\\geq",!0);c(f,d,w,"←","\\gets");c(f,d,w,">","\\gt",!0);c(f,d,w,"∈","\\in",!0);c(f,d,w,"","\\@not");c(f,d,w,"⊂","\\subset",!0);c(f,d,w,"⊃","\\supset",!0);c(f,d,w,"⊆","\\subseteq",!0);c(f,d,w,"⊇","\\supseteq",!0);c(f,b,w,"⊈","\\nsubseteq",!0);c(f,b,w,"⊉","\\nsupseteq",!0);c(f,d,w,"⊨","\\models");c(f,d,w,"←","\\leftarrow",!0);c(f,d,w,"≤","\\le");c(f,d,w,"≤","\\leq",!0);c(f,d,w,"<","\\lt",!0);c(f,d,w,"→","\\rightarrow",!0);c(f,d,w,"→","\\to");c(f,b,w,"≱","\\ngeq",!0);c(f,b,w,"≰","\\nleq",!0);c(f,d,kt," ","\\ ");c(f,d,kt," ","\\space");c(f,d,kt," ","\\nobreakspace");c(B,d,kt," ","\\ ");c(B,d,kt," "," ");c(B,d,kt," ","\\space");c(B,d,kt," ","\\nobreakspace");c(f,d,kt,null,"\\nobreak");c(f,d,kt,null,"\\allowbreak");c(f,d,un,",",",");c(f,d,un,";",";");c(f,b,G,"⊼","\\barwedge",!0);c(f,b,G,"⊻","\\veebar",!0);c(f,d,G,"⊙","\\odot",!0);c(f,d,G,"⊕","\\oplus",!0);c(f,d,G,"⊗","\\otimes",!0);c(f,d,z,"∂","\\partial",!0);c(f,d,G,"⊘","\\oslash",!0);c(f,b,G,"⊚","\\circledcirc",!0);c(f,b,G,"⊡","\\boxdot",!0);c(f,d,G,"△","\\bigtriangleup");c(f,d,G,"▽","\\bigtriangledown");c(f,d,G,"†","\\dagger");c(f,d,G,"⋄","\\diamond");c(f,d,G,"⋆","\\star");c(f,d,G,"◃","\\triangleleft");c(f,d,G,"▹","\\triangleright");c(f,d,_e,"{","\\{");c(B,d,z,"{","\\{");c(B,d,z,"{","\\textbraceleft");c(f,d,Le,"}","\\}");c(B,d,z,"}","\\}");c(B,d,z,"}","\\textbraceright");c(f,d,_e,"{","\\lbrace");c(f,d,Le,"}","\\rbrace");c(f,d,_e,"[","\\lbrack",!0);c(B,d,z,"[","\\lbrack",!0);c(f,d,Le,"]","\\rbrack",!0);c(B,d,z,"]","\\rbrack",!0);c(f,d,_e,"(","\\lparen",!0);c(f,d,Le,")","\\rparen",!0);c(B,d,z,"<","\\textless",!0);c(B,d,z,">","\\textgreater",!0);c(f,d,_e,"⌊","\\lfloor",!0);c(f,d,Le,"⌋","\\rfloor",!0);c(f,d,_e,"⌈","\\lceil",!0);c(f,d,Le,"⌉","\\rceil",!0);c(f,d,z,"\\","\\backslash");c(f,d,z,"∣","|");c(f,d,z,"∣","\\vert");c(B,d,z,"|","\\textbar",!0);c(f,d,z,"∥","\\|");c(f,d,z,"∥","\\Vert");c(B,d,z,"∥","\\textbardbl");c(B,d,z,"~","\\textasciitilde");c(B,d,z,"\\","\\textbackslash");c(B,d,z,"^","\\textasciicircum");c(f,d,w,"↑","\\uparrow",!0);c(f,d,w,"⇑","\\Uparrow",!0);c(f,d,w,"↓","\\downarrow",!0);c(f,d,w,"⇓","\\Downarrow",!0);c(f,d,w,"↕","\\updownarrow",!0);c(f,d,w,"⇕","\\Updownarrow",!0);c(f,d,ze,"∐","\\coprod");c(f,d,ze,"⋁","\\bigvee");c(f,d,ze,"⋀","\\bigwedge");c(f,d,ze,"⨄","\\biguplus");c(f,d,ze,"⋂","\\bigcap");c(f,d,ze,"⋃","\\bigcup");c(f,d,ze,"∫","\\int");c(f,d,ze,"∫","\\intop");c(f,d,ze,"∬","\\iint");c(f,d,ze,"∭","\\iiint");c(f,d,ze,"∏","\\prod");c(f,d,ze,"∑","\\sum");c(f,d,ze,"⨂","\\bigotimes");c(f,d,ze,"⨁","\\bigoplus");c(f,d,ze,"⨀","\\bigodot");c(f,d,ze,"∮","\\oint");c(f,d,ze,"∯","\\oiint");c(f,d,ze,"∰","\\oiiint");c(f,d,ze,"⨆","\\bigsqcup");c(f,d,ze,"∫","\\smallint");c(B,d,rr,"…","\\textellipsis");c(f,d,rr,"…","\\mathellipsis");c(B,d,rr,"…","\\ldots",!0);c(f,d,rr,"…","\\ldots",!0);c(f,d,rr,"⋯","\\@cdots",!0);c(f,d,rr,"⋱","\\ddots",!0);c(f,d,z,"⋮","\\varvdots");c(f,d,ge,"ˊ","\\acute");c(f,d,ge,"ˋ","\\grave");c(f,d,ge,"¨","\\ddot");c(f,d,ge,"~","\\tilde");c(f,d,ge,"ˉ","\\bar");c(f,d,ge,"˘","\\breve");c(f,d,ge,"ˇ","\\check");c(f,d,ge,"^","\\hat");c(f,d,ge,"⃗","\\vec");c(f,d,ge,"˙","\\dot");c(f,d,ge,"˚","\\mathring");c(f,d,X,"","\\@imath");c(f,d,X,"","\\@jmath");c(f,d,z,"ı","ı");c(f,d,z,"ȷ","ȷ");c(B,d,z,"ı","\\i",!0);c(B,d,z,"ȷ","\\j",!0);c(B,d,z,"ß","\\ss",!0);c(B,d,z,"æ","\\ae",!0);c(B,d,z,"œ","\\oe",!0);c(B,d,z,"ø","\\o",!0);c(B,d,z,"Æ","\\AE",!0);c(B,d,z,"Œ","\\OE",!0);c(B,d,z,"Ø","\\O",!0);c(B,d,ge,"ˊ","\\'");c(B,d,ge,"ˋ","\\`");c(B,d,ge,"ˆ","\\^");c(B,d,ge,"˜","\\~");c(B,d,ge,"ˉ","\\=");c(B,d,ge,"˘","\\u");c(B,d,ge,"˙","\\.");c(B,d,ge,"¸","\\c");c(B,d,ge,"˚","\\r");c(B,d,ge,"ˇ","\\v");c(B,d,ge,"¨",'\\"');c(B,d,ge,"˝","\\H");c(B,d,ge,"◯","\\textcircled");var ls={"--":!0,"---":!0,"``":!0,"''":!0};c(B,d,z,"–","--",!0);c(B,d,z,"–","\\textendash");c(B,d,z,"—","---",!0);c(B,d,z,"—","\\textemdash");c(B,d,z,"‘","`",!0);c(B,d,z,"‘","\\textquoteleft");c(B,d,z,"’","'",!0);c(B,d,z,"’","\\textquoteright");c(B,d,z,"“","``",!0);c(B,d,z,"“","\\textquotedblleft");c(B,d,z,"”","''",!0);c(B,d,z,"”","\\textquotedblright");c(f,d,z,"°","\\degree",!0);c(B,d,z,"°","\\degree");c(B,d,z,"°","\\textdegree",!0);c(f,d,z,"£","\\pounds");c(f,d,z,"£","\\mathsterling",!0);c(B,d,z,"£","\\pounds");c(B,d,z,"£","\\textsterling",!0);c(f,b,z,"✠","\\maltese");c(B,b,z,"✠","\\maltese");var aa='0123456789/@."';for(var Ln=0;Ln0)return nt(a,u,i,r,l.concat(m));if(o){var h,g;if(o==="boldsymbol"){var p=Of(a,i,r,l,n);h=p.fontName,g=[p.fontClass]}else s?(h=us[o].fontName,g=[o]):(h=Pr(o,r.fontWeight,r.fontShape),g=[o,r.fontWeight,r.fontShape]);if(cn(a,h,i).metrics)return nt(a,h,i,r,l.concat(g));if(ls.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var v=[],x=0;x{if(Mt(e.classes)!==Mt(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},Vf=e=>{for(var t=0;tr&&(r=l.height),l.depth>n&&(n=l.depth),l.maxFontSize>i&&(i=l.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},Oe=function(t,r,n,i){var a=new Mr(t,r,n,i);return O0(a),a},ss=(e,t,r,n)=>new Mr(e,t,r,n),jf=function(t,r,n){var i=Oe([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=O(i.height),i.maxFontSize=1,i},$f=function(t,r,n,i){var a=new P0(t,r,n,i);return O0(a),a},os=function(t){var r=new Tr(t);return O0(r),r},Uf=function(t,r){return t instanceof Tr?Oe([],[t],r):t},_f=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,l=1;l{var r=Oe(["mspace"],[],t),n=ve(e,t);return r.style.marginRight=O(n),r},Pr=function(t,r,n){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},us={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},cs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Yf=function(t,r){var[n,i,a]=cs[t],l=new Ct(n),s=new vt([l],{width:O(i),height:O(a),style:"width:"+O(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),o=ss(["overlay"],[s],r);return o.height=a,o.style.height=O(a),o.style.width=O(i),o},C={fontMap:us,makeSymbol:nt,mathsym:Pf,makeSpan:Oe,makeSvgSpan:ss,makeLineSpan:jf,makeAnchor:$f,makeFragment:os,wrapFragment:Uf,makeVList:Gf,makeOrd:qf,makeGlue:Wf,staticSvg:Yf,svgData:cs,tryCombineChars:Vf},ye={number:3,unit:"mu"},Pt={number:4,unit:"mu"},pt={number:5,unit:"mu"},Xf={mord:{mop:ye,mbin:Pt,mrel:pt,minner:ye},mop:{mord:ye,mop:ye,mrel:pt,minner:ye},mbin:{mord:Pt,mop:Pt,mopen:Pt,minner:Pt},mrel:{mord:pt,mop:pt,mopen:pt,minner:pt},mopen:{},mclose:{mop:ye,mbin:Pt,mrel:pt,minner:ye},mpunct:{mord:ye,mop:ye,mrel:pt,mopen:ye,mclose:ye,mpunct:ye,minner:ye},minner:{mord:ye,mop:ye,mbin:Pt,mrel:pt,mopen:ye,mpunct:ye,minner:ye}},Kf={mord:{mop:ye},mop:{mord:ye,mop:ye},mbin:{},mrel:{},mopen:{},mclose:{mop:ye},mpunct:{},minner:{mop:ye}},hs={},Qr={},Jr={};function j(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:l}=e,s={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},o=0;o{var M=x.classes[0],A=v.classes[0];M==="mbin"&&Y.contains(Qf,A)?x.classes[0]="mord":A==="mbin"&&Y.contains(Zf,M)&&(v.classes[0]="mord")},{node:h},g,p),ca(a,(v,x)=>{var M=u0(x),A=u0(v),T=M&&A?v.hasClass("mtight")?Kf[M][A]:Xf[M][A]:null;if(T)return C.makeGlue(T,u)},{node:h},g,p),a},ca=function e(t,r,n,i,a){i&&t.push(i);for(var l=0;lg=>{t.splice(h+1,0,g),l++})(l)}i&&t.pop()},ms=function(t){return t instanceof Tr||t instanceof P0||t instanceof Mr&&t.hasClass("enclosing")?t:null},t2=function e(t,r){var n=ms(t);if(n){var i=n.children;if(i.length){if(r==="right")return e(i[i.length-1],"right");if(r==="left")return e(i[0],"left")}}return t},u0=function(t,r){return t?(r&&(t=t2(t,r)),e2[t.classes[0]]||null):null},wr=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return bt(r.concat(n))},oe=function(t,r,n){if(!t)return bt();if(Qr[t.type]){var i=Qr[t.type](t,r);if(n&&r.size!==n.size){i=bt(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new L("Got group of unknown type: '"+t.type+"'")};function Or(e,t){var r=bt(["base"],e,t),n=bt(["strut"]);return n.style.height=O(r.height+r.depth),r.depth&&(n.style.verticalAlign=O(-r.depth)),r.children.unshift(n),r}function c0(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Te(e,t,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],l=[],s=0;s0&&(a.push(Or(l,t)),l=[]),a.push(n[s]));l.length>0&&a.push(Or(l,t));var u;r?(u=Or(Te(r,t,!0)),u.classes=["tag"],a.push(u)):i&&a.push(i);var m=bt(["katex-html"],a);if(m.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=O(m.height+m.depth),m.depth&&(h.style.verticalAlign=O(-m.depth))}return m}function fs(e){return new Tr(e)}class Ye{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Mt(this.classes));for(var n=0;n0&&(t+=' class ="'+Y.escape(Mt(this.classes))+'"'),t+=">";for(var n=0;n",t}toText(){return this.children.map(t=>t.toText()).join("")}}class dr{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return Y.escape(this.toText())}toText(){return this.text}}class r2{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",O(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var F={MathNode:Ye,TextNode:dr,SpaceNode:r2,newDocumentFragment:fs},Qe=function(t,r,n){return fe[r][t]&&fe[r][t].replace&&t.charCodeAt(0)!==55349&&!(ls.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=fe[r][t].replace),new F.TextNode(t)},q0=function(t){return t.length===1?t[0]:new F.MathNode("mrow",t)},H0=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=t.text;if(Y.contains(["\\imath","\\jmath"],a))return null;fe[i][a]&&fe[i][a].replace&&(a=fe[i][a].replace);var l=C.fontMap[n].fontName;return R0(a,l,i)?C.fontMap[n].variant:null},qe=function(t,r,n){if(t.length===1){var i=he(t[0],r);return n&&i instanceof Ye&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],l,s=0;s0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(o),l=o}return a},Et=function(t,r,n){return q0(qe(t,r,n))},he=function(t,r){if(!t)return new F.MathNode("mrow");if(Jr[t.type]){var n=Jr[t.type](t,r);return n}else throw new L("Got group of unknown type: '"+t.type+"'")};function ha(e,t,r,n,i){var a=qe(e,r),l;a.length===1&&a[0]instanceof Ye&&Y.contains(["mrow","mtable"],a[0].type)?l=a[0]:l=new F.MathNode("mrow",a);var s=new F.MathNode("annotation",[new F.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var o=new F.MathNode("semantics",[l,s]),u=new F.MathNode("math",[o]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var m=i?"katex":"katex-mathml";return C.makeSpan([m],[u])}var ps=function(t){return new dt({style:t.displayMode?K.DISPLAY:K.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},ds=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=C.makeSpan(n,[t])}return t},n2=function(t,r,n){var i=ps(n),a;if(n.output==="mathml")return ha(t,r,i,n.displayMode,!0);if(n.output==="html"){var l=c0(t,i);a=C.makeSpan(["katex"],[l])}else{var s=ha(t,r,i,n.displayMode,!1),o=c0(t,i);a=C.makeSpan(["katex"],[s,o])}return ds(a,n)},i2=function(t,r,n){var i=ps(n),a=c0(t,i),l=C.makeSpan(["katex"],[a]);return ds(l,n)},a2={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},l2=function(t){var r=new F.MathNode("mo",[new F.TextNode(a2[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},s2={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},o2=function(t){return t.type==="ordgroup"?t.body.length:1},u2=function(t,r){function n(){var s=4e5,o=t.label.slice(1);if(Y.contains(["widehat","widecheck","widetilde","utilde"],o)){var u=t,m=o2(u.base),h,g,p;if(m>5)o==="widehat"||o==="widecheck"?(h=420,s=2364,p=.42,g=o+"4"):(h=312,s=2340,p=.34,g="tilde4");else{var v=[1,1,2,2,3,3][m];o==="widehat"||o==="widecheck"?(s=[0,1062,2364,2364,2364][v],h=[0,239,300,360,420][v],p=[0,.24,.3,.3,.36,.42][v],g=o+v):(s=[0,600,1033,2339,2340][v],h=[0,260,286,306,312][v],p=[0,.26,.286,.3,.306,.34][v],g="tilde"+v)}var x=new Ct(g),M=new vt([x],{width:"100%",height:O(p),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:C.makeSvgSpan([],[M],r),minWidth:0,height:p}}else{var A=[],T=s2[o],[D,q,R]=T,E=R/1e3,$=D.length,Z,_;if($===1){var I=T[3];Z=["hide-tail"],_=[I]}else if($===2)Z=["halfarrow-left","halfarrow-right"],_=["xMinYMin","xMaxYMin"];else if($===3)Z=["brace-left","brace-center","brace-right"],_=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+$+" children.");for(var U=0;U<$;U++){var V=new Ct(D[U]),le=new vt([V],{width:"400em",height:O(E),viewBox:"0 0 "+s+" "+R,preserveAspectRatio:_[U]+" slice"}),ne=C.makeSvgSpan([Z[U]],[le],r);if($===1)return{span:ne,minWidth:q,height:E};ne.style.height=O(E),A.push(ne)}return{span:C.makeSpan(["stretchy"],A,r),minWidth:q,height:E}}}var{span:i,minWidth:a,height:l}=n();return i.height=l,i.style.height=O(l),a>0&&(i.style.minWidth=O(a)),i},c2=function(t,r,n,i,a){var l,s=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(l=C.makeSpan(["stretchy",r],[],a),r==="fbox"){var o=a.color&&a.getColor();o&&(l.style.borderColor=o)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new s0({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new s0({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var m=new vt(u,{width:"100%",height:O(s)});l=C.makeSvgSpan([],[m],a)}return l.height=s,l.style.height=O(s),l},xt={encloseSpan:c2,mathMLnode:l2,svgSpan:u2};function re(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function V0(e){var t=hn(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function hn(e){return e&&(e.type==="atom"||Lf.hasOwnProperty(e.type))?e:null}var j0=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=re(e.base,"accent"),r=n.base,e.base=r,i=Bf(oe(e,t)),e.base=n):(n=re(e,"accent"),r=n.base);var a=oe(r,t.havingCrampedStyle()),l=n.isShifty&&Y.isCharacterBox(r),s=0;if(l){var o=Y.getBaseElem(r),u=oe(o,t.havingCrampedStyle());s=ia(u).skew}var m=n.label==="\\c",h=m?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),g;if(n.isStretchy)g=xt.svgSpan(n,t),g=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:g,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+O(2*s)+")",marginLeft:O(2*s)}:void 0}]},t);else{var p,v;n.label==="\\vec"?(p=C.staticSvg("vec",t),v=C.svgData.vec[1]):(p=C.makeOrd({mode:n.mode,text:n.label},t,"textord"),p=ia(p),p.italic=0,v=p.width,m&&(h+=p.depth)),g=C.makeSpan(["accent-body"],[p]);var x=n.label==="\\textcircled";x&&(g.classes.push("accent-full"),h=a.height);var M=s;x||(M-=v/2),g.style.left=O(M),n.label==="\\textcircled"&&(g.style.top=".2em"),g=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:g}]},t)}var A=C.makeSpan(["mord","accent"],[g],t);return i?(i.children[0]=A,i.height=Math.max(A.height,i.height),i.classes[0]="mord",i):A},gs=(e,t)=>{var r=e.isStretchy?xt.mathMLnode(e.label):new F.MathNode("mo",[Qe(e.label,e.mode)]),n=new F.MathNode("mover",[he(e.base,t),r]);return n.setAttribute("accent","true"),n},h2=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));j({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=en(t[0]),n=!h2.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:j0,mathmlBuilder:gs});j({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:j0,mathmlBuilder:gs});j({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=oe(e.base,t),n=xt.svgSpan(e,t),i=e.label==="\\utilde"?.12:0,a=C.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},t);return C.makeSpan(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=xt.mathMLnode(e.label),n=new F.MathNode("munder",[he(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var qr=e=>{var t=new F.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};j({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=C.wrapFragment(oe(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var l;e.below&&(n=t.havingStyle(r.sub()),l=C.wrapFragment(oe(e.below,n,t),t),l.classes.push(a+"-arrow-pad"));var s=xt.svgSpan(e,t),o=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(u-=i.depth);var m;if(l){var h=-t.fontMetrics().axisHeight+l.height+.5*s.height+.111;m=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:o},{type:"elem",elem:l,shift:h}]},t)}else m=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:u},{type:"elem",elem:s,shift:o}]},t);return m.children[0].children[0].children[1].classes.push("svg-align"),C.makeSpan(["mrel","x-arrow"],[m],t)},mathmlBuilder(e,t){var r=xt.mathMLnode(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=qr(he(e.body,t));if(e.below){var a=qr(he(e.below,t));n=new F.MathNode("munderover",[r,a,i])}else n=new F.MathNode("mover",[r,i])}else if(e.below){var l=qr(he(e.below,t));n=new F.MathNode("munder",[r,l])}else n=qr(),n=new F.MathNode("mover",[r,n]);return n}});var m2=C.makeSpan;function ys(e,t){var r=Te(e.body,t,!0);return m2([e.mclass],r,t)}function vs(e,t){var r,n=qe(e.body,t);return e.mclass==="minner"?r=new F.MathNode("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new F.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new F.MathNode("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}j({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:we(i),isCharacterBox:Y.isCharacterBox(i)}},htmlBuilder:ys,mathmlBuilder:vs});var mn=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};j({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:mn(t[0]),body:we(t[1]),isCharacterBox:Y.isCharacterBox(t[1])}}});j({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],l;n!=="\\stackrel"?l=mn(i):l="mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:we(i)},o={type:"supsub",mode:a.mode,base:s,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:l,body:[o],isCharacterBox:Y.isCharacterBox(o)}},htmlBuilder:ys,mathmlBuilder:vs});j({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:mn(t[0]),body:we(t[0])}},htmlBuilder(e,t){var r=Te(e.body,t,!0),n=C.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=qe(e.body,t),n=new F.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var f2={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ma=()=>({type:"styling",body:[],mode:"math",style:"display"}),fa=e=>e.type==="textord"&&e.text==="@",p2=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function d2(e,t,r){var n=f2[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},l=r.callFunction("\\Big",[a],[]),s=r.callFunction("\\\\cdright",[t[1]],[]),o={type:"ordgroup",mode:"math",body:[i,l,s]};return r.callFunction("\\\\cdparent",[o],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function g2(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new L("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;a-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var g=!0,p=o+1;pAV=|." after @',l[o]);var v=d2(u,m,e),x={type:"styling",body:[v],mode:"math",style:"display"};n.push(x),s=ma()}a%2===0?n.push(s):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var M=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:M,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}j({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=C.wrapFragment(oe(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=O(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new F.MathNode("mrow",[he(e.label,t)]);return r=new F.MathNode("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new F.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});j({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=C.wrapFragment(oe(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new F.MathNode("mrow",[he(e.fragment,t)])}});j({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=re(t[0],"ordgroup"),i=n.body,a="",l=0;l=1114111)throw new L("\\@char with invalid code point "+a);return o<=65535?u=String.fromCharCode(o):(o-=65536,u=String.fromCharCode((o>>10)+55296,(o&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var bs=(e,t)=>{var r=Te(e.body,t.withColor(e.color),!1);return C.makeFragment(r)},xs=(e,t)=>{var r=qe(e.body,t.withColor(e.color)),n=new F.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};j({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=re(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:we(i)}},htmlBuilder:bs,mathmlBuilder:xs});j({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=re(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:bs,mathmlBuilder:xs});j({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&re(i,"size").value}},htmlBuilder(e,t){var r=C.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=O(ve(e.size,t)))),r},mathmlBuilder(e,t){var r=new F.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",O(ve(e.size,t)))),r}});var h0={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ws=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new L("Expected a control sequence",e);return t},y2=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},ks=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};j({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(h0[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=h0[n.text]),re(t.parseFunction(),"internal");throw new L("Invalid token after macro prefix",n)}});j({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new L("Expected a control sequence",n);for(var a=0,l,s=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){l=t.gullet.future(),s[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new L('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new L('Argument number "'+n.text+'" out of order');a++,s.push([])}else{if(n.text==="EOF")throw new L("Expected a macro definition");s[a].push(n.text)}var{tokens:o}=t.gullet.consumeArg();return l&&o.unshift(l),(r==="\\edef"||r==="\\xdef")&&(o=t.gullet.expandTokens(o),o.reverse()),t.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},r===h0[r]),{type:"internal",mode:t.mode}}});j({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=ws(t.gullet.popToken());t.gullet.consumeSpaces();var i=y2(t);return ks(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});j({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=ws(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return ks(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var mr=function(t,r,n){var i=fe.math[t]&&fe.math[t].replace,a=R0(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},$0=function(t,r,n,i){var a=n.havingBaseStyle(r),l=C.makeSpan(i.concat(a.sizingClasses(n)),[t],n),s=a.sizeMultiplier/n.sizeMultiplier;return l.height*=s,l.depth*=s,l.maxFontSize=a.sizeMultiplier,l},Ss=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=O(a),t.height-=a,t.depth+=a},v2=function(t,r,n,i,a,l){var s=C.makeSymbol(t,"Main-Regular",a,i),o=$0(s,r,i,l);return n&&Ss(o,i,r),o},b2=function(t,r,n,i){return C.makeSymbol(t,"Size"+r+"-Regular",n,i)},As=function(t,r,n,i,a,l){var s=b2(t,r,a,i),o=$0(C.makeSpan(["delimsizing","size"+r],[s],i),K.TEXT,i,l);return n&&Ss(o,i,K.TEXT),o},qn=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=C.makeSpan(["delimsizinginner",i],[C.makeSpan([],[C.makeSymbol(t,r,n)])]);return{type:"elem",elem:a}},Hn=function(t,r,n){var i=st["Size4-Regular"][t.charCodeAt(0)]?st["Size4-Regular"][t.charCodeAt(0)][4]:st["Size1-Regular"][t.charCodeAt(0)][4],a=new Ct("inner",zf(t,Math.round(1e3*r))),l=new vt([a],{width:O(i),height:O(r),style:"width:"+O(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),s=C.makeSvgSpan([],[l],n);return s.height=r,s.style.height=O(r),s.style.width=O(i),{type:"elem",elem:s}},m0=.008,Hr={type:"kern",size:-1*m0},x2=["|","\\lvert","\\rvert","\\vert"],w2=["\\|","\\lVert","\\rVert","\\Vert"],zs=function(t,r,n,i,a,l){var s,o,u,m,h="",g=0;s=u=m=t,o=null;var p="Size1-Regular";t==="\\uparrow"?u=m="⏐":t==="\\Uparrow"?u=m="‖":t==="\\downarrow"?s=u="⏐":t==="\\Downarrow"?s=u="‖":t==="\\updownarrow"?(s="\\uparrow",u="⏐",m="\\downarrow"):t==="\\Updownarrow"?(s="\\Uparrow",u="‖",m="\\Downarrow"):Y.contains(x2,t)?(u="∣",h="vert",g=333):Y.contains(w2,t)?(u="∥",h="doublevert",g=556):t==="["||t==="\\lbrack"?(s="⎡",u="⎢",m="⎣",p="Size4-Regular",h="lbrack",g=667):t==="]"||t==="\\rbrack"?(s="⎤",u="⎥",m="⎦",p="Size4-Regular",h="rbrack",g=667):t==="\\lfloor"||t==="⌊"?(u=s="⎢",m="⎣",p="Size4-Regular",h="lfloor",g=667):t==="\\lceil"||t==="⌈"?(s="⎡",u=m="⎢",p="Size4-Regular",h="lceil",g=667):t==="\\rfloor"||t==="⌋"?(u=s="⎥",m="⎦",p="Size4-Regular",h="rfloor",g=667):t==="\\rceil"||t==="⌉"?(s="⎤",u=m="⎥",p="Size4-Regular",h="rceil",g=667):t==="("||t==="\\lparen"?(s="⎛",u="⎜",m="⎝",p="Size4-Regular",h="lparen",g=875):t===")"||t==="\\rparen"?(s="⎞",u="⎟",m="⎠",p="Size4-Regular",h="rparen",g=875):t==="\\{"||t==="\\lbrace"?(s="⎧",o="⎨",m="⎩",u="⎪",p="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(s="⎫",o="⎬",m="⎭",u="⎪",p="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(s="⎧",m="⎩",u="⎪",p="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(s="⎫",m="⎭",u="⎪",p="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(s="⎧",m="⎭",u="⎪",p="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(s="⎫",m="⎩",u="⎪",p="Size4-Regular");var v=mr(s,p,a),x=v.height+v.depth,M=mr(u,p,a),A=M.height+M.depth,T=mr(m,p,a),D=T.height+T.depth,q=0,R=1;if(o!==null){var E=mr(o,p,a);q=E.height+E.depth,R=2}var $=x+D+q,Z=Math.max(0,Math.ceil((r-$)/(R*A))),_=$+Z*R*A,I=i.fontMetrics().axisHeight;n&&(I*=i.sizeMultiplier);var U=_/2-I,V=[];if(h.length>0){var le=_-x-D,ne=Math.round(_*1e3),J=Tf(h,Math.round(le*1e3)),pe=new Ct(h,J),de=(g/1e3).toFixed(3)+"em",Me=(ne/1e3).toFixed(3)+"em",He=new vt([pe],{width:de,height:Me,viewBox:"0 0 "+g+" "+ne}),k=C.makeSvgSpan([],[He],i);k.height=ne/1e3,k.style.width=de,k.style.height=Me,V.push({type:"elem",elem:k})}else{if(V.push(qn(m,p,a)),V.push(Hr),o===null){var ke=_-x-D+2*m0;V.push(Hn(u,ke,i))}else{var be=(_-x-D-q)/2+2*m0;V.push(Hn(u,be,i)),V.push(Hr),V.push(qn(o,p,a)),V.push(Hr),V.push(Hn(u,be,i))}V.push(Hr),V.push(qn(s,p,a))}var S=i.havingBaseStyle(K.TEXT),De=C.makeVList({positionType:"bottom",positionData:U,children:V},S);return $0(C.makeSpan(["delimsizing","mult"],[De],S),K.TEXT,i,l)},Vn=80,jn=.08,$n=function(t,r,n,i,a){var l=Af(t,i,n),s=new Ct(t,l),o=new vt([s],{width:"400em",height:O(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return C.makeSvgSpan(["hide-tail"],[o],a)},k2=function(t,r){var n=r.havingBaseSizing(),i=Es("\\surd",t*n.sizeMultiplier,Cs,n),a=n.sizeMultiplier,l=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),s,o=0,u=0,m=0,h;return i.type==="small"?(m=1e3+1e3*l+Vn,t<1?a=1:t<1.4&&(a=.7),o=(1+l+jn)/a,u=(1+l)/a,s=$n("sqrtMain",o,m,l,r),s.style.minWidth="0.853em",h=.833/a):i.type==="large"?(m=(1e3+Vn)*gr[i.size],u=(gr[i.size]+l)/a,o=(gr[i.size]+l+jn)/a,s=$n("sqrtSize"+i.size,o,m,l,r),s.style.minWidth="1.02em",h=1/a):(o=t+l+jn,u=t+l,m=Math.floor(1e3*t+l)+Vn,s=$n("sqrtTall",o,m,l,r),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=O(o),{span:s,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+l)*a}},Ts=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],S2=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ms=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],gr=[0,1.2,1.8,2.4,3],A2=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Y.contains(Ts,t)||Y.contains(Ms,t))return As(t,r,!1,n,i,a);if(Y.contains(S2,t))return zs(t,gr[r],!1,n,i,a);throw new L("Illegal delimiter: '"+t+"'")},z2=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],T2=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"stack"}],Cs=[{type:"small",style:K.SCRIPTSCRIPT},{type:"small",style:K.SCRIPT},{type:"small",style:K.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],M2=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},Es=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),l=a;lr)return n[l]}return n[n.length-1]},Ds=function(t,r,n,i,a,l){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var s;Y.contains(Ms,t)?s=z2:Y.contains(Ts,t)?s=Cs:s=T2;var o=Es(t,r,s,i);return o.type==="small"?v2(t,o.style,n,i,a,l):o.type==="large"?As(t,o.size,n,i,a,l):zs(t,r,n,i,a,l)},C2=function(t,r,n,i,a,l){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=901,u=5/i.fontMetrics().ptPerEm,m=Math.max(r-s,n+s),h=Math.max(m/500*o,2*m-u);return Ds(t,h,!0,i,a,l)},yt={sqrtImage:k2,sizedDelim:A2,sizeToMaxHeight:gr,customSizedDelim:Ds,leftRightDelim:C2},pa={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},E2=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function fn(e,t){var r=hn(e);if(r&&Y.contains(E2,r.text))return r;throw r?new L("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new L("Invalid delimiter type '"+e.type+"'",e)}j({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=fn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:pa[e.funcName].size,mclass:pa[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?C.makeSpan([e.mclass]):yt.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(Qe(e.delim,e.mode));var r=new F.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=O(yt.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function da(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}j({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new L("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:fn(t[0],e).text,color:r}}});j({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fn(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=re(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{da(e);for(var r=Te(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,l=0;l{da(e);var r=qe(e.body,t);if(e.left!=="."){var n=new F.MathNode("mo",[Qe(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new F.MathNode("mo",[Qe(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return q0(r)}});j({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=fn(t[0],e);if(!e.parser.leftrightDepth)throw new L("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=wr(t,[]);else{r=yt.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Qe("|","text"):Qe(e.delim,e.mode),n=new F.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var U0=(e,t)=>{var r=C.wrapFragment(oe(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,l=0,s=Y.isCharacterBox(e.body);if(n==="sout")a=C.makeSpan(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,l=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var o=ve({number:.6,unit:"pt"},t),u=ve({number:.35,unit:"ex"},t),m=t.havingBaseSizing();i=i/m.sizeMultiplier;var h=r.height+r.depth+o+u;r.style.paddingLeft=O(h/2+o);var g=Math.floor(1e3*h*i),p=kf(g),v=new vt([new Ct("phase",p)],{width:"400em",height:O(g/1e3),viewBox:"0 0 400000 "+g,preserveAspectRatio:"xMinYMin slice"});a=C.makeSvgSpan(["hide-tail"],[v],t),a.style.height=O(h),l=r.depth+o+u}else{/cancel/.test(n)?s||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var x=0,M=0,A=0;/box/.test(n)?(A=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),x=t.fontMetrics().fboxsep+(n==="colorbox"?0:A),M=x):n==="angl"?(A=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),x=4*A,M=Math.max(0,.25-r.depth)):(x=s?.2:0,M=x),a=xt.encloseSpan(r,n,x,M,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=O(A)):n==="angl"&&A!==.049&&(a.style.borderTopWidth=O(A),a.style.borderRightWidth=O(A)),l=r.depth+M,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var T;if(e.backgroundColor)T=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:r,shift:0}]},t);else{var D=/cancel|phase/.test(n)?["svg-align"]:[];T=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:D}]},t)}return/cancel/.test(n)&&(T.height=r.height,T.depth=r.depth),/cancel/.test(n)&&!s?C.makeSpan(["mord","cancel-lap"],[T],t):C.makeSpan(["mord"],[T],t)},_0=(e,t)=>{var r=0,n=new F.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[he(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};j({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=re(t[0],"color-token").color,l=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:l}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=re(t[0],"color-token").color,l=re(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:l,borderColor:a,body:s}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});j({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:U0,mathmlBuilder:_0});j({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Is={};function ut(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:l}=e,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},o=0;o{var t=e.parser.settings;if(!t.displayMode)throw new L("{"+e.envName+"} can be used only in display mode.")};function G0(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function It(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:l,colSeparationType:s,autoTag:o,singleRow:u,emptySingleRow:m,maxNumCols:h,leqno:g}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var p=e.gullet.expandMacroAsText("\\arraystretch");if(p==null)l=1;else if(l=parseFloat(p),!l||l<0)throw new L("Invalid \\arraystretch: "+p)}e.gullet.beginGroup();var v=[],x=[v],M=[],A=[],T=o!=null?[]:void 0;function D(){o&&e.gullet.macros.set("\\@eqnsw","1",!0)}function q(){T&&(e.gullet.macros.get("\\df@tag")?(T.push(e.subparse([new Ke("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):T.push(!!o&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(D(),A.push(ga(e));;){var R=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),R={type:"ordgroup",mode:e.mode,body:R},r&&(R={type:"styling",mode:e.mode,style:r,body:[R]}),v.push(R);var E=e.fetch().text;if(E==="&"){if(h&&v.length===h){if(u||s)throw new L("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(E==="\\end"){q(),v.length===1&&R.type==="styling"&&R.body[0].body.length===0&&(x.length>1||!m)&&x.pop(),A.length0&&(D+=.25),u.push({pos:D,isDashed:_t[Bt]})}for(q(l[0]),n=0;n0&&(U+=T,$_t))for(n=0;n=s)){var Ge=void 0;(i>0||t.hskipBeforeAndAfter)&&(Ge=Y.deflt(be.pregap,g),Ge!==0&&(J=C.makeSpan(["arraycolsep"],[]),J.style.width=O(Ge),ne.push(J)));var Ie=[];for(n=0;n0){for(var gn=C.makeLineSpan("hline",r,m),yn=C.makeLineSpan("hdashline",r,m),ir=[{type:"elem",elem:o,shift:0}];u.length>0;){var ar=u.pop(),lr=ar.pos-V;ar.isDashed?ir.push({type:"elem",elem:yn,shift:lr}):ir.push({type:"elem",elem:gn,shift:lr})}o=C.makeVList({positionType:"individualShift",children:ir},r)}if(de.length===0)return C.makeSpan(["mord"],[o],r);var Ut=C.makeVList({positionType:"individualShift",children:de},r);return Ut=C.makeSpan(["tag"],[Ut],r),C.makeFragment([o,Ut])},D2={c:"center ",l:"left ",r:"right "},ht=function(t,r){for(var n=[],i=new F.MathNode("mtd",[],["mtr-glue"]),a=new F.MathNode("mtd",[],["mml-eqn-num"]),l=0;l0){var v=t.cols,x="",M=!1,A=0,T=v.length;v[0].type==="separator"&&(g+="top ",A=1),v[v.length-1].type==="separator"&&(g+="bottom ",T-=1);for(var D=A;D0?"left ":"",g+=Z[Z.length-1].length>0?"right ":"";for(var _=1;_-1?"alignat":"align",a=t.envName==="split",l=It(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:G0(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),s,o=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var m="",h=0;h0&&p&&(M=1),n[v]={type:"align",align:x,pregap:M,postgap:0}}return l.colSeparationType=p?"align":"alignat",l};ut({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=hn(t[0]),n=r?[t[0]]:re(t[0],"ordgroup").body,i=n.map(function(l){var s=V0(l),o=s.text;if("lcr".indexOf(o)!==-1)return{type:"align",align:o};if(o==="|")return{type:"separator",separator:"|"};if(o===":")return{type:"separator",separator:":"};throw new L("Unknown column alignment: "+o,l)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return It(e.parser,a,W0(e.envName))},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new L("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=It(e.parser,n,W0(e.envName)),l=Math.max(0,...a.body.map(s=>s.length));return a.cols=new Array(l).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=It(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=hn(t[0]),n=r?[t[0]]:re(t[0],"ordgroup").body,i=n.map(function(l){var s=V0(l),o=s.text;if("lc".indexOf(o)!==-1)return{type:"align",align:o};throw new L("Unknown column alignment: "+o,l)});if(i.length>1)throw new L("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=It(e.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new L("{subarray} can contain only one column");return a},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=It(e.parser,t,W0(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Bs,htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Y.contains(["gather","gather*"],e.envName)&&pn(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:G0(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return It(e.parser,t,"display")},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Bs,htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){pn(e);var t={autoTag:G0(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return It(e.parser,t,"display")},htmlBuilder:ct,mathmlBuilder:ht});ut({type:"array",names:["CD"],props:{numArgs:0},handler(e){return pn(e),g2(e.parser)},htmlBuilder:ct,mathmlBuilder:ht});y("\\nonumber","\\gdef\\@eqnsw{0}");y("\\notag","\\nonumber");j({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new L(e.funcName+" valid only within array environment")}});var ya=Is;j({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new L("Invalid environment name",i);for(var a="",l=0;l{var r=e.font,n=t.withFont(r);return oe(e.body,n)},Ls=(e,t)=>{var r=e.font,n=t.withFont(r);return he(e.body,n)},va={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};j({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=en(t[0]),a=n;return a in va&&(a=va[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Fs,mathmlBuilder:Ls});j({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],i=Y.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:mn(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});j({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,l=r.parseExpression(!0,i),s="math"+n.slice(1);return{type:"font",mode:a,font:s,body:{type:"ordgroup",mode:r.mode,body:l}}},htmlBuilder:Fs,mathmlBuilder:Ls});var Rs=(e,t)=>{var r=t;return e==="display"?r=r.id>=K.SCRIPT.id?r.text():K.DISPLAY:e==="text"&&r.size===K.DISPLAY.size?r=K.TEXT:e==="script"?r=K.SCRIPT:e==="scriptscript"&&(r=K.SCRIPTSCRIPT),r},Y0=(e,t)=>{var r=Rs(e.size,t.style),n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var l=oe(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,o=3.5/t.fontMetrics().ptPerEm;l.height=l.height0?v=3*g:v=7*g,x=t.fontMetrics().denom1):(h>0?(p=t.fontMetrics().num2,v=g):(p=t.fontMetrics().num3,v=3*g),x=t.fontMetrics().denom2);var M;if(m){var T=t.fontMetrics().axisHeight;p-l.depth-(T+.5*h){var r=new F.MathNode("mfrac",[he(e.numer,t),he(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=ve(e.barSize,t);r.setAttribute("linethickness",O(n))}var i=Rs(e.size,t.style);if(i.size!==t.style.size){r=new F.MathNode("mstyle",[r]);var a=i.size===K.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var l=[];if(e.leftDelim!=null){var s=new F.MathNode("mo",[new F.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),l.push(s)}if(l.push(r),e.rightDelim!=null){var o=new F.MathNode("mo",[new F.TextNode(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),l.push(o)}return q0(l)}return r};j({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],l,s=null,o=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":l=!0;break;case"\\\\atopfrac":l=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":l=!1,s="(",o=")";break;case"\\\\bracefrac":l=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":l=!1,s="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:l,leftDelim:s,rightDelim:o,size:u,barSize:null}},htmlBuilder:Y0,mathmlBuilder:X0});j({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});j({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var ba=["display","text","script","scriptscript"],xa=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};j({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=en(t[0]),l=a.type==="atom"&&a.family==="open"?xa(a.text):null,s=en(t[1]),o=s.type==="atom"&&s.family==="close"?xa(s.text):null,u=re(t[2],"size"),m,h=null;u.isBlank?m=!0:(h=u.value,m=h.number>0);var g="auto",p=t[3];if(p.type==="ordgroup"){if(p.body.length>0){var v=re(p.body[0],"textord");g=ba[Number(v.text)]}}else p=re(p,"textord"),g=ba[Number(p.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:m,barSize:h,leftDelim:l,rightDelim:o,size:g}},htmlBuilder:Y0,mathmlBuilder:X0});j({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:re(t[0],"size").value,token:i}}});j({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=sf(re(t[1],"infix").size),l=t[2],s=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:l,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Y0,mathmlBuilder:X0});var Ps=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?oe(e.sup,t.havingStyle(r.sup()),t):oe(e.sub,t.havingStyle(r.sub()),t),i=re(e.base,"horizBrace")):i=re(e,"horizBrace");var a=oe(i.base,t.havingBaseStyle(K.DISPLAY)),l=xt.svgSpan(i,t),s;if(i.isOver?(s=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:l}]},t),s.children[0].children[0].children[1].classes.push("svg-align")):(s=C.makeVList({positionType:"bottom",positionData:a.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:a}]},t),s.children[0].children[0].children[0].classes.push("svg-align")),n){var o=C.makeSpan(["mord",i.isOver?"mover":"munder"],[s],t);i.isOver?s=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.2},{type:"elem",elem:n}]},t):s=C.makeVList({positionType:"bottom",positionData:o.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:o}]},t)}return C.makeSpan(["mord",i.isOver?"mover":"munder"],[s],t)},I2=(e,t)=>{var r=xt.mathMLnode(e.label);return new F.MathNode(e.isOver?"mover":"munder",[he(e.base,t),r])};j({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Ps,mathmlBuilder:I2});j({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=re(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:we(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Te(e.body,t,!1);return C.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Et(e.body,t);return r instanceof Ye||(r=new Ye("mrow",[r])),r.setAttribute("href",e.href),r}});j({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=re(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=e,a=re(t[0],"raw").string,l=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,o={};switch(n){case"\\htmlClass":o.class=a,s={command:"\\htmlClass",class:a};break;case"\\htmlId":o.id=a,s={command:"\\htmlId",id:a};break;case"\\htmlStyle":o.style=a,s={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),m=0;m{var r=Te(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=C.makeSpan(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Et(e.body,t)});j({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:we(t[0]),mathml:we(t[1])}},htmlBuilder:(e,t)=>{var r=Te(e.html,t,!1);return C.makeFragment(r)},mathmlBuilder:(e,t)=>Et(e.mathml,t)});var Un=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new L("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!rs(n))throw new L("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};j({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},l={number:0,unit:"em"},s="";if(r[0])for(var o=re(r[0],"raw").string,u=o.split(","),m=0;m{var r=ve(e.height,t),n=0;e.totalheight.number>0&&(n=ve(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=ve(e.width,t));var a={height:O(r+n)};i>0&&(a.width=O(i)),n>0&&(a.verticalAlign=O(-n));var l=new If(e.src,e.alt,a);return l.height=r,l.depth=n,l},mathmlBuilder:(e,t)=>{var r=new F.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=ve(e.height,t),i=0;if(e.totalheight.number>0&&(i=ve(e.totalheight,t)-n,r.setAttribute("valign",O(-i))),r.setAttribute("height",O(n+i)),e.width.number>0){var a=ve(e.width,t);r.setAttribute("width",O(a))}return r.setAttribute("src",e.src),r}});j({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=re(t[0],"size");if(r.settings.strict){var a=n[1]==="m",l=i.value.unit==="mu";a?(l||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):l&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return C.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var r=ve(e.dimension,t);return new F.SpaceNode(r)}});j({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=C.makeSpan([],[oe(e.body,t)]),r=C.makeSpan(["inner"],[r],t)):r=C.makeSpan(["inner"],[oe(e.body,t)]);var n=C.makeSpan(["fix"],[]),i=C.makeSpan([e.alignment],[r,n],t),a=C.makeSpan(["strut"]);return a.style.height=O(i.height+i.depth),i.depth&&(a.style.verticalAlign=O(-i.depth)),i.children.unshift(a),i=C.makeSpan(["thinbox"],[i],t),C.makeSpan(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new F.MathNode("mpadded",[he(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});j({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",l=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:l}}});j({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new L("Mismatched "+e.funcName)}});var wa=(e,t)=>{switch(t.style.size){case K.DISPLAY.size:return e.display;case K.TEXT.size:return e.text;case K.SCRIPT.size:return e.script;case K.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};j({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:we(t[0]),text:we(t[1]),script:we(t[2]),scriptscript:we(t[3])}},htmlBuilder:(e,t)=>{var r=wa(e,t),n=Te(r,t,!1);return C.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=wa(e,t);return Et(r,t)}});var Os=(e,t,r,n,i,a,l)=>{e=C.makeSpan([],[e]);var s=r&&Y.isCharacterBox(r),o,u;if(t){var m=oe(t,n.havingStyle(i.sup()),n);u={elem:m,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-m.depth)}}if(r){var h=oe(r,n.havingStyle(i.sub()),n);o={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var g;if(u&&o){var p=n.fontMetrics().bigOpSpacing5+o.elem.height+o.elem.depth+o.kern+e.depth+l;g=C.makeVList({positionType:"bottom",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:O(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:O(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(o){var v=e.height-l;g=C.makeVList({positionType:"top",positionData:v,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:o.elem,marginLeft:O(-a)},{type:"kern",size:o.kern},{type:"elem",elem:e}]},n)}else if(u){var x=e.depth+l;g=C.makeVList({positionType:"bottom",positionData:x,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:O(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return e;var M=[g];if(o&&a!==0&&!s){var A=C.makeSpan(["mspace"],[],n);A.style.marginRight=O(a),M.unshift(A)}return C.makeSpan(["mop","op-limits"],M,n)},qs=["\\smallint"],nr=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=re(e.base,"op"),i=!0):a=re(e,"op");var l=t.style,s=!1;l.size===K.DISPLAY.size&&a.symbol&&!Y.contains(qs,a.name)&&(s=!0);var o;if(a.symbol){var u=s?"Size2-Regular":"Size1-Regular",m="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(m=a.name.slice(1),a.name=m==="oiint"?"\\iint":"\\iiint"),o=C.makeSymbol(a.name,u,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),m.length>0){var h=o.italic,g=C.staticSvg(m+"Size"+(s?"2":"1"),t);o=C.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:g,shift:s?.08:0}]},t),a.name="\\"+m,o.classes.unshift("mop"),o.italic=h}}else if(a.body){var p=Te(a.body,t,!0);p.length===1&&p[0]instanceof Ze?(o=p[0],o.classes[0]="mop"):o=C.makeSpan(["mop"],p,t)}else{for(var v=[],x=1;x{var r;if(e.symbol)r=new Ye("mo",[Qe(e.name,e.mode)]),Y.contains(qs,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ye("mo",qe(e.body,t));else{r=new Ye("mi",[new dr(e.name.slice(1))]);var n=new Ye("mo",[Qe("⁡","text")]);e.parentIsSupSub?r=new Ye("mrow",[r,n]):r=fs([r,n])}return r},N2={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};j({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=N2[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:we(n)}},htmlBuilder:nr,mathmlBuilder:Cr});var B2={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};j({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:nr,mathmlBuilder:Cr});j({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=B2[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:nr,mathmlBuilder:Cr});var Hs=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=re(e.base,"operatorname"),i=!0):a=re(e,"operatorname");var l;if(a.body.length>0){for(var s=a.body.map(h=>{var g=h.text;return typeof g=="string"?{type:"textord",mode:h.mode,text:g}:h}),o=Te(s,t.withFont("mathrm"),!0),u=0;u{for(var r=qe(e.body,t.withFont("mathrm")),n=!0,i=0;im.toText()).join("");r=[new F.TextNode(s)]}var o=new F.MathNode("mi",r);o.setAttribute("mathvariant","normal");var u=new F.MathNode("mo",[Qe("⁡","text")]);return e.parentIsSupSub?new F.MathNode("mrow",[o,u]):F.newDocumentFragment([o,u])};j({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:we(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:Hs,mathmlBuilder:F2});y("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");jt({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?C.makeFragment(Te(e.body,t,!1)):C.makeSpan(["mord"],Te(e.body,t,!0),t)},mathmlBuilder(e,t){return Et(e.body,t,!0)}});j({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=oe(e.body,t.havingCrampedStyle()),n=C.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},t);return C.makeSpan(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("mover",[he(e.body,t),r]);return n.setAttribute("accent","true"),n}});j({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:we(n)}},htmlBuilder:(e,t)=>{var r=Te(e.body,t.withPhantom(),!1);return C.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=qe(e.body,t);return new F.MathNode("mphantom",r)}});j({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=C.makeSpan([],[oe(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=qe(we(e.body),t),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});j({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=C.makeSpan(["inner"],[oe(e.body,t.withPhantom())]),n=C.makeSpan(["fix"],[]);return C.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=qe(we(e.body),t),n=new F.MathNode("mphantom",r),i=new F.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});j({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=re(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=oe(e.body,t),n=ve(e.dy,t);return C.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new F.MathNode("mpadded",[he(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});j({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});j({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=re(t[0],"size"),l=re(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&re(i,"size").value,width:a.value,height:l.value}},htmlBuilder(e,t){var r=C.makeSpan(["mord","rule"],[],t),n=ve(e.width,t),i=ve(e.height,t),a=e.shift?ve(e.shift,t):0;return r.style.borderRightWidth=O(n),r.style.borderTopWidth=O(i),r.style.bottom=O(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=ve(e.width,t),n=ve(e.height,t),i=e.shift?ve(e.shift,t):0,a=t.color&&t.getColor()||"black",l=new F.MathNode("mspace");l.setAttribute("mathbackground",a),l.setAttribute("width",O(r)),l.setAttribute("height",O(n));var s=new F.MathNode("mpadded",[l]);return i>=0?s.setAttribute("height",O(i)):(s.setAttribute("height",O(i)),s.setAttribute("depth",O(-i))),s.setAttribute("voffset",O(i)),s}});function Vs(e,t,r){for(var n=Te(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a{var r=t.havingSize(e.size);return Vs(e.body,r,t)};j({type:"sizing",names:ka,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:ka.indexOf(n)+1,body:a}},htmlBuilder:L2,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=qe(e.body,r),i=new F.MathNode("mstyle",n);return i.setAttribute("mathsize",O(r.sizeMultiplier)),i}});j({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,l=r[0]&&re(r[0],"ordgroup");if(l)for(var s="",o=0;o{var r=C.makeSpan([],[oe(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new F.MathNode("mpadded",[he(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});j({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=oe(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=C.wrapFragment(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.idr.height+r.depth+l&&(l=(l+h-r.height-r.depth)/2);var g=o.height-r.height-l-u;r.style.paddingLeft=O(m);var p=C.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+g)},{type:"elem",elem:o},{type:"kern",size:u}]},t);if(e.index){var v=t.havingStyle(K.SCRIPTSCRIPT),x=oe(e.index,v,t),M=.6*(p.height-p.depth),A=C.makeVList({positionType:"shift",positionData:-M,children:[{type:"elem",elem:x}]},t),T=C.makeSpan(["root"],[A]);return C.makeSpan(["mord","sqrt"],[T,p],t)}else return C.makeSpan(["mord","sqrt"],[p],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new F.MathNode("mroot",[he(r,t),he(n,t)]):new F.MathNode("msqrt",[he(r,t)])}});var Sa={display:K.DISPLAY,text:K.TEXT,script:K.SCRIPT,scriptscript:K.SCRIPTSCRIPT};j({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),l=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:l,body:a}},htmlBuilder(e,t){var r=Sa[e.style],n=t.havingStyle(r).withFont("");return Vs(e.body,n,t)},mathmlBuilder(e,t){var r=Sa[e.style],n=t.havingStyle(r),i=qe(e.body,n),a=new F.MathNode("mstyle",i),l={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=l[e.style];return a.setAttribute("scriptlevel",s[0]),a.setAttribute("displaystyle",s[1]),a}});var R2=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===K.DISPLAY.size||n.alwaysHandleSupSub);return i?nr:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===K.DISPLAY.size||n.limits);return a?Hs:null}else{if(n.type==="accent")return Y.isCharacterBox(n.base)?j0:null;if(n.type==="horizBrace"){var l=!t.sub;return l===n.isOver?Ps:null}else return null}else return null};jt({type:"supsub",htmlBuilder(e,t){var r=R2(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,l=oe(n,t),s,o,u=t.fontMetrics(),m=0,h=0,g=n&&Y.isCharacterBox(n);if(i){var p=t.havingStyle(t.style.sup());s=oe(i,p,t),g||(m=l.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var v=t.havingStyle(t.style.sub());o=oe(a,v,t),g||(h=l.depth+v.fontMetrics().subDrop*v.sizeMultiplier/t.sizeMultiplier)}var x;t.style===K.DISPLAY?x=u.sup1:t.style.cramped?x=u.sup3:x=u.sup2;var M=t.sizeMultiplier,A=O(.5/u.ptPerEm/M),T=null;if(o){var D=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(l instanceof Ze||D)&&(T=O(-l.italic))}var q;if(s&&o){m=Math.max(m,x,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var R=u.defaultRuleThickness,E=4*R;if(m-s.depth-(o.height-h)0&&(m+=$,h-=$)}var Z=[{type:"elem",elem:o,shift:h,marginRight:A,marginLeft:T},{type:"elem",elem:s,shift:-m,marginRight:A}];q=C.makeVList({positionType:"individualShift",children:Z},t)}else if(o){h=Math.max(h,u.sub1,o.height-.8*u.xHeight);var _=[{type:"elem",elem:o,marginLeft:T,marginRight:A}];q=C.makeVList({positionType:"shift",positionData:h,children:_},t)}else if(s)m=Math.max(m,x,s.depth+.25*u.xHeight),q=C.makeVList({positionType:"shift",positionData:-m,children:[{type:"elem",elem:s,marginRight:A}]},t);else throw new Error("supsub must have either sup or sub.");var I=u0(l,"right")||"mord";return C.makeSpan([I],[l,C.makeSpan(["msupsub"],[q])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[he(e.base,t)];e.sub&&a.push(he(e.sub,t)),e.sup&&a.push(he(e.sup,t));var l;if(r)l=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===K.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===K.DISPLAY||u.limits)?l="munderover":l="msubsup"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(t.style===K.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||t.style===K.DISPLAY)?l="munder":l="msub"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===K.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===K.DISPLAY)?l="mover":l="msup"}return new F.MathNode(l,a)}});jt({type:"atom",htmlBuilder(e,t){return C.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new F.MathNode("mo",[Qe(e.text,e.mode)]);if(e.family==="bin"){var n=H0(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var js={mi:"italic",mn:"normal",mtext:"normal"};jt({type:"mathord",htmlBuilder(e,t){return C.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new F.MathNode("mi",[Qe(e.text,e.mode,t)]),n=H0(e,t)||"italic";return n!==js[r.type]&&r.setAttribute("mathvariant",n),r}});jt({type:"textord",htmlBuilder(e,t){return C.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=Qe(e.text,e.mode,t),n=H0(e,t)||"normal",i;return e.mode==="text"?i=new F.MathNode("mtext",[r]):/[0-9]/.test(e.text)?i=new F.MathNode("mn",[r]):e.text==="\\prime"?i=new F.MathNode("mo",[r]):i=new F.MathNode("mi",[r]),n!==js[i.type]&&i.setAttribute("mathvariant",n),i}});var _n={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Gn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};jt({type:"spacing",htmlBuilder(e,t){if(Gn.hasOwnProperty(e.text)){var r=Gn[e.text].className||"";if(e.mode==="text"){var n=C.makeOrd(e,t,"textord");return n.classes.push(r),n}else return C.makeSpan(["mspace",r],[C.mathsym(e.text,e.mode,t)],t)}else{if(_n.hasOwnProperty(e.text))return C.makeSpan(["mspace",_n[e.text]],[],t);throw new L('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(Gn.hasOwnProperty(e.text))r=new F.MathNode("mtext",[new F.TextNode(" ")]);else{if(_n.hasOwnProperty(e.text))return new F.MathNode("mspace");throw new L('Unknown type of space "'+e.text+'"')}return r}});var Aa=()=>{var e=new F.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};jt({type:"tag",mathmlBuilder(e,t){var r=new F.MathNode("mtable",[new F.MathNode("mtr",[Aa(),new F.MathNode("mtd",[Et(e.body,t)]),Aa(),new F.MathNode("mtd",[Et(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var za={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ta={"\\textbf":"textbf","\\textmd":"textmd"},P2={"\\textit":"textit","\\textup":"textup"},Ma=(e,t)=>{var r=e.font;if(r){if(za[r])return t.withTextFontFamily(za[r]);if(Ta[r])return t.withTextFontWeight(Ta[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(P2[r])};j({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:we(i),font:n}},htmlBuilder(e,t){var r=Ma(e,t),n=Te(e.body,r,!0);return C.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Ma(e,t);return Et(e.body,r)}});j({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=oe(e.body,t),n=C.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=C.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},t);return C.makeSpan(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new F.MathNode("mo",[new F.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new F.MathNode("munder",[he(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});j({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=oe(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return C.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new F.MathNode("mpadded",[he(e.body,t)],["vcenter"])}});j({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new L("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Ca(e),n=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),Tt=hs,$s=`[ \r - ]`,O2="\\\\[a-zA-Z@]+",q2="\\\\[^\uD800-\uDFFF]",H2="("+O2+")"+$s+"*",V2=`\\\\( -|[ \r ]+ -?)[ \r ]*`,f0="[̀-ͯ]",j2=new RegExp(f0+"+$"),$2="("+$s+"+)|"+(V2+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(f0+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(f0+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+H2)+("|"+q2+")");class Ea{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp($2,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Ke("EOF",new $e(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new L("Unexpected character: '"+t[r]+"'",new Ke(t[r],new $e(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` -`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new Ke(i,new $e(this,r,this.tokenRegex.lastIndex))}}class U2{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new L("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var _2=Ns;y("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});y("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});y("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});y("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});y("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});y("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");y("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Da={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};y("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new L("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=Da[t.text],n==null||n>=r)throw new L("Invalid base-"+r+" digit "+t.text);for(var i;(i=Da[e.future().text])!=null&&i{var n=e.consumeArg().tokens;if(n.length!==1)throw new L("\\newcommand's first argument must be a macro name");var i=n[0].text,a=e.isDefined(i);if(a&&!t)throw new L("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!r)throw new L("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var l=0;if(n=e.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var s="",o=e.expandNextToken();o.text!=="]"&&o.text!=="EOF";)s+=o.text,o=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new L("Invalid number of arguments: "+s);l=parseInt(s),n=e.consumeArg().tokens}return e.macros.set(i,{tokens:n,numArgs:l}),""};y("\\newcommand",e=>K0(e,!1,!0));y("\\renewcommand",e=>K0(e,!0,!1));y("\\providecommand",e=>K0(e,!0,!0));y("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});y("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});y("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Tt[r],fe.math[r],fe.text[r]),""});y("\\bgroup","{");y("\\egroup","}");y("~","\\nobreakspace");y("\\lq","`");y("\\rq","'");y("\\aa","\\r a");y("\\AA","\\r A");y("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");y("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");y("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");y("ℬ","\\mathscr{B}");y("ℰ","\\mathscr{E}");y("ℱ","\\mathscr{F}");y("ℋ","\\mathscr{H}");y("ℐ","\\mathscr{I}");y("ℒ","\\mathscr{L}");y("ℳ","\\mathscr{M}");y("ℛ","\\mathscr{R}");y("ℭ","\\mathfrak{C}");y("ℌ","\\mathfrak{H}");y("ℨ","\\mathfrak{Z}");y("\\Bbbk","\\Bbb{k}");y("·","\\cdotp");y("\\llap","\\mathllap{\\textrm{#1}}");y("\\rlap","\\mathrlap{\\textrm{#1}}");y("\\clap","\\mathclap{\\textrm{#1}}");y("\\mathstrut","\\vphantom{(}");y("\\underbar","\\underline{\\text{#1}}");y("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');y("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");y("\\ne","\\neq");y("≠","\\neq");y("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");y("∉","\\notin");y("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");y("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");y("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");y("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");y("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");y("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");y("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");y("⟂","\\perp");y("‼","\\mathclose{!\\mkern-0.8mu!}");y("∌","\\notni");y("⌜","\\ulcorner");y("⌝","\\urcorner");y("⌞","\\llcorner");y("⌟","\\lrcorner");y("©","\\copyright");y("®","\\textregistered");y("️","\\textregistered");y("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');y("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');y("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');y("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');y("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}");y("⋮","\\vdots");y("\\varGamma","\\mathit{\\Gamma}");y("\\varDelta","\\mathit{\\Delta}");y("\\varTheta","\\mathit{\\Theta}");y("\\varLambda","\\mathit{\\Lambda}");y("\\varXi","\\mathit{\\Xi}");y("\\varPi","\\mathit{\\Pi}");y("\\varSigma","\\mathit{\\Sigma}");y("\\varUpsilon","\\mathit{\\Upsilon}");y("\\varPhi","\\mathit{\\Phi}");y("\\varPsi","\\mathit{\\Psi}");y("\\varOmega","\\mathit{\\Omega}");y("\\substack","\\begin{subarray}{c}#1\\end{subarray}");y("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");y("\\boxed","\\fbox{$\\displaystyle{#1}$}");y("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");y("\\implies","\\DOTSB\\;\\Longrightarrow\\;");y("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Ia={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};y("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ia?t=Ia[r]:(r.slice(0,4)==="\\not"||r in fe.math&&Y.contains(["bin","rel"],fe.math[r].group))&&(t="\\dotsb"),t});var Z0={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};y("\\dotso",function(e){var t=e.future().text;return t in Z0?"\\ldots\\,":"\\ldots"});y("\\dotsc",function(e){var t=e.future().text;return t in Z0&&t!==","?"\\ldots\\,":"\\ldots"});y("\\cdots",function(e){var t=e.future().text;return t in Z0?"\\@cdots\\,":"\\@cdots"});y("\\dotsb","\\cdots");y("\\dotsm","\\cdots");y("\\dotsi","\\!\\cdots");y("\\dotsx","\\ldots\\,");y("\\DOTSI","\\relax");y("\\DOTSB","\\relax");y("\\DOTSX","\\relax");y("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");y("\\,","\\tmspace+{3mu}{.1667em}");y("\\thinspace","\\,");y("\\>","\\mskip{4mu}");y("\\:","\\tmspace+{4mu}{.2222em}");y("\\medspace","\\:");y("\\;","\\tmspace+{5mu}{.2777em}");y("\\thickspace","\\;");y("\\!","\\tmspace-{3mu}{.1667em}");y("\\negthinspace","\\!");y("\\negmedspace","\\tmspace-{4mu}{.2222em}");y("\\negthickspace","\\tmspace-{5mu}{.277em}");y("\\enspace","\\kern.5em ");y("\\enskip","\\hskip.5em\\relax");y("\\quad","\\hskip1em\\relax");y("\\qquad","\\hskip2em\\relax");y("\\tag","\\@ifstar\\tag@literal\\tag@paren");y("\\tag@paren","\\tag@literal{({#1})}");y("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new L("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});y("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");y("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");y("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");y("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");y("\\newline","\\\\\\relax");y("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Us=O(st["Main-Regular"][84][1]-.7*st["Main-Regular"][65][1]);y("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Us+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");y("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Us+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");y("\\hspace","\\@ifstar\\@hspacer\\@hspace");y("\\@hspace","\\hskip #1\\relax");y("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");y("\\ordinarycolon",":");y("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");y("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');y("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');y("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');y("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');y("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');y("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');y("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');y("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');y("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');y("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');y("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');y("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');y("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');y("∷","\\dblcolon");y("∹","\\eqcolon");y("≔","\\coloneqq");y("≕","\\eqqcolon");y("⩴","\\Coloneqq");y("\\ratio","\\vcentcolon");y("\\coloncolon","\\dblcolon");y("\\colonequals","\\coloneqq");y("\\coloncolonequals","\\Coloneqq");y("\\equalscolon","\\eqqcolon");y("\\equalscoloncolon","\\Eqqcolon");y("\\colonminus","\\coloneq");y("\\coloncolonminus","\\Coloneq");y("\\minuscolon","\\eqcolon");y("\\minuscoloncolon","\\Eqcolon");y("\\coloncolonapprox","\\Colonapprox");y("\\coloncolonsim","\\Colonsim");y("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");y("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");y("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");y("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");y("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");y("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");y("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");y("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");y("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");y("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");y("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");y("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");y("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");y("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");y("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");y("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");y("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");y("\\nleqq","\\html@mathml{\\@nleqq}{≰}");y("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");y("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");y("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");y("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");y("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");y("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");y("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");y("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");y("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");y("\\imath","\\html@mathml{\\@imath}{ı}");y("\\jmath","\\html@mathml{\\@jmath}{ȷ}");y("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");y("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");y("⟦","\\llbracket");y("⟧","\\rrbracket");y("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");y("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");y("⦃","\\lBrace");y("⦄","\\rBrace");y("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");y("⦵","\\minuso");y("\\darr","\\downarrow");y("\\dArr","\\Downarrow");y("\\Darr","\\Downarrow");y("\\lang","\\langle");y("\\rang","\\rangle");y("\\uarr","\\uparrow");y("\\uArr","\\Uparrow");y("\\Uarr","\\Uparrow");y("\\N","\\mathbb{N}");y("\\R","\\mathbb{R}");y("\\Z","\\mathbb{Z}");y("\\alef","\\aleph");y("\\alefsym","\\aleph");y("\\Alpha","\\mathrm{A}");y("\\Beta","\\mathrm{B}");y("\\bull","\\bullet");y("\\Chi","\\mathrm{X}");y("\\clubs","\\clubsuit");y("\\cnums","\\mathbb{C}");y("\\Complex","\\mathbb{C}");y("\\Dagger","\\ddagger");y("\\diamonds","\\diamondsuit");y("\\empty","\\emptyset");y("\\Epsilon","\\mathrm{E}");y("\\Eta","\\mathrm{H}");y("\\exist","\\exists");y("\\harr","\\leftrightarrow");y("\\hArr","\\Leftrightarrow");y("\\Harr","\\Leftrightarrow");y("\\hearts","\\heartsuit");y("\\image","\\Im");y("\\infin","\\infty");y("\\Iota","\\mathrm{I}");y("\\isin","\\in");y("\\Kappa","\\mathrm{K}");y("\\larr","\\leftarrow");y("\\lArr","\\Leftarrow");y("\\Larr","\\Leftarrow");y("\\lrarr","\\leftrightarrow");y("\\lrArr","\\Leftrightarrow");y("\\Lrarr","\\Leftrightarrow");y("\\Mu","\\mathrm{M}");y("\\natnums","\\mathbb{N}");y("\\Nu","\\mathrm{N}");y("\\Omicron","\\mathrm{O}");y("\\plusmn","\\pm");y("\\rarr","\\rightarrow");y("\\rArr","\\Rightarrow");y("\\Rarr","\\Rightarrow");y("\\real","\\Re");y("\\reals","\\mathbb{R}");y("\\Reals","\\mathbb{R}");y("\\Rho","\\mathrm{P}");y("\\sdot","\\cdot");y("\\sect","\\S");y("\\spades","\\spadesuit");y("\\sub","\\subset");y("\\sube","\\subseteq");y("\\supe","\\supseteq");y("\\Tau","\\mathrm{T}");y("\\thetasym","\\vartheta");y("\\weierp","\\wp");y("\\Zeta","\\mathrm{Z}");y("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");y("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");y("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");y("\\bra","\\mathinner{\\langle{#1}|}");y("\\ket","\\mathinner{|{#1}\\rangle}");y("\\braket","\\mathinner{\\langle{#1}\\rangle}");y("\\Bra","\\left\\langle#1\\right|");y("\\Ket","\\left|#1\\right\\rangle");var _s=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,l=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var o=h=>g=>{e&&(g.macros.set("|",l),i.length&&g.macros.set("\\|",s));var p=h;if(!h&&i.length){var v=g.future();v.text==="|"&&(g.popToken(),p=!0)}return{tokens:p?i:n,numArgs:0}};t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0));var u=t.consumeArg().tokens,m=t.expandTokens([...a,...u,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};y("\\bra@ket",_s(!1));y("\\bra@set",_s(!0));y("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");y("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");y("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");y("\\angln","{\\angl n}");y("\\blue","\\textcolor{##6495ed}{#1}");y("\\orange","\\textcolor{##ffa500}{#1}");y("\\pink","\\textcolor{##ff00af}{#1}");y("\\red","\\textcolor{##df0030}{#1}");y("\\green","\\textcolor{##28ae7b}{#1}");y("\\gray","\\textcolor{gray}{#1}");y("\\purple","\\textcolor{##9d38bd}{#1}");y("\\blueA","\\textcolor{##ccfaff}{#1}");y("\\blueB","\\textcolor{##80f6ff}{#1}");y("\\blueC","\\textcolor{##63d9ea}{#1}");y("\\blueD","\\textcolor{##11accd}{#1}");y("\\blueE","\\textcolor{##0c7f99}{#1}");y("\\tealA","\\textcolor{##94fff5}{#1}");y("\\tealB","\\textcolor{##26edd5}{#1}");y("\\tealC","\\textcolor{##01d1c1}{#1}");y("\\tealD","\\textcolor{##01a995}{#1}");y("\\tealE","\\textcolor{##208170}{#1}");y("\\greenA","\\textcolor{##b6ffb0}{#1}");y("\\greenB","\\textcolor{##8af281}{#1}");y("\\greenC","\\textcolor{##74cf70}{#1}");y("\\greenD","\\textcolor{##1fab54}{#1}");y("\\greenE","\\textcolor{##0d923f}{#1}");y("\\goldA","\\textcolor{##ffd0a9}{#1}");y("\\goldB","\\textcolor{##ffbb71}{#1}");y("\\goldC","\\textcolor{##ff9c39}{#1}");y("\\goldD","\\textcolor{##e07d10}{#1}");y("\\goldE","\\textcolor{##a75a05}{#1}");y("\\redA","\\textcolor{##fca9a9}{#1}");y("\\redB","\\textcolor{##ff8482}{#1}");y("\\redC","\\textcolor{##f9685d}{#1}");y("\\redD","\\textcolor{##e84d39}{#1}");y("\\redE","\\textcolor{##bc2612}{#1}");y("\\maroonA","\\textcolor{##ffbde0}{#1}");y("\\maroonB","\\textcolor{##ff92c6}{#1}");y("\\maroonC","\\textcolor{##ed5fa6}{#1}");y("\\maroonD","\\textcolor{##ca337c}{#1}");y("\\maroonE","\\textcolor{##9e034e}{#1}");y("\\purpleA","\\textcolor{##ddd7ff}{#1}");y("\\purpleB","\\textcolor{##c6b9fc}{#1}");y("\\purpleC","\\textcolor{##aa87ff}{#1}");y("\\purpleD","\\textcolor{##7854ab}{#1}");y("\\purpleE","\\textcolor{##543b78}{#1}");y("\\mintA","\\textcolor{##f5f9e8}{#1}");y("\\mintB","\\textcolor{##edf2df}{#1}");y("\\mintC","\\textcolor{##e0e5cc}{#1}");y("\\grayA","\\textcolor{##f6f7f7}{#1}");y("\\grayB","\\textcolor{##f0f1f2}{#1}");y("\\grayC","\\textcolor{##e3e5e6}{#1}");y("\\grayD","\\textcolor{##d6d8da}{#1}");y("\\grayE","\\textcolor{##babec2}{#1}");y("\\grayF","\\textcolor{##888d93}{#1}");y("\\grayG","\\textcolor{##626569}{#1}");y("\\grayH","\\textcolor{##3b3e40}{#1}");y("\\grayI","\\textcolor{##21242c}{#1}");y("\\kaBlue","\\textcolor{##314453}{#1}");y("\\kaGreen","\\textcolor{##71B307}{#1}");var Gs={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class G2{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new U2(_2,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Ea(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new Ke("EOF",n.loc)),this.pushTokens(i),r.range(n,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,l=0,s=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++l;else if(a.text==="}"){if(--l,l===-1)throw new L("Extra }",a)}else if(a.text==="EOF")throw new L("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",a);if(t&&n)if((l===0||l===1&&t[s]==="{")&&a.text===t[s]){if(++s,s===t.length){r.splice(-s,s);break}}else s=0}while(l!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new L("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new L("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new L("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,l=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var o=a[s];if(o.text==="#"){if(s===0)throw new L("Incomplete placeholder at end of macro body",o);if(o=a[--s],o.text==="#")a.splice(s+1,1);else if(/^[1-9]$/.test(o.text))a.splice(s,2,...l[+o.text-1]);else throw new L("Not a valid argument number",o)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new Ke(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var l=i.replace(/##/g,"");l.indexOf("#"+(a+1))!==-1;)++a;for(var s=new Ea(i,this.settings),o=[],u=s.lex();u.text!=="EOF";)o.push(u),u=s.lex();o.reverse();var m={tokens:o,numArgs:a};return m}return i}isDefined(t){return this.macros.has(t)||Tt.hasOwnProperty(t)||fe.math.hasOwnProperty(t)||fe.text.hasOwnProperty(t)||Gs.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Tt.hasOwnProperty(t)&&!Tt[t].primitive}}var Na=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vr=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Wn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Ba={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class dn{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new G2(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new L("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new Ke("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(dn.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||t&&Tt[i.text]&&Tt[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=fe[this.mode][r].group,o=$e.range(t),u;if(Ff.hasOwnProperty(s)){var m=s;u={type:"atom",mode:this.mode,family:m,loc:o,text:r}}else u={type:s,mode:this.mode,loc:o,text:r};l=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(ts(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),l={type:"textord",mode:"text",loc:$e.range(t),text:r};else return null;if(this.consume(),a)for(var h=0;hu&&(u=m):m&&(u!==void 0&&u>-1&&o.push(` -`.repeat(u)||" "),u=-1,o.push(m))}return o.join("")}function Js(e,t,r){return e.type==="element"?xp(e,t,r):e.type==="text"?r.whitespace==="normal"?eo(e,r):wp(e):[]}function xp(e,t,r){const n=to(e,r),i=e.children||[];let a=-1,l=[];if(vp(e))return l;let s,o;for(g0(e)||ja(e)&&Oa(t,e,ja)?o=` -`:yp(e)?(s=2,o=2):Qs(e)&&(s=1,o=1);++a0&&(a.properties.rel=[...g]),p&&(a.properties.target=p),m){const x=hr(t.contentProperties,a)||{};a.children.push({type:"element",tagName:"span",properties:qt(x),children:qt(m)})}}}})}}function hr(e,t){return typeof e=="function"?e(t):e}export{Lp as M,Op as a,Rp as b,Pp as c,vn as j,qp as r}; diff --git a/dist/copilot_web/vendor-react-V04_Axys.js b/dist/copilot_web/vendor-react-V04_Axys.js deleted file mode 100644 index 8327c86..0000000 --- a/dist/copilot_web/vendor-react-V04_Axys.js +++ /dev/null @@ -1,32 +0,0 @@ -var vd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Uo={exports:{}},T={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Kt=Symbol.for("react.element"),qa=Symbol.for("react.portal"),ba=Symbol.for("react.fragment"),ef=Symbol.for("react.strict_mode"),nf=Symbol.for("react.profiler"),tf=Symbol.for("react.provider"),rf=Symbol.for("react.context"),lf=Symbol.for("react.forward_ref"),uf=Symbol.for("react.suspense"),of=Symbol.for("react.memo"),sf=Symbol.for("react.lazy"),Ti=Symbol.iterator;function af(e){return e===null||typeof e!="object"?null:(e=Ti&&e[Ti]||e["@@iterator"],typeof e=="function"?e:null)}var $o={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vo=Object.assign,Ao={};function rt(e,n,t){this.props=e,this.context=n,this.refs=Ao,this.updater=t||$o}rt.prototype.isReactComponent={};rt.prototype.setState=function(e,n){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")};rt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bo(){}Bo.prototype=rt.prototype;function Du(e,n,t){this.props=e,this.context=n,this.refs=Ao,this.updater=t||$o}var Iu=Du.prototype=new Bo;Iu.constructor=Du;Vo(Iu,rt.prototype);Iu.isPureReactComponent=!0;var Li=Array.isArray,Ho=Object.prototype.hasOwnProperty,Fu={current:null},Wo={key:!0,ref:!0,__self:!0,__source:!0};function Qo(e,n,t){var r,l={},u=null,i=null;if(n!=null)for(r in n.ref!==void 0&&(i=n.ref),n.key!==void 0&&(u=""+n.key),n)Ho.call(n,r)&&!Wo.hasOwnProperty(r)&&(l[r]=n[r]);var o=arguments.length-2;if(o===1)l.children=t;else if(1>>1,X=C[H];if(0>>1;Hl(hl,z))vnl(qt,hl)?(C[H]=qt,C[vn]=z,H=vn):(C[H]=hl,C[hn]=z,H=hn);else if(vnl(qt,z))C[H]=qt,C[vn]=z,H=vn;else break e}}return N}function l(C,N){var z=C.sortIndex-N.sortIndex;return z!==0?z:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var s=[],f=[],h=1,m=null,p=3,g=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var N=t(f);N!==null;){if(N.callback===null)r(f);else if(N.startTime<=C)r(f),N.sortIndex=N.expirationTime,n(s,N);else break;N=t(f)}}function v(C){if(k=!1,d(C),!w)if(t(s)!==null)w=!0,pl(E);else{var N=t(f);N!==null&&ml(v,N.startTime-C)}}function E(C,N){w=!1,k&&(k=!1,c(P),P=-1),g=!0;var z=p;try{for(d(N),m=t(s);m!==null&&(!(m.expirationTime>N)||C&&!xe());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var X=H(m.expirationTime<=N);N=e.unstable_now(),typeof X=="function"?m.callback=X:m===t(s)&&r(s),d(N)}else r(s);m=t(s)}if(m!==null)var Jt=!0;else{var hn=t(f);hn!==null&&ml(v,hn.startTime-N),Jt=!1}return Jt}finally{m=null,p=z,g=!1}}var _=!1,x=null,P=-1,B=5,L=-1;function xe(){return!(e.unstable_now()-LC||125H?(C.sortIndex=z,n(f,C),t(s)===null&&C===t(f)&&(k?(c(P),P=-1):k=!0,ml(v,z-H))):(C.sortIndex=X,n(s,C),w||g||(w=!0,pl(E))),C},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(C){var N=p;return function(){var z=p;p=N;try{return C.apply(this,arguments)}finally{p=z}}}})(Go);Xo.exports=Go;var mf=Xo.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Zo=Ko,ve=mf;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bl=Object.prototype.hasOwnProperty,hf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mi={},Oi={};function vf(e){return Bl.call(Oi,e)?!0:Bl.call(Mi,e)?!1:hf.test(e)?Oi[e]=!0:(Mi[e]=!0,!1)}function yf(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function gf(e,n,t,r){if(n===null||typeof n>"u"||yf(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function oe(e,n,t,r,l,u,i){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=u,this.removeEmptyString=i}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new oe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new oe(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new oe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new oe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){b[e]=new oe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){b[e]=new oe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){b[e]=new oe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){b[e]=new oe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){b[e]=new oe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Uu=/[\-:]([a-z])/g;function $u(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Uu,$u);b[n]=new oe(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!1,!1)});b.xlinkHref=new oe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){b[e]=new oe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vu(e,n,t,r){var l=b.hasOwnProperty(n)?b[n]:null;(l!==null?l.type!==0:r||!(2o||l[i]!==u[o]){var s=` -`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=o);break}}}finally{gl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?vt(e):""}function wf(e){switch(e.tag){case 5:return vt(e.type);case 16:return vt("Lazy");case 13:return vt("Suspense");case 19:return vt("SuspenseList");case 0:case 2:case 15:return e=wl(e.type,!1),e;case 11:return e=wl(e.type.render,!1),e;case 1:return e=wl(e.type,!0),e;default:return""}}function Kl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case On:return"Fragment";case Mn:return"Portal";case Hl:return"Profiler";case Au:return"StrictMode";case Wl:return"Suspense";case Ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bo:return(e.displayName||"Context")+".Consumer";case qo:return(e._context.displayName||"Context")+".Provider";case Bu:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hu:return n=e.displayName||null,n!==null?n:Kl(e.type)||"Memo";case Ge:n=e._payload,e=e._init;try{return Kl(e(n))}catch{}}return null}function kf(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Kl(n);case 8:return n===Au?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ns(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Sf(e){var n=ns(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,u=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,u.call(this,i)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function nr(e){e._valueTracker||(e._valueTracker=Sf(e))}function ts(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=ns(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function zr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Yl(e,n){var t=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Ii(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=fn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function rs(e,n){n=n.checked,n!=null&&Vu(e,"checked",n,!1)}function Xl(e,n){rs(e,n);var t=fn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Gl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Gl(e,n.type,fn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Fi(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Gl(e,n,t){(n!=="number"||zr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var yt=Array.isArray;function Wn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Lt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var kt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ef=["Webkit","ms","Moz","O"];Object.keys(kt).forEach(function(e){Ef.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),kt[n]=kt[e]})});function os(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||kt.hasOwnProperty(e)&&kt[e]?(""+n).trim():n+"px"}function ss(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=os(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Cf=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ql(e,n){if(n){if(Cf[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function bl(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var eu=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nu=null,Qn=null,Kn=null;function $i(e){if(e=Gt(e)){if(typeof nu!="function")throw Error(y(280));var n=e.stateNode;n&&(n=tl(n),nu(e.stateNode,e.type,n))}}function as(e){Qn?Kn?Kn.push(e):Kn=[e]:Qn=e}function fs(){if(Qn){var e=Qn,n=Kn;if(Kn=Qn=null,$i(e),n)for(e=0;e>>=0,e===0?32:31-(Df(e)/If|0)|0}var rr=64,lr=4194304;function gt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,i=t&268435455;if(i!==0){var o=i&~l;o!==0?r=gt(o):(u&=i,u!==0&&(r=gt(u)))}else i=t&~l,i!==0?r=gt(i):u!==0&&(r=gt(u));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,u=n&-n,l>=u||l===16&&(u&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Yt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Le(n),e[n]=t}function $f(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Et),Xi=" ",Gi=!1;function Ls(e,n){switch(e){case"keyup":return pc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function hc(e,n){switch(e){case"compositionend":return Rs(n);case"keypress":return n.which!==32?null:(Gi=!0,Xi);case"textInput":return e=n.data,e===Xi&&Gi?null:e;default:return null}}function vc(e,n){if(Dn)return e==="compositionend"||!qu&&Ls(e,n)?(e=zs(),wr=Gu=be=null,Dn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=bi(t)}}function Is(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Is(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fs(){for(var e=window,n=zr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=zr(e.document)}return n}function bu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function xc(e){var n=Fs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&Is(t.ownerDocument.documentElement,t)){if(r!==null&&bu(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=eo(t,u);var i=eo(t,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(n),e.extend(i.node,i.offset)):(n.setEnd(i.node,i.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,In=null,ou=null,_t=null,su=!1;function no(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;su||In==null||In!==zr(r)||(r=In,"selectionStart"in r&&bu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_t&&Ft(_t,r)||(_t=r,r=Ir(ou,"onSelect"),0Un||(e.current=mu[Un],mu[Un]=null,Un--)}function O(e,n){Un++,mu[Un]=e.current,e.current=n}var cn={},re=pn(cn),fe=pn(!1),_n=cn;function Jn(e,n){var t=e.type.contextTypes;if(!t)return cn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in t)l[u]=n[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function ce(e){return e=e.childContextTypes,e!=null}function jr(){I(fe),I(re)}function so(e,n,t){if(re.current!==cn)throw Error(y(168));O(re,n),O(fe,t)}function Qs(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,kf(e)||"Unknown",l));return V({},t,r)}function Ur(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,_n=re.current,O(re,e),O(fe,fe.current),!0}function ao(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=Qs(e,n,_n),r.__reactInternalMemoizedMergedChildContext=e,I(fe),I(re),O(re,e)):I(fe),O(fe,t)}var $e=null,rl=!1,Ol=!1;function Ks(e){$e===null?$e=[e]:$e.push(e)}function jc(e){rl=!0,Ks(e)}function mn(){if(!Ol&&$e!==null){Ol=!0;var e=0,n=M;try{var t=$e;for(M=1;e>=i,l-=i,Ve=1<<32-Le(n)+l|t<P?(B=x,x=null):B=x.sibling;var L=p(c,x,d[P],v);if(L===null){x===null&&(x=B);break}e&&x&&L.alternate===null&&n(c,x),a=u(L,a,P),_===null?E=L:_.sibling=L,_=L,x=B}if(P===d.length)return t(c,x),j&&yn(c,P),E;if(x===null){for(;PP?(B=x,x=null):B=x.sibling;var xe=p(c,x,L.value,v);if(xe===null){x===null&&(x=B);break}e&&x&&xe.alternate===null&&n(c,x),a=u(xe,a,P),_===null?E=xe:_.sibling=xe,_=xe,x=B}if(L.done)return t(c,x),j&&yn(c,P),E;if(x===null){for(;!L.done;P++,L=d.next())L=m(c,L.value,v),L!==null&&(a=u(L,a,P),_===null?E=L:_.sibling=L,_=L);return j&&yn(c,P),E}for(x=r(c,x);!L.done;P++,L=d.next())L=g(x,c,P,L.value,v),L!==null&&(e&&L.alternate!==null&&x.delete(L.key===null?P:L.key),a=u(L,a,P),_===null?E=L:_.sibling=L,_=L);return e&&x.forEach(function(it){return n(c,it)}),j&&yn(c,P),E}function F(c,a,d,v){if(typeof d=="object"&&d!==null&&d.type===On&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case er:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===On){if(_.tag===7){t(c,_.sibling),a=l(_,d.props.children),a.return=c,c=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ge&&yo(E)===_.type){t(c,_.sibling),a=l(_,d.props),a.ref=pt(c,_,d),a.return=c,c=a;break e}t(c,_);break}else n(c,_);_=_.sibling}d.type===On?(a=Cn(d.props.children,c.mode,v,d.key),a.return=c,c=a):(v=Nr(d.type,d.key,d.props,null,c.mode,v),v.ref=pt(c,a,d),v.return=c,c=v)}return i(c);case Mn:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(c,a.sibling),a=l(a,d.children||[]),a.return=c,c=a;break e}else{t(c,a);break}else n(c,a);a=a.sibling}a=Al(d,c.mode,v),a.return=c,c=a}return i(c);case Ge:return _=d._init,F(c,a,_(d._payload),v)}if(yt(d))return w(c,a,d,v);if(st(d))return k(c,a,d,v);cr(c,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(c,a.sibling),a=l(a,d),a.return=c,c=a):(t(c,a),a=Vl(d,c.mode,v),a.return=c,c=a),i(c)):t(c,a)}return F}var bn=ea(!0),na=ea(!1),Zt={},je=pn(Zt),Vt=pn(Zt),At=pn(Zt);function Sn(e){if(e===Zt)throw Error(y(174));return e}function si(e,n){switch(O(At,n),O(Vt,e),O(je,Zt),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Jl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Jl(n,e)}I(je),O(je,n)}function et(){I(je),I(Vt),I(At)}function ta(e){Sn(At.current);var n=Sn(je.current),t=Jl(n,e.type);n!==t&&(O(Vt,e),O(je,t))}function ai(e){Vt.current===e&&(I(je),I(Vt))}var U=pn(0);function Wr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Dl=[];function fi(){for(var e=0;et?t:4,e(!0);var r=Il.transition;Il.transition={};try{e(!1),n()}finally{M=t,Il.transition=r}}function ga(){return _e().memoizedState}function Ac(e,n,t){var r=sn(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},wa(e))ka(n,t);else if(t=Zs(e,n,t,r),t!==null){var l=ue();Re(t,e,r,l),Sa(t,n,r)}}function Bc(e,n,t){var r=sn(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(wa(e))ka(n,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=n.lastRenderedReducer,u!==null))try{var i=n.lastRenderedState,o=u(i,t);if(l.hasEagerState=!0,l.eagerState=o,Me(o,i)){var s=n.interleaved;s===null?(l.next=l,ii(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=Zs(e,n,l,r),t!==null&&(l=ue(),Re(t,e,r,l),Sa(t,n,r))}}function wa(e){var n=e.alternate;return e===$||n!==null&&n===$}function ka(e,n){xt=Qr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Sa(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Ku(e,t)}}var Kr={readContext:Ce,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useInsertionEffect:ee,useLayoutEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useMutableSource:ee,useSyncExternalStore:ee,useId:ee,unstable_isNewReconciler:!1},Hc={readContext:Ce,useCallback:function(e,n){return De().memoizedState=[e,n===void 0?null:n],e},useContext:Ce,useEffect:wo,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,Cr(4194308,4,pa.bind(null,n,e),t)},useLayoutEffect:function(e,n){return Cr(4194308,4,e,n)},useInsertionEffect:function(e,n){return Cr(4,2,e,n)},useMemo:function(e,n){var t=De();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=De();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=Ac.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var n=De();return e={current:e},n.memoizedState=e},useState:go,useDebugValue:hi,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=go(!1),n=e[0];return e=Vc.bind(null,e[1]),De().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=$,l=De();if(j){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),Z===null)throw Error(y(349));Pn&30||ua(r,n,t)}l.memoizedState=t;var u={value:t,getSnapshot:n};return l.queue=u,wo(oa.bind(null,r,u,e),[e]),r.flags|=2048,Wt(9,ia.bind(null,r,u,t,n),void 0,null),t},useId:function(){var e=De(),n=Z.identifierPrefix;if(j){var t=Ae,r=Ve;t=(r&~(1<<32-Le(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Bt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(t,{is:r.is}):(e=i.createElement(t),t==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,t),e[Ie]=n,e[$t]=r,La(e,n,!1,!1),n.stateNode=e;e:{switch(i=bl(t,r),t){case"dialog":D("cancel",e),D("close",e),l=r;break;case"iframe":case"object":case"embed":D("load",e),l=r;break;case"video":case"audio":for(l=0;ltt&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304)}else{if(!r)if(e=Wr(i),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),mt(u,!0),u.tail===null&&u.tailMode==="hidden"&&!i.alternate&&!j)return ne(n),null}else 2*W()-u.renderingStartTime>tt&&t!==1073741824&&(n.flags|=128,r=!0,mt(u,!1),n.lanes=4194304);u.isBackwards?(i.sibling=n.child,n.child=i):(t=u.last,t!==null?t.sibling=i:n.child=i,u.last=i)}return u.tail!==null?(n=u.tail,u.rendering=n,u.tail=n.sibling,u.renderingStartTime=W(),n.sibling=null,t=U.current,O(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return Si(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?pe&1073741824&&(ne(n),n.subtreeFlags&6&&(n.flags|=8192)):ne(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function Jc(e,n){switch(ni(n),n.tag){case 1:return ce(n.type)&&jr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return et(),I(fe),I(re),fi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return ai(n),null;case 13:if(I(U),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));qn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return I(U),null;case 4:return et(),null;case 10:return ui(n.type._context),null;case 22:case 23:return Si(),null;case 24:return null;default:return null}}var pr=!1,te=!1,qc=typeof WeakSet=="function"?WeakSet:Set,S=null;function Bn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){A(e,n,r)}else t.current=null}function Pu(e,n,t){try{t()}catch(r){A(e,n,r)}}var zo=!1;function bc(e,n){if(au=Or,e=Fs(),bu(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{t.nodeType,u.nodeType}catch{t=null;break e}var i=0,o=-1,s=-1,f=0,h=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(o=i+l),m!==u||r!==0&&m.nodeType!==3||(s=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++f===l&&(o=i),p===u&&++h===r&&(s=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(fu={focusedElem:e,selectionRange:t},Or=!1,S=n;S!==null;)if(n=S,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,S=e;else for(;S!==null;){n=S;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var k=w.memoizedProps,F=w.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?k:Ne(n.type,k),F);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){A(n,n.return,v)}if(e=n.sibling,e!==null){e.return=n.return,S=e;break}S=n.return}return w=zo,zo=!1,w}function Pt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&Pu(n,t,u)}l=l.next}while(l!==r)}}function il(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function Nu(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Oa(e){var n=e.alternate;n!==null&&(e.alternate=null,Oa(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ie],delete n[$t],delete n[pu],delete n[Ic],delete n[Fc])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Da(e){return e.tag===5||e.tag===3||e.tag===4}function To(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Da(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Fr));else if(r!==4&&(e=e.child,e!==null))for(zu(e,n,t),e=e.sibling;e!==null;)zu(e,n,t),e=e.sibling}function Tu(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Tu(e,n,t),e=e.sibling;e!==null;)Tu(e,n,t),e=e.sibling}var J=null,ze=!1;function Xe(e,n,t){for(t=t.child;t!==null;)Ia(e,n,t),t=t.sibling}function Ia(e,n,t){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(qr,t)}catch{}switch(t.tag){case 5:te||Bn(t,n);case 6:var r=J,l=ze;J=null,Xe(e,n,t),J=r,ze=l,J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):J.removeChild(t.stateNode));break;case 18:J!==null&&(ze?(e=J,t=t.stateNode,e.nodeType===8?Ml(e.parentNode,t):e.nodeType===1&&Ml(e,t),Dt(e)):Ml(J,t.stateNode));break;case 4:r=J,l=ze,J=t.stateNode.containerInfo,ze=!0,Xe(e,n,t),J=r,ze=l;break;case 0:case 11:case 14:case 15:if(!te&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,i=u.destroy;u=u.tag,i!==void 0&&(u&2||u&4)&&Pu(t,n,i),l=l.next}while(l!==r)}Xe(e,n,t);break;case 1:if(!te&&(Bn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(o){A(t,n,o)}Xe(e,n,t);break;case 21:Xe(e,n,t);break;case 22:t.mode&1?(te=(r=te)||t.memoizedState!==null,Xe(e,n,t),te=r):Xe(e,n,t);break;default:Xe(e,n,t)}}function Lo(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new qc),n.forEach(function(r){var l=sd.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Pe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=i),r&=~u}if(r=l,r=W()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*nd(r/1960))-r,10e?16:e,en===null)var r=!1;else{if(e=en,en=null,Gr=0,R&6)throw Error(y(331));var l=R;for(R|=4,S=e.current;S!==null;){var u=S,i=u.child;if(S.flags&16){var o=u.deletions;if(o!==null){for(var s=0;sW()-wi?En(e,0):gi|=t),de(e,n)}function Ha(e,n){n===0&&(e.mode&1?(n=lr,lr<<=1,!(lr&130023424)&&(lr=4194304)):n=1);var t=ue();e=Qe(e,n),e!==null&&(Yt(e,n,t),de(e,t))}function od(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Ha(e,t)}function sd(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),Ha(e,t)}var Wa;Wa=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||fe.current)ae=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ae=!1,Gc(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&Ys(n,Vr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;_r(e,n),e=n.pendingProps;var l=Jn(n,re.current);Xn(n,t),l=di(null,n,r,e,l,t);var u=pi();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ce(r)?(u=!0,Ur(n)):u=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,oi(n),l.updater=ll,n.stateNode=l,l._reactInternals=n,wu(n,r,e,t),n=Eu(null,n,r,!0,u,t)):(n.tag=0,j&&u&&ei(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(_r(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=fd(r),e=Ne(r,e),l){case 0:n=Su(null,n,r,e,t);break e;case 1:n=xo(null,n,r,e,t);break e;case 11:n=Co(null,n,r,e,t);break e;case 14:n=_o(null,n,r,Ne(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Su(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),xo(e,n,r,l,t);case 3:e:{if(Na(n),e===null)throw Error(y(387));r=n.pendingProps,u=n.memoizedState,l=u.element,Js(e,n),Hr(n,r,null,t);var i=n.memoizedState;if(r=i.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},n.updateQueue.baseState=u,n.memoizedState=u,n.flags&256){l=nt(Error(y(423)),n),n=Po(e,n,r,t,l);break e}else if(r!==l){l=nt(Error(y(424)),n),n=Po(e,n,r,t,l);break e}else for(me=ln(n.stateNode.containerInfo.firstChild),he=n,j=!0,Te=null,t=na(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(qn(),r===l){n=Ke(e,n,t);break e}le(e,n,r,t)}n=n.child}return n;case 5:return ta(n),e===null&&vu(n),r=n.type,l=n.pendingProps,u=e!==null?e.memoizedProps:null,i=l.children,cu(r,l)?i=null:u!==null&&cu(r,u)&&(n.flags|=32),Pa(e,n),le(e,n,i,t),n.child;case 6:return e===null&&vu(n),null;case 13:return za(e,n,t);case 4:return si(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=bn(n,null,r,t):le(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Co(e,n,r,l,t);case 7:return le(e,n,n.pendingProps,t),n.child;case 8:return le(e,n,n.pendingProps.children,t),n.child;case 12:return le(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,u=n.memoizedProps,i=l.value,O(Ar,r._currentValue),r._currentValue=i,u!==null)if(Me(u.value,i)){if(u.children===l.children&&!fe.current){n=Ke(e,n,t);break e}}else for(u=n.child,u!==null&&(u.return=n);u!==null;){var o=u.dependencies;if(o!==null){i=u.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(u.tag===1){s=Be(-1,t&-t),s.tag=2;var f=u.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?s.next=s:(s.next=h.next,h.next=s),f.pending=s}}u.lanes|=t,s=u.alternate,s!==null&&(s.lanes|=t),yu(u.return,t,n),o.lanes|=t;break}s=s.next}}else if(u.tag===10)i=u.type===n.type?null:u.child;else if(u.tag===18){if(i=u.return,i===null)throw Error(y(341));i.lanes|=t,o=i.alternate,o!==null&&(o.lanes|=t),yu(i,t,n),i=u.sibling}else i=u.child;if(i!==null)i.return=u;else for(i=u;i!==null;){if(i===n){i=null;break}if(u=i.sibling,u!==null){u.return=i.return,i=u;break}i=i.return}u=i}le(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Xn(n,t),l=Ce(l),r=r(l),n.flags|=1,le(e,n,r,t),n.child;case 14:return r=n.type,l=Ne(r,n.pendingProps),l=Ne(r.type,l),_o(e,n,r,l,t);case 15:return _a(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_r(e,n),n.tag=1,ce(r)?(e=!0,Ur(n)):e=!1,Xn(n,t),bs(n,r,l),wu(n,r,l,t),Eu(null,n,r,!0,e,t);case 19:return Ta(e,n,t);case 22:return xa(e,n,t)}throw Error(y(156,n.tag))};function Qa(e,n){return ys(e,n)}function ad(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Se(e,n,t,r){return new ad(e,n,t,r)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fd(e){if(typeof e=="function")return Ci(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bu)return 11;if(e===Hu)return 14}return 2}function an(e,n){var t=e.alternate;return t===null?(t=Se(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function Nr(e,n,t,r,l,u){var i=2;if(r=e,typeof e=="function")Ci(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case On:return Cn(t.children,l,u,n);case Au:i=8,l|=8;break;case Hl:return e=Se(12,t,n,l|2),e.elementType=Hl,e.lanes=u,e;case Wl:return e=Se(13,t,n,l),e.elementType=Wl,e.lanes=u,e;case Ql:return e=Se(19,t,n,l),e.elementType=Ql,e.lanes=u,e;case es:return sl(t,l,u,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qo:i=10;break e;case bo:i=9;break e;case Bu:i=11;break e;case Hu:i=14;break e;case Ge:i=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=Se(i,t,n,l),n.elementType=e,n.type=r,n.lanes=u,n}function Cn(e,n,t,r){return e=Se(7,e,r,n),e.lanes=t,e}function sl(e,n,t,r){return e=Se(22,e,r,n),e.elementType=es,e.lanes=t,e.stateNode={isHidden:!1},e}function Vl(e,n,t){return e=Se(6,e,null,n),e.lanes=t,e}function Al(e,n,t){return n=Se(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function cd(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Sl(0),this.expirationTimes=Sl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function _i(e,n,t,r,l,u,i,o,s){return e=new cd(e,n,t,o,s),n===1?(n=1,u===!0&&(n|=8)):n=0,u=Se(3,null,null,n),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},oi(u),e}function dd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ga)}catch(e){console.error(e)}}Ga(),Yo.exports=ye;var gd=Yo.exports;export{yd as R,gd as a,vd as c,Ja as g,Ko as r}; diff --git a/dist/copilot_web/vendor-ui-Dzvx2fKw.js b/dist/copilot_web/vendor-ui-Dzvx2fKw.js deleted file mode 100644 index e7af5f5..0000000 --- a/dist/copilot_web/vendor-ui-Dzvx2fKw.js +++ /dev/null @@ -1 +0,0 @@ -import"./vendor-react-V04_Axys.js"; diff --git a/dist/copilot_web/workflowChat--6TDkP1M.js b/dist/copilot_web/workflowChat--6TDkP1M.js deleted file mode 100644 index 945540d..0000000 --- a/dist/copilot_web/workflowChat--6TDkP1M.js +++ /dev/null @@ -1,131 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/WorkflowOption-DPhIatDg.js","copilot_web/vendor-markdown-Dek94WS0.js","copilot_web/vendor-react-V04_Axys.js","copilot_web/message-components-yQk9DI7R.js","copilot_web/ParameterDebugInterfaceNew-CuNRLSlD.js","copilot_web/input.js","copilot_web/assets/input-CeTzrUyG.css","copilot_web/App-By_5x9Zk.js"])))=>i.map(i=>d[i]); -import{_ as Dt}from"./input.js";import{j as h,r as yg,b as wg}from"./vendor-markdown-Dek94WS0.js";import{r as I,R as wn,c as Mt}from"./vendor-react-V04_Axys.js";import{f as bg,v as Sg,a as sn,B as Ag,U as Eg,A as Ir,b as Ig,g as Ve,c as Pt,u as is,M as Cg,W as Ot}from"./message-components-yQk9DI7R.js";import{l as Ng}from"./App-By_5x9Zk.js";/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lg=m=>m.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Uo=(...m)=>m.filter((w,o,D)=>!!w&&w.trim()!==""&&D.indexOf(w)===o).join(" ").trim();/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Rg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tg=I.forwardRef(({color:m="currentColor",size:w=24,strokeWidth:o=2,absoluteStrokeWidth:D,className:B="",children:E,iconNode:M,...q},x)=>I.createElement("svg",{ref:x,...Rg,width:w,height:w,stroke:m,strokeWidth:D?Number(o)*24/Number(w):o,className:Uo("lucide",B),...q},[...M.map(([$,k])=>I.createElement($,k)),...Array.isArray(E)?E:[E]]));/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ht=(m,w)=>{const o=I.forwardRef(({className:D,...B},E)=>I.createElement(Tg,{ref:E,iconNode:w,className:Uo(`lucide-${Lg(m)}`,D),...B}));return o.displayName=`${m}`,o};/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Og=ht("Image",Mg);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Pg=ht("Plus",Dg);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kg=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Wg=ht("Send",kg);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ug=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Bg=ht("Settings",Ug);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Fg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],jg=ht("Trash",Fg);/** - * @license lucide-react v0.475.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Cr=ht("X",zg);function Gg({isOpen:m,onClose:w,onSave:o,initialApiKey:D=""}){const[B,E]=I.useState(D),[M,q]=I.useState(!1),[x,$]=I.useState(""),[k,F]=I.useState("https://api.openai.com/v1"),[re,ie]=I.useState(!1),[pe,R]=I.useState(!1),[W,le]=I.useState(null),[he,oe]=I.useState(null);I.useEffect(()=>{E(D);const H=localStorage.getItem("openaiApiKey"),Z=localStorage.getItem("openaiBaseUrl");H&&$(H),Z&&F(Z),(async()=>{try{const _e=localStorage.getItem("rsaPublicKey");if(_e)oe(_e);else{const bn=await bg();oe(bn),localStorage.setItem("rsaPublicKey",bn)}}catch(_e){console.error("Failed to fetch RSA public key:",_e)}})()},[D]);const Pe=async()=>{if(!x.trim()){le({success:!1,message:"Please enter an OpenAI API key"});return}if(!he){le({success:!1,message:"RSA public key not available. Please try again later."});return}R(!0),le(null);try{const H=await Sg(x,k,he);le({success:H,message:H?"API key is valid!":"Invalid API key. Please check and try again."})}catch(H){le({success:!1,message:H instanceof Error?H.message:"Failed to verify API key"})}finally{R(!1)}},fe=()=>{o(B),x.trim()?(localStorage.setItem("openaiApiKey",x),localStorage.setItem("openaiBaseUrl",k)):(localStorage.removeItem("openaiApiKey"),localStorage.removeItem("openaiBaseUrl")),w()};return m?h.jsx("div",{className:"fixed inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-xl p-8 w-[480px] shadow-2xl",children:[h.jsx("h2",{className:"text-xl text-gray-900 dark:text-white font-semibold mb-6",children:"Set API Key"}),h.jsxs("div",{className:"mb-6",children:[h.jsx("label",{className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"ComfyUI Copilot API Key"}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:M?"text":"password",value:B,onChange:H=>E(H.target.value),placeholder:"Enter your API key",className:`w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-lg mb-4 pr-12 - bg-gray-50 dark:bg-gray-700 - text-gray-900 dark:text-white - placeholder-gray-500 dark:placeholder-gray-400 - focus:border-blue-500 dark:focus:border-blue-400 - focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 - focus:outline-none`}),h.jsx("button",{type:"button",className:`absolute inset-y-0 right-0 pr-4 flex items-center text-gray-500 dark:text-gray-400 - hover:text-gray-700 dark:hover:text-gray-200 transition-colors bg-transparent border-none`,onClick:()=>q(!M),children:M?h.jsxs("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):h.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]}),h.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-300",children:[h.jsx("span",{children:"Don't have an API key? "}),h.jsx("a",{href:"https://form.typeform.com/to/tkg91K8D",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 font-medium",children:"Click here to request one"})]})]}),h.jsxs("div",{className:"mb-6 border-t border-gray-200 dark:border-gray-700 pt-6",children:[h.jsx("h3",{className:"text-sm text-gray-900 dark:text-white font-medium mb-4",children:"OpenAI API Configuration (Optional)"}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"OpenAI API Key"}),h.jsxs("div",{className:"relative",children:[h.jsx("input",{type:re?"text":"password",value:x,onChange:H=>$(H.target.value),placeholder:"Enter your OpenAI API key",className:`w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-lg pr-12 text-xs - bg-gray-50 dark:bg-gray-700 - text-gray-900 dark:text-white - placeholder-gray-500 dark:placeholder-gray-400 - focus:border-blue-500 dark:focus:border-blue-400 - focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 - focus:outline-none`}),h.jsx("button",{type:"button",className:`absolute inset-y-0 right-0 pr-4 flex items-center text-gray-500 dark:text-gray-400 - hover:text-gray-700 dark:hover:text-gray-200 transition-colors bg-transparent border-none`,onClick:()=>ie(!re),children:re?h.jsxs("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}):h.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})})})]})]}),h.jsxs("div",{className:"mb-4",children:[h.jsx("label",{className:"block text-xs font-medium text-gray-700 dark:text-gray-300 mb-2",children:"OpenAI Base URL"}),h.jsx("input",{type:"text",value:k,onChange:H=>F(H.target.value),placeholder:"https://api.openai.com/v1",className:`w-full px-4 py-3 border border-gray-200 dark:border-gray-600 rounded-lg text-xs - bg-gray-50 dark:bg-gray-700 - text-gray-900 dark:text-white - placeholder-gray-500 dark:placeholder-gray-400 - focus:border-blue-500 dark:focus:border-blue-400 - focus:ring-2 focus:ring-blue-500/20 dark:focus:ring-blue-400/20 - focus:outline-none`})]}),h.jsx("div",{className:"flex items-center mb-2",children:h.jsx("button",{onClick:Pe,disabled:pe||!x.trim(),className:`px-4 py-2 rounded-lg font-medium text-xs transition-colors ${pe||!x.trim()?"bg-gray-300 dark:bg-gray-600 text-gray-500 dark:text-gray-400 cursor-not-allowed":"bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 text-white"}`,children:pe?h.jsxs("span",{className:"flex items-center",children:[h.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Verifying..."]}):"Verify"})}),W&&h.jsx("div",{className:`text-xs p-2 rounded-md ${W.success?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400"}`,children:W.message})]}),h.jsxs("div",{className:"flex justify-end gap-3",children:[h.jsx("button",{onClick:w,className:`px-5 py-2.5 text-gray-700 bg-white dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 - rounded-lg font-medium transition-colors`,children:"Cancel"}),h.jsx("button",{onClick:fe,className:`px-5 py-2.5 bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 - text-white rounded-lg font-medium transition-colors`,children:"Save"})]})]})}):null}function Kg({onClose:m,onClear:w,hasMessages:o,onHeightResize:D,title:B="ComfyUI-Copilot"}){const[E,M]=I.useState(!1),[q,x]=I.useState(!1),$=()=>{M(!0)},k=re=>{localStorage.setItem("chatApiKey",re)},F=re=>{x(!0),re.preventDefault()};return I.useEffect(()=>{const re=pe=>{if(!q)return;const R=pe.movementY;D?.(R)},ie=()=>{x(!1)};return q&&(document.addEventListener("mousemove",re),document.addEventListener("mouseup",ie)),()=>{document.removeEventListener("mousemove",re),document.removeEventListener("mouseup",ie)}},[q,D]),h.jsxs(h.Fragment,{children:[h.jsx("div",{className:`absolute top-0 left-0 right-0 h-2 bg-gray-100 hover:bg-gray-300 - transition-colors duration-200 cursor-ns-resize z-20`,onMouseDown:F,style:{borderBottom:"1px solid #e5e7eb"}}),h.jsxs("div",{className:`flex items-center justify-between border-b px-4 py-3 - bg-white border-gray-200 sticky top-2 z-10`,children:[h.jsxs("div",{className:"flex items-center space-x-2",children:[h.jsx("img",{src:Ng,alt:"ComfyUI-Copilot Logo",className:"h-10 w-10 -ml-1"}),h.jsx("h3",{className:"text-[16px] font-medium text-gray-800",children:B}),h.jsx("button",{onClick:$,className:"p-1 bg-white border-none hover:bg-gray-100 rounded text-gray-500",children:h.jsx(Bg,{className:"h-5 w-5"})})]}),h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("button",{className:`inline-flex bg-white border-none items-center justify-center rounded-md p-2 - ${o?"text-gray-500 hover:bg-gray-100":"text-gray-300 cursor-not-allowed"}`,disabled:!o,onClick:w,children:h.jsx(jg,{className:"h-5 w-5"})}),h.jsx("button",{className:`inline-flex bg-white border-none items-center justify-center rounded-md p-2 - text-gray-500 hover:bg-gray-100`,onClick:m,children:h.jsx(Cr,{className:"h-5 w-5"})})]})]}),h.jsx(Gg,{isOpen:E,onClose:()=>M(!1),onSave:k,initialApiKey:localStorage.getItem("chatApiKey")||""})]})}const $g=5*1024*1024,ko=["image/jpeg","image/png","image/gif","image/webp"],rs=[{name:"gpt-4o",image_enable:!0},{name:"gpt-4o-mini",image_enable:!0},{name:"qwen-plus",image_enable:!1},{name:"DeepSeek-V3",image_enable:!1}];function Hg({input:m,loading:w,onChange:o,onSend:D,onKeyPress:B,onUploadImages:E,uploadedImages:M,onRemoveImage:q,selectedModel:x,onModelChange:$}){const[k,F]=I.useState(!1),re=wn.useRef(null),ie=I.useRef(null);I.useEffect(()=>{ie.current&&(ie.current.style.height="auto",ie.current.style.height=`${Math.min(ie.current.scrollHeight,400)}px`)},[m]);const pe=R=>{if(R.target.files){const W=[],le=[];if(Array.from(R.target.files).forEach(he=>{ko.includes(he.type)?he.size>$g?W.push(`${he.name} (exceeds 5MB)`):le.push(he):W.push(`${he.name} (unsupported format)`)}),W.length>0&&alert(`The following files couldn't be uploaded: -${W.join(` -`)}`),le.length>0){const he=new DataTransfer;le.forEach(oe=>he.items.add(oe)),E(he.files)}}};return h.jsxs("div",{className:`relative ${M.length>0?"mt-12":""}`,children:[M.length>0&&h.jsx("div",{className:"absolute -top-10 left-0 flex gap-2",children:M.map(R=>h.jsxs("div",{className:"relative group",children:[h.jsx("img",{src:R.preview,alt:"uploaded",className:"w-8 h-8 rounded object-cover"}),h.jsx("button",{onClick:()=>q(R.id),className:`absolute -top-1 -right-1 bg-white border-none text-gray-500 rounded-full p-0.5 - opacity-0 group-hover:opacity-100 transition-opacity`,children:h.jsx(Cr,{className:"w-3 h-3"})})]},R.id))}),h.jsx("textarea",{ref:ie,onChange:o,onKeyDown:R=>{if(R.key==="Enter"&&!R.shiftKey){if(R.nativeEvent.isComposing)return;R.preventDefault(),D()}B(R)},value:m,placeholder:"Type your message...",className:`w-full min-h-[80px] max-h-[400px] resize-none rounded-md border - border-gray-200 px-3 py-2 pr-12 pb-10 text-[14px] shadow-sm - focus:outline-none focus:ring-2 focus:ring-blue-500 - focus:border-transparent bg-white transition-all - duration-200 text-gray-700 overflow-y-auto`,style:{height:"80px"}}),h.jsxs("div",{className:`absolute bottom-2 left-3 right-12 flex items-center gap-2 - bg-white border-t border-gray-100 pt-1`,children:[h.jsx("select",{value:x,onChange:R=>$(R.target.value),className:`px-1.5 py-0.5 text-xs rounded-md - border border-gray-200 bg-white text-gray-700 - focus:outline-none focus:ring-2 focus:ring-blue-500 - focus:border-transparent hover:bg-gray-50 - transition-colors border-0`,children:rs.map(R=>h.jsx("option",{value:R.name,children:R.name},R.name))}),h.jsx("button",{type:"button",onClick:()=>F(!0),disabled:!rs.find(R=>R.name===x)?.image_enable,className:`p-1.5 text-gray-500 bg-white border-none - hover:bg-gray-100 hover:text-gray-600 - transition-all duration-200 outline-none - ${rs.find(R=>R.name===x)?.image_enable?"":"opacity-50 cursor-not-allowed"}`,children:h.jsx(Og,{className:"h-4 w-4"})})]}),h.jsx("button",{type:"submit",onClick:D,disabled:w,className:`absolute bottom-3 right-3 p-2 rounded-md text-gray-500 bg-white border-none - hover:bg-gray-100 hover:text-gray-600 disabled:opacity-50 - transition-all duration-200 active:scale-95`,children:w?h.jsx("div",{className:`h-5 w-5 animate-spin rounded-full - border-2 border-gray-300 border-t-blue-500`}):h.jsx(Wg,{className:"h-5 w-5 group-hover:translate-x-1"})}),k&&h.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:h.jsxs("div",{className:"bg-white rounded-lg p-6 w-96 relative",children:[h.jsx("button",{onClick:()=>F(!1),className:"absolute top-2 right-2 bg-white border-none text-gray-500 hover:text-gray-700",children:h.jsx(Cr,{className:"w-5 h-5"})}),h.jsx("h3",{className:"text-lg text-gray-800 font-medium mb-4",children:"Upload Images"}),h.jsxs("div",{className:`border-2 border-dashed border-gray-300 rounded-lg p-8 - flex flex-col items-center justify-center gap-4 - hover:border-blue-500 transition-colors cursor-pointer`,onClick:()=>re.current?.click(),children:[h.jsx(Pg,{className:"w-8 h-8 text-gray-400"}),h.jsxs("div",{className:"text-center",children:[h.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Click to upload images or drag and drop"}),h.jsx("p",{className:"text-xs text-gray-400",children:"Supported formats: JPG, PNG, GIF, WebP"}),h.jsx("p",{className:"text-xs text-gray-400",children:"Max file size: 5MB"})]})]}),h.jsx("input",{ref:re,type:"file",multiple:!0,accept:ko.join(","),onChange:pe,className:"hidden"}),M.length>0&&h.jsx("div",{className:"mt-4 grid grid-cols-3 gap-2",children:M.map(R=>h.jsxs("div",{className:"relative group",children:[h.jsx("img",{src:R.preview,alt:"preview",className:"w-full h-20 object-cover rounded"}),h.jsx("button",{onClick:()=>q(R.id),className:`absolute -top-1 -right-1 bg-white border-none text-gray-500 - rounded-full p-0.5 opacity-0 group-hover:opacity-100 - transition-opacity`,children:h.jsx(Cr,{className:"w-3 h-3"})})]},R.id))}),h.jsx("div",{className:"mt-4 flex justify-end gap-2",children:h.jsx("button",{onClick:()=>F(!1),className:`px-4 py-2 text-sm font-medium text-gray-700 - bg-white border border-gray-300 rounded-md - hover:bg-gray-50`,children:"Close"})})]})})]})}function qg(){const m=Object.values(sn.canvas.selected_nodes)[0],w=new Set;function o(D,B){if(!(!D||B>=1)&&D.inputs)for(const E of Object.values(D.inputs)){const M=E.link;if(M&&sn.graph.links[M]){const q=sn.graph.links[M].origin_id,x=sn.graph._nodes_by_id[q];x&&(w.add(x.type),o(x,B+1))}}}return m?(o(m,0),[{type:"upstream_node_types",data:Array.from(w)}]):null}function Zg({nodeInfo:m,onSendWithIntent:w,loading:o,onSendWithContent:D}){return h.jsx("div",{className:"mb-3 p-3 rounded-md bg-gray-50 border border-gray-200",children:h.jsxs("div",{className:"text-sm text-gray-700",children:[h.jsxs("p",{children:["Selected node: ",m[0].type]}),h.jsxs("div",{className:"flex gap-2 mt-2",children:[h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-blue-50 - text-blue-700 hover:bg-blue-100`,onClick:()=>D(`Reply in ${navigator.language} language: How does the ${m[0].type} node work? I need its official usage guide.`),disabled:o,children:"Usage"}),h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-green-100 - text-green-700 hover:bg-green-200`,onClick:()=>D(`Reply in ${navigator.language} language: Show me the technical specifications for the ${m[0].type} node's inputs and outputs.`),disabled:o,children:"Parameters"}),h.jsx("button",{className:`px-3 py-1 text-xs rounded-md bg-purple-100 - text-purple-700 hover:bg-purple-200`,onClick:()=>w("downstream_subgraph_search",qg()),disabled:o,children:"Downstream Nodes"})]})]})})}function Yg(){return h.jsx(Ag,{name:"Assistant",children:h.jsxs("div",{className:"flex items-center space-x-2 p-4 bg-gray-50 rounded-lg",children:[h.jsxs("div",{className:"flex space-x-1",children:[h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"150ms"}}),h.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"300ms"}})]}),h.jsx("span",{className:"text-sm text-gray-500",children:"AI is thinking..."})]})})}const Xg=m=>`https://ui-avatars.com/api/?name=${m||"User"}&background=random`,Jg=I.lazy(()=>Dt(()=>import("./WorkflowOption-DPhIatDg.js"),__vite__mapDeps([0,1,2,3])).then(m=>({default:m.WorkflowOption}))),Qg=I.lazy(()=>Dt(()=>import("./message-components-yQk9DI7R.js").then(m=>m.N),__vite__mapDeps([3,2,1])).then(m=>({default:m.NodeSearch}))),Vg=I.lazy(()=>Dt(()=>import("./message-components-yQk9DI7R.js").then(m=>m.D),__vite__mapDeps([3,2,1])).then(m=>({default:m.DownstreamSubgraphs}))),ep=I.lazy(()=>Dt(()=>import("./message-components-yQk9DI7R.js").then(m=>m.d),__vite__mapDeps([3,2,1])).then(m=>({default:m.NodeInstallGuide})));function np({messages:m,latestInput:w,onOptionClick:o,installedNodes:D,onAddMessage:B,loading:E}){const M=wn.useMemo(()=>x=>{if(x.role==="user")return h.jsx(Eg,{content:x.content,trace_id:x.trace_id},x.id);if(x.role==="ai"||x.role==="tool"){const $=Xg(x.role);try{const k=JSON.parse(x.content),F=k.ext?.find(W=>W.type==="workflow"),re=k.ext?.find(W=>W.type==="node"),ie=k.ext?.find(W=>W.type==="downstream_subgraph_search"),pe=k.ext?.find(W=>W.type==="node_install_guide");let R=null;if(F)R=h.jsx(I.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Jg,{content:x.content,name:x.name,avatar:$,latestInput:w,installedNodes:D,onAddMessage:B})});else if(re)R=h.jsx(I.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Qg,{content:x.content,name:x.name,avatar:$,installedNodes:D})});else if(ie){const W=h.jsx(I.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(Vg,{content:x.content,name:x.name,avatar:$,onAddMessage:B})});if(x.metadata?.intent==="downstream_subgraph_search")return h.jsx(Ir,{content:x.content,name:x.name,avatar:$,format:x.format,onOptionClick:o,extComponent:W,metadata:x.metadata},x.id);R=W}else pe&&(R=h.jsx(I.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(ep,{content:x.content,onLoadSubgraph:()=>{if(x.metadata?.pendingSubgraph){const W=Object.values(sn.canvas.selected_nodes)[0];if(W){const le=x.metadata.pendingSubgraph,he=le.json.nodes,oe=le.json.links,Pe=he.find(Z=>Z.id===0),fe=Pe?.id,H={};fe&&(H[fe]=W),sn.canvas.emitBeforeChange();try{for(const Z of he)if(Z.id!==fe){const Se=Pe?.pos||[0,0],_e=W._pos||[0,0],bn=[Z.pos[0]+_e[0]-Se[0],Z.pos[1]+_e[1]-Se[1]];H[Z.id]=Ig(Z.type,{pos:bn})}}finally{sn.canvas.emitAfterChange()}for(const Z of oe){const Se=H[Z.origin_id],_e=H[Z.target_id];Se&&_e&&Se.connect(Z.origin_slot,_e,Z.target_slot)}}else alert("Please select a upstream node first before adding a subgraph.")}else if(x.metadata?.pendingWorkflow){const W=x.metadata.pendingWorkflow,le=x.metadata.optimizedParams;sn.loadGraphData(W);for(const[oe,Pe,fe,H,Z]of le){const Se=sn.graph._nodes_by_id[oe].widgets;for(const _e of Se)_e.name===H&&(_e.value=Z)}sn.graph.setDirtyCanvas(!1,!0);const he={id:Ve(),role:"tool",content:JSON.stringify({text:"The workflow has been successfully loaded to the canvas",ext:[]}),format:"markdown",name:"Assistant"};B?.(he)}}})}));return k.text||R?h.jsx(Ir,{content:x.content,name:x.name,avatar:$,format:x.format,onOptionClick:o,extComponent:R,metadata:x.metadata},x.id):R||h.jsx(Ir,{content:x.content,name:x.name,avatar:$,format:x.format,onOptionClick:o,metadata:x.metadata},x.id)}catch(k){return console.error("[MessageList] Error parsing message content:",k),console.error("解析JSON失败",x.content),h.jsx(Ir,{content:x.content,name:x.name,avatar:$,format:x.format,onOptionClick:o,metadata:x.metadata},x.id)}}return null},[D,o,B,w]),q=wn.useMemo(()=>m?.map(M),[m,M]);return h.jsxs("div",{className:"flex flex-col gap-4 w-full",children:[q,E&&h.jsx(Yg,{})]})}async function tp(){try{return await(await Pt.fetchApi("/object_info",{method:"GET"})).json()}catch(m){throw console.error("Error fetching object info:",m),m}}async function rp(){const m=await tp();return Object.keys(m)}async function pp(m){return await(await Pt.fetchApi("/prompt",{method:"POST",body:JSON.stringify(m)})).json()}async function _p(m){try{const w=await Pt.fetchApi("/queue",{method:"POST",body:JSON.stringify(m)});if(!w.ok)throw new Error(`Failed to manage queue: ${w.status} ${w.statusText}`);return w}catch(w){throw console.error("Error managing queue:",w),w}}async function vp(){try{const m=await Pt.fetchApi("/interrupt",{method:"POST"});if(!m.ok)throw new Error(`Failed to interrupt processing: ${m.status} ${m.statusText}`);return m}catch(m){throw console.error("Error interrupting processing:",m),m}}async function mp(m){try{const w=await Pt.fetchApi(`/history/${m}`,{method:"GET"});if(!w.ok)throw new Error(`Failed to fetch history: ${w.status} ${w.statusText}`);return await w.json()}catch(w){throw console.error("Error fetching history:",w),w}}var Nr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Nr.exports;(function(m,w){(function(){var o,D="4.17.21",B=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",M="Expected a function",q="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",$=500,k="__lodash_placeholder__",F=1,re=2,ie=4,pe=1,R=2,W=1,le=2,he=4,oe=8,Pe=16,fe=32,H=64,Z=128,Se=256,_e=512,bn=30,Rr="...",kt=800,ss=16,Wt=1,dt=2,Tr=3,$n=1/0,fn=9007199254740991,Hn=17976931348623157e292,qn=NaN,ke=4294967295,Mr=ke-1,Or=ke>>>1,Dr=[["ary",Z],["bind",W],["bindKey",le],["curry",oe],["curryRight",Pe],["flip",_e],["partial",fe],["partialRight",H],["rearg",Se]],Sn="[object Arguments]",Dn="[object Array]",Zn="[object AsyncFunction]",Pn="[object Boolean]",An="[object Date]",Pr="[object DOMException]",Yn="[object Error]",Xn="[object Function]",gt="[object GeneratorFunction]",We="[object Map]",A="[object Number]",Y="[object Null]",ee="[object Object]",Ae="[object Promise]",un="[object Proxy]",Ee="[object RegExp]",V="[object Set]",ve="[object String]",Ke="[object Symbol]",cn="[object Undefined]",pt="[object WeakMap]",Bo="[object WeakSet]",_t="[object ArrayBuffer]",Jn="[object DataView]",kr="[object Float32Array]",Wr="[object Float64Array]",Ur="[object Int8Array]",Br="[object Int16Array]",Fr="[object Int32Array]",jr="[object Uint8Array]",zr="[object Uint8ClampedArray]",Gr="[object Uint16Array]",Kr="[object Uint32Array]",Fo=/\b__p \+= '';/g,jo=/\b(__p \+=) '' \+/g,zo=/(__e\(.*?\)|\b__t\)) \+\n'';/g,us=/&(?:amp|lt|gt|quot|#39);/g,os=/[&<>"']/g,Go=RegExp(us.source),Ko=RegExp(os.source),$o=/<%-([\s\S]+?)%>/g,Ho=/<%([\s\S]+?)%>/g,as=/<%=([\s\S]+?)%>/g,qo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zo=/^\w*$/,Yo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$r=/[\\^$.*+?()[\]{}|]/g,Xo=RegExp($r.source),Hr=/^\s+/,Jo=/\s/,Qo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vo=/\{\n\/\* \[wrapped with (.+)\] \*/,ea=/,? & /,na=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ta=/[()=,{}\[\]\/\s]/,ra=/\\(\\)?/g,ia=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ls=/\w*$/,sa=/^[-+]0x[0-9a-f]+$/i,ua=/^0b[01]+$/i,oa=/^\[object .+?Constructor\]$/,aa=/^0o[0-7]+$/i,la=/^(?:0|[1-9]\d*)$/,fa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ut=/($^)/,ca=/['\n\r\u2028\u2029\\]/g,Bt="\\ud800-\\udfff",ha="\\u0300-\\u036f",da="\\ufe20-\\ufe2f",ga="\\u20d0-\\u20ff",fs=ha+da+ga,cs="\\u2700-\\u27bf",hs="a-z\\xdf-\\xf6\\xf8-\\xff",pa="\\xac\\xb1\\xd7\\xf7",_a="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",va="\\u2000-\\u206f",ma=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ds="A-Z\\xc0-\\xd6\\xd8-\\xde",gs="\\ufe0e\\ufe0f",ps=pa+_a+va+ma,qr="['’]",xa="["+Bt+"]",_s="["+ps+"]",Ft="["+fs+"]",vs="\\d+",ya="["+cs+"]",ms="["+hs+"]",xs="[^"+Bt+ps+vs+cs+hs+ds+"]",Zr="\\ud83c[\\udffb-\\udfff]",wa="(?:"+Ft+"|"+Zr+")",ys="[^"+Bt+"]",Yr="(?:\\ud83c[\\udde6-\\uddff]){2}",Xr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+ds+"]",ws="\\u200d",bs="(?:"+ms+"|"+xs+")",ba="(?:"+Qn+"|"+xs+")",Ss="(?:"+qr+"(?:d|ll|m|re|s|t|ve))?",As="(?:"+qr+"(?:D|LL|M|RE|S|T|VE))?",Es=wa+"?",Is="["+gs+"]?",Sa="(?:"+ws+"(?:"+[ys,Yr,Xr].join("|")+")"+Is+Es+")*",Aa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ea="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Cs=Is+Es+Sa,Ia="(?:"+[ya,Yr,Xr].join("|")+")"+Cs,Ca="(?:"+[ys+Ft+"?",Ft,Yr,Xr,xa].join("|")+")",Na=RegExp(qr,"g"),La=RegExp(Ft,"g"),Jr=RegExp(Zr+"(?="+Zr+")|"+Ca+Cs,"g"),Ra=RegExp([Qn+"?"+ms+"+"+Ss+"(?="+[_s,Qn,"$"].join("|")+")",ba+"+"+As+"(?="+[_s,Qn+bs,"$"].join("|")+")",Qn+"?"+bs+"+"+Ss,Qn+"+"+As,Ea,Aa,vs,Ia].join("|"),"g"),Ta=RegExp("["+ws+Bt+fs+gs+"]"),Ma=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Oa=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Da=-1,se={};se[kr]=se[Wr]=se[Ur]=se[Br]=se[Fr]=se[jr]=se[zr]=se[Gr]=se[Kr]=!0,se[Sn]=se[Dn]=se[_t]=se[Pn]=se[Jn]=se[An]=se[Yn]=se[Xn]=se[We]=se[A]=se[ee]=se[Ee]=se[V]=se[ve]=se[pt]=!1;var te={};te[Sn]=te[Dn]=te[_t]=te[Jn]=te[Pn]=te[An]=te[kr]=te[Wr]=te[Ur]=te[Br]=te[Fr]=te[We]=te[A]=te[ee]=te[Ee]=te[V]=te[ve]=te[Ke]=te[jr]=te[zr]=te[Gr]=te[Kr]=!0,te[Yn]=te[Xn]=te[pt]=!1;var Pa={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},ka={"&":"&","<":"<",">":">",'"':""","'":"'"},Wa={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ua={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ba=parseFloat,Fa=parseInt,Ns=typeof Mt=="object"&&Mt&&Mt.Object===Object&&Mt,ja=typeof self=="object"&&self&&self.Object===Object&&self,we=Ns||ja||Function("return this")(),Qr=w&&!w.nodeType&&w,kn=Qr&&!0&&m&&!m.nodeType&&m,Ls=kn&&kn.exports===Qr,Vr=Ls&&Ns.process,$e=function(){try{var f=kn&&kn.require&&kn.require("util").types;return f||Vr&&Vr.binding&&Vr.binding("util")}catch{}}(),Rs=$e&&$e.isArrayBuffer,Ts=$e&&$e.isDate,Ms=$e&&$e.isMap,Os=$e&&$e.isRegExp,Ds=$e&&$e.isSet,Ps=$e&&$e.isTypedArray;function Ue(f,g,d){switch(d.length){case 0:return f.call(g);case 1:return f.call(g,d[0]);case 2:return f.call(g,d[0],d[1]);case 3:return f.call(g,d[0],d[1],d[2])}return f.apply(g,d)}function za(f,g,d,b){for(var T=-1,X=f==null?0:f.length;++T-1}function ei(f,g,d){for(var b=-1,T=f==null?0:f.length;++b-1;);return d}function Gs(f,g){for(var d=f.length;d--&&Vn(g,f[d],0)>-1;);return d}function Ja(f,g){for(var d=f.length,b=0;d--;)f[d]===g&&++b;return b}var Qa=ii(Pa),Va=ii(ka);function el(f){return"\\"+Ua[f]}function nl(f,g){return f==null?o:f[g]}function et(f){return Ta.test(f)}function tl(f){return Ma.test(f)}function rl(f){for(var g,d=[];!(g=f.next()).done;)d.push(g.value);return d}function ai(f){var g=-1,d=Array(f.size);return f.forEach(function(b,T){d[++g]=[T,b]}),d}function Ks(f,g){return function(d){return f(g(d))}}function Cn(f,g){for(var d=-1,b=f.length,T=0,X=[];++d-1}function Kl(e,n){var t=this.__data__,r=ir(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this}hn.prototype.clear=Fl,hn.prototype.delete=jl,hn.prototype.get=zl,hn.prototype.has=Gl,hn.prototype.set=Kl;function dn(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n=n?e:n)),e}function Ye(e,n,t,r,i,u){var a,l=n&F,c=n&re,p=n&ie;if(t&&(a=i?t(e,r,i,u):t(e)),a!==o)return a;if(!ae(e))return e;var _=O(e);if(_){if(a=Yf(e),!l)return Te(e,a)}else{var v=Ce(e),y=v==Xn||v==gt;if(On(e))return Iu(e,l);if(v==ee||v==Sn||y&&!i){if(a=c||y?{}:$u(e),!l)return c?Uf(e,of(a,e)):Wf(e,tu(a,e))}else{if(!te[v])return i?e:{};a=Xf(e,v,l)}}u||(u=new nn);var S=u.get(e);if(S)return S;u.set(e,a),wo(e)?e.forEach(function(L){a.add(Ye(L,n,t,L,e,u))}):xo(e)&&e.forEach(function(L,z){a.set(z,Ye(L,n,t,z,e,u))});var N=p?c?Di:Oi:c?Oe:ye,U=_?o:N(e);return He(U||e,function(L,z){U&&(z=L,L=e[z]),St(a,z,Ye(L,n,t,z,e,u))}),a}function af(e){var n=ye(e);return function(t){return ru(t,e,n)}}function ru(e,n,t){var r=t.length;if(e==null)return!r;for(e=ne(e);r--;){var i=t[r],u=n[i],a=e[i];if(a===o&&!(i in e)||!u(a))return!1}return!0}function iu(e,n,t){if(typeof e!="function")throw new qe(M);return Rt(function(){e.apply(o,t)},n)}function At(e,n,t,r){var i=-1,u=jt,a=!0,l=e.length,c=[],p=n.length;if(!l)return c;t&&(n=ue(n,Be(t))),r?(u=ei,a=!1):n.length>=B&&(u=vt,a=!1,n=new Bn(n));e:for(;++ii?0:i+t),r=r===o||r>i?i:P(r),r<0&&(r+=i),r=t>r?0:So(r);t0&&t(l)?n>1?be(l,n-1,t,r,i):In(i,l):r||(i[i.length]=l)}return i}var pi=Mu(),ou=Mu(!0);function on(e,n){return e&&pi(e,n,ye)}function _i(e,n){return e&&ou(e,n,ye)}function ur(e,n){return En(n,function(t){return mn(e[t])})}function jn(e,n){n=Tn(n,e);for(var t=0,r=n.length;e!=null&&tn}function cf(e,n){return e!=null&&Q.call(e,n)}function hf(e,n){return e!=null&&n in ne(e)}function df(e,n,t){return e>=Ie(n,t)&&e=120&&_.length>=120)?new Bn(a&&_):o}_=e[0];var v=-1,y=l[0];e:for(;++v-1;)l!==e&&Jt.call(l,c,1),Jt.call(e,c,1);return e}function mu(e,n){for(var t=e?n.length:0,r=t-1;t--;){var i=n[t];if(t==r||i!==u){var u=i;vn(i)?Jt.call(e,i,1):Ii(e,i)}}return e}function Si(e,n){return e+er(Qs()*(n-e+1))}function If(e,n,t,r){for(var i=-1,u=xe(Vt((n-e)/(t||1)),0),a=d(u);u--;)a[r?u:++i]=e,e+=t;return a}function Ai(e,n){var t="";if(!e||n<1||n>fn)return t;do n%2&&(t+=e),n=er(n/2),n&&(e+=e);while(n);return t}function j(e,n){return ji(Zu(e,n,De),e+"")}function Cf(e){return nu(ct(e))}function Nf(e,n){var t=ct(e);return vr(t,Fn(n,0,t.length))}function Ct(e,n,t,r){if(!ae(e))return e;n=Tn(n,e);for(var i=-1,u=n.length,a=u-1,l=e;l!=null&&++ii?0:i+n),t=t>i?i:t,t<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var u=d(i);++r>>1,a=e[u];a!==null&&!je(a)&&(t?a<=n:a=B){var p=n?null:zf(e);if(p)return Gt(p);a=!1,i=vt,c=new Bn}else c=n?[]:l;e:for(;++r=r?e:Xe(e,n,t)}var Eu=ml||function(e){return we.clearTimeout(e)};function Iu(e,n){if(n)return e.slice();var t=e.length,r=qs?qs(t):new e.constructor(t);return e.copy(r),r}function Ri(e){var n=new e.constructor(e.byteLength);return new Yt(n).set(new Yt(e)),n}function Of(e,n){var t=n?Ri(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}function Df(e){var n=new e.constructor(e.source,ls.exec(e));return n.lastIndex=e.lastIndex,n}function Pf(e){return bt?ne(bt.call(e)):{}}function Cu(e,n){var t=n?Ri(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function Nu(e,n){if(e!==n){var t=e!==o,r=e===null,i=e===e,u=je(e),a=n!==o,l=n===null,c=n===n,p=je(n);if(!l&&!p&&!u&&e>n||u&&a&&c&&!l&&!p||r&&a&&c||!t&&c||!i)return 1;if(!r&&!u&&!p&&e=l)return c;var p=t[r];return c*(p=="desc"?-1:1)}}return e.index-n.index}function Lu(e,n,t,r){for(var i=-1,u=e.length,a=t.length,l=-1,c=n.length,p=xe(u-a,0),_=d(c+p),v=!r;++l1?t[i-1]:o,a=i>2?t[2]:o;for(u=e.length>3&&typeof u=="function"?(i--,u):o,a&&Le(t[0],t[1],a)&&(u=i<3?o:u,i=1),n=ne(n);++r-1?i[u?n[a]:a]:o}}function Pu(e){return _n(function(n){var t=n.length,r=t,i=Ze.prototype.thru;for(e&&n.reverse();r--;){var u=n[r];if(typeof u!="function")throw new qe(M);if(i&&!a&&pr(u)=="wrapper")var a=new Ze([],!0)}for(r=a?r:t;++r1&&K.reverse(),_&&cl))return!1;var p=u.get(e),_=u.get(n);if(p&&_)return p==n&&_==e;var v=-1,y=!0,S=t&R?new Bn:o;for(u.set(e,n),u.set(n,e);++v1?"& ":"")+n[r],n=n.join(t>2?", ":" "),e.replace(Qo,`{ -/* [wrapped with `+n+`] */ -`)}function Qf(e){return O(e)||Kn(e)||!!(Xs&&e&&e[Xs])}function vn(e,n){var t=typeof e;return n=n??fn,!!n&&(t=="number"||t!="symbol"&&la.test(e))&&e>-1&&e%1==0&&e0){if(++n>=kt)return arguments[0]}else n=0;return e.apply(o,arguments)}}function vr(e,n){var t=-1,r=e.length,i=r-1;for(n=n===o?r:n;++t1?e[n-1]:o;return t=typeof t=="function"?(e.pop(),t):o,uo(e,t)});function oo(e){var n=s(e);return n.__chain__=!0,n}function lh(e,n){return n(e),e}function mr(e,n){return n(e)}var fh=_n(function(e){var n=e.length,t=n?e[0]:0,r=this.__wrapped__,i=function(u){return gi(u,e)};return n>1||this.__actions__.length||!(r instanceof G)||!vn(t)?this.thru(i):(r=r.slice(t,+t+(n?1:0)),r.__actions__.push({func:mr,args:[i],thisArg:o}),new Ze(r,this.__chain__).thru(function(u){return n&&!u.length&&u.push(o),u}))});function ch(){return oo(this)}function hh(){return new Ze(this.value(),this.__chain__)}function dh(){this.__values__===o&&(this.__values__=bo(this.value()));var e=this.__index__>=this.__values__.length,n=e?o:this.__values__[this.__index__++];return{done:e,value:n}}function gh(){return this}function ph(e){for(var n,t=this;t instanceof rr;){var r=eo(t);r.__index__=0,r.__values__=o,n?i.__wrapped__=r:n=r;var i=r;t=t.__wrapped__}return i.__wrapped__=e,n}function _h(){var e=this.__wrapped__;if(e instanceof G){var n=e;return this.__actions__.length&&(n=new G(this)),n=n.reverse(),n.__actions__.push({func:mr,args:[zi],thisArg:o}),new Ze(n,this.__chain__)}return this.thru(zi)}function vh(){return Su(this.__wrapped__,this.__actions__)}var mh=fr(function(e,n,t){Q.call(e,t)?++e[t]:gn(e,t,1)});function xh(e,n,t){var r=O(e)?ks:lf;return t&&Le(e,n,t)&&(n=o),r(e,C(n,3))}function yh(e,n){var t=O(e)?En:uu;return t(e,C(n,3))}var wh=Du(no),bh=Du(to);function Sh(e,n){return be(xr(e,n),1)}function Ah(e,n){return be(xr(e,n),$n)}function Eh(e,n,t){return t=t===o?1:P(t),be(xr(e,n),t)}function ao(e,n){var t=O(e)?He:Ln;return t(e,C(n,3))}function lo(e,n){var t=O(e)?Ga:su;return t(e,C(n,3))}var Ih=fr(function(e,n,t){Q.call(e,t)?e[t].push(n):gn(e,t,[n])});function Ch(e,n,t,r){e=Me(e)?e:ct(e),t=t&&!r?P(t):0;var i=e.length;return t<0&&(t=xe(i+t,0)),Ar(e)?t<=i&&e.indexOf(n,t)>-1:!!i&&Vn(e,n,t)>-1}var Nh=j(function(e,n,t){var r=-1,i=typeof n=="function",u=Me(e)?d(e.length):[];return Ln(e,function(a){u[++r]=i?Ue(n,a,t):Et(a,n,t)}),u}),Lh=fr(function(e,n,t){gn(e,t,n)});function xr(e,n){var t=O(e)?ue:hu;return t(e,C(n,3))}function Rh(e,n,t,r){return e==null?[]:(O(n)||(n=n==null?[]:[n]),t=r?o:t,O(t)||(t=t==null?[]:[t]),_u(e,n,t))}var Th=fr(function(e,n,t){e[t?0:1].push(n)},function(){return[[],[]]});function Mh(e,n,t){var r=O(e)?ni:Fs,i=arguments.length<3;return r(e,C(n,4),t,i,Ln)}function Oh(e,n,t){var r=O(e)?Ka:Fs,i=arguments.length<3;return r(e,C(n,4),t,i,su)}function Dh(e,n){var t=O(e)?En:uu;return t(e,br(C(n,3)))}function Ph(e){var n=O(e)?nu:Cf;return n(e)}function kh(e,n,t){(t?Le(e,n,t):n===o)?n=1:n=P(n);var r=O(e)?rf:Nf;return r(e,n)}function Wh(e){var n=O(e)?sf:Rf;return n(e)}function Uh(e){if(e==null)return 0;if(Me(e))return Ar(e)?nt(e):e.length;var n=Ce(e);return n==We||n==V?e.size:yi(e).length}function Bh(e,n,t){var r=O(e)?ti:Tf;return t&&Le(e,n,t)&&(n=o),r(e,C(n,3))}var Fh=j(function(e,n){if(e==null)return[];var t=n.length;return t>1&&Le(e,n[0],n[1])?n=[]:t>2&&Le(n[0],n[1],n[2])&&(n=[n[0]]),_u(e,be(n,1),[])}),yr=xl||function(){return we.Date.now()};function jh(e,n){if(typeof n!="function")throw new qe(M);return e=P(e),function(){if(--e<1)return n.apply(this,arguments)}}function fo(e,n,t){return n=t?o:n,n=e&&n==null?e.length:n,pn(e,Z,o,o,o,o,n)}function co(e,n){var t;if(typeof n!="function")throw new qe(M);return e=P(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=o),t}}var Ki=j(function(e,n,t){var r=W;if(t.length){var i=Cn(t,lt(Ki));r|=fe}return pn(e,r,n,t,i)}),ho=j(function(e,n,t){var r=W|le;if(t.length){var i=Cn(t,lt(ho));r|=fe}return pn(n,r,e,t,i)});function go(e,n,t){n=t?o:n;var r=pn(e,oe,o,o,o,o,o,n);return r.placeholder=go.placeholder,r}function po(e,n,t){n=t?o:n;var r=pn(e,Pe,o,o,o,o,o,n);return r.placeholder=po.placeholder,r}function _o(e,n,t){var r,i,u,a,l,c,p=0,_=!1,v=!1,y=!0;if(typeof e!="function")throw new qe(M);n=Qe(n)||0,ae(t)&&(_=!!t.leading,v="maxWait"in t,u=v?xe(Qe(t.maxWait)||0,n):u,y="trailing"in t?!!t.trailing:y);function S(ge){var rn=r,yn=i;return r=i=o,p=ge,a=e.apply(yn,rn),a}function N(ge){return p=ge,l=Rt(z,n),_?S(ge):a}function U(ge){var rn=ge-c,yn=ge-p,Po=n-rn;return v?Ie(Po,u-yn):Po}function L(ge){var rn=ge-c,yn=ge-p;return c===o||rn>=n||rn<0||v&&yn>=u}function z(){var ge=yr();if(L(ge))return K(ge);l=Rt(z,U(ge))}function K(ge){return l=o,y&&r?S(ge):(r=i=o,a)}function ze(){l!==o&&Eu(l),p=0,r=c=i=l=o}function Re(){return l===o?a:K(yr())}function Ge(){var ge=yr(),rn=L(ge);if(r=arguments,i=this,c=ge,rn){if(l===o)return N(c);if(v)return Eu(l),l=Rt(z,n),S(c)}return l===o&&(l=Rt(z,n)),a}return Ge.cancel=ze,Ge.flush=Re,Ge}var zh=j(function(e,n){return iu(e,1,n)}),Gh=j(function(e,n,t){return iu(e,Qe(n)||0,t)});function Kh(e){return pn(e,_e)}function wr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new qe(M);var t=function(){var r=arguments,i=n?n.apply(this,r):r[0],u=t.cache;if(u.has(i))return u.get(i);var a=e.apply(this,r);return t.cache=u.set(i,a)||u,a};return t.cache=new(wr.Cache||dn),t}wr.Cache=dn;function br(e){if(typeof e!="function")throw new qe(M);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function $h(e){return co(2,e)}var Hh=Mf(function(e,n){n=n.length==1&&O(n[0])?ue(n[0],Be(C())):ue(be(n,1),Be(C()));var t=n.length;return j(function(r){for(var i=-1,u=Ie(r.length,t);++i=n}),Kn=lu(function(){return arguments}())?lu:function(e){return ce(e)&&Q.call(e,"callee")&&!Ys.call(e,"callee")},O=d.isArray,od=Rs?Be(Rs):pf;function Me(e){return e!=null&&Sr(e.length)&&!mn(e)}function de(e){return ce(e)&&Me(e)}function ad(e){return e===!0||e===!1||ce(e)&&Ne(e)==Pn}var On=wl||ts,ld=Ts?Be(Ts):_f;function fd(e){return ce(e)&&e.nodeType===1&&!Tt(e)}function cd(e){if(e==null)return!0;if(Me(e)&&(O(e)||typeof e=="string"||typeof e.splice=="function"||On(e)||ft(e)||Kn(e)))return!e.length;var n=Ce(e);if(n==We||n==V)return!e.size;if(Lt(e))return!yi(e).length;for(var t in e)if(Q.call(e,t))return!1;return!0}function hd(e,n){return It(e,n)}function dd(e,n,t){t=typeof t=="function"?t:o;var r=t?t(e,n):o;return r===o?It(e,n,o,t):!!r}function Hi(e){if(!ce(e))return!1;var n=Ne(e);return n==Yn||n==Pr||typeof e.message=="string"&&typeof e.name=="string"&&!Tt(e)}function gd(e){return typeof e=="number"&&Js(e)}function mn(e){if(!ae(e))return!1;var n=Ne(e);return n==Xn||n==gt||n==Zn||n==un}function mo(e){return typeof e=="number"&&e==P(e)}function Sr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=fn}function ae(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function ce(e){return e!=null&&typeof e=="object"}var xo=Ms?Be(Ms):mf;function pd(e,n){return e===n||xi(e,n,ki(n))}function _d(e,n,t){return t=typeof t=="function"?t:o,xi(e,n,ki(n),t)}function vd(e){return yo(e)&&e!=+e}function md(e){if(nc(e))throw new T(E);return fu(e)}function xd(e){return e===null}function yd(e){return e==null}function yo(e){return typeof e=="number"||ce(e)&&Ne(e)==A}function Tt(e){if(!ce(e)||Ne(e)!=ee)return!1;var n=Xt(e);if(n===null)return!0;var t=Q.call(n,"constructor")&&n.constructor;return typeof t=="function"&&t instanceof t&&Ht.call(t)==pl}var qi=Os?Be(Os):xf;function wd(e){return mo(e)&&e>=-9007199254740991&&e<=fn}var wo=Ds?Be(Ds):yf;function Ar(e){return typeof e=="string"||!O(e)&&ce(e)&&Ne(e)==ve}function je(e){return typeof e=="symbol"||ce(e)&&Ne(e)==Ke}var ft=Ps?Be(Ps):wf;function bd(e){return e===o}function Sd(e){return ce(e)&&Ce(e)==pt}function Ad(e){return ce(e)&&Ne(e)==Bo}var Ed=gr(wi),Id=gr(function(e,n){return e<=n});function bo(e){if(!e)return[];if(Me(e))return Ar(e)?en(e):Te(e);if(mt&&e[mt])return rl(e[mt]());var n=Ce(e),t=n==We?ai:n==V?Gt:ct;return t(e)}function xn(e){if(!e)return e===0?e:0;if(e=Qe(e),e===$n||e===-1/0){var n=e<0?-1:1;return n*Hn}return e===e?e:0}function P(e){var n=xn(e),t=n%1;return n===n?t?n-t:n:0}function So(e){return e?Fn(P(e),0,ke):0}function Qe(e){if(typeof e=="number")return e;if(je(e))return qn;if(ae(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ae(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=js(e);var t=ua.test(e);return t||aa.test(e)?Fa(e.slice(2),t?2:8):sa.test(e)?qn:+e}function Ao(e){return an(e,Oe(e))}function Cd(e){return e?Fn(P(e),-9007199254740991,fn):e===0?e:0}function J(e){return e==null?"":Fe(e)}var Nd=ot(function(e,n){if(Lt(n)||Me(n)){an(n,ye(n),e);return}for(var t in n)Q.call(n,t)&&St(e,t,n[t])}),Eo=ot(function(e,n){an(n,Oe(n),e)}),Er=ot(function(e,n,t,r){an(n,Oe(n),e,r)}),Ld=ot(function(e,n,t,r){an(n,ye(n),e,r)}),Rd=_n(gi);function Td(e,n){var t=ut(e);return n==null?t:tu(t,n)}var Md=j(function(e,n){e=ne(e);var t=-1,r=n.length,i=r>2?n[2]:o;for(i&&Le(n[0],n[1],i)&&(r=1);++t1),u}),an(e,Di(e),t),r&&(t=Ye(t,F|re|ie,Gf));for(var i=n.length;i--;)Ii(t,n[i]);return t});function Xd(e,n){return Co(e,br(C(n)))}var Jd=_n(function(e,n){return e==null?{}:Af(e,n)});function Co(e,n){if(e==null)return{};var t=ue(Di(e),function(r){return[r]});return n=C(n),vu(e,t,function(r,i){return n(r,i[0])})}function Qd(e,n,t){n=Tn(n,e);var r=-1,i=n.length;for(i||(i=1,e=o);++rn){var r=e;e=n,n=r}if(t||e%1||n%1){var i=Qs();return Ie(e+i*(n-e+Ba("1e-"+((i+"").length-1))),n)}return Si(e,n)}var l0=at(function(e,n,t){return n=n.toLowerCase(),e+(t?Ro(n):n)});function Ro(e){return Xi(J(e).toLowerCase())}function To(e){return e=J(e),e&&e.replace(fa,Qa).replace(La,"")}function f0(e,n,t){e=J(e),n=Fe(n);var r=e.length;t=t===o?r:Fn(P(t),0,r);var i=t;return t-=n.length,t>=0&&e.slice(t,i)==n}function c0(e){return e=J(e),e&&Ko.test(e)?e.replace(os,Va):e}function h0(e){return e=J(e),e&&Xo.test(e)?e.replace($r,"\\$&"):e}var d0=at(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),g0=at(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),p0=Ou("toLowerCase");function _0(e,n,t){e=J(e),n=P(n);var r=n?nt(e):0;if(!n||r>=n)return e;var i=(n-r)/2;return dr(er(i),t)+e+dr(Vt(i),t)}function v0(e,n,t){e=J(e),n=P(n);var r=n?nt(e):0;return n&&r>>0,t?(e=J(e),e&&(typeof n=="string"||n!=null&&!qi(n))&&(n=Fe(n),!n&&et(e))?Mn(en(e),0,t):e.split(n,t)):[]}var A0=at(function(e,n,t){return e+(t?" ":"")+Xi(n)});function E0(e,n,t){return e=J(e),t=t==null?0:Fn(P(t),0,e.length),n=Fe(n),e.slice(t,t+n.length)==n}function I0(e,n,t){var r=s.templateSettings;t&&Le(e,n,t)&&(n=o),e=J(e),n=Er({},n,r,Fu);var i=Er({},n.imports,r.imports,Fu),u=ye(i),a=oi(i,u),l,c,p=0,_=n.interpolate||Ut,v="__p += '",y=li((n.escape||Ut).source+"|"+_.source+"|"+(_===as?ia:Ut).source+"|"+(n.evaluate||Ut).source+"|$","g"),S="//# sourceURL="+(Q.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Da+"]")+` -`;e.replace(y,function(L,z,K,ze,Re,Ge){return K||(K=ze),v+=e.slice(p,Ge).replace(ca,el),z&&(l=!0,v+=`' + -__e(`+z+`) + -'`),Re&&(c=!0,v+=`'; -`+Re+`; -__p += '`),K&&(v+=`' + -((__t = (`+K+`)) == null ? '' : __t) + -'`),p=Ge+L.length,L}),v+=`'; -`;var N=Q.call(n,"variable")&&n.variable;if(!N)v=`with (obj) { -`+v+` -} -`;else if(ta.test(N))throw new T(q);v=(c?v.replace(Fo,""):v).replace(jo,"$1").replace(zo,"$1;"),v="function("+(N||"obj")+`) { -`+(N?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(l?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+v+`return __p -}`;var U=Oo(function(){return X(u,S+"return "+v).apply(o,a)});if(U.source=v,Hi(U))throw U;return U}function C0(e){return J(e).toLowerCase()}function N0(e){return J(e).toUpperCase()}function L0(e,n,t){if(e=J(e),e&&(t||n===o))return js(e);if(!e||!(n=Fe(n)))return e;var r=en(e),i=en(n),u=zs(r,i),a=Gs(r,i)+1;return Mn(r,u,a).join("")}function R0(e,n,t){if(e=J(e),e&&(t||n===o))return e.slice(0,$s(e)+1);if(!e||!(n=Fe(n)))return e;var r=en(e),i=Gs(r,en(n))+1;return Mn(r,0,i).join("")}function T0(e,n,t){if(e=J(e),e&&(t||n===o))return e.replace(Hr,"");if(!e||!(n=Fe(n)))return e;var r=en(e),i=zs(r,en(n));return Mn(r,i).join("")}function M0(e,n){var t=bn,r=Rr;if(ae(n)){var i="separator"in n?n.separator:i;t="length"in n?P(n.length):t,r="omission"in n?Fe(n.omission):r}e=J(e);var u=e.length;if(et(e)){var a=en(e);u=a.length}if(t>=u)return e;var l=t-nt(r);if(l<1)return r;var c=a?Mn(a,0,l).join(""):e.slice(0,l);if(i===o)return c+r;if(a&&(l+=c.length-l),qi(i)){if(e.slice(l).search(i)){var p,_=c;for(i.global||(i=li(i.source,J(ls.exec(i))+"g")),i.lastIndex=0;p=i.exec(_);)var v=p.index;c=c.slice(0,v===o?l:v)}}else if(e.indexOf(Fe(i),l)!=l){var y=c.lastIndexOf(i);y>-1&&(c=c.slice(0,y))}return c+r}function O0(e){return e=J(e),e&&Go.test(e)?e.replace(us,ol):e}var D0=at(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),Xi=Ou("toUpperCase");function Mo(e,n,t){return e=J(e),n=t?o:n,n===o?tl(e)?fl(e):qa(e):e.match(n)||[]}var Oo=j(function(e,n){try{return Ue(e,o,n)}catch(t){return Hi(t)?t:new T(t)}}),P0=_n(function(e,n){return He(n,function(t){t=ln(t),gn(e,t,Ki(e[t],e))}),e});function k0(e){var n=e==null?0:e.length,t=C();return e=n?ue(e,function(r){if(typeof r[1]!="function")throw new qe(M);return[t(r[0]),r[1]]}):[],j(function(r){for(var i=-1;++ifn)return[];var t=ke,r=Ie(e,ke);n=C(n),e-=ke;for(var i=ui(r,n);++t0||n<0)?new G(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),n!==o&&(n=P(n),t=n<0?t.dropRight(-n):t.take(n-e)),t)},G.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},G.prototype.toArray=function(){return this.take(ke)},on(G.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=s[r?"take"+(n=="last"?"Right":""):n],u=r||/^find/.test(n);i&&(s.prototype[n]=function(){var a=this.__wrapped__,l=r?[1]:arguments,c=a instanceof G,p=l[0],_=c||O(a),v=function(z){var K=i.apply(s,In([z],l));return r&&y?K[0]:K};_&&t&&typeof p=="function"&&p.length!=1&&(c=_=!1);var y=this.__chain__,S=!!this.__actions__.length,N=u&&!y,U=c&&!S;if(!u&&_){a=U?a:new G(this);var L=e.apply(a,l);return L.__actions__.push({func:mr,args:[v],thisArg:o}),new Ze(L,y)}return N&&U?e.apply(this,l):(L=this.thru(v),N?r?L.value()[0]:L.value():L)})}),He(["pop","push","shift","sort","splice","unshift"],function(e){var n=Kt[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);s.prototype[e]=function(){var i=arguments;if(r&&!this.__chain__){var u=this.value();return n.apply(O(u)?u:[],i)}return this[t](function(a){return n.apply(O(a)?a:[],i)})}}),on(G.prototype,function(e,n){var t=s[n];if(t){var r=t.name+"";Q.call(st,r)||(st[r]=[]),st[r].push({name:n,func:t})}}),st[cr(o,le).name]=[{name:"wrapper",func:o}],G.prototype.clone=Ml,G.prototype.reverse=Ol,G.prototype.value=Dl,s.prototype.at=fh,s.prototype.chain=ch,s.prototype.commit=hh,s.prototype.next=dh,s.prototype.plant=ph,s.prototype.reverse=_h,s.prototype.toJSON=s.prototype.valueOf=s.prototype.value=vh,s.prototype.first=s.prototype.head,mt&&(s.prototype[mt]=gh),s},tt=cl();kn?((kn.exports=tt)._=tt,Qr._=tt):we._=tt}).call(Mt)})(Nr,Nr.exports);var Lr=Nr.exports;function ip(m=!0){I.useEffect(()=>{if(!m)return;const w=Lr.debounce(o=>{document.documentElement.style.setProperty("--mouse-x",`${o.clientX}px`),document.documentElement.style.setProperty("--mouse-y",`${o.clientY}px`)},16);return document.addEventListener("mousemove",w),()=>{w.cancel(),document.removeEventListener("mousemove",w)}},[m])}function sp(m={},w=!0){const[o,D]=I.useState(!1),[B,E]=I.useState({width:window.innerWidth/3,height:window.innerHeight,top:0});I.useCallback(Lr.debounce(q=>{o&&E(x=>{const $=window.innerWidth-q.clientX,k=Math.min(Math.max(m.minWidth||300,$),m.maxWidth||window.innerWidth*.8);return{...x,width:k}})},16),[o,m]);const M=I.useCallback(q=>{E(x=>{const $=x.height-q,k=x.top+q;return{...x,height:Math.min(Math.max(m.minHeight||300,$),m.maxHeight||window.innerHeight),top:Math.max(0,k)}})},[m]);return I.useEffect(()=>{if(!w||!o)return;const q=Lr.debounce($=>{E(k=>{const F=window.innerWidth-$.clientX,re=Math.min(Math.max(m.minWidth||300,F),m.maxWidth||window.innerWidth*.8);return{...k,width:re}})},16),x=()=>D(!1);return document.addEventListener("mousemove",q),document.addEventListener("mouseup",x),()=>{q.cancel(),document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",x)}},[o,m,w]),{isResizing:o,setIsResizing:D,dimensions:B,handleHeightResize:M}}function up(m=!0){const{state:w,dispatch:o}=is(),{activeTab:D,screenState:B}=w;I.useEffect(()=>{if(!m)return;const E=M=>{const q=D==="parameter-debug",x=D==="chat",$=!B||B.currentScreen===0;if(x||$&&q){const k=sn.canvas.selected_nodes;if(Object.keys(k??{}).length){const F=Object.values(k);o({type:"SET_SELECTED_NODE",payload:F})}else o({type:"SET_SELECTED_NODE",payload:null})}};return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[o,m,D,B])}const op=({message:m,onClose:w})=>m?h.jsxs("div",{className:"bg-gradient-to-r from-amber-50 to-amber-100 border-b border-amber-200 px-5 py-2 mt-2 relative shadow-sm",children:[h.jsxs("div",{className:"flex items-center",children:[h.jsx("div",{className:"flex-shrink-0 mr-2",children:h.jsx("svg",{className:"w-3.5 h-3.5 text-amber-600",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),h.jsx("div",{className:"text-amber-800 font-medium leading-relaxed pr-6 markdown-content",style:{fontSize:"11px"},children:h.jsx(Cg,{rehypePlugins:[[yg,{target:"_blank",rel:["noopener","noreferrer"]}]],remarkPlugins:[wg],className:"prose !text-[11px] prose-a:text-amber-700 prose-a:underline prose-a:font-medium hover:prose-a:text-amber-800",components:{a:({node:o,...D})=>h.jsx("a",{...D,className:"text-amber-700 underline hover:text-amber-800 transition-colors",style:{fontSize:"11px"}}),p:({children:o})=>h.jsx("span",{className:"inline",style:{fontSize:"11px"},children:o}),span:({children:o})=>h.jsx("span",{style:{fontSize:"11px"},children:o}),li:({children:o})=>h.jsx("li",{style:{fontSize:"11px"},children:o}),ul:({children:o})=>h.jsx("ul",{style:{fontSize:"11px"},children:o}),ol:({children:o})=>h.jsx("ol",{style:{fontSize:"11px"},children:o})},children:m})})]}),h.jsx("button",{onClick:w,className:"absolute right-2 top-1/2 -translate-y-1/2 text-amber-500 hover:text-amber-700 transition-colors p-1 rounded-full hover:bg-amber-200/50","aria-label":"Close announcement",children:h.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):null,ap=()=>{const{state:m,dispatch:w}=is(),{selectedNode:o,screenState:D}=m,B=o||[],E=wn.lazy(()=>Dt(()=>import("./ParameterDebugInterfaceNew-CuNRLSlD.js"),__vite__mapDeps([4,1,2,3,5,6,7])).then(q=>({default:q.ParameterDebugInterface}))),M=()=>{w({type:"SET_SELECTED_NODE",payload:null}),w({type:"SET_SCREEN_STATE",payload:null})};return h.jsx("div",{className:"flex-1 flex flex-col overflow-y-auto",children:h.jsx(wn.Suspense,{fallback:h.jsx("div",{children:"Loading..."}),children:h.jsx(E,{selectedNodes:B,visible:!0,onClose:M})})})},Wo=({active:m,onClick:w,children:o})=>h.jsx("button",{onClick:w,className:`px-4 py-2 font-medium text-sm transition-colors duration-200 ${m?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-blue-500 hover:border-b-2 hover:border-blue-300"}`,children:o});function lp({onClose:m,visible:w=!0,triggerUsage:o=!1,onUsageTriggered:D}){const{state:B,dispatch:E}=is(),{messages:M,installedNodes:q,loading:x,sessionId:$,selectedNode:k,activeTab:F}=B,re=I.useRef(null),[ie,pe]=I.useState(""),[R,W]=I.useState(""),[le,he]=I.useState(window.innerWidth/3),[oe,Pe]=I.useState(!1),[fe,H]=I.useState([]),[Z,Se]=I.useState("gpt-4o-mini");I.useState(window.innerHeight),I.useState(0);const[_e,bn]=I.useState(""),[Rr,kt]=I.useState(!1);ip(w&&F==="chat"),up(w);const{isResizing:ss,setIsResizing:Wt,dimensions:dt,handleHeightResize:Tr}=sp({minWidth:300,maxWidth:window.innerWidth*.8,minHeight:300,maxHeight:window.innerHeight},w);I.useEffect(()=>{re.current&&(re.current.scrollTop=re.current.scrollHeight)},[M]),I.useEffect(()=>{if(F!=="chat")return;(async()=>{const Y=await rp();console.log("[WorkflowChat] Received installed nodes:",Y.length),E({type:"SET_INSTALLED_NODES",payload:Y})})()},[F]);const $n=async A=>{try{const Y=await Ot.fetchMessages(A);E({type:"SET_MESSAGES",payload:Y})}catch(Y){console.error("Error fetching messages:",Y)}};I.useEffect(()=>{if(F!=="chat")return;let A=localStorage.getItem("sessionId");A?(E({type:"SET_SESSION_ID",payload:A}),$n(A)):(A=Ve(),E({type:"SET_SESSION_ID",payload:A}),localStorage.setItem("sessionId",A))},[F]);const fn=wn.useCallback(A=>{if(!oe)return;const Y=window.innerWidth-A.clientX,ee=Math.min(Math.max(300,Y),window.innerWidth*.8);he(ee)},[oe]),Hn=wn.useMemo(()=>Lr.debounce(fn,16),[fn]);I.useEffect(()=>(oe&&(document.addEventListener("mousemove",Hn),document.addEventListener("mouseup",An)),()=>{document.removeEventListener("mousemove",Hn),document.removeEventListener("mouseup",An),Hn.cancel()}),[oe,Hn]);const qn=A=>{pe(A.target.value)},ke=async()=>{if(E({type:"SET_LOADING",payload:!0}),ie.trim()===""&&!k||!$)return;W(ie);const A=Ve(),Y={id:Ve(),role:"user",content:ie,trace_id:A};E({type:"ADD_MESSAGE",payload:Y}),pe("");try{const ee={type:"model_select",data:[Z]};let Ae=Ve(),un=!0;for await(const Ee of Ot.streamInvokeServer($,ie,fe.map(V=>V.file),null,ee,A)){const V={id:Ae,role:"ai",content:JSON.stringify(Ee),format:Ee.format,finished:Ee.finished,name:"Assistant"};if(un)E({type:"ADD_MESSAGE",payload:V}),un=!1;else{E({type:"UPDATE_MESSAGE",payload:V});const ve=B.messages.map(Ke=>Ke.id===V.id&&!Ke.finished?V:Ke);Zn(ve)}Ee.finished&&E({type:"SET_LOADING",payload:!1})}}catch(ee){console.error("Error sending message:",ee),E({type:"SET_LOADING",payload:!1})}finally{H([])}},Mr=async A=>{if(!$)return;E({type:"SET_LOADING",payload:!0}),W(A);const Y=Ve(),ee={id:Ve(),role:"user",content:A,trace_id:Y};E({type:"ADD_MESSAGE",payload:ee});try{const Ae={type:"model_select",data:[Z]};let un=Ve(),Ee=!0;for await(const V of Ot.streamInvokeServer($,A,fe.map(ve=>ve.file),null,Ae,Y)){const ve={id:un,role:"ai",content:JSON.stringify(V),format:V.format,finished:V.finished,name:"Assistant"};if(Ee)E({type:"ADD_MESSAGE",payload:ve}),Ee=!1;else{E({type:"UPDATE_MESSAGE",payload:ve});const Ke=B.messages.map(cn=>cn.id===ve.id&&!cn.finished?ve:cn);Zn(Ke)}V.finished&&E({type:"SET_LOADING",payload:!1})}}catch(Ae){console.error("Error sending message:",Ae),E({type:"SET_LOADING",payload:!1})}finally{H([])}},Or=A=>{A.metaKey&&A.key==="Enter"&&ke()},Dr=()=>{E({type:"CLEAR_MESSAGES"});const A=B.sessionId;A&&localStorage.removeItem(`messages_${A}`),localStorage.removeItem("sessionId");const Y=Ve();E({type:"SET_SESSION_ID",payload:Y}),localStorage.setItem("sessionId",Y)},Sn=A=>{pe(A)},Dn=async(A,Y)=>{if(!$||!k)return;E({type:"SET_LOADING",payload:!0});const ee=Ve(),Ae={id:Ve(),role:"user",content:k.comfyClass||k.type,trace_id:ee};E({type:"ADD_MESSAGE",payload:Ae});try{let un=Ve(),Ee=!0;for await(const V of Ot.streamInvokeServer($,k.comfyClass||k.type,[],A,Y,ee)){const ve={id:un,role:"ai",content:JSON.stringify(V),format:V.format,finished:V.finished,name:"Assistant"};if(A&&A!==""&&(ve.metadata={intent:A}),Ee)E({type:"ADD_MESSAGE",payload:ve}),Ee=!1;else{E({type:"UPDATE_MESSAGE",payload:ve});const Ke=B.messages.map(cn=>cn.id===ve.id&&!cn.finished?ve:cn);Zn(Ke)}V.finished&&E({type:"SET_LOADING",payload:!1})}}catch(un){console.error("Error sending message:",un),E({type:"SET_LOADING",payload:!1})}},Zn=A=>{B.sessionId&&localStorage.setItem(`messages_${B.sessionId}`,JSON.stringify(A))},Pn=A=>{console.log("[WorkflowChat] Adding new message:",A);const Y=[...B.messages,A];E({type:"ADD_MESSAGE",payload:A}),Zn(Y)},An=()=>{Pe(!1)},Pr=A=>{const Y=Array.from(A).map(ee=>({id:Math.random().toString(36).substr(2,9),file:ee,preview:URL.createObjectURL(ee)}));H(ee=>[...ee,...Y])},Yn=A=>{H(Y=>Y.filter(Ae=>Ae.id!==A))};wn.useEffect(()=>()=>{fe.forEach(A=>URL.revokeObjectURL(A.preview))},[fe]),I.useEffect(()=>{o&&D&&F==="chat"&&(Dn("node_explain"),D())},[o,F]),I.useEffect(()=>{if(!w||F!=="chat")return;(async()=>{try{const Y=new Date().toDateString();if(localStorage.getItem("announcementLastShownDate")!==Y){const Ae=await Ot.fetchAnnouncement();Ae&&Ae.trim()!==""&&(bn(Ae),kt(!0),localStorage.setItem("announcementLastShownDate",Y))}}catch(Y){console.error("Error fetching announcement:",Y)}})()},[w,F]);const Xn=()=>{kt(!1)},gt=A=>{E({type:"SET_ACTIVE_TAB",payload:A})},We=wn.useMemo(()=>h.jsx(ap,{}),[]);return h.jsxs("div",{className:"fixed right-0 shadow-lg bg-white duration-200 ease-out",style:{display:w?"block":"none",width:`${dt.width}px`,height:`${dt.height}px`,top:`${dt.top}px`},children:[h.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize hover:bg-gray-300",onMouseDown:A=>{Wt(!0),A.preventDefault()}}),h.jsxs("div",{className:"flex h-full flex-col",children:[h.jsx(Kg,{onClose:m,onClear:Dr,hasMessages:M.length>0,onHeightResize:Tr,title:"ComfyUI-Copilot"}),h.jsxs("div",{className:"flex border-b border-gray-200 mt-2",children:[h.jsx(Wo,{active:F==="chat",onClick:()=>gt("chat"),children:"Chat"}),h.jsx(Wo,{active:F==="parameter-debug",onClick:()=>gt("parameter-debug"),children:"GenLab"})]}),Rr&&_e&&F==="chat"&&h.jsx(op,{message:_e,onClose:Xn}),h.jsx("div",{className:"flex-1 overflow-y-auto p-4 scroll-smooth",style:{display:F==="chat"?"block":"none"},ref:re,children:h.jsx(np,{messages:M,latestInput:R,onOptionClick:Sn,installedNodes:q,onAddMessage:Pn,loading:x})}),h.jsxs("div",{className:"border-t px-4 py-3 border-gray-200 bg-white sticky bottom-0",style:{display:F==="chat"?"block":"none"},children:[k&&h.jsx(Zg,{nodeInfo:k,onSendWithIntent:Dn,loading:x,onSendWithContent:Mr}),h.jsx(Hg,{input:ie,loading:x,onChange:qn,onSend:ke,onKeyPress:Or,onUploadImages:Pr,uploadedImages:fe,onRemoveImage:Yn,selectedModel:Z,onModelChange:Se})]}),h.jsx("div",{className:"flex-1 flex flex-col",style:{display:F==="parameter-debug"?"flex":"none"},children:We})]})]})}const xp=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"}));export{mp as g,vp as i,_p as m,pp as r,xp as w};