1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,369090,(e,t,n)=>{"use strict";var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,l=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,u=/^\s+|\s+$/g;function d(e){return e?e.replace(u,""):""}t.exports=function(e,t){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,u=1;function h(e){var t=e.match(i);t&&(n+=t.length);var r=e.lastIndexOf("\n");u=~r?e.length-r:u+e.length}function f(){var e={line:n,column:u};return function(t){return t.position=new p(e),g(l),t}}function p(e){this.start=e,this.end={line:n,column:u},this.source=t.source}function m(r){var i=Error(t.source+":"+n+":"+u+": "+r);if(i.reason=r,i.filename=t.source,i.line=n,i.column=u,i.source=e,t.silent);else throw i}function g(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function x(e){var t;for(e=e||[];t=y();)!1!==t&&e.push(t);return e}function y(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return u+=2,h(r),e=e.slice(n),u+=2,t({type:"comment",comment:r})}}p.prototype.content=e,g(l);var v,b=[];for(x(b);v=function(){var e=f(),t=g(a);if(t){if(y(),!g(o))return m("property missing ':'");var n=g(s),i=e({type:"declaration",property:d(t[0].replace(r,"")),value:n?d(n[0].replace(r,"")):""});return g(c),i}}();)!1!==v&&(b.push(v),x(b));return b}},559596,(e,t,n)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),l="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;l?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(e.r(369090))},851521,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.camelCase=void 0;var r=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,l=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},c=function(e,t){return"".concat(t,"-")};n.camelCase=function(e,t){var n;return(void 0===t&&(t={}),!(n=e)||l.test(n)||r.test(n))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,c):e.replace(a,c)).replace(i,s))}},763185,(e,t,n)=>{"use strict";var r=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(559596)),i=e.r(851521);function l(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}l.default=l,t.exports=l},975609,(e,t,n)=>{"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},s=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,n=r.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!l)return!1;for(t in e);return void 0===t||r.call(e,t)},c=function(e,t){l&&"__proto__"===t.name?l(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;else if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,l,a,d=arguments[0],h=1,f=arguments.length,p=!1;for("boolean"==typeof d&&(p=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<f;++h)if(t=arguments[h],null!=t)for(n in t)r=u(d,n),d!==(i=u(t,n))&&(p&&i&&(s(i)||(l=o(i)))?(l?(l=!1,a=r&&o(r)?r:[]):a=r&&s(r)?r:{},c(d,{name:n,newValue:e(p,a,i)})):void 0!==i&&c(d,{name:n,newValue:i}));return d}},914813,820121,470326,572731,203436,419143,624484,368864,812878,373091,849450,37665,891730,e=>{"use strict";var t=e.i(867650),n=e.i(877369),r=e.i(984661),i=e.i(94884);let l=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,180a52.06,52.06,0,0,0,52-52V64A52,52,0,0,0,76,64v64A52.06,52.06,0,0,0,128,180ZM100,64a28,28,0,0,1,56,0v64a28,28,0,0,1-56,0Zm40,155.22V240a12,12,0,0,1-24,0V219.22A92.14,92.14,0,0,1,36,128a12,12,0,0,1,24,0,68,68,0,0,0,136,0,12,12,0,0,1,24,0A92.14,92.14,0,0,1,140,219.22Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M168,64v64a40,40,0,0,1-40,40h0a40,40,0,0,1-40-40V64a40,40,0,0,1,40-40h0A40,40,0,0,1,168,64Z",opacity:"0.2"}),r.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M80,128V64a48,48,0,0,1,96,0v64a48,48,0,0,1-96,0Zm128,0a8,8,0,0,0-16,0,64,64,0,0,1-128,0,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.6A80.11,80.11,0,0,0,208,128Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,174a46.06,46.06,0,0,0,46-46V64a46,46,0,0,0-92,0v64A46.06,46.06,0,0,0,128,174ZM94,64a34,34,0,0,1,68,0v64a34,34,0,0,1-68,0Zm40,141.75V240a6,
16,0,0,1-12,0V205.75A78.09,78.09,0,0,1,50,128a6,6,0,0,1,12,0,66,66,0,0,0,132,0,6,6,0,0,1,12,0A78.09,78.09,0,0,1,134,205.75Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M128,172a44.05,44.05,0,0,0,44-44V64a44,44,0,0,0-88,0v64A44.05,44.05,0,0,0,128,172ZM92,64a36,36,0,0,1,72,0v64a36,36,0,0,1-72,0Zm40,139.89V240a4,4,0,0,1-8,0V203.89A76.09,76.09,0,0,1,52,128a4,4,0,0,1,8,0,68,68,0,0,0,136,0,4,4,0,0,1,8,0A76.09,76.09,0,0,1,132,203.89Z"}))]]),a=r.forwardRef((e,t)=>r.createElement(i.default,{ref:t,...e,weights:l}));a.displayName="MicrophoneIcon";var o=e.i(195639);let s=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),r.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z"}))]]),c=r.forwardRef((e,t)=>r.createElement(i.default,{ref:t,...e,weights:s}));c.displayName="StopIcon";var u=e.i(360112),d=e.i(75918),h=e.i(253402),f=e.i(908095),p=e.i(71631),m=e.i(1678),g=e.i(530675);let x=(0,r.createContext)("light");function y(){return(0,r.useContext)(x)}function v(e){let{orgSlug:i,onSend:l,onStop:s,autoFocus:x,placeholder:v}=e,[b,k]=(0,r.useState)(""),[w,M]=(0,r.useState)(!1),[S,C]=(0,r.useState)(!1),j=(0,g.useAssistantStore)(e=>e.isStreaming),A=(0,g.useAssistantStore)(e=>e.expertMode),N=(0,g.useAssistantStore)(e=>e.setExpertMode),E=(0,g.useAssistantStore)(e=>e.capabilities?.voice??!1),P=(0,g.useAssistantStore)(e=>e.capabilities?.expert_only??!1),L="dark"===y(),T=(0,r.useRef)(null),I=(0,r.useRef)(null),D=(0,r.useRef)([]),z=(0,r.useRef)(!1);(0,r.useEffect)(()=>(z.current=!1,()=>{z.current=!0;let e=I.current;if(e&&"inactive"!==e.state){for(let t of e.stream.getTracks())t.stop();e.stop()}}),[]),(0,r.useEffect)(()=>{let e=T.current;e&&(e.style.height="0px",e.style.height=`${Math.min(e.scrollHeight,160)}px`)},[b]),(0,r.useEffect)(()=>{x&&T.current?.focus()},[x]);let F=()=>{let e=b.trim();e&&!j&&(k(""),l(e))},R=async()=>{if(w)return void I.current?.stop();try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e,{mimeType:MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":void 0});D.current=[],t.ondataavailable=e=>{e.data.size>0&&D.current.push(e.data)},t.onstop=async()=>{for(let t of e.getTracks())t.stop();if(z.current)return;M(!1);let n=new Blob(D.current,{type:t.mimeType||"audio/webm"});if(!(n.size<1e3)){C(!0);try{let{text:e}=await p.API.assistant.transcribe(i,n);e&&k(t=>t?`${t} ${e}`:e),T.current?.focus()}catch{u.toast.error("No he entendido el audio. Prueba a dictarlo otra vez.")}finally{C(!1)}}},I.current=t,t.start(),M(!0)}catch{u.toast.error("No tengo permiso para usar el micrófono.")}};return(0,t.jsxs)("div",{className:(0,m.cn)("p-3",L?"border-t border-white/10":"border-t border-border bg-card/90 backdrop-blur"),children:[(0,t.jsxs)("div",{className:(0,m.cn)("flex items-end gap-2 p-1.5 transition-[border-color,box-shadow,background-color] duration-200 ease-out",L?"rounded-lg border border-white/15 bg-white/[0.06] focus-within:border-white/35 focus-within:bg-white/[0.09]":"rounded-2xl border border-border bg-card shadow-card focus-within:border-foreground
1/40 focus-within:shadow-[0_0_0_3px_hsl(var(--primary)/0.45)]"),children:[(0,t.jsx)(h.Textarea,{ref:T,value:b,onChange:e=>k(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),F())},placeholder:v??"Pregúntale a Pacoâ¦",rows:1,className:(0,m.cn)("min-h-[40px] max-h-[160px] resize-none border-0 bg-transparent px-2 text-sm shadow-none transition-none focus-visible:ring-0 focus-visible:ring-offset-0",L&&"text-white placeholder:text-white/45"),"aria-label":"Mensaje para Paco"}),E&&(0,t.jsxs)(f.Tooltip,{children:[(0,t.jsx)(f.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)(d.Button,{variant:w?"destructive":"ghost",size:"icon",onClick:R,disabled:S,className:(0,m.cn)("h-10 w-10 shrink-0 rounded-lg",L&&!w&&"text-white/70 hover:bg-white/10 hover:text-white"),"aria-pressed":w,children:[(0,t.jsx)(a,{className:(0,m.cn)("size-4",w&&"animate-pulse"),weight:w?"fill":"regular"}),(0,t.jsx)("span",{className:"sr-only",children:w?"Parar el dictado":"Dictar"})]})}),(0,t.jsx)(f.TooltipContent,{children:w?"Parar y transcribir":S?"Transcribiendoâ¦":"Dictar por voz"})]}),j?(0,t.jsxs)(d.Button,{size:"icon",variant:"outline",onClick:s,className:(0,m.cn)("h-10 w-10 shrink-0 rounded-lg",L&&"border-white/30 bg-transparent text-white hover:bg-white/10 hover:text-white"),title:"Parar",children:[(0,t.jsx)(c,{className:"size-4",weight:"fill"}),(0,t.jsx)("span",{className:"sr-only",children:"Parar"})]}):(0,t.jsxs)(d.Button,{size:"icon",onClick:F,disabled:!b.trim(),className:"h-10 w-10 shrink-0 rounded-lg",title:"Enviar",children:[(0,t.jsx)(o.PaperPlaneTiltIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Enviar"})]})]}),(0,t.jsxs)("div",{className:(0,m.cn)("mt-2 flex items-center justify-between text-[11px]",L?"text-white/50":"text-muted-foreground"),children:[(0,t.jsx)("span",{className:"hidden sm:inline",children:"Enter envÃa · Shift+Enter, salto de lÃnea"}),P?(0,t.jsx)("span",{}):(0,t.jsxs)("button",{type:"button",onClick:()=>N(!A),className:(0,m.cn)("flex items-center gap-1 rounded-full border px-2 py-0.5 transition-[background-color,color] duration-200 ease-out",A?"border-primary bg-primary text-primary-foreground":L?"border-white/20 text-white/70 hover:bg-white/10 hover:text-white":"border-border hover:bg-muted"),"aria-pressed":A,title:"Fuerza el modelo experto (más lento, para análisis e informes)",children:[(0,t.jsx)(n.LightningIcon,{className:"size-3",weight:A?"fill":"regular"}),"Modo experto"]})]})]})}e.s(["AssistantToneContext",0,x,"useAssistantTone",()=>y],820121),e.s(["Composer",()=>v],914813);let b="Soy Paco, tu asesor de IA.";function k(e){let t=e.trim();return t.endsWith(b)?{salute:t.slice(0,-b.length).trim(),signature:b}:{salute:t,signature:null}}e.s(["SIGNATURE",0,b,"splitGreeting",()=>k],470326);function w(e){return e-Math.floor(e)}function M(e,t){let n=Math.floor(e),r=Math.floor(t),i=e-n,l=t-r;i=i*i*(3-2*i),l=l*l*(3-2*l);let a=S(n,r),o=S(n+1,r),s=S(n,r+1);return a+(o-a)*i+(s-a)*l+(a-o-s+S(n+1,r+1))*i*l}function S(e,t){let n=43758.5453*Math.sin(12.9898*e+78.233*t);return n-Math.floor(n)}function C(e,t){let n=1-2*(e+.5)/t,r=Math.sqrt(1-n*n),i=Math.PI*(3-Math.sqrt(5))*e;return[r*Math.cos(i),n,r*Math.sin(i)]}function j(e,t,n,r,i){let l=Math.sin(t),a=Math.cos(t),o=Math.sin(e),s=Math.cos(e);return(e,t,c)=>{let u=-e*o+c*s;return[n+(e*s+c*o)*i,r-(t*a-u*l)*i,t*l+u*a]}}function A(e,t,n,r){if(!r){let r=Math.round((n?1-e:e)*255);return`rgba(${r},${r},${r},${t})`}let i=t=>Math.round(n?t*(1-e):t+(255-t)*e);return`rgba(${i(r.r)},${i(r.g)},${i(r.b)},${t})`}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.3,r=[];for(let t of e)(t.a??1)<.02||(t.r=Math.max(n,t.r),r.push(t));return r.sort((e,t)=>e.z-t.z),{dots:r,lines:t.filter(e=>(e.a??1)>=.02)}}function E(e,t,n,r){t.lines.length&&function(e,t,n,r){for(let i of t){let t=i.a??1;e.strokeStyle=A(Math.min(1,Math.max(0,i.white)),t,n,r),e.lineWidth=i.w,e.beginPath(),e.moveTo(i.x1,i.y1),e.lineTo(i.x2,i.y2),e.stroke()}}(e,t.lines,n,r),function(e,t,n){arguments.length>3&&void 0!==arguments[3]&&arguments[3];let r=arguments.length>4?arguments[4]:void 0;for(let i of t){let t=i.a??1;e.fillStyle=A(Math.min(1,Math.max(0,i.white)),t,n,r),e.beginPath(),e.arc(i.x,i.y,i.r,0,2*Math.PI),e.fill()}}(e,t.dots,n,.3,r)}function P(e,t){return(e/300)**t}let L=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],T=["orbitN","ghostN","nodeN","strandN","signals"],I=["iconD"],D=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","
1nodeR","nodeRDepth"];function z(e,t){let n={...e},r=new Set,i=Math.sqrt(t);for(let[e,t]of L){let l=n[e],a=n[t];null==l||null==a||r.has(e)||r.has(t)||(n[e]=Math.max(2,Math.round(l*i)),n[t]=Math.max(2,Math.round(a*i)),r.add(e),r.add(t))}for(let e of T){let i=n[e];null==i||0===i||r.has(e)||(n[e]=Math.max(1,Math.round(i*t)))}for(let e of I){let r=n[e];null!=r&&(n[e]=Math.max(.02,r*t))}return n}function F(e,t){let n={...e};for(let e of D){let r=n[e];null!=r&&(n[e]=r*t)}return n.rSizeMul=(n.rSizeMul??1)*t,n}let R={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}};function O(e){let t=e.length,n=[],r=0;for(let i=0;i<t;i++){let l=e[i],a=e[(i+1)%t],o=Math.hypot(a[0]-l[0],a[1]-l[1]);n.push(o),r+=o}return i=>{let l=i*r,a=0;for(;l>n[a]&&a<t-1;)l-=n[a],a++;let o=e[a],s=e[(a+1)%t],c=n[a]?Math.min(1,l/n[a]):0;return[o[0]+(s[0]-o[0])*c,o[1]+(s[1]-o[1])*c]}}let _=[e=>{let t=-Math.PI/2+2*e*Math.PI;return[.24*Math.cos(t),.24*Math.sin(t)]},O([[0,-.26],[.24,.16],[-.24,.16]]),O([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]])],H=(e,t,n)=>{let r=e/2*.78,i=n.spin??1,l=j(.1*t*i,.3,e/2,e/2,1),a=P(e,n.rsPow??.6),o=[],s=n.ghostN??150;for(let e=0;e<s;e++){let t=C(e,s),[n,i,c]=l(t[0]*r,t[1]*r,t[2]*r),u=(c/r+1)/2;o.push({x:n,y:i,z:c,r:.8*a,white:.78,a:.1+.22*u})}let c=.24*t*i,u=n.faceOn?-.3:.55+.3*Math.sin(.18*t)*i,d=Math.cos(c),h=Math.sin(c),f=-h*Math.sin(u),p=Math.cos(u),m=d*Math.sin(u),g=0*m-h*p,x=h*f-d*m,y=d*p-0*f,v=.23*(n.wobMul??1),b=n.faceOn?r/(1+.85*v):r,k=n.lanes??5,w=n.segs??88,M=Math.max(1,Math.round(k*(n.bandMul??1)));for(let e=0;e<M;e++){let i=(e-(M-1)/2)*.075,s=Math.abs(e-(M-1)/2)/Math.max(1,(M-1)/2);for(let c=0;c<w;c++){let u=c/w*2*Math.PI,v=(.16*Math.sin(3*u-1.7*t+.22*e)+.07*Math.sin(5*u+1.1*t))*(n.wobMul??1),k=n.faceOn?1+v:1,M=n.faceOn?i:i+v,S=d*Math.cos(u)+f*Math.sin(u)+g*M,C=0*Math.cos(u)+p*Math.sin(u)+x*M,j=h*Math.cos(u)+m*Math.sin(u)+y*M,A=Math.sqrt(S*S+C*C+j*j),N=b*k,[E,P,L]=l(S/A*N,C/A*N,j/A*N),T=(L/r+1)/2;o.push({x:E,y:P,z:L,r:((n.rBase??1.1)+(n.rDepth??1.7)*T)*(1-.25*s)*a,white:.52-.44*T+.18*s,a:.4+.6*T})}}return N(o,[],n.rMin)},V={orbits:(e,t,n)=>{let r=e/2*.82,i=j(.12*t,.3,e/2,e/2,1),l=P(e,n.rsPow??.6),a=[],o=n.orbitN??12,s=n.ghostN??40,c=n.particles??3;for(let e=0;e<o;e++){let o=S(e,1.7),u=S(e,5.2),d=S(e,8.9),h=r*(.45+.52*o),f=2*o*Math.PI,p=Math.acos(2*u-1),m=Math.sin(p)*Math.cos(f),g=Math.cos(p),x=Math.sin(p)*Math.sin(f),y=-g,v=m,b=Math.max(1e-6,Math.sqrt(y*y+v*v));y/=b;let k=0*g-x*(v/=b),w=x*y-0*m,M=m*v-g*y,C=(.25+.55*d)*(d>.5?1:-1);for(let e=0;e<s;e++){let t=e/s*2*Math.PI,[r,o,c]=i((y*Math.cos(t)+k*Math.sin(t))*h,(v*Math.cos(t)+w*Math.sin(t))*h,(0*Math.cos(t)+M*Math.sin(t))*h),u=(c/h+1)/2;a.push({x:r,y:o,z:c,r:(n.ghostR??.9)*l,white:.72,a:(n.ghostA??.5)*(.4+.6*u)})}for(let e=0;e<c;e++){let r=t*C+e/c*2*Math.PI+6*u,[o,s,d]=i((y*Math.cos(r)+k*Math.sin(r))*h,(v*Math.cos(r)+w*Math.sin(r))*h,(0*Math.cos(r)+M*Math.sin(r))*h),f=(d/h+1)/2;a.push({x:o,y:s,z:d,r:((n.partR??1.2)+(n.partRDepth??1.6)*f)*l,white:.3-.22*f})}}return N(a,[],n.rMin)},globe:(e,t,n)=>{let r=.4+.06*Math.sin(.35*t),i=j(.5*t,r,e/2,e/2,e/2*.82),l=t*(.5+1.2*(n.scanMul??1)),a=P(e,n.rsPow??.6),o=n.dimBase??1,s=[],c=n.latRings??17,u=n.lonDensity??44;for(let e=0;e<=c;e++){let r=-Math.PI/2+e/c*Math.PI,h=Math.cos(r),f=Math.sin(r),p=Math.max(1,Math.round(Math.abs(h)*u));for(let e=0;e<p;e++){var d;let r=e/p*2*Math.PI,[c,u,m]=i(h*Math.cos(r),f,h*Math.sin(r)),g=(m+1)/2,x=Math.atan2(Math.sin((d=r+.5*t)-l),Math.cos(d-l)),y=Math.exp(-(x*x)/.18)*Math.max(0,m);s.push({x:c,y:u,z:m,r:((n.rBase??.6)+(n.rDepth??1.7)*g+(n.rBoost??1
1)*y)*a,white:(n.inkFar??.62)-(n.inkSpan??.54)*g,a:o+(1-o)*Math.min(1,y)})}}return N(s,[],n.rMin)},rubik:(e,t,n)=>{let r=j(.55*t,.35+.1*Math.sin(.9*t),e/2,e/2,e/2*.82),i=P(e,n.rsPow??.6),l=n.moveCount??14,a=function(e){let t=[];for(let n=0;n<e;n++){let e=Math.min(2,Math.floor(3*S(n,2.3))),r=-1+.5*Math.min(3,Math.floor(4*S(n,5.9))),i=.5>S(n,7.7)?1:-1;t.push({axis:e,lo:r,hi:r+.5,ang:i*Math.PI/2})}return t}(l),o=function(e,t,n,r){let i=e%(2*t*.42+1.2),l=Array(t).fill(0),a=-1;if(i<2*t*.42){let e=Math.floor(i/.42),n=1-(1-Math.min(1,(i-.42*e)/.42/.7))**3;if(e<t){for(let t=0;t<e;t++)l[t]=1;l[e]=n,a=e}else{let r=2*t-1-e;for(let e=0;e<r;e++)l[e]=1;l[r]=1-n,a=r}}return{amount:l,active:a}}(t,l,0,0),s=[],c=n.latRings??15,u=n.lonDensity??40;for(let e=0;e<=c;e++){let t=-Math.PI/2+e/c*Math.PI,l=Math.cos(t),d=Math.sin(t),h=Math.max(1,Math.round(Math.abs(l)*u));for(let e=0;e<h;e++){let t=e/h*2*Math.PI,[c,u,f,p]=function(e,t,n){let[r,i,l]=e,a=!1;for(let e=0;e<t.length;e++){if(n.amount[e]<=0)continue;let o=t[e],s=0===o.axis?r:1===o.axis?i:l;if(s<o.lo||s>=o.hi)continue;e===n.active&&(a=!0);let c=o.ang*n.amount[e],u=Math.cos(c),d=Math.sin(c);if(0===o.axis){let e=i*u-l*d;l=i*d+l*u,i=e}else if(1===o.axis){let e=r*u+l*d;l=-r*d+l*u,r=e}else{let e=r*u-i*d;i=r*d+i*u,r=e}}return[r,i,l,a]}([l*Math.cos(t),d,l*Math.sin(t)],a,o),[m,g,x]=r(c,u,f),y=(x+1)/2;s.push({x:m,y:g,z:x,r:((n.rBase??.6)+(n.rDepth??1.7)*y+(p?n.rActive??.3:0))*i,white:(n.inkFar??.62)-(n.inkSpan??.54)*y-.14*!!p})}}return N(s,[],n.rMin)},wave:(e,t,n)=>{let r=e/2*.874,i=j(.18*t,.38,e/2,e/2,1),l=P(e,n.rsPow??.6),a=[],o=n.rings??15,s=n.lonDensity??40;for(let e=0;e<=o;e++){let c=-Math.PI/2+e/o*Math.PI,u=Math.cos(c),d=Math.sin(c),h=.62*Math.sin(2.1*t-.52*e)+.38*Math.sin(1.27*t+.83*e),f=r*(.88+.105*h),p=Math.max(1,Math.round(Math.abs(u)*s));for(let e=0;e<p;e++){let t=e/p*2*Math.PI,[o,s,c]=i(u*Math.cos(t)*f,d*f,u*Math.sin(t)*f),m=(c/r+1)/2,g=Math.max(0,h);a.push({x:o,y:s,z:c,r:((n.rBase??.6)+(n.rDepth??1.7)*m)*(1+.4*g)*l,white:.66-.56*m-.1*g})}}return N(a,[],n.rMin)},web:(e,t,n)=>{let r=e/2*.8*(n.spread??1),i=j(.12*t,.32,e/2,e/2,r),l=P(e,n.rsPow??.6),a=n.nodeN??30,o=n.thr??.72,s=n.nodeR??1.4,c=n.nodeRDepth??1.8,u=[];for(let e=0;e<a;e++){let n=C(e,a),r=n[0]+.3*(M(.31*e+9,.24*t)-.5)*2,i=n[1]+.3*(M(.53*e+27,.21*t)-.5)*2,l=n[2]+.3*(M(.77*e+55,.27*t)-.5)*2,o=Math.sqrt(r*r+i*i+l*l);u.push([r/o,i/o,l/o])}let d=[],h=[];for(let e=0;e<a;e++)for(let t=e+1;t<a;t++){let r=u[e][0]-u[t][0],a=u[e][1]-u[t][1],s=u[e][2]-u[t][2],c=Math.sqrt(r*r+a*a+s*s);if(c>=o)continue;let[h,f,p]=i(u[e][0],u[e][1],u[e][2]),[m,g,x]=i(u[t][0],u[t][1],u[t][2]),y=((p+x)/2+1)/2;d.push({x1:h,y1:f,x2:m,y2:g,white:.42,a:(1-c/o)*(.3+.55*y),w:Math.max(.6,(n.lineW??.8)*l)})}for(let e=0;e<a;e++){let[n,r,a]=i(u[e][0],u[e][1],u[e][2]),o=(a+1)/2,d=1+.25*Math.sin(1.4*t+2.7*e);h.push({x:n,y:r,z:a,r:(s+c*o)*d*l,white:.55-.45*o})}let f=n.signals??5;for(let e=0;e<f;e++){var p,m,g;let n=Math.floor(.55*t+7.31*e),r=Math.floor(S(n,3.1*e+1.7)*a),o=Math.floor(S(n,5.7*e+4.2)*a);if(r===o)continue;let d=w(.55*t+7.31*e),f=(p=u[r][0],p+(u[o][0]-p)*d),x=(m=u[r][1],m+(u[o][1]-m)*d),y=(g=u[r][2],g+(u[o][2]-g)*d),v=Math.max(1e-6,Math.sqrt(f*f+x*x+y*y)),[b,k,M]=i(f/v,x/v,y/v),C=(M+1)/2;h.push({x:b,y:k,z:M,r:(1.5*s+c*C)*l,white:.05,a:.5+.5*C})}return N(h,d,n.rMin)},braid:(e,t,n)=>{let r=e/2*.76,i=j(.4*t,.3,e/2,e/2,1),l=P(e,n.rsPow??.6),a=[],o=n.ghostN??150;for(let e=0;e<o;e++){let t=C(e,o),[n,s,c]=i(t[0]*r,t[1]*r,t[2]*r),u=(c/r+1)/2;a.push({x:n,y:s,z:c,r:.8*l,white:.78,a:.1+.22*u})}let s=n.strandN??52,c=n.turns??3;for(let e=0;e<3;e++){let o=e/3*2*Math.PI;for(let e=0;e<s;e++){let u=(2*w(e/s+.045*t)-1)*.96,d=Math.sqrt(Math.max(0,1-u*u)),h=Math.min(1,(1-Math.abs(u))/.1),f=u*Math.PI*c+o,p=1+.075*Math.sin(u*Math.PI*c*2+2*o+.8*t),m=d*r*p,[g,x,y]=i(Math.cos(f)*m,u*r*p,Math.sin(f)*m),v=(y/r+1)/2;a.push({x:g,y:x,z:y,r:((n.rBase??1.2)+(n.rDepth??1.8)*v)*l,white:.55-.45*v,a:h*(.45+.55*v)})}}return N(a,[],n.rMin)},ribbon:H,ring:H,morph:(e,t,n)=>{var r;let i=_.length,l=t%(2.3*i),a=null!=n.shape&&n.shape>=0&&n.shape<i?Math.floor(n.shape):-1,o=a>=0?a:Math.floor(l/2.3),s=a>=0?t%2.3:l-2.3*o,c=a>=0?0:s>1.4?(r=(s-1.4)/.9)*r*(3-2*r):0,u=n.spread??1,d=_[o],h=a>=0?d:_[(o+1)%i],f=[];for(let e=0;e<160;e++){let t=e/160,n=d(t),r=h(t);f.push([(n[0]+(r[0]-n[0])*c)*u,(n[1]+(r[1]-n[1])*c)*u])}let p=[],m=0;for(let e=0;e<160;e++){let t=f[e],n=f[(e+1)%160],r=Math.hypot(n[0]-t[0],n[1]-t[1]);p.push(r),m+=r}let g=Math.max(6,Math.round(34*(n.iconD??1))),x=(n.rDot??.021)*1.35*u,y=1+.02*Math.sin(3.1*s),v=[],b=e/2,k=0,w=0;for(let t=0;t<g;t++){let n=t/g*m;for(;w+p[k]<n&&k<159;)w+=p[k],k++;let r=f[k],i=f[(k+1)%160],l=p[k]?Math.min(1,(n-w)/p[k]):0,a=(r[0]+(i[0]-r[0])*l)*y,o=(r[1]+(i[1]-r[1])*l)*y;v.push({x:b+a*e,y:b+o*e,z:0,r:Math.max(.35,x*e),white:.1})}return N(v,[],n.rMin)}};Object.fromEntries(Object.entries(V).map(e=>{let[t,n]=e;return[t,(e,t,r,i,l)=>E(e,n(t,r,l),i)]}));let B={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},q={orbits:{64:{speed:1.885,count:1,size:1},32:{speed:2.9072,count:.4251,size:1.6849},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},32:{speed:2.3803,count:.1839,size:1.4769,extra:{scanMul:4.2301,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},32:{speed:1.8964,count:.1537,size:1.4951},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},32:{speed:4.1512,count:.169,size:1.3232},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},32:{speed:5.0104,count:.4942,size:1.2571},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},32:{speed:2.2234,count:.2056,size:1.2011},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},32:{speed:2.7776,count:.0969,size:.9766,extra:{spin:0,bandMul:4.49,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},32:{speed:3.5517,count:.0678,size:1.31,extra:{spin:0,bandMul:3.8265,wobMul:.4751}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},32:{speed:2.2057,count:.5937,size:.6916,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},Z=new Map,$=Object.freeze({reach:160,strength:11,deform:19,taper:1.95,curve:2.8,falloff:24,smoothing:.3,handover:.6,squash:1.2,blur:1,fadeMs:180}),U=null,W=null,K=null,X=0,Q=0,G=!1,Y="",J=0,ee=new Set,et=!1,en=0,er=0,ei=NaN,el=NaN,ea=0,eo=0,es=0,ec=null,eu=!0,ed=!1,eh=e=>Math.max(0,Math.min(1,e)),ef=e=>e.opts,ep=e=>"function"==typeof window.matchMedia&&window.matchMedia(e).matches;function em(e){eu="mouse"===e.pointerType||""===e.pointerType,ed=!1,eA++,ei=ea=e.clientX,el=eo=e.clientY,ez&&(ez=!1,eI(),eO=0,e_=0,eH=eV=NaN),ey()}function eg(){ed=!0,eF()}function ex(){ei=el=NaN,ey()}function ey(){et&&0===en&&(er=performance.now(),en=requestAnimationFrame(eG))}let ev=null,eb=null,ek=null,ew=!1,eM="thinking-orb-gravity-hide",eS=null,eC=!1,ej=new WeakMap,eA=0,eN=-1,eE=0,eP=-1;function eL(e,t){let n=document.elementFromPoint(e,t);if(!n)return!1;let r=function(e){let t=ej.get(e);if(t)return t;let n=document.documentElement,r=n.classList.contains(eM);r&&n.classList.remove(eM);let i=getComputedStyle(e).cursor;return r&&n.classList.add(eM),ej.set(e,i),i}(n);return"auto"!==r&&"default"!==r?(eT(),!1):(eC||(eS||((eS=document.createElement("style")).textContent=`html.${eM}
1, html.${eM} * { cursor: none !important; }`,document.head.appendChild(eS)),document.documentElement.classList.add(eM),eC=!0,eN=eA,eP=eE),!0)}function eT(){eC&&(document.documentElement.classList.remove(eM),eC=!1,eN=-1)}function eI(){ev&&ew&&(ev.style.display="none",ew=!1)}let eD=-1/0,ez=!1;function eF(){ez=!1,eT(),eI(),eO=0,e_=0,eH=eV=NaN}let eR={cx:0,cy:0,r:0},eO=0,e_=0,eH=NaN,eV=NaN,eB=null,eq=null,eZ=null,e$=null,eU=null,eW=0,eK=0,eX=0;function eQ(e,t,n){if(!ek||!eb||!ev||!U||!W)return;let r=U,i=ef(e),l=Math.min(3,window.devicePixelRatio||1);if(eB||(eq=(eB=document.createElement("canvas")).getContext("2d")),eZ||(e$=(eZ=document.createElement("canvas")).getContext("2d")),!eq||!e$||(K&&X===l||(K=function(e){if(!W||!U)return null;let t=document.createElement("canvas");t.width=Math.ceil(U.width*e),t.height=Math.ceil(U.height*e);let n=t.getContext("2d",{willReadFrequently:!0});return n?(n.scale(e,e),n.drawImage(W,0,0,U.width,U.height),n.getImageData(0,0,t.width,t.height)):null}(l),X=l),!K))return;if(l!==eW||r.width!==eK||r.height!==eX){eW=l,eK=r.width,eX=r.height;let e=Math.ceil((r.width+96)*l),t=Math.ceil((r.height+96)*l);eb.width=eB.width=eZ.width=e,eb.height=eB.height=eZ.height=t,eb.style.width=`${r.width+96}px`,eb.style.height=`${r.height+96}px`,eU=e$.createImageData(e,t)}let a=eb.width,o=eb.height,s=Math.pow(t,i.curve),c=1-Math.exp(-n/(.012+.14*i.smoothing));eO+=(i.strength*s-eO)*c,e_+=(i.deform*s-e_)*c;let u=eO*l,d=e_*l;if(Number.isNaN(eH))eH=eR.cx,eV=eR.cy;else{let e=1-Math.exp(-n/(.05+.6*i.handover));eH+=(eR.cx-eH)*e,eV+=(eR.cy-eV)*e}let h=48*l,f=h+r.hotX*l,p=h+r.hotY*l,m=f+(eH-ea)*l,g=p+(eV-eo)*l,x=Math.hypot(m-f,g-p)||1,y=(m-f)/x,v=(g-p)/x,b=i.falloff*l;if(i.squash>0){let e=Math.hypot(.5*r.width-r.hotX,r.height-r.hotY)||1,t=Math.max(0,-(y*((.5*r.width-r.hotX)/e)+v*((r.height-r.hotY)/e))),n=1+i.squash*t;u*=n,d*=n}let k=Math.ceil(Math.max(d,1))+4,w=Math.floor(Math.min(h,h+y*u)-k),M=Math.floor(Math.min(h,h+v*u)-k),S=Math.ceil(Math.max(h,h+y*u)+r.width*l+k),C=Math.ceil(Math.max(h,h+v*u)+r.height*l+k),j=Math.max(0,w),A=Math.max(0,M),N=Math.min(a,S)-j,E=Math.min(o,C)-A;d>.01?(!function(e,t,n,r,i,l,a){if(!K||!eU)return;let o=eU.width,s=eU.height,c=K,u=c.width,d=c.height,h=c.data,f=eU.data;f.fill(0);let p=Math.max(1,Math.hypot(u,d)),m=l-r,g=a-i,x=Math.hypot(m,g)||1,y=m/x,v=g/x,b=Math.max(0,Math.floor(n+Math.min(0,e*y)-3)),k=Math.min(o,Math.ceil(n+u+Math.max(0,e*y)+3)),w=Math.max(0,Math.floor(n+Math.min(0,e*v)-3)),M=Math.min(s,Math.ceil(n+d+Math.max(0,e*v)+3));for(let s=w;s<M;s++)for(let c=b;c<k;c++){let m=(s*o+c)*4,g=c-n,x=s-n;if(e>.01){let o=c,u=s,d=0,h=0,y=0,v=1;for(let n=0;n<7;n++)d=e*Math.pow(Math.min(1,Math.hypot(o-r,u-i)/p),t),v=Math.hypot(h=l-o,y=a-u)||1,o+=(c-d*h/v-o)*.5,u+=(s-d*y/v-u)*.5;let b=o+d*h/v-c,k=u+d*y/v-s;if(b*b+k*k>2.25){f[m]=f[m+1]=f[m+2]=f[m+3]=0;continue}g=o-n,x=u-n}let y=Math.floor(g),v=Math.floor(x);if(y<-1||v<-1||y>=u||v>=d){f[m]=f[m+1]=f[m+2]=f[m+3]=0;continue}let b=g-y,k=x-v,w=0,M=0,S=0,C=0;for(let e=0;e<4;e++){let t=y+(1&e),n=v+(e>>1);if(t<0||n<0||t>=u||n>=d)continue;let r=(n*u+t)*4,i=(1&e?b:1-b)*(e>>1?k:1-k)*h[r+3];w+=h[r]*i,M+=h[r+1]*i,S+=h[r+2]*i,C+=i}C>0?(f[m]=w/C,f[m+1]=M/C,f[m+2]=S/C,f[m+3]=C):f[m]=f[m+1]=f[m+2]=f[m+3]=0}}(d,i.taper,h,f,p,m,g),e$.putImageData(eU,0,0,j,A,N,E)):(e$.setTransform(1,0,0,1,0,0),e$.clearRect(0,0,a,o),e$.drawImage(W,h,h,r.width*l,r.height*l));let P=ek,L=eq;if(P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,a,o),P.globalAlpha=1,P.globalCompositeOperation="source-over",P.drawImage(eZ,0,0),u>.5){let e=h+r.width*l*.42,t=h+r.height*l*.5,n=b/2,a=L.createLinearGradient(e-y*n,t-v*n,e+y*n,t+v*n);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)");for(let e=10;e>=1;e--){let t=e/10;L.setTransform(1,0,0,1,0,0),L.globalCompositeOperation="source-over",L.globalAlpha=1,L.clearRect(j,A,N,E),L.drawImage(eZ,j,A,N,E,j+y*u*t,A+v*u*t,N,E),L.globalCompositeOperation="destination-in",L.fillStyle=a,L.fillRect(j,A,N,E),P.globalCompositeOperation="destination-over",P.globalAlpha=.9*Math.pow(1-t,1.6),i.blur>0&&(P.filter=`blur(${(i.blur*Math.sqrt(t)*l).toFixed(2)}px)`),P.drawImage(eB,j,A,N,E,j,A,N,E)}P.filter="none",P.globalAlpha=1,P.globalCompositeOperation="source-over"}ev.style.transform=`translate3d(${(ea-r.hotX-48).toFixed(2)}px,${(eo-r.hotY-48).toFixed(2)}px,0)`,ew||(ev.style.display="",ew=!0)}function eG(e){if(en=0,!et)return;let t=performance.now();try{!function(e){let t=Math.min(.05,Math.max(.001,(e-er)/1e3));er=e,eE++;let n=null,r=0;if(!Number.isNaN(ei)&&null===function(){if(G)return Y||"disabled by a fail-safe";if(!U)return"no pointer sprite set";if(!W)return"pointer sprite still loading";if(ep("(prefers-reduced-motion: reduce)"))return"prefers-reduced-motion is on";if(ep("(forced-colors: active)"))return"forced colours are active";if(!ep("(pointer: fine)")||!ep("(hover: hover)"))return"no fine pointer";if((window.devicePixelRatio||1)!==Q)return"display scale changed since the sprite was set â reload";
1let e=window.visualViewport;return e&&Math.abs(e.scale-1)>.001?"page is zoomed":null}()){let t=1/0;for(let e of ee){if(!e.el.isConnected)continue;let r=e.el.getBoundingClientRect();if(r.width<=0)continue;let i=r.left+r.width/2,l=r.top+r.height/2,a=Math.min(r.width,r.height)/2,o=ef(e).reach;if(ei<i-a-o||ei>i+a+o||el<l-a-o||el>l+a+o)continue;let s=Math.hypot(ei-i,el-l)-a;s<=o&&s<t&&(t=s,n=e,eR.cx=i,eR.cy=l,eR.r=a)}if(n){let i=1-Math.max(0,t)/ef(n).reach;r=i*i*(3-2*i),eD=e}}let i=ec??n,l=1-Math.exp(-(1e3*t)/((i?ef(i).fadeMs:$.fadeMs)/3));if(es+=(r-es)*l,n&&n!==ec&&(ec=n),!n&&es<.002){if(es=0,ec&&eC&&!ez&&eu&&!ed&&!Number.isNaN(ei)){if(e-eD<500){eL(ei,el)?eQ(ec,0,t):eI(),en=requestAnimationFrame(eG);return}if(ew){eT(),ez=!0,ec=null;return}}ec=null,eF();return}ec&&(es>.002&&eu&&!ed&&!Number.isNaN(ei)&&function(){if(ev)return!0;let e=document.createElement("div");e.className="thinking-orb-gravity-cursor",e.setAttribute("aria-hidden","true"),e.style.cssText="position:fixed;left:0;top:0;pointer-events:none;z-index:2147483001;will-change:transform;display:none";let t=document.createElement("canvas");t.style.display="block",e.appendChild(t),document.body.appendChild(e);let n=t.getContext("2d");return n?(ev=e,eb=t,ek=n,eW=0,!0):(e.remove(),!1)}()&&eL(ei,el)?eN===eA&&eE-eP<2&&!ew?eI():eQ(ec,es,t):es>.002&&!Number.isNaN(ei)&&eu&&!ed?eI():eF(),en=requestAnimationFrame(eG))}(e)}catch(e){G=!0,Y=`disabled after an error (${e instanceof Error?e.message:String(e)})`,eF(),ec=null,"u">typeof console&&console.warn("thinking-orbs: gravity disabled after error",e);return}let n=performance.now()-t;n>12?++J>=30&&!G&&(G=!0,Y=`disabled after slow frames (~${Math.round(n)}ms each)`,eF()):J=0}let eY={working:"Workingâ¦",searching:"Searchingâ¦",solving:"Solvingâ¦",listening:"Listeningâ¦",connecting:"Connectingâ¦",weaving:"Weavingâ¦",composing:"Composingâ¦",breathing:"Thinkingâ¦",shaping:"Shapingâ¦"};function eJ(e){let{state:n="working",size:i=64,theme:l="auto",speed:a=1,paused:o=!1,color:s,dots:c=1,dotSize:u=1,opts:d,frame:h,gravity:f,style:p,"aria-label":m,...g}=e,x=(0,r.useRef)(null),y=d?JSON.stringify(d):"",v=function(e,t){let[n,i]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{if("dark"===e)return void i(!0);if("light"===e)return void i(!1);let n=()=>{i(function(e){let t=e;for(;t;){let e=t.getAttribute("data-theme");if("dark"===e)return!0;if("light"===e)return!1;if(t.classList.contains("dark"))return!0;if(t.classList.contains("light"))return!1;t=t.parentElement}return null}(t.current)??("u"<typeof matchMedia||matchMedia("(prefers-color-scheme: dark)").matches))};n();let r="u">typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null,l=()=>n();null==r||r.addEventListener("change",l);let a=null;return"u">typeof MutationObserver&&t.current&&(a=new MutationObserver(n)).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0}),()=>{null==r||r.removeEventListener("change",l),null==a||a.disconnect()}},[e,t]),n}(l,x),b=f?JSON.stringify(f):"";(0,r.useEffect)(()=>{let e=x.current;if(e&&f)return function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=!0===t?{}:t;n.sprite&&function(e){if(e===U||(U=e,W=null,K=null,G=!1,J=0,Q="u">typeof window&&window.devicePixelRatio||1,eF(),!e||"u"<typeof Image))return;let t=new Image;t.decoding="async",t.onload=()=>{U===e&&(W=t,ey())},t.src=e.src}(n.sprite);let r={el:e,opts:{reach:Math.max(1,n.reach??$.reach),strength:Math.max(0,Math.min(64,n.strength??$.strength)),deform:Math.max(0,Math.min(32,n.deform??$.deform)),taper:Math.max(1,Math.min(4,n.taper??$.taper)),curve:Math.max(1,Math.min(4,n.curve??$.curve)),falloff:Math.max(2,Math.min(200,n.falloff??$.falloff)),smoothing:eh(n.smoothing??$.smoothing),handover:eh(n.handover??$.handover),squash:Math.max(0,Math.min(3,n.squash??$.squash)),blur:Math.max(0,Math.min(24,n.blur??$.blur)),fadeMs:Math.max(1,n.fadeMs??$.fadeMs)}};return ee.add(r),et||0===ee.size||"u"<typeof document||ep("(pointer: fine)")&&(et=!0,document.addEventListener("pointermove",em,{passive:!0}),document.addEventListener("pointerleave",ex),document.addEventListener("pointercancel",ex),document.addEventListener("keydown",eg,{passive:!0}),document.addEventListener("visibilitychange",ex),window.addEventListener("blur",ex)),ey(),()=>{ee.delete(r),ec===r&&(ec=null),0===ee.size&&queueMicrotask(()=>{0===ee.size&&et&&(et=!1,document.removeEventListener("pointermove",em),document.removeEventListener("pointerleave",ex),document.removeEventListener("pointercancel",ex),document.removeEventListener("keydown",eg),document.removeEventListener("visibilitychange",ex),window.removeEventListener("blur",ex),0!==en&&(cancelAnimationFrame(en),en=0),ec=null,es=0,eF(),ev&&(ev.remove(),ev=null,eb=null,ek=null),eS&&(eS.remove(),eS=null))})}}(e,!0===f||f)},[b]);let k=function(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>
1{if("u"<typeof matchMedia)return;let e=matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let n=e=>t(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),e}();return(0,r.useEffect)(()=>{let e=x.current;if(!e)return;let t=Math.min(2,"u">typeof devicePixelRatio&&devicePixelRatio||1);e.width=Math.round(i*t),e.height=Math.round(i*t);let r=e.getContext("2d");if(!r)return;let{mode:l,speed:f,opts:p}=function(e,t){let n=`${e}-${t}`,r=Z.get(n);if(r)return r;let i=B[e],l=q[i][t],a={...R[i]};1!==l.count&&(a=z(a,l.count)),1!==l.size&&(a=F(a,l.size)),l.extra&&(a={...a,...l.extra});let o={mode:i,speed:l.speed,opts:a};return Z.set(n,o),o}(n,i),m=1!==c?z(p,Math.max(.1,c)):p;1!==u&&(m=F(m,Math.max(.1,u))),d&&(m={...m,...d});let g=h??V[l],y=function(e){if(!e)return;let t=e.trim().match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);if(t){let e=t[1];3===e.length&&(e=e.replace(/./g,e=>e+e));let n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:255&n}}let n=e.trim().match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i);if(n)return{r:Number(n[1]),g:Number(n[2]),b:Number(n[3])}}(s),b=f*a,w=e=>{r.setTransform(t,0,0,t,0,0),r.clearRect(0,0,i,i),E(r,g(i,e,m),v,y)};if(k)return void w(.6);let M=0,S=!1,C=()=>{w(performance.now()/1e3*b),S&&(M=requestAnimationFrame(C))},j=()=>{S||o||(S=!0,M=requestAnimationFrame(C))},A=()=>{S=!1,cancelAnimationFrame(M)};w(performance.now()/1e3*b);let N=!0,P="u">typeof IntersectionObserver?new IntersectionObserver(e=>{let[t]=e;(N=t.isIntersecting)&&"hidden"!==document.visibilityState?j():A()}):null;null==P||P.observe(e);let L=()=>{"hidden"===document.visibilityState?A():N&&j()};return document.addEventListener("visibilitychange",L),P||j(),()=>{A(),null==P||P.disconnect(),document.removeEventListener("visibilitychange",L)}},[n,i,v,a,o,k,s,c,u,y,h]),(0,t.jsx)("canvas",{ref:x,role:"img","aria-label":m??eY[n],style:{width:i,height:i,display:"block",...p},...g})}let e0=/^(profit|balance|trial|aging|treasury|vat|financial|compare|unjustified|reconciliation_suggestions|casilla|tax_)/,e1=/^(make_|download_|export_)/,e2=/^(validate_|accept_|run_matching|remember|open_page)/;function e4(e){var t;return e.recording?"listening":e.isStreaming?(t=e.activeTool)?e1.test(t)?"working":e2.test(t)?"connecting":e0.test(t)?"solving":"searching":"composing":"working"}function e6(e){return(e??"").replace(/[\s.â¦]+$/u,"")}function e5(e){let{state:n="working",size:r=32,speed:i=1,paused:l=!1,glow:a=!1,theme:o="dark",scale:s=1,className:c,label:u}=e,d="light"===o,h=Math.round(r*s),f=(0,t.jsxs)("span",{className:"relative inline-flex shrink-0 items-center justify-center",style:{width:h,height:h},children:[a&&(0,t.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-[-30%] rounded-full blur-md",style:{background:d?"radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.75) 38%, hsl(var(--secondary) / 0.05) 58%, transparent 72%)":"radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(122, 112, 224, 0.18) 42%, transparent 68%)",opacity:d?1:.7}}),(0,t.jsx)(eJ,{state:n,size:r,theme:o,color:d?"#221A5E":void 0,dots:d?1.3:1,dotSize:d?1.55:1,speed:i,paused:l,"aria-label":u??"Paco",className:"relative",style:1!==s?{transform:`scale(${s})`,transformOrigin:"center"}:void 0})]});return(0,t.jsx)("span",{className:(0,m.cn)("inline-flex",c),children:f})}function e8(e){let{state:n="working",size:r=32,speed:i=1,glow:l=!0,className:a,children:o}=e;return(0,t.jsxs)("span",{className:(0,m.cn)("inline-flex max-w-full items-center gap-3 rounded-full bg-secondary py-2 pl-2 pr-5 text-white",a),children:[(0,t.jsx)(e5,{state:n,size:r,speed:i,glow:l}),o]})}function e3(){return(0,g.useAssistantStore)(e=>{let t=e.messages[e.messages.length-1],n=t&&"assistant"===t.role&&t.isStreaming?[...t.toolCalls].reverse().find(e=>void 0===e.ok):void 0;return e4({isStreaming:e.isStreaming,activeTool:n?.name??null})})}e.s(["deriveOrbState",()=>e4,"statusLine",()=>e6],572731),e.s(["OrbPill",()=>e8,"PacoOrb",()=>e5,"useLiveOrbState",()=>e3],203436);let e9=(0,r.createContext)({sendPrompt:()=>void 0,orgSlug:""});function e7(){return(0,r.useContext)(e9)}e.s(["AssistantPromptContext",0,e9,"useAssistantPrompt",()=>e7],419143);let te=/^(\d[\d.,]*)\s+(.*)$/;function tt(e){let{title:n}=e,r=te.exec(n);return r?(0,t.jsxs)("p",{className:"flex items-baseline gap-1.5",children:[(0,t.jsx)("span",{className:"financial-number font-display text-2xl font-semibold leading-none tracking-tight",children:r[1]}),(0,t.jsx)("span",{className:"font-display text-sm font-semibold tracking-tight",children:r[2]})]}):(0,t.jsx)("p",{className:"font-display text-sm font-semibold tracking-tight",children:n})}
1function tn(e){let{compact:n=!1}=e,{sendPrompt:r}=e7(),i=(0,g.useAssistantStore)(e=>e.capabilities),l=(0,g.useAssistantStore)(e=>e.insights),a=i?.user_first_name,{salute:o,signature:s}=k(l?.greeting??`Hola${a?`, ${a}`:""}. ${b}`),c=i?.scope==="portfolio"?"Toda la cartera a un mensaje de distancia.":`Preg\xfantame lo que quieras de ${i?.organization_name??"este cliente"}.`;return(0,t.jsxs)("div",{className:(0,m.cn)("px-4",n?"py-4":"py-6"),children:[(0,t.jsxs)("section",{className:(0,m.cn)("flex items-center gap-4 rounded-xl bg-secondary text-white",n?"p-4":"p-5"),children:[(0,t.jsx)(e5,{state:"working",size:n?32:64,speed:.7}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("h2",{className:(0,m.cn)("font-display tracking-tight",n?"text-lg leading-tight":"text-2xl leading-[1.1]"),children:[o,s&&(0,t.jsxs)("span",{className:"text-primary",children:[" ",s]})]}),(0,t.jsx)("p",{className:(0,m.cn)("text-white/65",n?"mt-0.5 text-xs":"mt-1 text-sm"),children:c})]})]}),l&&l.cards.length>0&&(0,t.jsx)("div",{className:(0,m.cn)("mt-3 grid gap-2.5",n?"grid-cols-1":"grid-cols-1 md:grid-cols-2"),children:l.cards.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>r(e.prompt),className:"rounded-lg border border-border bg-card p-3.5 text-left transition-colors duration-150 hover:border-foreground
1/40",children:[(0,t.jsx)(tt,{title:e.title}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.detail}),(0,t.jsx)("p",{className:"mt-2.5 text-xs font-medium",children:e.prompt})]},e.id))}),i&&i.suggestions.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:i.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>r(e),className:"rounded-full border border-border bg-card px-3 py-1.5 text-xs transition-colors duration-200 ease-out hover:border-foreground/40",children:e},e))})]})}function tr(){}function ti(){}e.s(["Greeting",()=>tn],624484);let tl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ta=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,to={};function ts(e,t){return((t||to).jsx?ta:tl).test(e)}let tc=/[ \t\n\f\r]/g;function tu(e){return""===e.replace(tc,"")}class td{constructor(e,t){this.attribute=t,this.property=e}}td.prototype.attribute="",td.prototype.booleanish=!1,td.prototype.boolean=!1,td.prototype.commaOrSpaceSeparated=!1,td.prototype.commaSeparated=!1,td.prototype.defined=!1,td.prototype.mustUseProperty=!1,td.prototype.number=!1,td.prototype.overloadedBoolean=!1,td.prototype.property="",td.prototype.spaceSeparated=!1,td.prototype.space=void 0;let th=0,tf=tb(),tp=tb(),tm=tb(),tg=tb(),tx=tb(),ty=tb(),tv=tb();function tb(){return 2**++th}e.s(["boolean",0,tf,"booleanish",0,tp,"commaOrSpaceSeparated",0,tv,"commaSeparated",0,ty,"number",0,tg,"overloadedBoolean",0,tm,"spaceSeparated",0,tx],383954);var tk=e.i(383954);let tw=Object.keys(tk);class tM extends td{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<tw.length;){const e=tw[i];!function(e,t,n){n&&(e[t]=n)}(this,tw[i],(n&tk[e])===tk[e])}}}function tS(e){return e.toLowerCase()}tM.prototype.defined=!0;let tC=/[A-Z]/g,tj=/-[a-z]/g,tA=/^data[-\w.:]+$/i;function tN(e){return"-"+e.toLowerCase()}function tE(e){return e.charAt(1).toUpperCase()}let tP={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"};class tL{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function tT(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tL(n,r,t)}function tI(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let l=new tM(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[tS(r)]=r,n[tS(l.attribute)]=r}return new tL(t,n,e.space)}tL.prototype.normal={},tL.prototype.property={},tL.prototype.space=void 0;let tD=tI({properties:{ariaActiveDescendant:null,ariaAtomic:tp,ariaAutoComplete:null,ariaBusy:tp,ariaChecked:tp,ariaColCount:tg,ariaColIndex:tg,ariaColSpan:tg,ariaControls:tx,ariaCurrent:null,ariaDescribedBy:tx,ariaDetails:null,ariaDisabled:tp,ariaDropEffect:tx,ariaErrorMessage:null,ariaExpanded:tp,ariaFlowTo:tx,ariaGrabbed:tp,ariaHasPopup:null,ariaHidden:tp,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tx,ariaLevel:tg,ariaLive:null,ariaModal:tp,ariaMultiLine:tp,ariaMultiSelectable:tp,ariaOrientation:null,ariaOwns:tx,ariaPlaceholder:null,ariaPosInSet:tg,ariaPressed:tp,ariaReadOnly:tp,ariaRelevant:null,ariaRequired:tp,ariaRoleDescription:tx,ariaRowCount:tg,ariaRowIndex:tg,ariaRowSpan:tg,ariaSelected:tp,ariaSetSize:tg,ariaSort:null,ariaValueMax:tg,ariaValueMin:tg,ariaValueNow:tg,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function tz(e,t){return t in e?e[t]:t}function tF(e,t){return tz(e,t.toLowerCase())}let tR=tI({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ty,acceptCharset:tx,accessKey:tx,action:null,allow:null,allowFullScreen:tf,allowPaymentRequest:tf,allowUserMedia:tf,alt:null,as:null,async:tf,autoCapitalize:null,autoComplete:tx,autoFocus:tf,autoPlay:tf,blocking:tx,capture:null,charSet:null,checked:tf,cite:null,className:tx,cols:tg,colSpan:null,content:null,contentEditable:tp,controls:tf,controlsList:tx,coords:tg|ty,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tf,defer:tf,dir:null,dirName:null,disabled:tf,download:tm,draggable:tp,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tf,formTarget:null,headers:tx,height:tg,hidden:tm,high:tg,href:null,hrefLang:null,htmlFor:tx,httpEquiv:tx,id:null,imageSizes:null,imageSrcSet:null,inert:tf,inputMode:null,integrity:null,is:null,isMap:tf,itemId:null,itemProp:tx,itemRef:tx,itemScope:tf,itemType:tx,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tf,low:tg,manifest:null,max:null,maxLength:tg,media:null,method:null,min:null,minLength:tg,multiple:tf,muted:tf,name:null,nonce:null,noModule:tf,noValidate:tf,onAbort:null,onAfterPrint:null,onAuxCl
1ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:tf,optimum:tg,pattern:null,ping:tx,placeholder:null,playsInline:tf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tf,referrerPolicy:null,rel:tx,required:tf,reversed:tf,rows:tg,rowSpan:tg,sandbox:tx,scope:null,scoped:tf,seamless:tf,selected:tf,shadowRootClonable:tf,shadowRootDelegatesFocus:tf,shadowRootMode:null,shape:null,size:tg,sizes:null,slot:null,span:tg,spellCheck:tp,src:null,srcDoc:null,srcLang:null,srcSet:null,start:tg,step:null,style:null,tabIndex:tg,target:null,title:null,translate:null,type:null,typeMustMatch:tf,useMap:null,value:tp,width:tg,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tx,axis:null,background:null,bgColor:null,border:tg,borderColor:null,bottomMargin:tg,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tf,declare:tf,event:null,face:null,frame:null,frameBorder:null,hSpace:tg,leftMargin:tg,link:null,longDesc:null,lowSrc:null,marginHeight:tg,marginWidth:tg,noResize:tf,noHref:tf,noShade:tf,noWrap:tf,object:null,profile:null,prompt:null,rev:null,rightMargin:tg,rules:null,scheme:null,scrolling:tp,standby:null,summary:null,text:null,topMargin:tg,valueType:null,version:null,vAlign:null,vLink:null,vSpace:tg,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:tf,disableRemotePlayback:tf,prefix:null,property:null,results:tg,security:null,unselectable:null},space:"html",transform:tF}),tO=tI({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
1-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:tv,accentHeight:tg,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:tg,amplitude:tg,arabicForm:null,ascent:tg,attributeName:null,attributeType:null,azimuth:tg,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:tg,by:null,calcMode:null,capHeight:tg,className:tx,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:tg,diffuseConstant:tg,direction:null,display:null,dur:null,divisor:tg,dominantBaseline:null,download:tf,dx:null,dy:null,edgeMode:null,editable:null,elevation:tg,enableBackground:null,end:null,event:null,exponent:tg,externalResourcesRequired:null,fill:null,fillOpacity:tg,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ty,g2:ty,glyphName:ty,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:tg,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:tg,horizOriginX:tg,horizOriginY:tg,id:null,ideographic:tg,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:tg,k:tg,k1:tg,k2:tg,k3:tg,k4:tg,kernelMatrix:tv,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:tg,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:tg,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
1Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:tg,overlineThickness:tg,paintOrder:null,panose1:null,path:null,pathLength:tg,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tx,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:tg,pointsAtY:tg,pointsAtZ:tg,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tv,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tv,rev:tv,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tv,requiredFeatures:tv,requiredFonts:tv,requiredFormats:tv,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:tg,specularExponent:tg,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:tg,strikethroughThickness:tg,string:null,stroke:null,strokeDashArray:tv,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:tg,strokeOpacity:tg,strokeWidth:null,style:null,surfaceScale:tg,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tv,tabIndex:tg,tableValues:null,target:null,targetX:tg,targetY:tg,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tv,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:tg,underlineThickness:tg,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:tg,values:null,vAlphabetic:tg,vMathematical:tg,vectorEffect:null,vHanging:tg,vIdeographic:tg,version:null,vertAdvY:tg,vertOriginX:tg,vertOriginY:tg,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:tg,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tz}),t_=tI({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),tH=tI({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tF}),tV=tI({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),tB=tT([tD,tR,t_,tH,tV],"html"),tq=tT([tD,tO,t_,tH,tV],"svg");var tZ=e.i(763185);let t$=tW("end"),tU=tW("start");function tW(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function tK(e){return e&&"object"==typeof e?"position"in e||"type"in e?tQ(e.position):"start"in e||"end"in e?tQ(e):"line"in e||"column"in e?tX(e):"":""}function tX(e){return tG(e&&e.line)+":"+tG(e&&e.column)}function tQ(e){return tX(e&&e.start)+"-"+tX(e&&e.end)}function tG(e){return e&&"number"==typeof e?e:1}class tY extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},l=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(l=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=tK(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tY.prototype.file="",tY.prototype.name="",tY.prototype.reason="",tY.prototype.message="",tY.prototype.stack="",tY.prototype.column=void 0,tY.prototype.line=void 0,tY.prototype.ancestors=void 0,tY.prototype.cause=void 0,tY.prototype.fatal=void 0,tY.prototype.place=void 0,tY.prototype.ruleId=void 0,tY.prototype.source=void 0;let tJ={}.hasOwnProperty,t0=new Map,t1=/[A-Z]/g,t2=new Set(["table","tbody","thead","tfoot","tr"]),t4=new Set(["td","th"]),t6="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function t5(e,t,n){var r,i,l,a,o,s,c,u,d;let h,f,p,m,g,x,y,v,b,k,w;return"element"===t.type?(r=e,i=t,l=n,f=h=r.schema,"svg"===i.tagName.toLowerCase()&&"html"===h.space&&(r.schema=tq),r.ancestors.push(i),p=t7(r,i.tagName,!1),m=function(e,t){let n,r,i={};for(r in t.properties)if("children"!==r&&tJ.call(t.properties,r)){let l=function(e,t,n){let r=function(e,t){let n=tS(t),r=t,i=td;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&tA.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(tj,tE);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tj.test(e)){let n=e.replace(tC,tN);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=tM}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){var i;let t;if(Array.isArray(n)&&(n=r.commaSeparated?(t={},(""===(i=n)[i.length-1]?[...i,""]:i).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,tZ.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new tY("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});
1throw t.file=e.filePath||void 0,t.url=t6+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)tJ.call(e,t)&&(n[function(e){let t=e.replace(t1,nt);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?tP[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(l){let[r,a]=l;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof a&&t4.has(t.tagName)?n=a:i[r]=a}}return n&&((i.style||(i.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),i}(r,i),g=t9(r,i),t2.has(i.tagName)&&(g=g.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&tu(e.value):tu(e))})),t8(r,m,p,i),t3(m,g),r.ancestors.pop(),r.schema=h,r.create(i,p,m,l)):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return tr("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}ne(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?(a=e,o=t,s=n,y=x=a.schema,"svg"===o.name&&"html"===x.space&&(a.schema=tq),a.ancestors.push(o),v=null===o.name?a.Fragment:t7(a,o.name,!0),b=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];tr("ExpressionStatement"===t.type);let i=t.expression;tr("ObjectExpression"===i.type);let l=i.properties[0];tr("SpreadElement"===l.type),Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ne(e,t.position);else{let i,l=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];tr("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else ne(e,t.position);else i=null===r.value||r.value;n[l]=i}return n}(a,o),k=t9(a,o),t8(a,b,v,o),t3(b,k),a.ancestors.pop(),a.schema=x,a.create(o,v,b,s)):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ne(e,t.position)}(e,t):"root"===t.type?(c=e,u=t,d=n,t3(w={},t9(c,u)),c.create(u,c.Fragment,w,d)):"text"===t.type?t.value:void 0}function t8(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function t3(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function t9(e,t){let n=[],r=-1,i=e.passKeys?new Map:t0;for(;++r<t.children.length;){let l,a=t.children[r];if(e.passKeys){let e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){let t=i.get(e)||0;l=e+"-"+t,i.set(e,t+1)}}let o=t5(e,a,l);void 0!==o&&n.push(o)}return n}function t7(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=ts(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}tr(e,"always a result"),r=e}else r=ts(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return tJ.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ne(e)}function ne(e,t){let n=new tY("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=t6+"#cannot-handle-mdx-estrees-without-createevaluater",n}function nt(e){return"-"+e.toLowerCase()}let nn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},nr={};function ni(e,t){let n=t||nr;return nl(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function nl(e,t,n){var r;if((r=e)&&"object"==typeof r){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return na(e.children,t,n)}return Array.isArray(e)?na(e,t,n):""}function na(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nl(e[i],t,n);return r.join("")}function no(e,t,n,r){let i,l=e.length,a=0;if(t=t<0?-t>l?0:l+t:t>l?l:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)(i=r.slice(a,a+1e4)).unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function ns(e,t){return e.length>0?(no(e,e.length,0,t),e):t}let nc={}.hasOwnProperty;function nu(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let r,i=(nc.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];if(l)for(r in l){nc.call(i,r)||(i[r]=[]);let e=l[r];!function(e,t){let n=-1,r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);no(e,0,0,r)}(i[r],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}let nd=nM(/[A-Za-z]/),nh=nM(/[\dA-Za-z]/),nf=nM(/[#-'*+\--9=?A-Z^-~]/);function np(e){return null!==e&&(e<32||127===e)}
1let nm=nM(/\d/),ng=nM(/[\dA-Fa-f]/),nx=nM(/[!-/:-@[-`{-~]/);function ny(e){return null!==e&&e<-2}function nv(e){return null!==e&&(e<0||32===e)}function nb(e){return -2===e||-1===e||32===e}let nk=nM(/\p{P}|\p{S}/u),nw=nM(/\s/);function nM(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function nS(e,t,n,r){let i=r?r-1:1/0,l=0;return function(r){return nb(r)?(e.enter(n),function r(a){return nb(a)&&l++<i?(e.consume(a),r):(e.exit(n),t(a))}(r)):t(r)}}let nC={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),nS(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return ny(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},nj={tokenize:function(e){let t,n,r,i=this,l=[],a=0;return o;function o(t){if(a<l.length){let n=l[a];return i.containerState=n[1],e.attempt(n[0].continuation,s,c)(t)}return c(t)}function s(e){if(a++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&x();let r=i.events.length,l=r;for(;l--;)if("exit"===i.events[l][0]&&"chunkFlow"===i.events[l][1].type){n=i.events[l][1].end;break}g(a);let o=r;for(;o<i.events.length;)i.events[o][1].end={...n},o++;return no(i.events,l+1,0,i.events.slice(r)),i.events.length=o,c(e)}return o(e)}function c(n){if(a===l.length){if(!t)return h(n);if(t.currentConstruct&&t.currentConstruct.concrete)return p(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(nA,u,d)(n)}function u(e){return t&&x(),g(a),h(e)}function d(e){return i.parser.lazy[i.now().line]=a!==l.length,r=i.now().offset,p(e)}function h(t){return i.containerState={},e.attempt(nA,f,p)(t)}function f(e){return a++,l.push([i.currentConstruct,i.containerState]),h(e)}function p(r){if(null===r){t&&x(),g(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){m(e.exit("chunkFlow"),!0),g(0),e.consume(n);return}return ny(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,i.interrupt=void 0,o):(e.consume(n),t)}(r)}function m(e,l){let o=i.sliceStream(e);if(l&&o.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(o),i.parser.lazy[e.start.line]){let e,n,l=t.events.length;for(;l--;)if(t.events[l][1].start.offset<r&&(!t.events[l][1].end||t.events[l][1].end.offset>r))return;let o=i.events.length,s=o;for(;s--;)if("exit"===i.events[s][0]&&"chunkFlow"===i.events[s][1].type){if(e){n=i.events[s][1].end;break}e=!0}for(g(a),l=o;l<i.events.length;)i.events[l][1].end={...n},l++;no(i.events,s+1,0,i.events.slice(o)),i.events.length=l}}function g(t){let n=l.length;for(;n-- >t;){let t=l[n];i.containerState=t[1],t[0].exit.call(i,e)}l.length=t}function x(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},nA={tokenize:function(e,t,n){return nS(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}},nN={partial:!0,tokenize:function(e,t,n){return function(t){return nb(t)?nS(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||ny(e)?t(e):n(e)}}};class nE{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=null==t?1/0:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&nP(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),nP(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),nP(this.right,e.reverse())}setCursor(e){if(e!==this.left.length&&(!(e>this.left.length)||0!==this.right.length)&&(!(e<0)||0!==this.left.length))if(e<this.left.length){let t=this.left.splice(e,1/0);nP(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);nP(this.left,t.reverse())}}}function nP(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function nL(e){let t,n,r,i,l,a,o,s={},c=-1,u=new nE(e);for(;++c<u.length;){for(;c in s;)c=s[c];if(t=u.get(c),c&&"chunkFlow"===t[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&((r=0)<(a=t[1]._tokenizer.events).length&&"lineEndingBlank"===a[r][1].type&&(r+=2),r<a.length&&"content"===a[r][1].type))for(;++r<a.length&&"content"!==a[r][1].type;)"chunkText"===a[r][1].type&&(a[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(s,function(e,t){let n,r,i=e.get(t)[1],l=e.get(t)[2],a=t-1,o=[],s=i._tokenizer;!s&&(s=l.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(s._c
1ontentTypeTextTrailing=!0));let c=s.events,u=[],d={},h=-1,f=i,p=0,m=0,g=[0];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),!f._tokenizer&&(n=l.sliceStream(f),f.next||n.push(null),r&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(n),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),r=f,f=f.next}for(f=i;++h<c.length;)"exit"===c[h][0]&&"enter"===c[h-1][0]&&c[h][1].type===c[h-1][1].type&&c[h][1].start.line!==c[h][1].end.line&&(m=h+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),h=g.length;h--;){let t=c.slice(g[h],g[h+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),h=-1;++h<u.length;)d[p+u[h][0]]=p+u[h][1],p+=u[h][1]-u[h][0]-1;return d}(u,c)),c=s[c],o=!0);else if(t[1]._container){for(r=c,n=void 0;r--;)if("lineEnding"===(i=u.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(u.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...u.get(n)[1].start},(l=u.slice(n,c)).unshift(t),u.splice(n,c-n+1,l))}}return no(e,0,1/0,u.slice(0)),!o}let nT={resolve:function(e){return nL(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):ny(t)?e.check(nI,l,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function l(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},nI={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),nS(e,i,"linePrefix")};function i(i){if(null===i||ny(i))return n(i);let l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},nD={tokenize:function(e){let t=this,n=e.attempt(nN,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,nS(e,e.attempt(this.parser.constructs.flow,r,e.attempt(nT,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},nz={resolveAll:n_()},nF=nO("string"),nR=nO("text");function nO(e){return{resolveAll:n_("text"===e?nH:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,l,a);return l;function l(e){return s(e)?i(e):a(e)}function a(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),o)}function o(e){return s(e)?(t.exit("data"),i(e)):(t.consume(e),o)}function s(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function n_(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function nH(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],l=t.sliceStream(i),a=l.length,o=-1,s=0;for(;a--;){let e=l[a];if("string"==typeof e){for(o=e.length;32===e.charCodeAt(o-1);)s++,o--;if(o)break;o=-1}else if(-2===e)r=!0,s++;else if(-1===e);else{a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let l={type:n===e.length||r||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:i.start._bufferIndex+o,_index:i.start._index+a,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...l.start},i.start.offset===i.end.offset?Object.assign(i,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}function nV(e){return null===e||nv(e)||nw(e)?1:nk(e)?2:void 0}function nB(e,t,n){let r=[],i=-1;for(;++i<e.length;){let l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}let nq={name:"attention",resolveAll:function(e,t){let n,r,i,l,a,o,s,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
1n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[n][1].end},h={...e[u][1].start};nZ(d,-o),nZ(h,o),l={type:o>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:o>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:h},i={type:o>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:o>1?"strong":"emphasis",start:{...l.start},end:{...a.end}},e[n][1].end={...l.start},e[u][1].start={...a.end},s=[],e[n][1].end.offset-e[n][1].start.offset&&(s=ns(s,[["enter",e[n][1],t],["exit",e[n][1],t]])),s=ns(s,[["enter",r,t],["enter",l,t],["exit",l,t],["enter",i,t]]),s=ns(s,nB(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),s=ns(s,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,s=ns(s,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,no(e,n-1,u-n+3,s),u=n+s.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=nV(i);return function(a){return n=a,e.enter("attentionSequence"),function a(o){if(o===n)return e.consume(o),a;let s=e.exit("attentionSequence"),c=nV(o),u=!c||2===c&&l||r.includes(o),d=!l||2===l&&c||r.includes(i);return s._open=!!(42===n?u:u&&(l||!d)),s._close=!!(42===n?d:d&&(c||!u)),t(o)}(a)}}};function nZ(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let n$={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return nb(t)?nS(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(n$,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return nb(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}},nU={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return nx(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},nW=document.createElement("i");function nK(e){let t="&"+e+";";nW.innerHTML=t;let n=nW.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let nX={name:"characterReference",tokenize:function(e,t,n){let r,i,l=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),r=31,i=nh,c(t))}function s(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=ng,c):(e.enter("characterReferenceValue"),r=7,i=nm,c(t))}function c(o){if(59===o&&a){let r=e.exit("characterReferenceValue");return i!==nh||nK(l.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)}return i(o)&&a++<r?(e.consume(o),c):n(o)}}},nQ={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},nG={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,l={partial:!0,tokenize:function(e,t,n){let l=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};
vendor: 11,033 bytes, line 1
1function a(t){return e.enter("codeFencedFence"),nb(t)?nS(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):s(t)}function s(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(l++,e.consume(i),t):l>=o?(e.exit("codeFencedFenceSequence"),nb(i)?nS(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||ny(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},a=0,o=0;return function(t){var l;let c;return l=t,a=(c=i.events[i.events.length-1])&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=l,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o<3?n(i):(e.exit("codeFencedFenceSequence"),nb(i)?nS(e,s,"whitespace")(i):s(i))}(l)};function s(l){return null===l||ny(l)?(e.exit("codeFencedFence"),i.interrupt?t(l):e.check(nQ,u,p)(l)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||ny(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),s(i)):nb(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nS(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(l))}function c(t){return null===t||ny(t)?s(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||ny(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),s(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function u(t){return e.attempt(l,p,d)(t)}function d(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h}function h(t){return a>0&&nb(t)?nS(e,f,"linePrefix",a+1)(t):f(t)}function f(t){return null===t||ny(t)?e.check(nQ,u,p)(t):(e.enter("codeFlowValue"),function t(n){return null===n||ny(n)?(e.exit("codeFlowValue"),f(n)):(e.consume(n),t)}(t))}function p(n){return e.exit("codeFenced"),t(n)}}},nY={name:"codeIndented",tokenize:function(e,t,n){let r=this;return function(t){return e.enter("codeIndented"),nS(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?l(n):ny(n)?e.attempt(nJ,t,l)(n):(e.enter("codeFlowValue"),function n(r){return null===r||ny(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function l(n){return e.exit("codeIndented"),t(n)}}},nJ={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):ny(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):nS(e,l,"linePrefix",5)(t)}function l(e){let l=r.events[r.events.length-1];return l&&"linePrefix"===l[1].type&&l[2].sliceSerialize(l[1],!0).length>=4?t(e):ny(e)?i(e):n(e)}}};function n0(e,t,n,r,i,l,a,o,s){let c=s||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(l),e.consume(t),e.exit(l),d):null===t||32===t||41===t||np(t)?n(t):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),p(t))};function d(n){return 62===n?(e.enter(l),e.consume(n),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(n))}function h(t){return 62===t?(e.exit("chunkString"),e.exit(o),d(t)):null===t||60===t||ny(t)?n(t):(e.consume(t),92===t?f:h)}function f(t){return 60===t||62===t||92===t?(e.consume(t),h):h(t)}function p(i){return!u&&(null===i||41===i||nv(i))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(i)):u<c&&40===i?(e.consume(i),u++,p):41===i?(e.consume(i),u--,p):null===i||32===i||40===i||np(i)?n(i):(e.consume(i),92===i?m:p)}function m(t){return 40===t||41===t||92===t?(e.consume(t),p):p(t)}}function n1(e,t,n,r,i,l){let a,o=this,s=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(l),c};function c(d){return s>999||null===d||91===d||93===d&&!a||94===d&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(d):93===d?(e.exit(l),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):ny(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||ny(t)||s++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!nb(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function n2(e,t,n,r,i,l){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,o):n(t)};function o(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(l),s(n))}function s(t){return t===a?(e.exit(l),o(a)):null===t?n(t):ny(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),nS(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||ny(t)?(e.exit("chunkString"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function n4(e,t){let n;return function r(i){return ny(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):nb(i)?nS(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function n6(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}let n5={partial:!0,tokenize:function(e,t,n){return function(t){return nv(t)?n4(e,r)(t):n(t)};function r(t){return n2(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return nb(t)?nS(e,l,"whitespace")(t):l(t)}function l(e){return null===e||ny(e)?t(e):n(e)}}},n8=["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"],n3=["pre","script","style","textarea"],n9={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(nN,t,n)}}},n7={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return ny(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},re={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&no(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,l,a=e.length,o=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){o=2;break}}else"labelEnd"===n.type&&(i=a);let s={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},u={type:"labelText",start:{...e[r+o+2][1].end},end:{...e[i-2][1].start}};return l=ns(l=[["enter",s,t],["enter",c,t]],e.slice(r+1,r+o+3)),l=ns(l,[["enter",u,t]]),l=ns(l,nB(t.parser.constructs.insideSpan.null,e.slice(r+o+4,i-3),t)),l=ns(l,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),l=ns(l,e.slice(i+1)),l=ns(l,[["exit",s,t]]),no(e,r,e.length,l),e},tokenize:function(e,t,n){let r,i,l=this,a=l.events.length;for(;a--;)if(("labelImage"===l.events[a][1].type||"labelLink"===l.events[a][1].type)&&!l.events[a][1]._balanced){r=l.events[a][1];break}return function(t){return r?r._inactive?u(t):(i=l.parser.defined.includes(n6(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o):n(t)};function o(t){return 40===t?e.attempt(rt,c,i?c:u)(t):91===t?e.attempt(rn,c,i?s:u)(t):i?c(t):u(t)}function s(t){return e.attempt(rr,c,u)(t)}function c(e){return t(e)}function u(e){return r._balanced=!0,n(e)}}},rt={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return nv(t)?n4(e,i)(t):i(t)}function i(t){return 41===t?c(t):n0(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function l(t){return nv(t)?n4(e,o)(t):c(t)}function a(e){return n(e)}function o(t){return 34===t||39===t||40===t?n2(e,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function s(t){return nv(t)?n4(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},rn={tokenize:function(e,t,n){let r=this;return function(t){return n1.call(r,e,i,l,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(n6(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function l(e){return n(e)}}},rr={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}},ri={name:"labelStartImage",resolveAll:re.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),l):n(t)}function l(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},rl={name:"labelStartLink",resolveAll:re.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},ra={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),nS(e,t,"linePrefix")}}},ro={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(l){var a;return e.enter("thematicBreak"),r=a=l,function l(a){return a===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),nb(n)?nS(e,l,"whitespace")(n):l(n))}(a)):i>=3&&(null===a||ny(a))?(e.exit("thematicBreak"),t(a)):n(a)}(a)}}},rs={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(nN,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nS(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!nb(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
1=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ru,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,nS(e,e.attempt(rs,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],l=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:nm(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(ro,n,o)(t):o(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return nm(i)&&++a<10?(e.consume(i),t):(!r.interrupt||a<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),o(i)):n(i)}(t)}return n(t)};function o(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(nN,r.interrupt?n:s,e.attempt(rc,u,c))}
1function s(e){return r.containerState.initialBlankLine=!0,l++,u(e)}function c(t){return nb(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},rc={partial:!0,tokenize:function(e,t,n){let r=this;return nS(e,function(e){let i=r.events[r.events.length-1];return!nb(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},ru={partial:!0,tokenize:function(e,t,n){let r=this;return nS(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},rd={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,l=e.length;for(;l--;)if("enter"===e[l][0]){if("content"===e[l][1].type){n=l;break}"paragraph"===e[l][1].type&&(r=l)}else"content"===e[l][1].type&&e.splice(l,1),i||"definition"!==e[l][1].type||(i=l);let a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var a;let o,s=i.events.length;for(;s--;)if("lineEnding"!==i.events[s][1].type&&"linePrefix"!==i.events[s][1].type&&"content"!==i.events[s][1].type){o="paragraph"===i.events[s][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||o)?(e.enter("setextHeadingLine"),r=t,a=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),nb(n)?nS(e,l,"lineSuffix")(n):l(n))}(a)):n(t)};function l(r){return null===r||ny(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};e.s(["attentionMarkers",0,{null:[42,95]},"contentInitial",0,{91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,n1.call(i,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function l(t){return(r=n6(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return nv(t)?n4(e,o)(t):o(t)}function o(t){return n0(e,s,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function s(t){return e.attempt(n5,c,c)(t)}function c(t){return nb(t)?nS(e,u,"whitespace")(t):u(t)}function u(l){return null===l||ny(l)?(e.exit("definition"),i.parser.defined.push(r),t(l)):n(l)}}}},"disable",0,{null:[]},"document",0,{42:rs,43:rs,45:rs,48:rs,49:rs,50:rs,51:rs,52:rs,53:rs,54:rs,55:rs,56:rs,57:rs,62:n$},"flow",0,{35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,l=3;return"whitespace"===e[3][1].type&&(l+=2),i-2>l&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(l===i-1||i-4>l&&"whitespace"===e[i-2][1].type)&&(i-=l+1===i?2:4),i>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[i][1].end},r={type:"chunkText",start:e[l][1].start,end:e[i][1].end,contentType:"text"},no(e,l,i-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var l;return e.enter("atxHeading"),l=i,e.enter("atxHeadingSequence"),function i(l){return 35===l&&r++<6?(e.consume(l),i):null===l||nv(l)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||ny(r)?(e.exit("atxHeading"),t(r)):nb(r)?nS(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||nv(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(l)):n(l)}(l)}}},42:ro,45:[rd,ro],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return t>1&&"linePrefix"===e[t-2][1].type&&(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},tokenize:function(e,t,n){let r,i,l,a,o,s=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),r=3,s.interrupt?t:T):nd(a)?(e.consume(a),l=String.fromCharCode(a),p):n(a)}function u(i){return 45===i?(e.consume(i),r=2,d):91===i?(e.consume(i),r=5,a=0,h):nd(i)?(e.consume(i),r=4,s.interrupt?t:T):n(i)}function d(r){return 45===r?(e.consume(r),s.interrupt?t:T):n(r)}function h(r){let i="CDATA[";return r===i.charCodeAt(a++)?(e.consume(r),a===i.length)?s.interrupt?t:S:h:n(r)}function f(t){return nd(t)?(e.consume(t),l=String.fromCharCode(t),p):n(t)}
1function p(a){if(null===a||47===a||62===a||nv(a)){let o=47===a,c=l.toLowerCase();return!o&&!i&&n3.includes(c)?(r=1,s.interrupt?t(a):S(a)):n8.includes(l.toLowerCase())?(r=6,o)?(e.consume(a),m):s.interrupt?t(a):S(a):(r=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(a):i?function t(n){return nb(n)?(e.consume(n),t):w(n)}(a):g(a))}return 45===a||nh(a)?(e.consume(a),l+=String.fromCharCode(a),p):n(a)}function m(r){return 62===r?(e.consume(r),s.interrupt?t:S):n(r)}function g(t){return 47===t?(e.consume(t),w):58===t||95===t||nd(t)?(e.consume(t),x):nb(t)?(e.consume(t),g):w(t)}function x(t){return 45===t||46===t||58===t||95===t||nh(t)?(e.consume(t),x):y(t)}function y(t){return 61===t?(e.consume(t),v):nb(t)?(e.consume(t),y):g(t)}function v(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,b):nb(t)?(e.consume(t),v):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||nv(n)?y(n):(e.consume(n),t)}(t)}function b(t){return t===o?(e.consume(t),o=null,k):null===t||ny(t)?n(t):(e.consume(t),b)}function k(e){return 47===e||62===e||nb(e)?g(e):n(e)}function w(t){return 62===t?(e.consume(t),M):n(t)}function M(t){return null===t||ny(t)?S(t):nb(t)?(e.consume(t),M):n(t)}function S(t){return 45===t&&2===r?(e.consume(t),N):60===t&&1===r?(e.consume(t),E):62===t&&4===r?(e.consume(t),I):63===t&&3===r?(e.consume(t),T):93===t&&5===r?(e.consume(t),L):ny(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(n9,D,C)(t)):null===t||ny(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),S)}function C(t){return e.check(n7,j,D)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return null===t||ny(t)?C(t):(e.enter("htmlFlowData"),S(t))}function N(t){return 45===t?(e.consume(t),T):S(t)}function E(t){return 47===t?(e.consume(t),l="",P):S(t)}function P(t){if(62===t){let n=l.toLowerCase();return n3.includes(n)?(e.consume(t),I):S(t)}return nd(t)&&l.length<8?(e.consume(t),l+=String.fromCharCode(t),P):S(t)}function L(t){return 93===t?(e.consume(t),T):S(t)}function T(t){return 62===t?(e.consume(t),I):45===t&&2===r?(e.consume(t),T):S(t)}function I(t){return null===t||ny(t)?(e.exit("htmlFlowData"),D(t)):(e.consume(t),I)}function D(n){return e.exit("htmlFlow"),t(n)}}},61:rd,95:ro,96:nG,126:nG},"flowInitial",0,{[-2]:nY,[-1]:nY,32:nY},"insideSpan",0,{null:[nq,nz]},"string",0,{38:nX,92:nU},"text",0,{[-5]:ra,[-4]:ra,[-3]:ra,33:ri,38:nX,42:nq,60:[{name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return nd(t)?(e.consume(t),l):64===t?n(t):o(t)}function l(t){return 43===t||45===t||46===t||nh(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,a):(43===n||45===n||46===n||nh(n))&&r++<32?(e.consume(n),t):(r=0,o(n))}(t)):o(t)}function a(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||np(r)?n(r):(e.consume(r),a)}function o(t){return 64===t?(e.consume(t),s):nf(t)?(e.consume(t),o):n(t)}function s(i){return nh(i)?function i(l){return 46===l?(e.consume(l),r=0,s):62===l?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(l),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(l){if((45===l||nh(l))&&r++<63){let n=45===l?t:i;return e.consume(l),n}return n(l)}(l)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,l,a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),s):47===t?(e.consume(t),b):63===t?(e.consume(t),y):nd(t)?(e.consume(t),w):n(t)}function s(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):nd(t)?(e.consume(t),x):n(t)}function c(t){return 45===t?(e.consume(t),h):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):ny(t)?(l=u,P(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),h):u(t)}function h(e){return 62===e?E(e):45===e?d(e):u(e)}function f(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?p:f):n(t)}function p(t){return null===t?n(t):93===t?(e.consume(t),m):ny(t)?(l=p,P(t)):(e.consume(t),p)}function m(t){return 93===t?(e.consume(t),g):p(t)}function g(t){return 62===t?E(t):93===t?(e.consume(t),g):p(t)}function x(t){return null===t||62===t?E(t):ny(t)?(l=x,P(t)):(e.consume(t),x)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):ny(t)?(l=y,P(t)):(e.consume(t),y)}function v(e){return 62===e?E(e):y(e)}function b(t){return nd(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||nh(t)?(e.consume(t),k):function t(n){return ny(n)?(l=t,P(n)):nb(n)?(e.consume(n),t):E(n)}(t)}function w(t){return 45===t||nh(t)?(e.consume(t),w):47===t||62===t||nv(t)?M(t):n(t)}function M(t){return 47===t?(e.consume(t),E):58===t||95===t||nd(t)?(e.consume(t),S):ny(t)?(l=M,P(t)):nb(t)?(e.consume(t),M):E(t)}function S(t){return 45===t||46===t||58===t||95===t||nh(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),C):ny(n)?(l=t,P(n)):nb(n)?(e.consume(n),t):M(n)}(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,j):ny(t)?(l=C,P(t)):nb(t)?(e.consume(t),C):(e.consume(t),A)}function j(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):ny(t)?(l=j,P(t)):(e.consume(t),j)}function A(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||nv(t)?M(t):(e.consume(t),A)}function N(e){return 47===e||62===e||nv(e)?M(e):n(e)}function E(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function P(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return nb(t)?nS(e,T,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):T(t)}function T(t){return e.enter("htmlTextData"),l(t)}}}],91:rl,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return ny(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},nU],93:re,95:nq,96:{name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):(t===r||"lineEnding"===e[t][1].type)&&(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,l=0;
1return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),l++,t):(e.exit("codeTextSequence"),a(n))}(t)};function a(s){return null===s?n(s):32===s?(e.enter("space"),e.consume(s),e.exit("space"),a):96===s?(i=e.enter("codeTextSequence"),r=0,function n(a){return 96===a?(e.consume(a),r++,n):r===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(a)):(i.type="codeTextData",o(a))}(s)):ny(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):(e.enter("codeTextData"),o(s))}function o(t){return null===t||32===t||96===t||ny(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),o)}}}}],119210);var rh=e.i(119210);let rf=/[\0\t\n\r]/g;function rp(e,t){let n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(65535&n)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let rm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function rg(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return rp(n.slice(t?2:1),t?16:10)}return nK(n)||e}let rx={}.hasOwnProperty;function ry(e){return{line:e.line,column:e.column,offset:e.offset}}function rv(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+tK({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+tK({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+tK({start:t.start,end:t.end})+") is still open")}function rb(e){let t=this;t.parser=function(n){var r,i;let l,a,o,s;return"object"==typeof(r={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(i=r,r=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(x),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(p),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(f),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(f,i),codeText:r(function(){return{type:"inlineCode",value:""}},i),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(m),hardBreakTrailing:r(m),htmlFlow:r(g,i),htmlFlowData:c,htmlText:r(g,i),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:i,link:r(x),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(p),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:a(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:a(),autolinkEmail:function(e){u.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){u.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:a(),characterEscapeValue:u,characterReferenceMarkerHexadecimal:h,characterReferenceMarkerNumeric:h,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=rp(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=nK(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=ry(e.end)},codeFenced:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:u,codeIndented:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:u,data:u,definition:a(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=n6(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:a(),hardBreakEscape:a(d),hardBreakTrailing:a(d),htmlFlow:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:u,htmlText:a(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:u,image:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(rm,rg),n.identifier=n6(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=ry(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
1ype)&&(c.call(this,e),u.call(this,e))},link:a(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}),listItem:a(),listOrdered:a(),listUnordered:a(),paragraph:a(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=n6(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:a(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:a(),thematicBreak:a()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(rx.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},a={stack:[r],tokenStack:[],config:t,enter:l,exit:o,buffer:i,resume:s,data:n},c=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?c.push(u):u=function(e,t,n){let r,i,l,a,o=t-1,s=-1,c=!1;for(;++o<=n;){let t=e[o];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?s++:s--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||s||l||(l=o),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!s&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===s&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=o;for(i=void 0;a--;){let t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=a}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}l&&(!i||l<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||o,0,["exit",r,t[2]]),o++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(o,0,["enter",i,t[2]]),o++,n++,l=void 0,a=!0}}}return e[t][1]._spread=c,n}(e,c.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];rx.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},a),e[u][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||rv).call(a,void 0,e[0])}for(r.position={start:ry(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ry(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){l.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function l(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ry(t.start),end:void 0}}function a(e){return function(t){e&&e.call(this,t),o.call(this,t)}}function o(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||rv).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+tK({start:e.start,end:e.end})+"): itâs not open");n.position.end=ry(e.end)}function s(){return ni(this.stack.pop())}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:ry(e.start),end:void 0},t.push(n)),this.stack.push(n)}function u(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ry(e.end)}function d(){this.data.atHardBreak=!0}function h(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function p(){return{type:"heading",depth:0,children:[]}}function m(){return{type:"break"}}function g(){return{type:"html",value:""}}function x(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(i)(function(e){for(;!nL(e););return e}((function(e){let t={constructs:nu([rh,...(e||{}).extensions||[]]),content:n(nC),defined:[],document:n(nj),flow:n(nD),lazy:{},string:n(nF),text:n(nR)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
1olumn:n&&n.column||1,offset:n&&n.offset||0},i={},l=[],a=[],o=[],s={attempt:p(function(e,t){m(e,t.from)}),check:p(f),consume:function(e){ny(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,g()):-1!==e&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=h(),c.events.push(["enter",n,c]),o.push(n),n},exit:function(e){let t=o.pop();return t.end=h(),c.events.push(["exit",t,c]),t},interrupt:p(f,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,g()},events:[],now:h,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let l,a=e[r];if("string"==typeof a)l=a;else switch(a){case -5:l="\r";break;case -4:l="\n";break;case -3:l="\r\n";break;case -2:l=t?" ":" ";break;case -1:if(!t&&n)continue;l=" ";break;default:l=String.fromCharCode(a)}n=-2===a,i.push(l)}return i.join("")}(d(e),t)},sliceStream:d,write:function(e){return(a=ns(a,e),function(){let e;for(;r._index<a.length;){let n=a[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),u=u(t)}else u=u(n)}}(),null!==a[a.length-1])?[]:(m(t,0),c.events=nB(l,c.events,c),c.events)}},u=t.tokenize.call(c,s);return t.resolveAll&&l.push(t),c;function d(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;if(r===l)n=[e[r].slice(i,a)];else{if(n=e.slice(r,l),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}a>0&&n.push(e[l].slice(0,a))}return n}(a,e)}function h(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:l}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:l}}function f(e,t){t.restore()}function p(e,t){return function(n,i,l){var a;let u,d,f,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(a=n,function(e){let t=null!==e&&a[e],n=null!==e&&a.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(u=e,d=0,0===e.length)?l:x(e[d])}function x(e){return function(n){let i,l,a,u,d;return(i=h(),l=c.previous,a=c.currentConstruct,u=c.events.length,d=Array.from(o),p={from:u,restore:function(){r=i,c.previous=l,c.currentConstruct=a,c.events.length=u,o=d,g()}},f=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?v(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,s,y,v)(n)}}function y(t){return e(f,p),i}function v(e){return(p.restore(),++d<u.length)?x(u[d]):l}}}function m(e,t){e.resolveAll&&!l.includes(e)&&l.push(e),e.resolve&&no(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function g(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(i).document().write((a=1,o="",s=!0,function(e,t,n){let r,i,c,u,d,h=[];for(e=o+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),c=0,o="",s&&(65279===e.charCodeAt(0)&&c++,s=void 0);c<e.length;){if(rf.lastIndex=c,u=(r=rf.exec(e))&&void 0!==r.index?r.index:e.length,d=e.charCodeAt(u),!r){o=e.slice(c);break}if(10===d&&c===u&&l)h.push(-3),l=void 0;else switch(l&&(h.push(-5),l=void 0),c<u&&(h.push(e.slice(c,u)),a+=u-c),d){case 0:h.push(65533),a++;break;case 9:for(i=4*Math.ceil(a/4),h.push(-2);a++<i;)h.push(-1);break;case 10:h.push(-4),a=1;break;default:l=!0,a=1}c=u+1}return n&&(l&&h.push(-5),o&&h.push(o),h.push(null)),h})(n,r,!0))))}}let rk="object"==typeof self?self:globalThis,rw=e=>{var t;let n,r;return(t=new Map,n=(e,n)=>(t.set(n,e),e),r=i=>{if(t.has(i))return t.get(i);let[l,a]=e[i];switch(l){case 0:case -1:return n(a,i);case 1:{let e=n([],i);for(let t of a)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),i);case 4:{let{source:e,flags:t}=a;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of a)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of a)e.add(r(t));return e}case 7:{let{name:e,message:t}=a;return n(new rk[e](t),i)}case 8:return n(BigInt(a),i);
1case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new rk[l](a),i)})(0)},{toString:rM}={},{keys:rS}=Object,rC=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=rM.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},rj=e=>{let[t,n]=e;return 0===t&&("function"===n||"symbol"===n)},rA=function(e){var t,n,r;let i,l,{json:a,lossy:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=[];return(t=!(a||o),n=!!a,r=new Map,i=(e,t)=>{let n=s.push(e)-1;return r.set(t,n),n},l=e=>{if(r.has(e))return r.get(e);let[a,o]=rC(e);switch(a){case 0:{let n=e;switch(o){case"bigint":a=8,n=e.toString();break;case"function":case"symbol":if(t)throw TypeError("unable to serialize "+o);n=null;break;case"undefined":return i([-1],e)}return i([a,n],e)}case 1:{if(o){let t=e;return"DataView"===o?t=new Uint8Array(e.buffer):"ArrayBuffer"===o&&(t=new Uint8Array(e)),i([o,[...t]],e)}let t=[],n=i([a,t],e);for(let n of e)t.push(l(n));return n}case 2:{if(o)switch(o){case"BigInt":return i([o,e.toString()],e);case"Boolean":case"Number":case"String":return i([o,e.valueOf()],e)}if(n&&"toJSON"in e)return l(e.toJSON());let r=[],s=i([a,r],e);for(let n of rS(e))(t||!rj(rC(e[n])))&&r.push([l(n),l(e[n])]);return s}case 3:return i([a,e.toISOString()],e);case 4:{let{source:t,flags:n}=e;return i([a,{source:t,flags:n}],e)}case 5:{let n=[],r=i([a,n],e);for(let[r,i]of e)(t||!(rj(rC(r))||rj(rC(i))))&&n.push([l(r),l(i)]);return r}case 6:{let n=[],r=i([a,n],e);for(let r of e)(t||!rj(rC(r)))&&n.push(l(r));return r}}let{message:s}=e;return i([a,{name:o,message:s}],e)})(e),s},rN="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?rw(rA(e,t)):structuredClone(e):(e,t)=>rw(rA(e,t));function rE(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let l=e.charCodeAt(n),a="";if(37===l&&nh(e.charCodeAt(n+1))&&nh(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){let t=e.charCodeAt(n+1);l<56320&&t>56319&&t<57344?(a=String.fromCharCode(l,t),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function rP(e,t){let n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function rL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}let rT=function(e){var t,n;if(null==e)return rD;if("function"==typeof e)return rI(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=rT(e[n]);return rI(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i=-1;for(;++i<t.length;)if(t[i].apply(this,n))return!0;return!1})}(e):(t=e,rI(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,rI(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function rI(e){return function(t,n,r){return!!(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function rD(){return!0}let rz=[];function rF(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;let l=rT(i),a=r?-1:1;(function e(i,o,s){let c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){let e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){var c;let u,d,h,f=rz;if((!t||l(i,o,s[s.length-1]||void 0))&&!1===(f=Array.isArray(c=n(i,s))?c:"number"==typeof c?[!0,c]:null==c?rz:[c])[0])return f;if("children"in i&&i.children&&i.children&&"skip"!==f[0])for(d=(r?i.children.length:-1)+a,h=s.concat(i);d>-1&&d<i.children.length;){if(!1===(u=e(i.children[d],d,h)())[0])return u;d="number"==typeof u[1]?u[1]:d+a}return f}})(e,void 0,[])()}function rR(e,t,n,r){let i,l,a;"function"==typeof t&&"function"!=typeof n?(l=void 0,a=t,i=n):(l=t,a=n,i=r),rF(e,l,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},i)}function rO(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),l=i[0];l&&"text"===l.type?l.value="["+l.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function r_(e){let t=e.spread;return null==t?e.children.length>1:t}function rH(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let rV={blockquote:function(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let l={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l={type:"element",tagName:"pre",properties:{},children:[l=e.applyData(t,l)]},e.patch(t,l),l},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
1,footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=rE(i.toLowerCase()),a=e.footnoteOrder.indexOf(i),o=e.footnoteCounts.get(i);void 0===o?(o=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=a+1,o+=1,e.footnoteCounts.set(i,o);let s={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,s);let c={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rO(e,t);let i={src:rE(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,l),e.applyData(t,l)},image:function(e,t){let n={src:rE(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return rO(e,t);let i={href:rE(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let l={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)},link:function(e,t){let n={href:rE(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=r_(n[r])}return t}(n):r_(t),l={},a=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){let e=r[o];(i||0!==o||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}let s=r[r.length-1];s&&(i||"element"!==s.type||"p"!==s.tagName)&&a.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,l),e.applyData(t,l)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=tU(t.children[1]),a=t$(t.children[t.children.length-1]);l&&a&&(r.position={start:l,end:a}),i.push(r)}let l={type:"element",tagName:"table",properties:{}
1,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",l=n&&"table"===n.type?n.align:void 0,a=l?l.length:t.children.length,o=-1,s=[];for(;++o<a;){let n=t.children[o],r={},a=l?l[o]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),s.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,l=[];for(;r;)l.push(rH(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(rH(t.slice(i),i>0,!1)),l.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:rB,yaml:rB,definition:rB,footnoteDefinition:rB};function rB(){}let rq={}.hasOwnProperty,rZ={};function r$(e,t){e.position&&(t.position=function(e){let t=tU(e),n=t$(e);if(t&&n)return{start:t,end:n}}(e))}function rU(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&i&&Object.assign(n.properties,rN(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function rW(e,t){let n=[],r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function rK(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function rX(e,t){let n,r,i,l,a=(n=t||rZ,r=new Map,i=new Map,l={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=l.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=rK(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=rK(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:rU,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...rV,...n.handlers},one:function(e,t){let n=e.type,r=l.handlers[n];if(rq.call(l.handlers,n)&&r)return r(l,e,t);if(l.options.passThrough&&l.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=rN(n);return r.children=l.all(e),r}return rN(e)}return(l.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(rq.call(n,"hProperties")||rq.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(l,e,t)},options:n,patch:r$,wrap:rW},rR(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),l),o=a.one(e,void 0),s=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rP,r=e.options.footnoteBackLabel||rL,i=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[],s=-1;for(;++s<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[s]);if(!i)continue;let l=e.all(i),a=String(i.identifier).toUpperCase(),c=rE(a.toLowerCase()),u=0,d=[],h=e.footnoteCounts.get(a);for(;void 0!==h&&++u<=h;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(s,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(s,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let f=l[l.length-1];if(f&&"element"===f.type&&"p"===f.tagName){let e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else l.push(...d);let p={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(l,!0)};e.patch(i,p),o.push(p)}if(0!==o.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...rN(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)}
1,{type:"text",value:"\n"}]}}(a),c=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return s&&(tr("children"in c),c.children.push({type:"text",value:"\n"},s)),c}function rQ(e,t){return e&&"run"in e?async function(n,r){let i=rX(n,{file:r,...t});await e.run(i,r)}:function(n,r){return rX(n,{file:r,...e||t})}}function rG(e){if(e)throw e}var rY=e.i(975609);function rJ(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}let r0=function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');r6(e);let r=0,i=-1,l=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else i<0&&(n=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,o=t.length-1;for(;l--;)if(47===e.codePointAt(l)){if(n){r=l+1;break}}else a<0&&(n=!0,a=l+1),o>-1&&(e.codePointAt(l)===t.codePointAt(o--)?o<0&&(i=l):(o=-1,i=a));return r===i?i=a:i<0&&(i=e.length),e.slice(r,i)},r1=function(e){let t;if(r6(e),0===e.length)return".";let n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},r2=function(e){let t;r6(e);let n=e.length,r=-1,i=0,l=-1,a=0;for(;n--;){let o=e.codePointAt(n);if(47===o){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===o?l<0?l=n:1!==a&&(a=1):l>-1&&(a=-1)}return l<0||r<0||0===a||1===a&&l===r-1&&l===i+1?"":e.slice(l,r)},r4=function(){let e,t,n;for(var r,i=arguments.length,l=Array(i),a=0;a<i;a++)l[a]=arguments[a];let o=-1;for(;++o<l.length;)r6(l[o]),l[o]&&(e=void 0===e?l[o]:e+"/"+l[o]);return void 0===e?".":(r6(r=e),t=47===r.codePointAt(0),0!==(n=function(e,t){let n,r,i="",l=0,a=-1,o=0,s=-1;for(;++s<=e.length;){if(s<e.length)n=e.codePointAt(s);else if(47===n)break;else n=47;if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(i.length<2||2!==l||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",l=0):l=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=s,o=0;continue}}else if(i.length>0){i="",l=0,a=s,o=0;continue}}t&&(i=i.length>0?i+"/..":"..",l=2)}else i.length>0?i+="/"+e.slice(a+1,s):i=e.slice(a+1,s),l=s-a-1;a=s,o=0}else 46===n&&o>-1?o++:o=-1}return i}(r,!t)).length||t||(n="."),n.length>0&&47===r.codePointAt(r.length-1)&&(n+="/"),t?"/"+n:n)};function r6(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}function r5(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let r8=["history","path","basename","stem","extname","dirname"];class r3{constructor(e){let t,n;t=e?r5(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":"/",this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<r8.length;){const e=r8[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)r8.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?r0(this.path):void 0}set basename(e){r7(e,"basename"),r9(e,"basename"),this.path=r4(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?r1(this.path):void 0}set dirname(e){ie(this.basename,"dirname"),this.path=r4(e||"",this.basename)}get extname(){return"string"==typeof this.path?r2(this.path):void 0}set extname(e){if(r9(e,"extname"),ie(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=r4(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){r5(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!r5(e)){let t=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("file:"!==e.protocol){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),r7(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?r0(this.path,this.extname):void 0}set stem(e){r7(e,"stem"),r9(e,"stem"),this.path=r4(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new tY(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function r9(e,t){if(e&&e.includes("/"))throw Error("`"+t+"` cannot be a path: did not expect `/`")}function r7(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function ie(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}let it=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ir={}.hasOwnProperty;class ii extends it{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=function(){let e=[],t={run:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=-1,l=n.pop();if("function"!=typeof l)throw TypeError("Expected function as last argument, not "+l);!function t(r){for(var a=arguments.length,o=Array(a>1?a-1:0),s=1;s<a;s++)o[s-1]=arguments[s];let c=e[++i],u=-1;if(r)return void l(r);for(;++u<n.length;)(null===o[u]||void 0===o[u])&&(o[u]=n[u]);n=o,c?(function(e,t){let n;return function(){let t;for(var l=arguments.length,a=Array(l),o=0;o<l;o++)a[o]=arguments[o];let s=e.length>a.length;s&&a.push(r);try{t=e.apply(this,a)}catch(e){if(s&&n)throw e;return r(e)}s||(t&&t.then&&"function"==typeof t.then?t.then(i,r):t instanceof Error?r(t):i(t))};function r(e){for(var r=arguments.length,i=Array(r>1?r-1:0),l=1;l<r;l++)i[l-1]=arguments[l];n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(c,t)(...o):l(null,...o)}(null,...n)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new ii,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data((0,rY.default)(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(is("data",this.frozen),this.namespace[e]=t,this):ir.call(this.namespace,e)&&this.namespace[e]||void 0:e?(is("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=id(e),n=this.parser||this.Parser;return ia("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),ia("process",this.parser||this.Parser),io("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let l=id(e),a=n.parse(l);function o(e,n){e||!n?i(e):r?r(n):(tr(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(a,l,function(e,t,r){var i,l;if(e||!t||!r)return o(e);let a=n.stringify(t,r);"string"==typeof(i=a)||(l=i)&&"object"==typeof l&&"byteLength"in l&&"byteOffset"in l?r.value=a:r.result=a,o(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),ia("processSync",this.parser||this.Parser),io("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,rG(e),t=r}),iu("processSync","process",n),tr(t,"we either bailed on an error or have a tree"),t}
1run(e,t,n){ic(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,l){tr("function"!=typeof t,"`file` canât be a `done` anymore, we checked");let a=id(t);r.run(e,a,function(t,r,a){let o=r||e;t?l(t):i?i(o):(tr(n,"`done` is defined if `resolve` is not"),n(void 0,o,a))})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){rG(e),n=t,r=!0}),iu("runSync","run",r),tr(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=id(t),r=this.compiler||this.Compiler;return io("stringify",r),ic(e),r(e,n)}use(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=this.attachers,l=this.namespace;if(is("use",this.frozen),null==e);else if("function"==typeof e)s(e,n);else if("object"==typeof e)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(l.settings=(0,rY.default)(!0,l.settings,e.settings))}function o(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;)!function(e){if("function"==typeof e)s(e,[]);else if("object"==typeof e)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}(e[t]);else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let n=-1,r=-1;for(;++n<i.length;)if(i[n][0]===e){r=n;break}if(-1===r)i.push([e,...t]);else if(t.length>0){let[n,...l]=t,a=i[r][1];rJ(a)&&rJ(n)&&(n=(0,rY.default)(!0,a,n)),i[r]=[e,n,...l]}}}}let il=new ii().freeze();function ia(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function io(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function is(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ic(e){if(!rJ(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function iu(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function id(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new r3(e)}let ih=[],ip={allowDangerousHtml:!0},im=/^(https?|ircs?|mailto|xmpp)$/i,ig=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ix(e){var n;let r,i,l,a,o,s=(r=(n=e).rehypePlugins||ih,i=n.remarkPlugins||ih,l=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...ip}:ip,il().use(rb).use(i).use(rQ,l).use(r)),c=(a=e.children||"",o=new r3,"string"==typeof a?o.value=a:ti("Unexpected value `"+a+"` for `children` prop, expected `string`"),o);return function(e,n){let r=n.allowedElements,i=n.allowElement,l=n.components,a=n.disallowedElements,o=n.skipHtml,s=n.unwrapDisallowed,c=n.urlTransform||iy;for(let e of ig)Object.hasOwn(n,e.from)&&ti("Unexpected `"+e.from+"` prop, "+(e.to?"use `"+e.to+"` instead":"remove it")+" (see <https://github.com/remarkjs/react-markdown/blob/main/changelog.md#"+e.id+"> for more info)");return r&&a&&ti("Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other"),rR(e,function(e,t,n){if("raw"===e.type&&n&&"number"==typeof t)return o?n.children.splice(t,1):n.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in nn)if(Object.hasOwn(nn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=nn[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=c(String(n||""),t,e))}}if("element"===e.type){let l=r?!r.includes(e.tagName):!!a&&a.includes(e.tagName);if(!l&&i&&"number"==typeof t&&(l=!i(e,t,n)),l&&n&&"number"==typeof t)return s&&e.children?n.children.splice(t,1,...e.children):n.children.splice(t,1),t}}),function(e,t){var n,r,i,l;let a;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let o=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=o,r=t.jsxDEV,a=function(e,t,i,l){let a=Array.isArray(i.children),o=tU(e);return r(t,i,l,a,{columnNumber:o?o.column-1:void 0,fileName:n,lineNumber:o?o.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");
1if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,l=t.jsxs,a=function(e,t,n,r){let a=Array.isArray(n.children)?l:i;return r?a(t,n,r):a(t,n)}}let s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:o,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?tq:tB,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=t5(s,e,void 0);return c&&"string"!=typeof c?c:s.create(e,s.Fragment,{children:c||void 0},void 0)}(e,{Fragment:t.Fragment,components:l,ignoreInvalidStyle:!0,jsx:t.jsx,jsxs:t.jsxs,passKeys:!0,passNode:!0})}(s.runSync(s.parse(c),c),e)}function iy(e){let t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return -1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||im.test(e.slice(0,t))?e:""}function iv(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}e.s(["default",()=>ix],368864);let ib="phrasing",ik=["autolink","link","image","label"];function iw(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function iM(e){this.config.enter.autolinkProtocol.call(this,e)}function iS(e){this.config.exit.autolinkProtocol.call(this,e)}function iC(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];tr("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function ij(e){this.config.exit.autolinkEmail.call(this,e)}function iA(e){this.exit(e)}function iN(e){!function(e,t,n){let r=rT((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),l=-1;for(;++l<i.length;)rF(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){let e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[l][0],a=i[l][1],o=0,s=n.children.indexOf(e),c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},l=a(...d,i);if("string"==typeof l&&(l=l.length>0?{type:"text",value:l}:void 0),!1===l?r.lastIndex=n+1:(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(l)?u.push(...l):l&&u.push(l),o=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(o<e.value.length&&u.push({type:"text",value:e.value.slice(o)}),n.children.splice(s,1,...u)):u=[e],s+u.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,iE],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,iP]],{ignore:["link","linkReference"]})}function iE(e,t,n,r,i){let l,a="";if(!iL(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",a="http://"),(l=n.split(".")).length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))return!1;let o=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")"),i=iv(e,"("),l=iv(e,")");for(;-1!==r&&i>l;)e+=n.slice(0,r+1),r=(n=n.slice(r+1)).indexOf(")"),l++;return[e,n]}(n+r);if(!o[0])return!1;let s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function iP(e,t,n,r){return!(!iL(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function iL(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||nw(n)||nk(n))&&(!t||47!==n)}function iT(){this.buffer()}function iI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function iD(){this.buffer()}function iz(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function iF(e){let t=this.resume(),n=this.stack[this.stack.length-1];tr("footnoteReference"===n.type),n.identifier=n6(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iR(e){this.exit(e)}function iO(e){let t=this.resume(),n=this.stack[this.stack.length-1];tr("footnoteDefinition"===n.type),n.identifier=n6(this.sliceSerialize(e)).toLowerCase(),n.label=t}function i_(e){this.exit(e)}function iH(e,t,n,r){let i=n.createTracker(r),l=i.move("[^"),a=n.enter("footnoteReference"),o=n.enter("reference");return l+=i.move(n.safe(n.associationId(e),{after:"]",before:l})),o(),a(),l+=i.move("]")}
1function iV(e,t,n){return 0===t?e:iB(e,t,n)}function iB(e,t,n){return(n?"":" ")+e}iH.peek=function(){return"["};let iq=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function iZ(e){this.enter({type:"delete",children:[]},e)}function i$(e){this.exit(e)}function iU(e,t,n,r){let i=n.createTracker(r),l=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),l(),a}function iW(e){return e.length}function iK(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}iU.peek=function(){return"~"};function iX(e,t,n){let r=e.value||"",i="`",l=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++l<n.unsafe.length;){let e,t=n.unsafe[l],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}iX.peek=function(){return"`"};rT(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let iQ=function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),l=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(l=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+l);let a=l.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));let o=n.createTracker(r);o.move(l+" ".repeat(a-l.length)),o.shift(a);let s=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?l:l+" ".repeat(a-l.length))+e});return s(),c};function iG(e){let t=e._align;tr(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function iY(e){this.exit(e),this.data.inTable=void 0}function iJ(e){this.enter({type:"tableRow",children:[]},e)}function i0(e){this.exit(e)}function i1(e){this.enter({type:"tableCell",children:[]},e)}function i2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,i4));let n=this.stack[this.stack.length-1];tr("inlineCode"===n.type),n.value=t,this.exit(e)}function i4(e,t){return"|"===t?t:e}function i6(e){let t=this.stack[this.stack.length-2];tr("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function i5(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];tr("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,l=-1;for(;++l<i.length;){let e=i[l];if("paragraph"===e.type){r=e;break}}r===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function i8(e,t,n,r){let i=e.children[0],l="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);l&&o.move(a);let s=iQ(e,t,n,{...r,...o.current()});return l&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),s}let i3={tokenize:function(e,t,n){let r=0;return function t(l){return(87===l||119===l)&&r<3?(r++,e.consume(l),t):46===l&&3===r?(e.consume(l),i):n(l)};function i(e){return null===e?n(e):t(e)}},partial:!0},i9={tokenize:function(e,t,n){let r,i,l;return a;function a(t){return 46===t||95===t?e.check(le,s,o)(t):null===t||nv(t)||nw(t)||45!==t&&nk(t)?s(t):(l=!0,e.consume(t),a)}function o(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function s(e){return i||r||!l?n(e):t(e)}},partial:!0},i7={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?l(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||
160===a||63===a||93===a||95===a||126===a?e.check(le,t,l)(a):null===a||nv(a)||nw(a)?t(a):(e.consume(a),i)}function l(t){return 41===t&&r++,e.consume(t),i}},partial:!0},le={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),l):93===a?(e.consume(a),i):60===a||null===a||nv(a)||nw(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||nv(e)||nw(e)?t(e):r(e)}function l(t){return nd(t)?function t(i){return 59===i?(e.consume(i),r):nd(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},lt={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return nh(e)?n(e):t(e)}},partial:!0},ln={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!lo.call(r,r.previous)||ld(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(i3,e.attempt(i9,e.attempt(i7,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:lo},lr={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",l=!1;return function(t){return(72===t||104===t)&&ls.call(r,r.previous)&&!ld(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a):n(t)};function a(t){if(nd(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),o}return n(t)}function o(t){return 47===t?(e.consume(t),l)?s:(l=!0,o):n(t)}function s(t){return null===t||np(t)||nv(t)||nw(t)||nk(t)?n(t):e.attempt(i9,e.attempt(i7,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ls},li={name:"emailAutolink",tokenize:function(e,t,n){let r,i,l=this;return function(t){return!lu(t)||!lc.call(l,l.previous)||ld(l.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return lu(r)?(e.consume(r),t):64===r?(e.consume(r),a):n(r)}(t))};function a(t){return 46===t?e.check(lt,s,o)(t):45===t||95===t||nh(t)?(i=!0,e.consume(t),a):s(t)}function o(t){return e.consume(t),r=!0,a}function s(a){return i&&r&&nd(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:lc},ll={},la=48;for(;la<123;)ll[la]=li,58==++la?la=65:91===la&&(la=97);function lo(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||nv(e)}function ls(e){return!nd(e)}function lc(e){return!(47===e||lu(e))}function lu(e){return 43===e||45===e||46===e||95===e||nh(e)}function ld(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}ll[43]=li,ll[45]=li,ll[46]=li,ll[95]=li,ll[72]=[li,lr],ll[104]=[li,lr],ll[87]=[li,ln],ll[119]=[li,ln];let lh={tokenize:function(e,t,n){let r=this;return nS(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function lf(e,t,n){let r,i=this,l=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;l--;){let e=i.events[l][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(l){if(!r||!r._balanced)return n(l);let o=n6(i.sliceSerialize({start:r.end,end:i.now()}));return 94===o.codePointAt(0)&&a.includes(o.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l)):n(l)}}function lp(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let l={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function lm(e,t,n){let r,i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),o};function o(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(o){if(a>999||93===o&&!r||null===o||91===o||nv(o))return n(o);if(93===o){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return l.includes(n6(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(o)}return nv(o)||(r=!0),a++,e.consume(o),92===o?c:s}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,s):s(t)}}function lg(e,t,n){let r,i,l=this,a=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),o=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),s};function s(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(o>999||93===t&&!i||null===t||91===t||nv(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=n6(l.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return nv(t)||(i=!0),o++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(r)||a.push(r),nS(e,h,"gfmFootnoteDefinitionWhitespace")):n(t)}function h(e){return t(e)}}function lx(e,t,n){return e.check(nN,t,e.attempt(lh,t,n))}function ly(e){e.exit("gfmFootnoteDefinition")}class lv{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length,n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function lb(e,t,n){let r,i=this,l=0,a=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,l="tableHead"===r||"tableRow"===r?y:o;return l===y&&i.parser.lazy[i.now().line]?n(e):l(e)};function o(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,a+=1),s(n)}function s(t){return null===t?n(t):ny(t)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):nb(t)?nS(e,s,"whitespace")(t):(a+=1,r&&(r=!1,l+=1),124
1===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,s):(e.enter("data"),c(t))}function c(t){return null===t||124===t||nv(t)?(e.exit("data"),s(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,nb(t))?nS(e,h,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):h(t)}function h(t){return 45===t||58===t?p(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):n(t)}function f(t){return nb(t)?nS(e,p,"whitespace")(t):p(t)}function p(t){return 58===t?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||ny(t)?x(t):n(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(n))}(t)):n(t)}function g(t){return nb(t)?nS(e,x,"whitespace")(t):x(t)}function x(i){if(124===i)return h(i);if(null===i||ny(i))return r&&l===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function y(t){return e.enter("tableRow"),v(t)}function v(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),v):null===n||ny(n)?(e.exit("tableRow"),t(n)):nb(n)?nS(e,v,"whitespace")(n):(e.enter("data"),b(n))}function b(t){return null===t||124===t||nv(t)?(e.exit("data"),v(t)):(e.consume(t),92===t?k:b)}function k(t){return 92===t||124===t?(e.consume(t),b):b(t)}}function lk(e,t){let n,r,i,l=-1,a=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,h=new lv;for(;++l<e.length;){let f=e[l],p=f[1];"enter"===f[0]?"tableHead"===p.type?(u=!1,0!==d&&(lM(h,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(l,0,[["enter",n,t]])):"tableRow"===p.type||"tableDelimiterRow"===p.type?(a=!0,i=void 0,s=[0,0,0,0],c=[0,l+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(l,0,[["enter",r,t]])),o="tableDelimiterRow"===p.type?2:r?3:1):o&&("data"===p.type||"tableDelimiterMarker"===p.type||"tableDelimiterFiller"===p.type)?(a=!1,0===c[2]&&(0!==s[1]&&(c[0]=c[1],i=lw(h,t,s,o,void 0,i),s=[0,0,0,0]),c[2]=l)):"tableCellDivider"===p.type&&(a?a=!1:(0!==s[1]&&(c[0]=c[1],i=lw(h,t,s,o,void 0,i)),c=[(s=c)[1],l,0,0])):"tableHead"===p.type?(u=!0,d=l):"tableRow"===p.type||"tableDelimiterRow"===p.type?(d=l,0!==s[1]?(c[0]=c[1],i=lw(h,t,s,o,l,i)):0!==c[1]&&(i=lw(h,t,c,o,l,i)),o=0):o&&("data"===p.type||"tableDelimiterMarker"===p.type||"tableDelimiterFiller"===p.type)&&(c[3]=l)}for(0!==d&&lM(h,t,d,n,r),h.consume(t.events),l=-1;++l<t.events.length;){let e=t.events[l];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,l))}return e}function lw(e,t,n,r,i,l){0!==n[0]&&(l.end=Object.assign({},lS(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));let a=lS(t.events,n[1]);if(l={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",l,t]]),0!==n[2]){let i=lS(t.events,n[2]),l=lS(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(l.end=Object.assign({},lS(t.events,i)),e.add(i,0,[["exit",l,t]]),l=void 0),l}function lM(e,t,n,r,i){let l=[],a=lS(t.events,n);i&&(i.end=Object.assign({},a),l.push(["exit",i,t])),r.end=Object.assign({},a),l.push(["exit",r,t]),e.add(n+1,0,l)}function lS(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let lC={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return nv(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),l):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),l):n(t)}function l(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return ny(r)?t(r):nb(r)?e.check({tokenize:lj},t,n)(r):n(r)}}};
1function lj(e,t,n){return nS(e,function(e){return null===e?n(e):t(e)},"whitespace")}let lA={};function lN(e){let t,n,r,i=e||lA,l=this.data(),a=l.micromarkExtensions||(l.micromarkExtensions=[]),o=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),s=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);a.push(nu([{text:ll},{document:{91:{name:"gfmFootnoteDefinition",tokenize:lg,continuation:{tokenize:lx},exit:ly}},text:{91:{name:"gfmFootnoteCall",tokenize:lm},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lf,resolveTo:lp}}},(t=(i||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,l=this.events,a=0;return function(o){return 126===i&&"characterEscape"!==l[l.length-1][1].type?r(o):(e.enter("strikethroughSequenceTemporary"),function l(o){let s=nV(i);if(126===o)return a>1?r(o):(e.consume(o),a++,l);if(a<2&&!t)return r(o);let c=e.exit("strikethroughSequenceTemporary"),u=nV(o);return c._open=!u||2===u&&!!s,c._close=!s||2===s&&!!u,n(o)}(o))}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},l={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",l,t]],o=t.parser.constructs.insideSpan.null;o&&no(a,a.length,0,nB(o,e.slice(r+1,n),t)),no(a,a.length,0,[["exit",l,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),no(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}},null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}),{flow:{null:{name:"table",tokenize:lb,resolveAll:lk}}},{text:{91:lC}}])),o.push([{transforms:[iN],enter:{literalAutolink:iw,literalAutolinkEmail:iM,literalAutolinkHttp:iM,literalAutolinkWww:iM},exit:{literalAutolink:iA,literalAutolinkEmail:ij,literalAutolinkHttp:iS,literalAutolinkWww:iC}},{enter:{gfmFootnoteCallString:iT,gfmFootnoteCall:iI,gfmFootnoteDefinitionLabelString:iD,gfmFootnoteDefinition:iz},exit:{gfmFootnoteCallString:iF,gfmFootnoteCall:iR,gfmFootnoteDefinitionLabelString:iO,gfmFootnoteDefinition:i_}},{canContainEols:["delete"],enter:{strikethrough:iZ},exit:{strikethrough:i$}},{enter:{table:iG,tableData:i1,tableHeader:i1,tableRow:iJ},exit:{codeText:i2,table:iY,tableData:i0,tableHeader:i0,tableRow:i0}},{exit:{taskListCheckValueChecked:i6,taskListCheckValueUnchecked:i6,paragraph:i5}}]),s.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:ib,notInConstruct:ik},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:ib,notInConstruct:ik},{character:":",before:"[ps]",after:"\\/",inConstruct:ib,notInConstruct:ik}]},(r=!1,i&&i.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:function(e,t,n,i){let l=n.createTracker(i),a=l.move("[^"),o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=l.move(n.safe(n.associationId(e),{before:a,after:"]"})),s(),a+=l.move("]:"),e.children&&e.children.length>0&&(l.shift(4),a+=l.move((r?"\n":" ")+n.indentLines(n.containerFlow(e,l.current()),r?iB:iV))),o(),a},footnoteReference:iH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iq}],handlers:{delete:iU}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=iX(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return o(function(e,t,n){let r=e.children,i=-1,l=[],a=t.enter("table");for(;++i<r.length;)l[i]=s(r[i],t,n);return a(),l}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){let i=o([s(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){let i=n.enter("tableCell"),a=n.enter("phrasing"),o=n.containerPhrasing(e,{...r,before:l,after:l});return a(),i(),o}function o(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||iW,l=[],a=[],o=[],s=[],c=0,u=-1;for(;++u<e.length;){let t=[],r=[],l=-1;for(e[u].length>c&&(c=e[u].length);++l<e[u].length;){var d;let a=null==(d=e[u][l])?"":String(d);if(!1!==n.alignDelimiters){let e=i(a);r[l]=e,(void 0===s[l]||e>s[l])&&(s[l]=e)}t.push(a)}a[u]=t,o[u]=r}let h=-1;if("object"==typeof r&&"length"in r)for(;
1++h<c;)l[h]=iK(r[h]);else{let e=iK(r);for(;++h<c;)l[h]=e}h=-1;let f=[],p=[];for(;++h<c;){let e=l[h],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,s[h]-t.length-r.length),a=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>s[h]&&(s[h]=i),p[h]=i),f[h]=a}a.splice(1,0,f),o.splice(1,0,p),u=-1;let m=[];for(;++u<a.length;){let e=a[u],t=o[u];h=-1;let r=[];for(;++h<c;){let i=e[h]||"",a="",o="";if(!1!==n.alignDelimiters){let e=s[h]-(t[h]||0),n=l[h];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),o=" ".repeat(e/2-.5)):o=a=" ".repeat(e/2):o=" ".repeat(e)}!1===n.delimiterStart||h||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||h)&&r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(i),!1!==n.alignDelimiters&&r.push(o),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||h!==c-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function s(e,t,n){let r=e.children,i=-1,l=[],o=t.enter("tableRow");for(;++i<r.length;)l[i]=a(r[i],e,t,n);return o(),l}}(i),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:i8}}]})}e.s(["default",()=>lN],812878),e.s(["BlockRenderer",()=>aj],849450);var lE=e.i(905109),lP=e.i(961433),lL=e.i(632736),lT=e.i(906123),lI=e.i(406604),lD=e.i(874941);function lz(e){let{block:n}=e,{orgSlug:i}=e7(),l=(0,g.useAssistantStore)(e=>e.updateAction),a=(0,g.useAssistantStore)(e=>e.appendAssistantMessage),[o,s]=(0,r.useState)(null),c="pending"===n.status,h=async()=>{s("confirm");try{let e=await p.API.assistant.confirmAction(i,n.action_id);l(n.action_id,e.status,e.message??void 0),"confirmed"===e.status&&a({content:e.message??"Hecho.",blocks:e.blocks??[]}),u.toast.success(e.message??"Hecho.")}catch(t){let e=(0,lD.getErrorMessage)(t,"No se pudo ejecutar la acción");l(n.action_id,"failed",e),u.toast.error(e)}finally{s(null)}},f=async()=>{s("cancel");try{let e=await p.API.assistant.cancelAction(i,n.action_id);l(n.action_id,e.status,e.message??void 0)}catch(e){u.toast.error((0,lD.getErrorMessage)(e,"No se pudo descartar la acción"))}finally{s(null)}},x="confirmed"===n.status,[v,b]=(0,r.useState)(!1),k="dark"===y(),w=k?"text-white/65":"text-muted-foreground";if(!c){let e="confirmed"===n.status?"Confirmada":"cancelled"===n.status?"Descartada":"expired"===n.status?"Caducada sin confirmar":"No se pudo ejecutar";return(0,t.jsxs)("section",{className:(0,m.cn)("rounded-xl border p-3 shadow-card",k?"border-white/15 bg-white/10 text-white":"border-border bg-muted/40"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[x?(0,t.jsx)(lE.CheckCircleIcon,{weight:"fill",className:"size-4 shrink-0 text-success"}):(0,t.jsx)(lL.XCircleIcon,{weight:"fill",className:(0,m.cn)("size-4 shrink-0",w)}),(0,t.jsx)("p",{className:"min-w-0 flex-1 truncate font-display text-sm font-semibold",children:n.title}),(0,t.jsx)("span",{className:(0,m.cn)("font-mono text-[10px] uppercase tracking-[0.14em]",w),children:e})]}),!x&&n.result_message&&(0,t.jsx)("p",{className:(0,m.cn)("mt-1 text-sm",w),children:n.result_message}),(0,t.jsx)("button",{type:"button",onClick:()=>b(e=>!e),className:(0,m.cn)("mt-1 text-xs",k?"text-white/60 hover:text-white":"text-muted-foreground hover:text-foreground"),children:v?"Ocultar la propuesta":"Ver la propuesta"}),v&&(0,t.jsx)("p",{className:(0,m.cn)("mt-1 whitespace-pre-line text-sm",w),children:n.summary}),n.result_blocks?.map((e,r)=>(0,t.jsx)(aj,{block:e},`${n.action_id}-r${r}`))]})}return(0,t.jsxs)("section",{className:(0,m.cn)("rounded-xl border-2 border-primary/60 p-3",k?"bg-white/[0.06] text-white":"bg-card text-foreground shadow-card"),children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(lP.ShieldCheckIcon,{weight:"fill",className:(0,m.cn)("mt-0.5 size-5 shrink-0",k?"text-primary":"text-secondary")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h4",{className:"font-display text-sm font-semibold",children:n.title}),(0,t.jsx)("p",{className:(0,m.cn)("mt-0.5 whitespace-pre-line text-sm",k?"text-white/85":"text-foreground
1/90"),children:n.summary}),n.params_preview&&Object.keys(n.params_preview).length>0&&(0,t.jsx)("dl",{className:(0,m.cn)("mt-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs",w),children:Object.entries(n.params_preview).map(e=>{let[n,r]=e;return(0,t.jsxs)("div",{className:"contents",children:[(0,t.jsx)("dt",{className:"font-medium",children:n}),(0,t.jsx)("dd",{className:"truncate",children:String(r)})]},n)})})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)(d.Button,{size:"sm",onClick:h,disabled:null!==o,children:["confirm"===o?(0,t.jsx)(lI.Spinner,{size:"sm"}):(0,t.jsx)(lE.CheckCircleIcon,{className:"size-4"}),n.confirm_label??"Confirmar"]}),n.review_href&&(0,t.jsx)(d.Button,{size:"sm",variant:"outline",asChild:!0,className:(0,m.cn)(k&&"border-white/30 bg-transparent text-white hover:bg-white/10 hover:text-white"),children:(0,t.jsx)(lT.default,{href:n.review_href,children:n.review_label??"Revisar a mano"})}),(0,t.jsx)(d.Button,{size:"sm",variant:"ghost",onClick:f,disabled:null!==o,className:(0,m.cn)(k&&"text-white/70 hover:bg-white/10 hover:text-white"),children:"Descartar"}),(0,t.jsx)("span",{className:(0,m.cn)("ml-auto text-xs",w),children:"No se toca nada hasta que confirmes"})]})]})}
1var lF=e.i(437593),lR=e.i(550706),lO=e.i(319777),l_=e.i(701656);let lH=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M188,140H172a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm-48-28v56a12,12,0,0,1-24,0V152a12,12,0,0,1,24,0ZM96,208a12,12,0,0,1-12,12H52a12,12,0,0,1-10.42-17.95L63.32,164H52a12,12,0,0,1,0-24H84A12,12,0,0,1,94.42,158L72.68,196H84A12,12,0,0,1,96,208ZM216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88A12,12,0,0,0,216.49,79.52ZM160,80V57l23,23Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),r.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,184,144Zm-.35,40H176V160h8A12,12,0,0,1,196,173.16,12.25,12.25,0,0,1,183.65,184ZM136,152v55.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,136,152ZM96,208.53A8.17,8.17,0,0,1,87.73,216H56.23a8.27,8.27,0,0,1-6-2.5A8,8,0,0,1,49.05,204l25.16-44H56.27A8.17,8.17,0,0,1,48,152.53,8,8,0,0,1,56,144H87.77a8.27,8.27,0,0,1,6,2.5A8,8,0,0,1,95,156L69.79,200H88A8,8,0,0,1,96,208.53ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,146H168a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H174V158h10a14,14,0,0,1,0,28Zm-50-34v56a6,6,0,0,1-12,0V152a6,6,0,0,1,12,0ZM94,208a6,6,0,0,1-6,6H56a6,6,0,0,1-5.21-9l26.87-47H56a6,6,0,0,1,0-12H88a6,6,0,0,1,5.21,9L66.34,202H88A6,6,0,0,1,94,208ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M184,148H168a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H172V156h12a16,16,0,0,1,0,32Zm-52-36v56a4,4,0,0,1-8,0V152a4,4,0,0,1,8,0Zm-40.53,2L62.89,204H88a4,4,0,0,1,0,8H56a4,4,0,0,1-3.47-6l28.58-50H56a4,4,0,0,1,0-8H88a4,4,0,0,1,3.47,6ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),lV=r.forwardRef((e,t)=>r.createElement(i.default,{ref:t,...e,weights:lH}));lV.displayName="FileZipIcon";let lB=new Map([["bold",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,36H140V24a12,12,0,0,0-24,0V36H40A20,20,0,0,0,20,56V176a20,20,0,0,0,20,20H71l-16.4,20.5a12,12,0,0,0,18.74,15l28.4-35.5h52.46l28.4,35.5a12,12,0,0,0,18.74-15L185,196h31a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,136H44V60H212Z"}))],["duotone",r.createElement(r.Fragment,null,r.createElement("path",{d:"M224,56V176a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),r.createElement("path",{d:"M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z"}))],["fill",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Z"}))],["light",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,42H134V24a6,6,0,0,0-12,0V42H40A14,14,0,0,0,26,56V176a14,14,0,0,0,14,14H83.52L59.31,220.25a6,6,0,0,0,9.38,7.5L98.88,190h58.24l30.19,37.75a6,6,0,0,0,9.38-7.5L172.48,190H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,134a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Z"}))],["regular",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z"}))],["thin",r.createElement(r.Fragment,null,r.createElement("path",{d:"M216,44H132V24a4,4,0,0,0-8,0V44H40A12,12,0,0,0,28,56V176a12,12,0,0,0,12,12H87.68l-26.8,33.5a4,4,0,1,0,6.24,5L97.92,188h60.16l30.8,38.5a4,4,0,0,0,6.24
1-5L168.32,188H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,132a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Z"}))]]),lq=r.forwardRef((e,t)=>r.createElement(i.default,{ref:t,...e,weights:lB}));lq.displayName="PresentationIcon";var lZ=e.i(493134);let l$=["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"];function lU(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"EUR",n="number"==typeof e?e:Number(e);return Number.isFinite(n)?(0,lZ.formatCurrency)(n,t):""}function lW(e){if(!e||"string"!=typeof e)return"";let t=new Date(10===e.length?`${e}T00:00:00`:e);return Number.isNaN(t.getTime())?e:`${t.getDate()} ${l$[t.getMonth()]} ${t.getFullYear()}`}function lK(e){let t="number"==typeof e?e:Number(e);return Number.isFinite(t)?new Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(t):""}function lX(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"EUR";if(null==e||""===e)return"";switch(t){case"money":return lU(e,n);case"number":return lK(e);case"date":return lW(e);case"percent":let r;return Number.isFinite(r="number"==typeof e?e:Number(e))?`${new Intl.NumberFormat("es-ES",{maximumFractionDigits:1}).format(r)} %`:"";case"days":let i;return Number.isFinite(i="number"==typeof e?e:Number(e))?0===i?"hoy":1===i?"1 dÃa":`${i} d\xedas`:"";default:return String(e)}}let lQ={ready:{label:"Lista",variant:"success"},flagged:{label:"A revisar",variant:"warning"},NEEDS_REVIEW:{label:"Pendiente",variant:"warning"},CONTABILIZED:{label:"Contabilizada",variant:"success"},PROCESSED:{label:"Procesada",variant:"muted"},PROCESSING:{label:"En proceso",variant:"muted"},IGNORED:{label:"Descartada",variant:"muted"},DUPLICATE:{label:"Duplicada",variant:"destructive"},DRAFT:{label:"Borrador",variant:"muted"},PAID:{label:"Pagada",variant:"success"},PENDING:{label:"Pendiente de pago",variant:"warning"},PARTIAL:{label:"Pago parcial",variant:"warning"},OVERDUE:{label:"Vencida",variant:"destructive"},UNALLOCATED:{label:"Sin asignar",variant:"muted"},WRITTEN_OFF:{label:"Cancelada sin pago",variant:"muted"},matched:{label:"Conciliado",variant:"success"},pending:{label:"Sin tratar",variant:"warning"},unmatched:{label:"Sin conciliar",variant:"warning"},classified:{label:"Clasificado",variant:"info"},ignored:{label:"Ignorado",variant:"muted"},synced:{label:"En el ERP",variant:"success"},error:{label:"Error ERP",variant:"destructive"},update_failed:{label:"Cambio sin propagar",variant:"destructive"},bloquea:{label:"Bloquea",variant:"destructive"},aviso:{label:"Aviso",variant:"warning"},Ingresos:{label:"Ingresos",variant:"success"},Gastos:{label:"Gastos",variant:"destructive"},cliente:{label:"Cliente",variant:"info"},proveedor:{label:"Proveedor",variant:"secondary"},pendiente:{label:"Pendiente",variant:"warning"},calculado:{label:"Calculado",variant:"info"},presentado:{label:"Presentado",variant:"success"},"fuera de plazo":{label:"Fuera de plazo",variant:"destructive"}};function lG(e){let t=String(e??"");return lQ[t]??{label:t,variant:"outline"}}function lY(e){if(e){if(e.startsWith("/")&&!e.startsWith("//"))return e;try{let t=new URL(e);return"https:"===t.protocol||"http:"===t.protocol?e:void 0}catch{return}}}function lJ(e){return e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`:""}function l0(){var e;return{dark:e="dark"===y(),panel:e?"rounded-lg border border-white/10 bg-white/[0.05] text-white":"rounded-xl border border-border bg-card text-foreground shadow-card",title:e?"font-display text-sm font-medium text-white":"font-display text-sm font-semibold",muted:e?"text-white/55":"text-muted-foreground",divider:e?"divide-white/10":"divide-border",border:e?"border-white/10":"border-border",rowHover:e?"hover:bg-white/[0.05]":"hover:bg-muted/60",chip:(0,m.cn)("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-sm transition-colors duration-200 ease-out",e?"border-white/15 bg-white/[0.06] text-white/85 hover:border-white/30 hover:bg-white/[0.12] hover:text-white":"border-border bg-card font-medium text-foreground hover:bg-muted"),chipIcon:e?"size-3.5 text-white/50":"size-3.5 text-muted-foreground",ghost:e?"text-white/60 hover:bg-white/10 hover:text-white":"",dashed:e?"rounded-lg border border-dashed border-white/15 px-3 py-2 text-sm text-white/60":"rounded-lg border border-dashed border-border bg-card px-3 py-2 text-sm text-muted-foreground",badge:e?"text-white":void 0,link:e?"text-white/85 hover:text-white":""}}e.s(["formatBytes",()=>lJ,"formatCell",()=>lX,"formatDateShort",()=>lW,"formatMoney",()=>lU,"formatNumber",()=>lK,"safeHref",()=>lY,"statusOf",()=>lG],373091);let l1={pdf:lR.FilePdfIcon,xlsx:l_.FileXlsIcon,csv:l_.FileXlsIcon,zip:lV,pptx:lq};function l2(e){let{block:n}=e,{orgSlug:i}=e7(),l=l0(),[a,o]=(0,r.useState)(!1),s=l1[n.artifact_kind]??lO.FileTextIcon,c=async()=>{o(!0);try{let e=await p.API.assistant.downloadArtifact(i,n.artifact_id),t=URL.createObjectURL(new Blob([e.data],{type:n.mime})),r=document.createElement("a");r.href=t,r.download=n.filename,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(t)}catch(e){u.toast.error((0,lD.getErrorMessage)(e,"No se pudo descargar el fichero"))}finally{o(!1)}};return(0,t.jsxs)("section",{className:(0,m.cn)("flex items-center gap-3 p-3",l.panel),children:[(0,t.jsx)("div",{className:(0,m.cn)("flex size-10 shrink-0 items-center justify-center rounded-md",l.dark?"bg-white/10 text-white":"bg-secondary text-secondary-foreground"),children:(0,t.jsx)(s,{className:"size-5",weight:"fill"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:n.title??n.filename}),(0,t.jsxs)("p",{className:(0,m.cn)("text-xs",l.muted),children:[n.filename,n.size_bytes?` \xb7 ${lJ(n.size_bytes)}`:""]})]}),(0,t.jsxs)(d.Button,{size:"sm",onClick:c,disabled:a,children:[a?(0,t.jsx)(lI.Spinner,{size:"sm"}):(0,t.jsx)(lF.DownloadSimpleIcon,{className:"size-4"}),"Descargar"]})]})}var l4=e.i(197055),l6=e.i(458789),l5=e.i(109461),l8=e.i(52026),l3=e.i(575855),l9=e.i(389255),l7=e.i(450613),ae=e.i(942327),at=e.i(300343),an=(0,l9.generateCategoricalChart)({chartName:"LineChart",GraphicalChild:l3.Line,axisComponents:[{axisType:"xAxis",AxisComp:l7.XAxis},{axisType:"yAxis",AxisComp:ae.YAxis}],formatAxisMap:at.formatAxisMap}),ar=e.i(909070),ai=e.i(813344),al=e.i(22173);let aa=["hsl(var(--chart-1))","hsl(var(--chart-2))","hsl(var(--chart-3))","hsl(var(--chart-4))","hsl(var(--chart-5))"],ao={ingresos:"hsl(var(--chart-ingresos))",gastos:"hsl(var(--chart-gastos))",resultado:"hsl(var(--chart-2))",impuestos:"hsl(var(--chart-impuestos) / 0.63)"};function as(e){let{block:n}=e,r=l0(),i=Object.fromEntries(n.series.map((e,t)=>{var n;return[`s${t}`,{label:e.name,color:(n=e.name,ao[n.trim().toLowerCase()]??aa[t%aa.length])}]})),l=n.categories.map((e,t)=>({name:e,...Object.fromEntries(n.series.map((e,n)=>[`s${n}`,e.data[t]??0]))})),a=(e,r)=>{let l=String(r),a=i[l]?.label??l;return(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-4",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:a}),(0,t.jsx)("span",{className:"font-medium tabular-nums text-foreground",children:"money"===n.unit?lU(e):"percent"===n.unit?`${lK(e)} %`:lK(e)})]})};return(0,t.jsxs)("section",{className:(0,m.cn)("p-3",r.panel),children:[n.title&&(0,t.jsx)("h4",{className:(0,m.cn)("mb-2",r.title),children:n.title}),(0,t.jsx)(al.ChartContainer,{config:i,className:(0,m.cn)("h-[220px] w-full",r.dark&&"[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-white/10 [&_.recharts-cartesian-axis-tick_text]:fill-white/60 [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-white/15 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-white/40"),children:"line"===n.chart_type?(0,t.jsxs)(an,{data:l,children:[(0,t.jsx)(l5.CartesianGrid,{vertical:!1}
1),(0,t.jsx)(l7.XAxis,{dataKey:"name",tickLine:!1,axisLine:!1,fontSize:11}),(0,t.jsx)(ae.YAxis,{tickLine:!1,axisLine:!1,fontSize:11,width:64,tickFormatter:e=>lK(e)}),(0,t.jsx)(al.ChartTooltip,{content:(0,t.jsx)(al.ChartTooltipContent,{className:"text-foreground",formatter:a})}),n.series.length>1&&(0,t.jsx)(al.ChartLegend,{content:(0,t.jsx)(al.ChartLegendContent,{})}),n.series.map((e,n)=>(0,t.jsx)(l3.Line,{type:"monotone",dataKey:`s${n}`,stroke:`var(--color-s${n})`,strokeWidth:2,dot:!1},e.name))]}):"donut"===n.chart_type?(0,t.jsxs)(ai.PieChart,{children:[(0,t.jsx)(al.ChartTooltip,{content:(0,t.jsx)(al.ChartTooltipContent,{className:"text-foreground",formatter:a})}),(0,t.jsx)(ar.Pie,{data:l,dataKey:"s0",nameKey:"name",innerRadius:50,outerRadius:80,paddingAngle:2,children:l.map((e,n)=>(0,t.jsx)(l8.Cell,{fill:aa[n%aa.length]},String(e.name)))}),(0,t.jsx)(al.ChartLegend,{content:(0,t.jsx)(al.ChartLegendContent,{nameKey:"name"})})]}):(0,t.jsxs)(l6.BarChart,{data:l,children:[(0,t.jsx)(l5.CartesianGrid,{vertical:!1}),(0,t.jsx)(l7.XAxis,{dataKey:"name",tickLine:!1,axisLine:!1,fontSize:11}),(0,t.jsx)(ae.YAxis,{tickLine:!1,axisLine:!1,fontSize:11,width:64,tickFormatter:e=>lK(e)}),(0,t.jsx)(al.ChartTooltip,{content:(0,t.jsx)(al.ChartTooltipContent,{className:"text-foreground",formatter:a})}),n.series.length>1&&(0,t.jsx)(al.ChartLegend,{content:(0,t.jsx)(al.ChartLegendContent,{})}),n.series.map((e,r)=>(0,t.jsx)(l4.Bar,{dataKey:`s${r}`,fill:`var(--color-s${r})`,radius:[3,3,0,0],stackId:"stacked"===n.chart_type?"a":void 0},e.name))]})})]})}var ac=e.i(722583);function au(e){let{block:n}=e,r=l0();return 0===n.items.length?(0,t.jsx)("section",{className:r.dashed,children:"Ninguna factura con esos filtros."}):(0,t.jsxs)("section",{className:(0,m.cn)("overflow-hidden",r.panel),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 pt-2",children:[(0,t.jsx)("h4",{className:r.title,children:n.title??"Facturas"}),null!==n.total_count&&void 0!==n.total_count&&(0,t.jsxs)("span",{className:(0,m.cn)("text-xs",r.muted),children:[n.items.length," de ",n.total_count]})]}),(0,t.jsx)("ul",{className:(0,m.cn)("divide-y",r.divider),children:n.items.map(e=>{let n=e.review_state??e.status,i=(0,t.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("p",{className:"truncate text-sm font-medium",children:[e.number??"Sin número",e.contact?(0,t.jsxs)("span",{className:(0,m.cn)("font-normal",r.muted),children:[" · ",e.contact]}):null]}),(0,t.jsxs)("p",{className:(0,m.cn)("text-xs",r.muted),children:[lW(e.date),e.kind?` \xb7 ${"received"===e.kind?"recibida":"emitida"}`:""]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,t.jsx)("span",{className:"financial-number text-sm font-semibold",children:lU(e.total,e.currency)}),(0,t.jsxs)("div",{className:"flex gap-1",children:[n&&(0,t.jsx)(ac.Badge,{variant:lG(n).variant,className:r.badge,children:lG(n).label}),e.payment_status&&"PAID"!==e.payment_status&&e.kind&&(0,t.jsx)(ac.Badge,{variant:lG(e.payment_status).variant,className:r.badge,children:lG(e.payment_status).label})]})]})]});return(0,t.jsx)("li",{className:r.rowHover,children:lY(e.href)?(0,t.jsx)(lT.default,{href:lY(e.href)??"#",children:i}):i},e.id)})}),lY(n.href)&&(0,t.jsx)("div",{className:(0,m.cn)("border-t px-3 py-2 text-right",r.border),children:(0,t.jsx)(lT.default,{href:lY(n.href)??"#",className:(0,m.cn)("text-xs font-medium underline-offset-2 hover:underline",r.link),children:"Ver en facturas"})})]})}let ad={neutral:"text-foreground",good:"text-success",bad:"text-destructive",warning:"text-warning"};function ah(e){let{block:n}=e,r=l0();return(0,t.jsxs)("section",{className:(0,m.cn)("p-3",r.panel),children:[n.title&&(0,t.jsx)("h4",{className:(0,m.cn)("mb-2",r.title),children:n.title}),(0,t.jsx)("div",{className:(0,m.cn)("grid gap-x-5 gap-y-3",n.items.length<=2?"grid-cols-2":"grid-cols-2 sm:grid-cols-3"),children:n.items.map(e=>{let n=null===e.value||void 0===e.value?"â".replace("â","·"):lX(e.value,"text"===e.format?void 0:e.format);return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:(0,m.cn)("truncate text-xs",r.muted),children:e.label}),(0,t.jsx)("p",{className:(0,m.cn)("financial-number break-words font-display text-lg font-semibold leading-tight sm:text-xl",ad[e.tone??"neutral"],r.dark&&(e.tone??"neutral")==="neutral"&&"text-white"),children:n||"·"}),null!==e.delta&&void 0!==e.delta&&(0,t.jsxs)("p",{className:(0,m.cn)("text-xs",e.delta>=0?"text-success":"text-destructive"),children:[e.delta>=0?"+":"",lX(e.delta,"text"===e.format?void 0:e.format),e.delta_label?` ${e.delta_label}`:""]}),e.hint&&(0,t.jsx)("p",{className:(0,m.cn)("truncate text-xs",r.muted),children:e.hint})]},e.label)})})]})}var af=e.i(867881),ap=e.i(183724);function am(e){let{block:n}=e,r=l0();return(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:n.items.map(e=>{let n=r.chip,i=lY(e.href);return i?i.startsWith("/")&&!i.startsWith("//")?(0,t.jsxs)(lT.default,{href:i,className:n,title:e.description??void 0,children:[(0,t.jsx)(af.ArrowRightIcon,{className:r.chipIcon}),e.label]},e.href+e.label):(0,t.jsxs)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:n,title:e.description??void 0,children:[(0,t.jsx)(ap.ArrowSquareOutIcon,{className:r.chipIcon}),e.label]},e.href+e.label):null})})}var ag=e.i(868729),ax=e.i(107464);function ay(e){let{block:n}=e,{sendPrompt:r}=e7(),i=l0();return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:(0,m.cn)("text-sm",i.dark?"text-white/70":"text-muted-foreground"),children:n.question}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:n.options.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>r(e.prompt),className:i.chip,title:e.description??void 0,children:e.label},e.label))})]})}function av(e){let{block:n}=e,r=l0();return(0,t.jsx)("ul",{className:"space-y-1.5",children:n.items.map(e=>{let n=(0,t.jsxs)("span",{className:(0,m.cn)("flex items-start gap-2.5 px-3 py-2 text-sm transition-colors duration-200",r.panel,r.dark?"hover:bg-white/[0.09]":"hover:bg-muted"),children:[(0,t.jsx)(lO.FileTextIcon,{className:(0,m.cn)("mt-0.5 size-4 shrink-0",r.muted)}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"block truncate font-medium",children:[e.name,e.page?(0,t.jsxs)("span",{className:r.muted,children:[" · pág. ",e.page]}):null]}),(0,t.jsx)("span",{className:(0,m.cn)("block text-xs",r.muted),children:e.snippet})]})]});return(0,t.jsx)("li",{children:lY(e.href)?(0,t.jsx)(lT.default,{href:lY(e.href)??"#",children:n}):n},`${e.document_id}-${e.page??0}`)})})}function ab(e,t){return"done"===e?"done":"error"===e||"failed"===e?"failed":"running"===e?"running":"queued"===e?"queued":t}function ak(e){let{block:n}=e,{sendPrompt:r}=e7(),i=l0(),l="done"===n.status||"failed"===n.status,a=(0,ag.useQuery)({queryKey:["assistant-job",n.job_id],queryFn:()=>p.API.assistant.pollJob(n.poll_url),enabled:!l,refetchInterval:e=>{let t=ab(e.state.data?.status,n.status);return"done"!==t&&"failed"!==t&&2e3}}).data,o=ab(a?.status,n.status),s=a?.total??n.total,c=a?.done??n.done,u=a?.validated?.length,d=a?.skipped?.length,h=s?Math.round(c/s*100):"done"===o?100:15;return(0,t.jsxs)("section",{className:(0,m.cn)("p-3",i.panel),children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:n.label}),(0,t.jsx)(ax.Progress,{value:h,className:(0,m.cn)("mt-2",i.dark&&"bg-white/10")}),(0,t.jsxs)("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:(0,m.cn)("text-xs",i.muted),children:"done"===o?`Terminado${void 0!==u?`: ${u} contabilizadas`:""}${d?`, ${d} saltadas`:""}`:"failed"===o?"Ha fallado":s?`${c} de ${s}`:"En cola"}),"done"===o&&(u??0)>0&&(0,t.jsxs)("button",{type:"button",onClick:()=>r(n.subject?`Ens\xe9\xf1ame las facturas que acabas de validar de ${n.subject}`:"Enséñame las facturas que acabas de validar"),className:(0,m.cn)(i.chip,"px-2.5 py-1 text-xs"),children:["Enséñame lo validado",(0,t.jsx)(af.ArrowRightIcon,{className:i.chipIcon})]})]})]})}var aw=e.i(417473),aM=e.i(732935);function aS(e){let{block:n}=e,[i,l]=(0,r.useState)(!1),a=l0(),o=i?n.rows:n.rows.slice(0,12),s=n.rows.length-o.length,c=async()=>{let e=n.columns.map(e=>e.label).join(";"),t=n.rows.map(e=>n.columns.map(t=>{let n=e[t.key];return String(("badge"===t.format?lG(n).label:lX(n,t.format))??"").replace(/;/g,",")}).join(";"));try{await navigator.clipboard.writeText([e,...t].join("\n"))}catch{}};return(0,t.jsxs)("section",{className:(0,m.cn)("overflow-hidden",a.panel),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 pt-2",children:[(0,t.jsx)("h4",{className:a.title,children:n.title??"Tabla"}),(0,t.jsxs)(d.Button,{variant:"ghost",size:"sm",onClick:c,title:"Copiar como CSV",className:a.ghost,children:[(0,t.jsx)(aw.CopyIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Copiar como CSV"})]})]}),(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(aM.Table,{children:[(0,t.jsx)(aM.TableHeader,{children:(0,t.jsx)(aM.TableRow,{className:(0,m.cn)(a.dark&&"border-white/10 hover:bg-transparent"),children:n.columns.map(e=>(0,t.jsx)(aM.TableHead,{className:(0,m.cn)("text-xs",a.dark&&"text-white/50","right"===e.align&&"text-right","center"===e.align&&"text-center"),children:e.label},e.key))})}),(0,t.jsxs)(aM.TableBody,{children:[o.map((e,r)=>{let i="string"==typeof e.href?lY(e.href)??null:null,l=`${r}-${String(e[n.columns[0]?.key]??"")}`;return(0,t.jsx)(aM.TableRow,{className:(0,m.cn)(i&&"cursor-pointer",a.dark&&"border-white/[0.08] hover:bg-white/[0.05]"),children:n.columns.map(r=>{let l=e[r.key],o="badge"===r.format?l?(0,t.jsx)(ac.Badge,{variant:lG(l).variant,className:a.badge,children:lG(l).label}):null:lX(l,r.format,n.currency);return(0,t.jsx)(aM.TableCell,{className:(0,m.cn)("text-sm",a.dark&&"text-white/90","right"===r.align&&"text-right financial-number","center"===r.align&&"text-center"),children:i&&r.key===n.columns[0].key?(0,t.jsx)(lT.default,{href:i,className:(0,m.cn)("underline-offset-2 hover:underline",a.link),children:o}):o},r.key)})},l)}),n.footer&&(0,t.jsx)(aM.TableRow,{className:(0,m.cn)(a.dark?"bg-white/[0.08] hover:bg-white/[0.08]":"bg-muted/60 hover:bg-muted/60"),
1children:n.columns.map(e=>(0,t.jsx)(aM.TableCell,{className:(0,m.cn)("text-sm font-semibold",a.dark&&"text-white","right"===e.align&&"text-right financial-number"),children:lX(n.footer?.[e.key],e.format,n.currency)},e.key))})]})]})}),(s>0||i)&&(0,t.jsx)("div",{className:"px-3 pb-2",children:(0,t.jsx)(d.Button,{variant:"ghost",size:"sm",onClick:()=>l(e=>!e),className:a.ghost,children:i?"Ver menos":`Ver las ${n.rows.length}`})}),n.note&&(0,t.jsx)("p",{className:(0,m.cn)("px-3 pb-2 text-xs",a.muted),children:n.note})]})}function aC(e){let{block:n}=e,r=l0();return 0===n.items.length?(0,t.jsx)("section",{className:r.dashed,children:"Ningún movimiento con esos filtros."}):(0,t.jsxs)("section",{className:(0,m.cn)("overflow-hidden",r.panel),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 pt-2",children:[(0,t.jsx)("h4",{className:r.title,children:n.title??"Movimientos"}),null!==n.total_count&&void 0!==n.total_count&&(0,t.jsxs)("span",{className:(0,m.cn)("text-xs",r.muted),children:[n.items.length," de ",n.total_count]})]}),(0,t.jsx)("ul",{className:(0,m.cn)("divide-y",r.divider),children:n.items.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate text-sm",children:e.description||e.counterparty||"Movimiento"}),(0,t.jsxs)("p",{className:(0,m.cn)("text-xs",r.muted),children:[lW(e.date),e.counterparty&&e.description?` \xb7 ${e.counterparty}`:""]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1",children:[(0,t.jsx)("span",{className:(0,m.cn)("financial-number text-sm font-semibold",(e.amount??0)<0?"text-destructive":"text-success"),children:lU(e.amount,e.currency)}),(e.treatment||e.status)&&(0,t.jsx)(ac.Badge,{variant:lG(e.treatment??e.status).variant,className:r.badge,children:lG(e.treatment??e.status).label})]})]},e.id))}),lY(n.href)&&(0,t.jsx)("div",{className:(0,m.cn)("border-t px-3 py-2 text-right",r.border),children:(0,t.jsx)(lT.default,{href:lY(n.href)??"#",className:(0,m.cn)("text-xs font-medium underline-offset-2 hover:underline",r.link),children:"Ver en banco"})})]})}function aj(e){let{block:n}=e;switch(n.kind){case"kpis":return(0,t.jsx)(ah,{block:n});case"table":return(0,t.jsx)(aS,{block:n});case"chart":return(0,t.jsx)(as,{block:n});case"invoices":return(0,t.jsx)(au,{block:n});case"transactions":return(0,t.jsx)(aC,{block:n});case"links":return(0,t.jsx)(am,{block:n});case"action":return(0,t.jsx)(lz,{block:n});case"artifact":return(0,t.jsx)(l2,{block:n});case"job":return(0,t.jsx)(ak,{block:n});case"citations":return(0,t.jsx)(av,{block:n});case"choices":return(0,t.jsx)(ay,{block:n});default:return null}}var aA=r;class aN extends aA.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e){console.error(`Paco render failed (${this.props.what}):`,e)}render(){return this.state.failed?(0,t.jsxs)("p",{role:"alert",className:this.props.className??"text-xs text-destructive",children:["No he podido mostrar ",this.props.what,". El resto de la respuesta sigue siendo válido."]}):this.props.children}}e.s(["RenderGuard",()=>aN],37665);let aE=/\[\[b\d+\]\]/g,aP=/\[\[?(?:b\d*\]?)?$/;function aL(e){return e.replace(aE,"").replace(aP,"").replace(/[ \t]+([.,;:!?])/g,"$1").replace(/[ \t]{2,}/g," ").replace(/[ \t]+$/,"")}e.s(["stripCardMarkers",()=>aL],891730)},631746,e=>{"use strict";var t=e.i(948753),n=e.i(244825),r=e.i(984661);function i(){t.hasReducedMotionListener.current||(0,n.initPrefersReducedMotion)();let[e]=(0,r.useState)(t.prefersReducedMotion.current);return e}e.s(["useReducedMotion",()=>i])},129577,e=>{"use strict";var t=e.i(867650),n=e.i(590280),r=e.i(984661),i=e.i(914813),l=e.i(624484),a=e.i(1678),o=e.i(472768),s=e.i(444229),c=e.i(877369),u=e.i(223689),d=e.i(369352),h=e.i(939843),f=e.i(993019),p=e.i(906123),m=e.i(368864),g=e.i(812878),x=e.i(849450),y=e.i(373091),v=e.i(203436),b=e.i(37665),k=e.i(530675),w=e.i(891730),M=e.i(652546),S=e.i(631746);let C=["Buscando la factura que el cliente juró haber enviado","Recordando que el 20 de abril no es orientativo","Convenciendo al Excel de que 12,50 no es 1250","Cuadrando el debe y el haber a golpe de céntimo","Leyendo la letra pequeña del extracto bancario, otra vez","Preguntándole a la 555 quién es todo ese dinero","Buscando el ticket de la gasolinera en el bolsillo del pantalón","Explicando que 'ya lo pago yo' no es un asiento contable","Persiguiendo un NIF con la letra equivocada","Descifrando un concepto bancario de 40 caracteres en mayúsculas","Separando lo deducible de lo que al cliente le gustarÃa que fuera deducible","Calculando cuántos 'te lo mando mañana' caben en un trimestre","Poniendo orden en una carpeta llamada 'facturas varias (2)'","Comprobando si eso es una factura o una foto de una factura","Recordándole al cliente que Bizum también es dinero","Traduciendo 'un gasto de la empresa' a una cuenta del PGC","Esperando a que el banco sincronice, como todos","Localizando la nómina que llegó en foto y girada","Diciéndole al modelo 303 que respire hondo","Sumando el IVA soportado que sà tiene NIF","Aplicando el 21 % con cariño","Reconciliando el banco con la realidad","Repasando el trimestre con un café que ya está frÃo","Buscando la factura rectificativa de la rectificativa","Haciendo cuentas mientras el cliente hace planes","Contando cuántos dÃas lleva esa factura
1sin que nadie la mire","Distinguiendo un anticipo de un olvido","Comprobando que el proveedor existe y no es un primo del cliente","Redondeando a dos decimales sin que nadie salga herido","Averiguando si ese pago es un alquiler o una corazonada","Pidiendo educadamente el extracto de agosto","Cerrando el mes con la puerta del despacho entreabierta","Buscando el IBAN correcto entre los tres que mandó el cliente","Comprobando que el total de la factura es el total de la factura","Poniendo cara de póquer ante un gasto de 'representación'","Repasando qué vence antes: el 303 o la paciencia","Cotejando el extracto con la memoria del cliente, que falla más","Archivando en su sitio lo que llegó por WhatsApp a las once de la noche","Anotando en la agenda que el cliente 'ya está en ello'","Revisando que nadie haya contabilizado la propina"];function j(e){if(1===C.length)return C[0];let t=e??"";for(;t===e||!t;)t=C[Math.floor(Math.random()*C.length)];return t}var A=e.i(572731),N=e.i(820121);function E(e){let{status:n,className:i,compact:l=!1}=e,o=(0,S.useReducedMotion)(),s=(0,v.useLiveOrbState)(),c="dark"===(0,N.useAssistantTone)(),[u,d]=(0,r.useState)(n?(0,A.statusLine)(n):j()),[h,p]=(0,r.useState)(!n);return(0,r.useEffect)(()=>{n&&(d((0,A.statusLine)(n)),p(!1));let e=!1,t=window.setTimeout(function n(){e||(d(e=>j(e)),p(!0),t=window.setTimeout(n,2800))},n?4600:2800);return()=>{e=!0,window.clearTimeout(t)}},[n]),(0,t.jsx)("div",{className:(0,a.cn)("flex",i),role:"status","aria-live":"polite",children:(0,t.jsx)(v.OrbPill,{state:s,size:l?32:64,speed:1.15,className:(0,a.cn)(l?"":"py-3 pl-3 pr-6",c&&"bg-white/10"),children:(0,t.jsx)("span",{className:(0,a.cn)("min-w-0 overflow-hidden",l?"h-5":"h-6"),children:(0,t.jsx)(M.AnimatePresence,{mode:"wait",initial:!1,children:(0,t.jsxs)(f.motion.span,{initial:o?{opacity:0}:{opacity:0,y:6},animate:{opacity:1,y:0},exit:o?{opacity:0}:{opacity:0,y:-6},transition:{duration:.22,ease:[.23,1,.32,1]},className:(0,a.cn)("block truncate leading-6",l?"text-sm":"text-base",h?"italic text-white/60":"font-medium text-white/90"),children:[u,!h&&"â¦"]},u)})})})})}function P(e){return{p:e=>{let{children:n}=e;return(0,t.jsx)("p",{className:"mb-2 last:mb-0",children:n})},strong:e=>{let{children:n}=e;return(0,t.jsx)("strong",{className:"font-semibold",children:n})},ul:e=>{let{children:n}=e;return(0,t.jsx)("ul",{className:"mb-2 list-disc space-y-0.5 pl-5 last:mb-0",children:n})},ol:e=>{let{children:n}=e;return(0,t.jsx)("ol",{className:"mb-2 list-decimal space-y-0.5 pl-5 last:mb-0",children:n})},li:e=>{let{children:n}=e;return(0,t.jsx)("li",{children:n})},h1:e=>{let{children:n}=e;return(0,t.jsx)("h3",{className:"mb-1 mt-3 font-display text-base font-semibold first:mt-0",children:n})},h2:e=>{let{children:n}=e;return(0,t.jsx)("h3",{className:"mb-1 mt-3 font-display text-base font-semibold first:mt-0",children:n})},h3:e=>{let{children:n}=e;return(0,t.jsx)("h4",{className:"mb-1 mt-2 font-display text-sm font-semibold first:mt-0",children:n})},code:n=>{let{children:r}=n;return(0,t.jsx)("code",{className:(0,a.cn)("rounded px-1 py-0.5 text-xs",e?"bg-white/10":"bg-muted"),children:r})},table:e=>{let{children:n}=e;return(0,t.jsx)("div",{className:"mb-2 overflow-x-auto",children:(0,t.jsx)("table",{className:"w-full text-sm",children:n})})},th:n=>{let{children:r}=n;return(0,t.jsx)("th",{className:(0,a.cn)("border-b px-2 py-1 text-left text-xs font-semibold",e?"border-white/20":"border-border"),children:r})},td:n=>{let{children:r}=n;return(0,t.jsx)("td",{className:(0,a.cn)("border-b px-2 py-1 align-top",e?"border-white/15":"border-border/60"),children:r})},a:e=>{let{href:n,children:r}=e,i=(0,y.safeHref)(n);return i?i.startsWith("/")?(0,t.jsx)(p.default,{href:i,className:"underline underline-offset-2",children:r}):(0,t.jsx)("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-2",children:r}):(0,t.jsx)("span",{children:r})}}}let L=P(!1),T=P(!0);function I(e){let{call:n,dark:r}=e;return(0,t.jsxs)("li",{className:(0,a.cn)("flex items-center gap-1.5 font-mono text-[11px]",r?"text-white/60":"text-muted-foreground"),children:[void 0===n.ok?(0,t.jsx)(d.WrenchIcon,{className:"size-3 shrink-0"}):n.ok?(0,t.jsx)(s.CheckIcon,{className:"size-3 shrink-0 text-success"}):(0,t.jsx)(h.XIcon,{className:"size-3 shrink-0 text-destructive"}),(0,t.jsx)("span",{className:"truncate",children:n.label}),n.summary&&(0,t.jsxs)("span",{className:(0,a.cn)("truncate",r?"text-white/55":"text-muted-foreground
1/70"),children:["· ",n.summary]})]})}function D(e){let{message:n,status:i}=e,[l,s]=(0,r.useState)(!1),d="dark"===(0,N.useAssistantTone)(),h=(0,k.useAssistantStore)(e=>e.capabilities?.expert_only??!1);if("user"===n.role)return(0,t.jsx)(f.motion.div,{className:"flex justify-end",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.23,1,.32,1]},children:(0,t.jsx)("div",{className:(0,a.cn)("max-w-[85%] whitespace-pre-wrap rounded-2xl rounded-br-md px-4 py-2.5 text-sm text-white",d?"bg-white/10":"bg-secondary"),children:n.content})});let p=(0,w.stripCardMarkers)(n.content),y=p.trim().length>0,M=n.isStreaming&&!y&&0===n.blocks.length,S=n.blocks.some(e=>"action"===e.kind&&"pending"!==e.status);return(0,t.jsxs)(f.motion.div,{className:"flex gap-2.5",initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.25,ease:[.23,1,.32,1]},children:[!M&&(d?(0,t.jsx)(v.PacoOrb,{state:"working",size:32,speed:n.isStreaming?1.2:.55,className:"-ml-1 mt-0.5"}):(0,t.jsx)(v.PacoOrb,{theme:"light",state:"working",size:32,glow:!0,speed:n.isStreaming?1.2:.55,className:"-ml-1 mt-0.5"})),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2.5",children:[n.toolCalls.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(e=>!e),className:(0,a.cn)("flex items-center gap-1 text-xs",d?"text-white/60 hover:text-white":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(o.CaretDownIcon,{className:(0,a.cn)("size-3 transition-transform duration-200 ease-out",l&&"rotate-180")}),1===n.toolCalls.length?"1 consulta":`${n.toolCalls.length} consultas`]}),l&&(0,t.jsx)("ul",{className:"mt-1 space-y-0.5 pl-1",children:n.toolCalls.map(e=>(0,t.jsx)(I,{call:e,dark:d},e.id))})]}),n.blocks.map((e,r)=>{let i=`${n.id}-b${r}`;return(0,t.jsx)(b.RenderGuard,{what:"este bloque",children:(0,t.jsx)(x.BlockRenderer,{block:e})},i)}),M?(0,t.jsx)(E,{status:i,compact:!0}):y&&(0,t.jsxs)("div",{className:(0,a.cn)("text-sm leading-relaxed",S?d?"text-white/55":"text-muted-foreground":d?"text-white/90":"text-foreground/90"),children:[(0,t.jsx)(m.default,{remarkPlugins:[g.default],components:d?T:L,children:p}),n.isStreaming&&(0,t.jsx)("span",{className:(0,a.cn)("ml-0.5 inline-block h-4 w-1.5 animate-pulse align-text-bottom",d?"bg-white/60":"bg-foreground
1/60")})]}),n.isStreaming&&y&&i&&(0,t.jsx)(E,{status:i,compact:!0}),n.error&&(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-sm text-destructive",children:[(0,t.jsx)(u.WarningCircleIcon,{className:"size-4"}),n.error]}),!n.isStreaming&&n.tier&&!h&&(0,t.jsxs)("p",{className:(0,a.cn)("flex items-center gap-1.5 font-mono text-[10px] uppercase tracking-[0.14em]",d?"text-white/55":"text-muted-foreground/70"),children:[(0,t.jsx)(c.LightningIcon,{className:"size-3",weight:"smart"===n.tier?"fill":"regular"}),"smart"===n.tier?"Modo experto":"Modo rápido"]})]})]})}function z(e){let{className:n}=e,i=(0,k.useAssistantStore)(e=>e.messages),l=(0,k.useAssistantStore)(e=>e.status),o=(0,r.useRef)(null),s=(0,r.useRef)(0),c=i[i.length-1];return(0,r.useEffect)(()=>{var e;let t=o.current;if(!t)return;let n=t.closest("[data-paco-scroll]");if(!n)return;let r=n.scrollHeight-n.scrollTop-n.clientHeight<240;(i.length!==s.current||r)&&(e=i.length!==s.current?"auto":"smooth","function"==typeof n.scrollTo?n.scrollTo({top:n.scrollHeight,behavior:e}):n.scrollTop=n.scrollHeight),s.current=i.length},[i.length,c?.content,c?.blocks.length]),(0,t.jsxs)("div",{className:(0,a.cn)("space-y-4 px-4 py-4",n),children:[i.map(e=>(0,t.jsx)(D,{message:e,status:e.isStreaming?l:null},e.id)),(0,t.jsx)("div",{ref:o})]})}var F=e.i(926832);let R=new Set(["invoices","banking","reports","tax-models","contacts","products","tags","integrations","journal-entries","worklist","dashboard","settings","assistant","documents","group","onboarding","support"]);var O=e.i(419143),_=e.i(830616),H=e.i(71631);let V=[];function B(e){let{onPick:n}=e,r=(0,k.useAssistantStore)(e=>e.capabilities?.suggestions??V);return 0===r.length?null:(0,t.jsx)("div",{className:"flex flex-wrap gap-2 px-4 pt-10 pb-6",children:r.slice(0,3).map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>n(e),className:"rounded-lg border border-white/15 bg-white/[0.06] px-3 py-1.5 text-sm text-white/75 transition-colors duration-200 hover:border-white/30 hover:bg-white/[0.1] hover:text-white",children:e},e))})}function q(e){let a,o,s,{orgSlug:c,variant:u}=e,d=(0,n.usePathname)(),{sendMessage:h,stop:f}=(a=k.useAssistantStore,o=(0,_.useQueryClient)(),s=(0,r.useCallback)(()=>o.invalidateQueries({queryKey:["assistant-conversations"]}),[o]),{sendMessage:(0,r.useCallback)(async e=>{let t=e.message.trim();if(!t)return;let n=a.getState();if(n.isStreaming)return;let r=new AbortController;n.beginTurn(t,r);try{let n=await H.API.assistant.streamTurn(e.orgSlug,{message:t,conversation_id:e.conversationId??a.getState().conversationId??null,page_context:e.pageContext??{},force_tier:e.forceTier??null},r.signal);if(!n.ok||!n.body){let e=`Error ${n.status}`;try{let t=await n.json();e=t?.detail?.message||t?.detail||e}catch{}403===n.status&&(e="Paco no está activado en esta organización."),429===n.status&&(e="Vas muy rápido: espera unos segundos y vuelve a intentarlo."),a.getState().failTurn(String(e));return}let i=n.body.getReader(),l=new TextDecoder,o="",c=!1;for(;;){let{done:e,value:t}=await i.read();if(e)break;o+=l.decode(t,{stream:!0});let{events:n,rest:r}=function(e){let t=e.split("\n"),n=t.pop()??"",r=[];for(let e of t){if(!e.startsWith("data: "))continue;let t=e.slice(6).trim();if(t)try{r.push(JSON.parse(t))}catch{}}return{events:r,rest:n}}(o);for(let e of(o=r,n)){let t=a.getState();switch(e.type){case"meta":t.setMeta({conversationId:e.conversation_id,tier:e.tier,model:e.model,userMessageId:e.user_message_id});break;case"status":e.text&&t.setStatus(e.text);break;case"token":e.content&&t.appendToken(e.content);break;case"tool_call":t.addToolCall({id:e.tool_call_id??"",name:e.tool_name??"",label:e.label??e.tool_name??""});break;case"tool_result":t.resolveToolCall(e.tool_call_id??"",!1!==e.ok,e.summary);break;case"block":case"action":case"artifact":e.block&&t.pushBlock(e.block);break;case"done":c=!0,s(),t.finishTurn({messageId:e.message_id,content:e.content,blocks:e.blocks}),e.conversation_id&&t.setMeta({conversationId:e.conversation_id});break;case"error":c=!0,t.failTurn(e.message||"Se me ha cruzado un cable. Inténtalo otra vez.")}}}c||a.getState().finishTurn({}),s()}catch(e){if(e?.name==="AbortError")return void a.getState().finishTurn({});a.getState().failTurn("No he podido conectar con el servidor. Comprueba la conexión e inténtalo de nuevo.")}},[s]),stop:(0,r.useCallback)(()=>a.getState().stopStreaming(),[a])}),p=(0,k.useAssistantStore)(e=>e.messages.length>0),m=(0,k.useAssistantStore)(e=>e.expertMode),g=(0,k.useAssistantStore)(e=>e.conversationOrgSlug)??c,x=(0,k.useAssistantStore)(e=>e.pendingPrompt),y=(0,k.useAssistantStore)(e=>e.pendingPageContext),v=(0,k.useAssistantStore)(e=>e.setPendingPrompt),w=(0,k.useAssistantStore)(e=>e.isStreaming),M=(0,r.useRef)(null),S=(0,r.useCallback)((e,t)=>{h({orgSlug:g,message:e,pageContext:{...function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!e)return{};
1let n=e.split("?")[0].split("/").filter(Boolean);if(0===n.length)return{path:e};if("dashboard"===n[0]){let t=n[1]??"home",r={path:e,section:`manager:${t}`};return"invoices"===t&&n[2]&&"validate"===n[3]&&(r.entity_type="invoice",r.entity_id=n[2]),r}let[,r,i,l]=n,a={path:e,section:r&&R.has(r)?r:void 0};if("invoices"===r&&i&&"validate"===l)a.entity_type="invoice",a.entity_id=i;else if("tax-models"===r&&i)a.entity_type="submission",a.entity_id=i;else{let e,n,i;"reports"===r&&(e=(0,F.parseReportSearch)(new URLSearchParams(t)),n=(0,F.periodParams)(e),i={tab:e.tab},n.start_date&&n.end_date&&(i.from=n.start_date,i.to=n.end_date),"none"!==e.compare&&(i.compare=e.compare),"management"!==e.view&&(i.view=e.view),"period"!==e.columns&&(i.columns=e.columns),"sumas-saldos"===e.tab&&(i.level=String(e.level)),e.asOf&&(i.asOf=e.asOf),a.view=i)}return a}(d,window.location.search),...t??{}},forceTier:m?"smart":null})},[h,g,d,m]);return(0,r.useEffect)(()=>{!x||w||M.current!==x&&(M.current=x,v(null),S(x,y))},[x,y,w,S,v]),(0,t.jsx)(O.AssistantPromptContext.Provider,{value:{sendPrompt:S,orgSlug:g},children:(0,t.jsx)(N.AssistantToneContext.Provider,{value:"hero"===u?"dark":"light",children:(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 basis-0",children:[(0,t.jsx)("div",{"data-paco-scroll":"",className:"h-full overflow-y-auto scrollbar-thin",children:p?(0,t.jsx)(b.RenderGuard,{what:"la conversación",className:"px-4 py-6 text-sm text-destructive",children:(0,t.jsx)(z,{className:"hero"===u?"pt-10 pb-6":void 0})}):"hero"===u?(0,t.jsx)(B,{onPick:S}):(0,t.jsx)(l.Greeting,{compact:"dock"===u})}),"hero"===u&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-12 bg-gradient-to-b from-secondary via-secondary/70 to-transparent backdrop-blur-[3px] [mask-image:linear-gradient(to_bottom,black_35%,transparent)]"}),(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-8 bg-gradient-to-t from-secondary/90 to-transparent"})]})]}),(0,t.jsx)(i.Composer,{orgSlug:g,onSend:S,onStop:f,autoFocus:!0,placeholder:"hero"===u?"Pregúntale a Paco por la cartera o por un clienteâ¦":void 0})]})})})}e.s(["AssistantChat",()=>q],129577)},152e3,e=>{"use strict";var t=e.i(984661),n=e.i(94884);let r=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),t.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z"}))]]),i=t.forwardRef((e,i)=>t.createElement(n.default,{ref:i,...e,weights:r}));i.displayName="PushPinIcon",e.s(["PushPinIcon",()=>i],152e3)},379945,e=>{"use strict";function t(e){return e.messages.map(e=>({id:e.id,role:e.role,content:e.content,blocks:e.blocks??[],toolCalls:(e.tool_calls??[]).map(e=>({id:e.id,name:e.name,label:e.name,ok:e.ok,summary:e.summary})),tier:e.tier??void 0,model:e.model??void 0,createdAt:e.created_at??new Date().toISOString()}))}e.s(["messagesFromDetail",()=>t])},169300,e=>{"use strict";var t=e.i(867650),n=e.i(914358),r=e.i(152e3),i=e.i(749501),l=e.i(868729),a=e.i(830616),o=e.i(360112),s=e.i(75918),c=e.i(836291),u=e.i(71631),d=e.i(1678),h=e.i(874941),f=e.i(379945),p=e.i(530675),m=e.i(820121);function g(e){return"portfolio"===e.scope?"Toda la cartera":e.organization_name??e.organization_slug??""}function x(e){let{orgSlug:x,onSelect:y}=e,v=(0,a.useQueryClient)(),b="dark"===(0,m.useAssistantTone)(),k=(0,p.useAssistantStore)(e=>e.conversationId),w=(0,p.useAssistantStore)(e=>e.loadConversation),M=(0,p.useAssistantStore)(e=>e.newConversation),S=(0,p.useAssistantStore)(e=>e.removeConversation),{data:C,isLoading:j}=(0,l.useQuery)({queryKey:["assistant-conversations",x,"all"],queryFn:()=>u.API.assistant.listConversations(x,{limit:50,all:!0}),refetchOnMount:"always",staleTime:0}),A=async e=>{let t=e.organization_slug??x;try{let n=await u.API.assistant.getConversation(t,e.id);w(e.id,(0,f.messagesFromDetail)(n),t,g(e)),y?.()}catch(e){o.toast.error((0,h.getErrorMessage)(e,"No se pudo abrir la conversación"))}},N=async e=>{try{await u.API.assistant.deleteConversation(x,e),S(e),v.invali
1dateQueries({queryKey:["assistant-conversations",x]})}catch(e){o.toast.error((0,h.getErrorMessage)(e,"No se pudo borrar la conversación"))}};return(0,t.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2",children:[(0,t.jsx)("p",{className:(0,d.cn)("font-display text-sm font-semibold",b&&"text-white"),children:"Conversaciones"}),(0,t.jsxs)(s.Button,{size:"sm",variant:"outline",className:(0,d.cn)(b&&"border-white/30 bg-transparent text-white hover:bg-white/10 hover:text-white"),onClick:()=>{M(),y?.()},children:[(0,t.jsx)(n.PlusIcon,{className:"size-4"}),"Nueva"]})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[j&&(0,t.jsxs)("div",{className:"space-y-2 px-3",children:[(0,t.jsx)(c.Skeleton,{className:(0,d.cn)("h-9 w-full",b&&"bg-white/10")}),(0,t.jsx)(c.Skeleton,{className:(0,d.cn)("h-9 w-full",b&&"bg-white/10")}),(0,t.jsx)(c.Skeleton,{className:(0,d.cn)("h-9 w-3/4",b&&"bg-white/10")})]}),C&&0===C.conversations.length&&(0,t.jsx)("p",{className:(0,d.cn)("px-3 py-6 text-center text-sm",b?"text-white/60":"text-muted-foreground"),children:"TodavÃa no has hablado con Paco."}),(0,t.jsx)("ul",{children:C?.conversations.map(e=>(0,t.jsxs)("li",{className:(0,d.cn)("group flex items-center gap-1 px-2",k===e.id&&(b?"bg-white/10":"bg-muted")),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>A(e),className:(0,d.cn)("flex min-w-0 flex-1 flex-col gap-0.5 rounded-md px-1 py-2 text-left text-sm",b?"text-white hover:bg-white/[0.08]":"hover:bg-muted"),children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[e.pinned&&(0,t.jsx)(r.PushPinIcon,{className:(0,d.cn)("size-3 shrink-0",b?"text-white/50":"text-muted-foreground"),weight:"fill"}),(0,t.jsx)("span",{className:"truncate",children:e.title})]}),(0,t.jsx)("span",{className:(0,d.cn)("truncate font-mono text-[10px] uppercase tracking-[0.12em]",b?"text-white/55":"text-muted-foreground/70"),children:g(e)})]}),(0,t.jsxs)(s.Button,{size:"icon-sm",variant:"ghost",className:(0,d.cn)("opacity-0 transition-opacity duration-150 group-hover:opacity-100 hover:text-destructive",b?"text-white/60 hover:bg-white/10":"text-muted-foreground"),onClick:()=>N(e.id),title:"Borrar",children:[(0,t.jsx)(i.TrashIcon,{className:"size-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Borrar conversación"})]})]},e.id))})]})]})}e.s(["ConversationList",()=>x])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.