1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c76066a5-d18f-564e-aa68-945ac10f6d1b")}catch(e){}}(); 3(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[73270],{20732:function(e,t,n){n.d(t,{Xe:function(){return Du},Yl:function(){return Rr},bh:function(){return wa},iU:function(){return Fr},k_:function(){return se},wr:function(){return pe}});var r,a,o,i,s,l,c=n(91880),u=n(76036),d=n(80980),p=n(52371),f=n(53539),h=n(73240),m=n(38634),g=n(47396),y=n(15775),v=n(62648),x=n(67771),b=n(59559),k=n(90901),w=n(1622),S=n(77092),E=n(57019),I=n(17613),C=n(25243),z=n(22221),j=n(96353),_=n(79387),A=n(71634),T=n(62954),N=n(65713),D=n(59461),M=n(41146),L=n(78986),P=n(48267),R=n(18305),O=n(64760),F=Object.create,q=Object.defineProperty,B=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyNames,V=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty,H=(e,t)=>function(){return t||(0,e[U(e)[0]])((t={exports:{}}).exports,t),t.exports},Y=(e,t)=>{for(var n in t)q(e,n,{get:t[n],enumerable:!0})},Z=(e,t,n)=>(n=null!=e?F(V(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of U(t))$.call(e,a)||a===n||q(e,a,{get:()=>t[a],enumerable:!(r=B(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:q(n,"default",{value:e,enumerable:!0}),e)),W=H({"../../../../../../root/.yarn/berry/cache/throttleit-npm-2.1.0-7064896991-10.zip/node_modules/throttleit/index.js"(e,t){t.exports=function(e,t){if("function"!=typeof e)throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...a){clearTimeout(n);const o=Date.now(),i=t-(o-r);i<=0?(r=o,e.apply(this,a)):n=setTimeout((()=>{r=Date.now(),e.apply(this,a)}),i)}}}}),G=H({"../../../../../../root/.yarn/berry/cache/inline-style-parser-npm-0.2.7-f6a53ea0a2-10.zip/node_modules/inline-style-parser/cjs/index.js"(e,t){var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,a=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,u="";function d(e){return e?e.replace(c,u):u}t.exports=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var c=1,p=1;function f(e){var t=e.match(r);t&&(c+=t.length);var n=e.lastIndexOf("\n");p=~n?e.length-n:p+e.length}function h(){var e={line:c,column:p};return function(t){return t.position=new m(e),v(),t}}function m(e){this.start=e,this.end={line:c,column:p},this.source=t.source}function g(n){var r=new Error(t.source+":"+c+":"+p+": "+n);if(r.reason=n,r.filename=t.source,r.line=c,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function v(){y(a)}function x(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;u!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,u===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return p+=2,f(r),e=e.slice(n),p+=2,t({type:"comment",comment:r})}}function k(){var e=h(),t=y(o);if(t){if(b(),!y(i))return g("property missing ':'");var r=y(s),a=e({type:"declaration",property:d(t[0].replace(n,u)),value:r?d(r[0].replace(n,u)):u});return y(l),a}}return m.prototype.content=e,v(),function(){var e,t=[];for(x(t);e=k();)!1!==e&&(t.push(e),x(t));return t}()}}}),J=H({"../../../../../../root/.yarn/berry/cache/style-to-object-npm-1.0.14-fd5f299af0-10.zip/node_modules/style-to-object/cjs/index.js"(e){var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){let r=null;if(!e||"string"!=typeof e)return r;const a=(0,n.default)(e),o="function"==typeof t;return a.forEach((e=>{if("declaration"!==e.type)return;const{property:n,value:a}=e;o?t(n,a,e):a&&(r=r||{},r[n]=a)})),r};var n=t(G())}}),K=H({"../../../../../../root/.yarn/berry/cache/style-to-js-npm-1.1.21-dde24b7a46-10.zip/node_modules/style-to-js/cjs/utilities.js"(e){Object.defineProperty(e,"__esMo
3dule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},s=function(e,t){return"".concat(t,"-")};e.camelCase=function(e,l){return void 0===l&&(l={}),function(e){return!e||r.test(e)||t.test(e)}(e)?e:(e=e.toLowerCase(),(e=l.reactCompat?e.replace(o,s):e.replace(a,s)).replace(n,i))}}}),Q=H({"../../../../../../root/.yarn/berry/cache/style-to-js-npm-1.1.21-dde24b7a46-10.zip/node_modules/style-to-js/cjs/index.js"(e,t){var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(J()),r=K();function a(e,t){var a={};return e&&"string"==typeof e?((0,n.default)(e,(function(e,n){e&&n&&(a[(0,r.camelCase)(e,t)]=n)})),a):a}a.default=a,t.exports=a}}),X=H({"../../../../../../root/.yarn/berry/cache/extend-npm-3.0.2-e1ca07ac54-10.zip/node_modules/extend/index.js"(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},s=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var t,a=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},l=function(e,t){a&&"__proto__"===t.name?a(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(o)return o(e,t).value}return e[t]};t.exports=function e(){var t,n,r,a,o,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(a=c(t,n))&&(h&&a&&(s(a)||(o=i(a)))?(o?(o=!1,u=r&&i(r)?r:[]):u=r&&s(r)?r:{},l(d,{name:n,newValue:e(h,u,a)})):void 0!==a&&l(d,{name:n,newValue:a}));return d}}}),ee=class{buffered=null;handler=null;listeners=new Set;send(e){this.listeners.forEach((t=>t(e))),null!==this.handler?this.handler(e):this.buffered=e}setHandler(e){if(this.handler=e,null!==this.buffered){const t=this.buffered;this.buffered=null,e(t)}return()=>{this.handler===e&&(this.handler=null)}}on(e){return this.listeners.add(e),null!==this.buffered&&e(this.buffered),()=>{this.listeners.delete(e)}}peek(){return this.buffered??void 0}clear(){this.buffered=null}},te=class{stored=null;subscribers=new Set;get latest(){return this.stored??void 0}set(e){this.stored=e,this.subscribers.forEach((t=>t(e)))}subscribe(e){return this.subscribers.add(e),null!==this.stored&&e(this.stored),()=>{this.subscribers.delete(e)}}clear(){this.stored=null}},ne=()=>({state:new te,prompt:new ee,thread:new ee}),re=(0,c.createContext)(null),ae=()=>{const e=(0,c.useContext)(re);if(!e)throw new Error("useChatConfig must be used within ChatProvider");return e},oe=(0,c.createContext)({components:{Link:u.N_},bridge:ne(),registerChatInstance:()=>()=>{}}),ie=()=>(0,c.useContext)(oe),se=({transport:e,user:t,__internal:n,children:r})=>{const a=(0,c.useMemo)((()=>({transport:e,user:t})),[e,t]),o=(0,c.useRef)(0),[i]=(0,c.useState)((()=>({...n,components:{...n?.components,Link:n?.components?.Link??u.N_},bridge:n?.bridge??ne(),registerChatInstance:()=>o.current>=1?null:(o.current+=1,()=>{o.current-=1})})));return(0,d.jsx)(re.Provider,{value:a,children:(0,d.jsx)(oe.Provider,{value:i,children:r})})},le=e=>"object"==typeof e&&null!==e&&"type"in e&&("company"===e.type||"narrative"===e.type||"article"===e.type||"industry"===e.type||"market"===e.type),ce=e=>le(e)&&"company"===e.type,ue=e=>{const t=void 0!==e.company_id?{type:"company",company_id:e.company_id,unique_symbol:e.unique_symbol,label:e.company_name,canonical_url:e.canonical_url}:void 0,n=void 0!==e.page_context?.title||void 0!==e.page_context?.annotation?{title:e.page_context?.title,view:e.page_context?.annotation}:void 0;if(void 0!==t||void 0!==n)return{...t?{anchor:t}:{},...n?{page:n}:{}}},de=()=>(0,h.v4)(),pe=e=>(0,h.tf)(e),fe=e=>({Authorization:`Bearer ${e??""}`}),he=(e,t)=>["vibe","chat-history-list",e,t??"__none__"],me=async(e,t,n)=>{if(n)return{chats:[],total:0};try{return await(async(e,t)=>{const n=await t(),r=await fetch(`${e}/history`,{headers:fe(n)});if(!r.ok)throw new Error(`Failed to fetch chat history list: ${r.status}`);return r.json()})(e,t)}catch(e){return console.error("Failed to fetch chat history list",e),{chats:[],total:0}}},ge="vercel.ai.error",ye=Symbol.for(ge),ve=class e extends(a=Error,r=ye,a){constructor({name:e,message:t,cause:n}){super(t),this[r]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,ge)}static hasMarker(e,t){const n=Symbol.for(t);return null!=e&&"object"==typeof e&&n in e&&"boolean"==typeof e[n]&&!0===e[n]}},xe="AI_APICallError",be=`vercel.ai.error.${xe}`,ke=Symbol.for(be),we=(i=ve,o=ke,"AI_EmptyResponseBodyError"),Se=`vercel.ai.error.${we}`,Ee=Symbol.for(Se);l=ve,s=Ee;function Ie(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}var Ce,ze,je,_e,Ae,Te,Ne,De,Me,Le,Pe,Re,Oe,Fe,qe,Be,Ue,Ve,$e,He,Ye,Ze,We="AI_InvalidArgumentError",Ge=`vercel.ai.error.${We}`,Je=Symbol.for(Ge),Ke=class extends(ze=ve,Ce=Je,ze){constructor({message:e,cause:t,argument:n}){super({name:We,message:e,cause:t}),this[Ce]=!0,this.argument=n}static isInstance(e){return ve.hasMarker(e,Ge)}},Qe="AI_InvalidPromptError",Xe=`vercel.ai.error.${Qe}`,et=Symbol.for(Xe),tt=(_e=ve,je=et,"AI_InvalidResponseDataError"),nt=`vercel.ai.error.${tt}`,rt=Symbol.for(nt),at=(Te=ve,Ae=rt,"AI_JSONParseError"),ot=`vercel.ai.error.${at}`,it=Symbol.for(ot),st=class extends(De=ve,Ne=it,De){constructor({text:e,cause:t}){super({name:at,message:`JSON parsing failed: Text: ${e}.\nError message: ${Ie(t)}`,cause:t}),this[Ne]=!0,this.text=e}static isInstance(e){return ve.hasMarker(e,ot)}},lt="AI_LoadAPIKeyError",ct=`vercel.ai.error.${lt}`,ut=Symbol.for(ct),dt=(Le=ve,Me=ut,"AI_LoadSettingError"),pt=`vercel.ai.error.${dt}`,ft=Symbol.for(pt),ht=(Re=ve,Pe=ft,"AI_NoContentGeneratedError"),mt=`vercel.ai.error.${ht}
3`,gt=Symbol.for(mt),yt=(Fe=ve,Oe=gt,"AI_NoSuchModelError"),vt=`vercel.ai.error.${yt}`,xt=Symbol.for(vt),bt=(Be=ve,qe=xt,"AI_TooManyEmbeddingValuesForCallError"),kt=`vercel.ai.error.${bt}`,wt=Symbol.for(kt),St=(Ve=ve,Ue=wt,"AI_TypeValidationError"),Et=`vercel.ai.error.${St}`,It=Symbol.for(Et),Ct=class e extends(He=ve,$e=It,He){constructor({value:e,cause:t}){super({name:St,message:`Type validation failed: Value: ${JSON.stringify(e)}.\nError message: ${Ie(t)}`,cause:t}),this[$e]=!0,this.value=e}static isInstance(e){return ve.hasMarker(e,Et)}static wrap({value:t,cause:n}){return e.isInstance(n)&&n.value===t?n:new e({value:t,cause:n})}},zt="AI_UnsupportedFunctionalityError",jt=`vercel.ai.error.${zt}`,_t=Symbol.for(jt),At=(Ze=ve,Ye=_t,class extends Error{constructor(e,t){super(e),this.name="ParseError",this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}}),Tt=32;function Nt(e){}function Dt(e){if("function"==typeof e)throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Nt,onError:n=Nt,onRetry:r=Nt,onComment:a}=e,o=[];let i,s,l=!0,c="",u=0;function d(e){let n=0;if(-1===e.indexOf("\r")){let r=e.indexOf("\n",n);for(;-1!==r;){if(n===r){u>0&&t({id:i,event:s,data:c}),i=void 0,c="",u=0,s=void 0,n=r+1,r=e.indexOf("\n",n);continue}const a=e.charCodeAt(n);if(Mt(e,n,a)){const a=e.charCodeAt(n+5)===Tt?n+6:n+5,o=e.slice(a,r);if(0===u&&10===e.charCodeAt(r+1)){t({id:i,event:s,data:o}),i=void 0,c="",s=void 0,n=r+2,r=e.indexOf("\n",n);continue}c=0===u?o:`${c}\n${o}`,u++}else Lt(e,n,a)?s=e.slice(e.charCodeAt(n+6)===Tt?n+7:n+6,r)||void 0:p(e,n,r);n=r+1,r=e.indexOf("\n",n)}return e.slice(n)}for(;n<e.length;){const t=e.indexOf("\r",n),r=e.indexOf("\n",n);let a=-1;if(-1!==t&&-1!==r?a=t<r?t:r:-1!==t?a=t===e.length-1?-1:t:-1!==r&&(a=r),-1===a)break;p(e,n,a),n=a+1,13===e.charCodeAt(n-1)&&10===e.charCodeAt(n)&&n++}return e.slice(n)}function p(e,n,r){if(n===r)return u>0&&t({id:i,event:s,data:c}),i=void 0,c="",u=0,void(s=void 0);const o=e.charCodeAt(n);if(Mt(e,n,o)){const t=e.charCodeAt(n+5)===Tt?n+6:n+5,a=e.slice(t,r);return c=0===u?a:`${c}\n${a}`,void u++}if(Lt(e,n,o))return void(s=e.slice(e.charCodeAt(n+6)===Tt?n+7:n+6,r)||void 0);if(105===o&&100===e.charCodeAt(n+1)&&58===e.charCodeAt(n+2)){const t=e.slice(e.charCodeAt(n+3)===Tt?n+4:n+3,r);return void(i=t.includes("\0")?void 0:t)}if(58===o){if(a){const t=e.slice(n,r);a(t.slice(e.charCodeAt(n+1)===Tt?2:1))}return}const l=e.slice(n,r),d=l.indexOf(":");if(-1===d)return void f(l,"",l);const p=l.slice(0,d),h=l.charCodeAt(d+1)===Tt?2:1;f(p,l.slice(d+h),l)}function f(e,t,a){switch(e){case"event":s=t||void 0;break;case"data":c=0===u?t:`${c}\n${t}`,u++;break;case"id":i=t.includes("\0")?void 0:t;break;case"retry":/^\d+$/.test(t)?r(parseInt(t,10)):n(new At(`Invalid \`retry\` value: "${t}"`,{type:"invalid-retry",value:t,line:a}
3));break;default:n(new At(`Unknown field "${e.length>20?`${e.slice(0,20)}â¦`:e}"`,{type:"unknown-field",field:e,value:t,line:a}))}}return{feed:function(e){if(l&&(l=!1,239===e.charCodeAt(0)&&187===e.charCodeAt(1)&&191===e.charCodeAt(2)&&(e=e.slice(3))),0===o.length){const t=d(e);return void(""!==t&&o.push(t))}if(-1===e.indexOf("\n")&&-1===e.indexOf("\r"))return void o.push(e);o.push(e);const t=o.join("");o.length=0;const n=d(t);""!==n&&o.push(n)},reset:function(e={}){if(e.consume&&o.length>0){const e=o.join("");p(e,0,e.length)}l=!0,i=void 0,c="",u=0,s=void 0,o.length=0}}}function Mt(e,t,n){return 100===n&&97===e.charCodeAt(t+1)&&116===e.charCodeAt(t+2)&&97===e.charCodeAt(t+3)&&58===e.charCodeAt(t+4)}function Lt(e,t,n){return 101===n&&118===e.charCodeAt(t+1)&&101===e.charCodeAt(t+2)&&110===e.charCodeAt(t+3)&&116===e.charCodeAt(t+4)&&58===e.charCodeAt(t+5)}var Pt,Rt,Ot=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(a){r=Dt({onEvent:e=>{a.enqueue(e)},onError(t){"terminate"===e?a.error(t):"function"==typeof e&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},Ft="AI_DownloadError",qt=`vercel.ai.error.${Ft}`,Bt=Symbol.for(qt);Rt=ve,Pt=Bt;var Ut=({prefix:e,size:t=16,alphabet:n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const a=()=>{const e=n.length,r=new Array(t);for(let a=0;a<t;a++)r[a]=n[Math.random()*e|0];return r.join("")};if(null==e)return a;
3if(n.includes(r))throw new Ke({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${a()}`},Vt=Ut();function $t(e){if(null==e)return{};const t={};if(e instanceof Headers)e.forEach(((e,n)=>{t[n.toLowerCase()]=e}));else{Array.isArray(e)||(e=Object.entries(e));for(const[n,r]of e)null!=r&&(t[n.toLowerCase()]=r)}return t}var Ht=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Yt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Zt(e){const t=JSON.parse(e);return null===t||"object"!=typeof t||!1===Ht.test(e)&&!1===Yt.test(e)?t:function(e){let t=[e];for(;t.length;){const e=t;t=[];for(const n of e){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&null!==n.constructor&&"object"==typeof n.constructor&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const e in n){const r=n[e];r&&"object"==typeof r&&t.push(r)}}}return e}(t)}var Wt=Symbol.for("vercel.ai.validator");function Gt(e){let t;return()=>(null==t&&(t=e()),t)}function Jt(e){return function(e){return"object"==typeof e&&null!==e&&Wt in e&&!0===e[Wt]&&"validate"in e}(e)?e:"function"==typeof e?e():(t=e,n=async e=>{const n=await t["~standard"].validate(e);return null==n.issues?{success:!0,value:n.value}:{success:!1,error:new Ct({value:e,cause:n.issues})}},{[Wt]:!0,validate:n});var t,n}async function Kt({value:e,schema:t}){const n=await Qt({value:e,schema:t});if(!n.success)throw Ct.wrap({value:e,cause:n.error});return n.value}async function Qt({value:e,schema:t}){const n=Jt(t);try{if(null==n.validate)return{success:!0,value:e,rawValue:e};const t=await n.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:Ct.wrap({value:e,cause:t.error}),rawValue:e}}catch(t){return{success:!1,error:Ct.wrap({value:e,cause:t}),rawValue:e}}}async function Xt({text:e,schema:t}){try{const n=function(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch(t){return Zt(e)}try{return Zt(e)}finally{Error.stackTraceLimit=t}}(e);return null==t?{success:!0,value:n,rawValue:n}:await Qt({value:n,schema:t})}catch(t){return{success:!1,error:st.isInstance(t)?t:new st({text:e,cause:t}),rawValue:void 0}}}async function en(e){return"function"==typeof e&&(e=e()),Promise.resolve(e)}var tn=Symbol.for("vercel.ai.schema");function nn(e,{validate:t}={}){return{[tn]:!0,_type:void 0,[Wt]:!0,get jsonSchema(){return"function"==typeof e&&(e=e()),e},validate:t}}function rn(e){if("object"===e.type){e.additionalProperties=!1;const t=e.properties;if(null!=t)for(const e in t)t[e]=rn(t[e])}return"array"===e.type&&null!=e.items&&(Array.isArray(e.items)?e.items=e.items.map((e=>rn(e))):e.items=rn(e.items)),e}var an=Symbol("Let zodToJsonSchema decide on which parser to use"),on={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"};function sn(e,t){return Ln(e.type._def,t)}
vendor: 9,927 bytes, line 3
3function ln(e,t,n){const r=null!=n?n:t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map(((n,r)=>ln(e,t,n)))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return cn(e)}}var cn=e=>{const t={type:"integer",format:"unix-time"};for(const n of e.checks)switch(n.kind){case"min":t.minimum=n.value;break;case"max":t.maximum=n.value}return t};var un=void 0,dn=/^[cC][^\s-]{8,}$/,pn=/^[0-9a-z]+$/,fn=/^[0-9A-HJKMNP-TV-Z]{26}$/,hn=/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,mn=()=>(void 0===un&&(un=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),un),gn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yn=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bn=/^[a-zA-Z0-9_-]{21}$/,kn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;function wn(e,t){const n={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value;break;case"max":n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"email":switch(t.emailStrategy){case"format:email":In(n,"email",r.message,t);break;case"format:idn-email":In(n,"idn-email",r.message,t);break;case"pattern:zod":Cn(n,hn,r.message,t)}break;case"url":In(n,"uri",r.message,t);break;case"uuid":In(n,"uuid",r.message,t);break;case"regex":Cn(n,r.regex,r.message,t);break;case"cuid":Cn(n,dn,r.message,t);break;case"cuid2":Cn(n,pn,r.message,t);break;case"startsWith":Cn(n,RegExp(`^${Sn(r.value,t)}`),r.message,t);break;case"endsWith":Cn(n,RegExp(`${Sn(r.value,t)}$`),r.message,t);break;case"datetime":In(n,"date-time",r.message,t);break;case"date":In(n,"date",r.message,t);break;case"time":In(n,"time",r.message,t);break;case"duration":In(n,"duration",r.message,t);break;case"length":n.minLength="number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,n.maxLength="number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value;break;case"includes":Cn(n,RegExp(Sn(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&In(n,"ipv4",r.message,t),"v4"!==r.version&&In(n,"ipv6",r.message,t);break;case"base64url":Cn(n,xn,r.message,t);break;case"jwt":Cn(n,kn,r.message,t);break;case"cidr":"v6"!==r.version&&Cn(n,gn,r.message,t),"v4"!==r.version&&Cn(n,yn,r.message,t);break;case"emoji":Cn(n,mn(),r.message,t);break;case"ulid":Cn(n,fn,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":In(n,"binary",r.message,t);break;case"contentEncoding:base64":n.contentEncoding="base64";break;case"pattern:zod":Cn(n,vn,r.message,t)}break;case"nanoid":Cn(n,bn,r.message,t)}return n}function Sn(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)En.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}var En=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function In(e,t,n,r){var a;e.format||(null==(a=e.anyOf)?void 0:a.some((e=>e.format)))?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function Cn(e,t,n,r){var a;e.pattern||(null==(a=e.allOf)?void 0:a.some((e=>e.pattern)))?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:zn(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=zn(t,r)}function zn(e,t){var n;if(!t.applyRegexFlags||!e.flags)return e.source;const r=e.flags.includes("i"),a=e.flags.includes("m"),o=e.flags.includes("s"),i=r?e.source.toLowerCase():e.source;let s="",l=!1,c=!1,u=!1;for(let e=0;e<i.length;e++)if(l)s+=i[e],l=!1;else{if(r)if(c){if(i[e].match(/[a-z]/)){u?(s+=i[e],s+=`${i[e-2]}-${i[e]}`.toUpperCase(),u=!1):"-"===i[e+1]&&(null==(n=i[e+2])?void 0:n.match(/[a-z]/))?(s+=i[e],u=!0):s+=`${i[e]}${i[e].toUpperCase()}`;continue}}else if(i[e].match(/[a-z]/)){s+=`[${i[e]}${i[e].toUpperCase()}]`;continue}if(a){if("^"===i[e]){s+="(^|(?<=[\r\n]))";continue}if("$"===i[e]){s+="($|(?=[\r\n]))";continue}}o&&"."===i[e]?s+=c?`${i[e]}\r\n`:`[${i[e]}\r\n]`:(s+=i[e],"\\"===i[e]?l=!0:c&&"]"===i[e]?c=!1:c||"["!==i[e]||(c=!0))}try{new RegExp(s)}catch(n){return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return s}function jn(e,t){var n,r,a,o,i,s;const l={type:"object",additionalProperties:null!=(n=Ln(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))?n:t.allowedAdditionalProperties};if((null==(r=e.keyType)?void 0:r._def.typeName)===g.kY.ZodString&&(null==(a=e.keyType._def.checks)?void 0:a.length)){const{type:n,...r}=wn(e.keyType._def,t);return{...l,propertyNames:r}}if((null==(o=e.keyType)?void 0:o._def.typeName)===g.kY.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if((null==(i=e.keyType)?void 0:i._def.typeName)===g.kY.ZodBranded&&e.keyType._def.type._def.typeName===g.kY.ZodString&&(null==(s=e.keyType._def.type._def.checks)?void 0:s.length)){const{type:n,...r}=sn(e.keyType._def,t);return{...l,propertyNames:r}}return l}var _n={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};var An=(e,t)=>{const n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map(((e,n)=>Ln(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]}))).filter((e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0)));return n.length?{anyOf:n}:void 0};function Tn(e,t){const n={type:"object",properties:{}},r=[],a=e.shape();for(const e in a){let o=a[e];if(void 0===o||void 0===o._def)continue;const i=Nn(o),s=Ln(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==s&&(n.properties[e]=s,i||r.push(e))}r.length&&(n.required=r);const o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return Ln(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(n.additionalProperties=o),n}function Nn(e){try{return e.isOptional()}catch(e){return!0}}var Dn=(e,t,n)=>{switch(t){case g.kY.ZodString:return wn(e,n);case g.kY.ZodNumber:return function(e){const t={type:"number"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"int":t.type="integer";break;case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case g.kY.ZodObject:return Tn(e,n);case g.kY.ZodBigInt:return function(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const n of e.checks)switch(n.kind){case"min":n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case"max":n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case"multipleOf":t.multipleOf=n.value}return t}(e);case g.kY.ZodBoolean:return{type:"boolean"};case g.kY.ZodDate:return ln(e,n);case g.kY.ZodUndefined:return{not:{}};case g.kY.ZodNull:return{type:"null"};case g.kY.ZodArray:return function(e,t){var n,r,a;const o={type:"array"};return(null==(n=e.type)?void 0:n._def)&&(null==(a=null==(r=e.type)?void 0:r._def)?void 0:a.typeName)!==g.kY.ZodAny&&(o.items=Ln(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(o.minItems=e.minLength.value),e.maxLength&&(o.maxItems=e.maxLength.value),e.exactLength&&(o.minItems=e.exactLength.value,o.maxItems=e.exactLength.value),o}(e,n);case g.kY.ZodUnion:case g.kY.ZodDiscriminatedUnion:return function(e,t){const n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every((e=>e._def.typeName in _n&&(!e._def.checks||!e._def.checks.length)))){const e=n.reduce(((e,t)=>{const n=_n[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e}),[]);return{type:e.length>1?e:e[0]}}if(n.every((e=>"ZodLiteral"===e._def.typeName&&!e.description))){const e=n.reduce(((e,t)=>{const n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}}),[]);if(e.length===n.length){const t=e.filter(((e,t,n)=>n.indexOf(e)===t));return{type:t.length>1?t:t[0],enum:n.reduce(((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value]),[])}}}else if(n.every((e=>"ZodEnum"===e._def.typeName)))return{type:"string",enum:n.reduce(((e,t)=>[...e,...t._def.values.filter((t=>!e.includes(t)))]),[])};return An(e,t)}(e,n);case g.kY.ZodIntersection:return function(e,t){const n=[Ln(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ln(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter((e=>!!e)),r=[];
vendor: 2,361 bytes, line 3
3return n.forEach((e=>{if("type"in(t=e)&&"string"===t.type||!("allOf"in t)){let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:n,...r}=e;t=r}r.push(t)}else r.push(...e.allOf);var t})),r.length?{allOf:r}:void 0}(e,n);case g.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map(((e,n)=>Ln(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[]),additionalItems:Ln(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map(((e,n)=>Ln(e._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]}))).reduce(((e,t)=>void 0===t?e:[...e,t]),[])}}(e,n);case g.kY.ZodRecord:return jn(e,n);case g.kY.ZodLiteral:return function(e){const t=typeof e.value;return"bigint"!==t&&"number"!==t&&"boolean"!==t&&"string"!==t?{type:Array.isArray(e.value)?"array":"object"}:{type:"bigint"===t?"integer":t,const:e.value}}(e);case g.kY.ZodEnum:return function(e){return{type:"string",enum:Array.from(e.values)}}(e);case g.kY.ZodNativeEnum:return function(e){const t=e.values,n=Object.keys(e.values).filter((e=>"number"!=typeof t[t[e]])).map((e=>t[e])),r=Array.from(new Set(n.map((e=>typeof e))));return{type:1===r.length?"string"===r[0]?"string":"number":["string","number"],enum:n}}(e);case g.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[_n[e.innerType._def.typeName],"null"]};const n=Ln(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}(e,n);case g.kY.ZodOptional:return((e,t)=>{var n;if(t.currentPath.toString()===(null==(n=t.propertyPath)?void 0:n.toString()))return Ln(e.innerType._def,t);const r=Ln(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}})(e,n);case g.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?jn(e,t):{type:"array",maxItems:125,items:{type:"array",items:[Ln(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},Ln(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}
3(e,n);case g.kY.ZodSet:return function(e,t){const n={type:"array",uniqueItems:!0,items:Ln(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}(e,n);case g.kY.ZodLazy:return()=>e.getter()._def;case g.kY.ZodPromise:return function(e,t){return Ln(e.type._def,t)}(e,n);case g.kY.ZodNaN:case g.kY.ZodNever:return{not:{}};case g.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?Ln(e.schema._def,t):{}}(e,n);case g.kY.ZodAny:case g.kY.ZodUnknown:return{};case g.kY.ZodDefault:return function(e,t){return{...Ln(e.innerType._def,t),default:e.defaultValue()}}(e,n);case g.kY.ZodBranded:return sn(e,n);case g.kY.ZodReadonly:case g.kY.ZodCatch:return((e,t)=>Ln(e.innerType._def,t))(e,n);case g.kY.ZodPipeline:return((e,t)=>{if("input"===t.pipeStrategy)return Ln(e.in._def,t);if("output"===t.pipeStrategy)return Ln(e.out._def,t);const n=Ln(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[n,Ln(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]})].filter((e=>void 0!==e))}})(e,n);case g.kY.ZodFunction:case g.kY.ZodVoid:case g.kY.ZodSymbol:default:return}},Mn=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function Ln(e,t,n=!1){var r;const a=t.seen.get(e);if(t.override){const o=null==(r=t.override)?void 0:r.call(t,e,t,a,n);if(o!==an)return o}if(a&&!n){const e=Pn(a,t);if(void 0!==e)return e}const o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);const i=Dn(e,e.typeName,t),s="function"==typeof i?Ln(i(),t):i;if(s&&Rn(e,t,s),t.postProcess){const n=t.postProcess(s,e,t);return o.jsonSchema=s,n}return o.jsonSchema=s,s}var Pn=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Mn(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every(((e,n)=>t.currentPath[n]===e))?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{}):"seen"===t.$refStrategy?{}:void 0}},Rn=(e,t,n)=>(e.description&&(n.description=e.description),n),On=e=>{const t=(e=>"string"==typeof e?{...on,name:e}:{...on,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map((([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}])))}},Fn=(e,t)=>{var n;const r=On(t);let a="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce(((e,[t,n])=>{var a;return{...e,[t]:null!=(a=Ln(n._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0))?a:{}}}),{}):void 0;const o="string"==typeof t?t:"title"===(null==t?void 0:t.nameStrategy)||null==t?void 0:t.name,i=null!=(n=Ln(e._def,void 0===o?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1))?n:{},s="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==s&&(i.title=s);const l=void 0===o?a?{...i,[r.definitionPath]:a}:i:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...a,[o]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l};function qn(e,t){var n;const r=null!=(n=null==t?void 0:t.useReferences)&&n;return nn((()=>rn(m.blZ(e,{target:"draft-7",io:"input",reused:r?"ref":"inline"}))),{validate:async t=>{const n=await m.bpZ(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function Bn(e,t){return function(e){return"_zod"in e}(e)?qn(e,t):function(e,t){var n;const r=null!=(n=null==t?void 0:t.useReferences)&&n;return nn((()=>Fn(e,{$refStrategy:r?"root":"none"})),{validate:async t=>{const n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}(e,t)}function Un(e){return null==e?nn({properties:{},additionalProperties:!1}):"object"==typeof(t=e)&&null!==t&&tn in t&&!0===t[tn]&&"jsonSchema"in t&&"validate"in t?e:"function"==typeof e?e():Bn(e);var t}var{btoa:Vn,atob:$n}=globalThis,Hn=Object.defineProperty;Symbol.for("vercel.ai.error.AI_NoOutputSpecifiedError");Symbol.for("vercel.ai.error.AI_InvalidArgumentError");Symbol.for("vercel.ai.error.AI_InvalidStreamPartError");Symbol.for("vercel.ai.error.AI_InvalidToolInputError");Symbol.for("vercel.ai.error.AI_NoImageGeneratedError");var Yn,Zn="AI_NoObjectGeneratedError",Wn=`vercel.ai.error.${Zn}`,Gn=Symbol.for(Wn),Jn=class extends ve{constructor({message:e="No object generated.",cause:t,text:n,response:r,usage:a,finishReason:o}){super({name:Zn,message:e,cause:t}),this[Yn]=!0,this.text=n,this.response=r,this.usage=a,this.finishReason=o}static isInstance(e){return ve.hasMarker(e,Wn)}};Yn=Gn;Symbol.for("vercel.ai.error.AI_NoOutputGeneratedError");Symbol.for("vercel.ai.error.AI_NoSuchToolError");Symbol.for("vercel.ai.error.AI_ToolCallRepairError");Symbol.for("vercel.ai.error.AI_InvalidDataContentError");Symbol.for("vercel.ai.error.AI_InvalidMessageRoleError");Symbol.for("vercel.ai.error.AI_MessageConversionError");Symbol.for("vercel.ai.error.AI_DownloadError");Symbol.for("vercel.ai.error.AI_RetryError");var Kn=m.z.union([m.z.string(),m.z.instanceof(Uint8Array),m.z.instanceof(ArrayBuffer),m.z.custom((e=>{var t,n;return null!=(n=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&n}),{message:"Must be a Buffer"})]),Qn=m.z.lazy((()=>m.z.union([m.z.null(),m.z.string(),m.z.number(),m.z.boolean(),m.z.record(m.z.string(),Qn),m.z.array(Qn)]))),Xn=m.z.record(m.z.string(),m.z.record(m.z.string(),Qn)),er=m.z.object({type:m.z.literal("text"),text:m.z.string(),providerOptions:Xn.optional()}),tr=m.z.object({type:m.z.literal("image"),image:m.z.union([Kn,m.z.instanceof(URL)]),mediaType:m.z.string().optional(),providerOptions:Xn.optional()}),nr=m.z.object({type:m.z.literal("file"),data:m.z.union([Kn,m.z.instanceof(URL)]),filename:m.z.string().optional(),mediaType:m.z.string(),providerOptions:Xn.optional()}),rr=m.z.object({type:m.z.literal("reasoning"),text:m.z.string(),providerOptions:Xn.optional()}),ar=m.z.object({type:m.z.literal("tool-call"),toolCallId:m.z.string(),toolName:m.z.string(),input
3:m.z.unknown(),providerOptions:Xn.optional(),providerExecuted:m.z.boolean().optional()}),or=m.z.discriminatedUnion("type",[m.z.object({type:m.z.literal("text"),value:m.z.string()}),m.z.object({type:m.z.literal("json"),value:Qn}),m.z.object({type:m.z.literal("error-text"),value:m.z.string()}),m.z.object({type:m.z.literal("error-json"),value:Qn}),m.z.object({type:m.z.literal("content"),value:m.z.array(m.z.union([m.z.object({type:m.z.literal("text"),text:m.z.string()}),m.z.object({type:m.z.literal("media"),data:m.z.string(),mediaType:m.z.string()})]))})]),ir=m.z.object({type:m.z.literal("tool-result"),toolCallId:m.z.string(),toolName:m.z.string(),output:or,providerOptions:Xn.optional()}),sr=m.z.object({role:m.z.literal("system"),content:m.z.string(),providerOptions:Xn.optional()}),lr=m.z.object({role:m.z.literal("user"),content:m.z.union([m.z.string(),m.z.array(m.z.union([er,tr,nr]))]),providerOptions:Xn.optional()}),cr=m.z.object({role:m.z.literal("assistant"),content:m.z.union([m.z.string(),m.z.array(m.z.union([er,nr,rr,ar,ir]))]),providerOptions:Xn.optional()}),ur=m.z.object({role:m.z.literal("tool"),content:m.z.array(ir),providerOptions:Xn.optional()}),dr=(m.z.union([sr,lr,cr,ur]),Ut({prefix:"aitxt",size:24}),TransformStream,Gt((()=>Bn(m.z.union([m.z.strictObject({type:m.z.literal("text-start"),id:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("text-delta"),id:m.z.string(),delta:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("text-end"),id:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("error"),errorText:m.z.string()}),m.z.strictObject({type:m.z.literal("tool-input-start"),toolCallId:m.z.string(),toolName:m.z.string(),providerExecuted:m.z.boolean().optional(),dynamic:m.z.boolean().optional()}),m.z.strictObject({type:m.z.literal("tool-input-delta"),toolCallId:m.z.string(),inputTextDelta:m.z.string()}),m.z.strictObject({type:m.z.literal("tool-input-available"),toolCallId:m.z.string(),toolName:m.z.string(),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),providerMetadata:Xn.optional(),dynamic:m.z.boolean().optional()}),m.z.strictObject({type:m.z.literal("tool-input-error"),toolCallId:m.z.string(),toolName:m.z.string(),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),providerMetadata:Xn.optional(),dynamic:m.z.boolean().optional(),errorText:m.z.string()}),m.z.strictObject({type:m.z.literal("tool-output-available"),toolCallId:m.z.string(),output:m.z.unknown(),providerExecuted:m.z.boolean().optional(),dynamic:m.z.boolean().optional(),preliminary:m.z.boolean().optional()}),m.z.strictObject({type:m.z.literal("tool-output-error"),toolCallId:m.z.string(),errorText:m.z.string(),providerExecuted:m.z.boolean().optional(),dynamic:m.z.boolean().optional()}),m.z.strictObject({type:m.z.literal("reasoning-start"),id:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("reasoning-delta"),id:m.z.string(),delta:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("reasoning-end"),id:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("source-url"),sourceId:m.z.string(),url:m.z.string(),title:m.z.string().optional(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("source-document"),sourceId:m.z.string(),mediaType:m.z.string(),title:m.z.string(),filename:m.z.string().optional(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.literal("file"),url:m.z.string(),mediaType:m.z.string(),providerMetadata:Xn.optional()}),m.z.strictObject({type:m.z.custom((e=>"string"==typeof e&&e.startsWith("data-")),{message:'Type must start with "data-"'}),id:m.z.string().optional(),data:m.z.unknown(),transient:m.z.boolean().optional()}),m.z.strictObject({type:m.z.literal("start-step")}),m.z.strictObject({type:m.z.literal("finish-step")}),m.z.strictObject({type:m.z.literal("start"),messageId:m.z.string().optional(),messageMetadata:m.z.unknown().optional()}),m.z.strictObject({type:m.z.literal("finish"),finishReason:m.z.enum(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:m.z.unknown().optional()}),m.z.strictObject({type:m.z.literal("abort")}),m.z.strictObject({type:m.z.literal("message-metadata"),messageMetadata:m.z.unknown()})])))));function pr(){return Object.create(null)}function fr(e,t){if(void 0===e&&void 0===t)return;if(void 0===e)return t;if(void 0===t)return e;const n={...e};for(const r in t)if("__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&Object.prototype.hasOwnProperty.call(t,r)){const a=t[r];if(void 0===a)continue;const o=r in e?e[r]:void 0,i=!(null===a||"object"!=typeof a||Array.isArray(a)||a instanceof Date||a instanceof RegExp),s=!(null==o||"object"!=typeof o||Array.isArray(o)||o instanceof Date||o instanceof RegExp);n[r]=i&&s?fr(o,a):a}return n}function hr(e){const t=["ROOT"];let n=-1,r=null;function a(e,a,o){switch(e){case'"':n=a,t.pop(),t.push(o),t.push("INSIDE_STRING");break;case"f":case"t":case"n":n=a,r=a,t.pop(),t.push(o),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=a,t.pop(),t.push(o),t.push("INSIDE_NUMBER");break;case"{":n=a,t.pop(),t.push(o),t.push("INSIDE_OBJECT_START");break;case"[":n=a,t.pop(),t.push(o),t.push("INSIDE_ARRAY_START")}}function o(e,r){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":n=r,t.pop()}}function i(e,r){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=r,t.pop()}}for(let s=0;s<e.length;s++){const l=e[s];switch(t[t.length-1]){case"ROOT":a(l,s,"FINISH");break;case"INSIDE_OBJECT_START":switch(l){case'"':t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"}":n=s,t.pop()}break;
vendor: 2,331 bytes, line 3
3case"INSIDE_OBJECT_AFTER_COMMA":if('"'===l)t.pop(),t.push("INSIDE_OBJECT_KEY");break;case"INSIDE_OBJECT_KEY":if('"'===l)t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY");break;case"INSIDE_OBJECT_AFTER_KEY":if(":"===l)t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE");break;case"INSIDE_OBJECT_BEFORE_VALUE":a(l,s,"INSIDE_OBJECT_AFTER_VALUE");break;case"INSIDE_OBJECT_AFTER_VALUE":o(l,s);break;case"INSIDE_STRING":switch(l){case'"':t.pop(),n=s;break;case"\\":t.push("INSIDE_STRING_ESCAPE");break;default:n=s}break;case"INSIDE_ARRAY_START":if("]"===l)n=s,t.pop();else n=s,a(l,s,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_ARRAY_AFTER_VALUE":switch(l){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":n=s,t.pop();break;default:n=s}break;case"INSIDE_ARRAY_AFTER_COMMA":a(l,s,"INSIDE_ARRAY_AFTER_VALUE");break;case"INSIDE_STRING_ESCAPE":t.pop(),n=s;break;case"INSIDE_NUMBER":switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n=s;break;case"e":case"E":case"-":case".":break;case",":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,s),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&o(l,s);break;case"}":t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]&&o(l,s);break;case"]":t.pop(),"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,s);break;default:t.pop()}break;case"INSIDE_LITERAL":{const a=e.substring(r,s+1);"false".startsWith(a)||"true".startsWith(a)||"null".startsWith(a)?n=s:(t.pop(),"INSIDE_OBJECT_AFTER_VALUE"===t[t.length-1]?o(l,s):"INSIDE_ARRAY_AFTER_VALUE"===t[t.length-1]&&i(l,s));break}}}let s=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--){switch(t[n]){case"INSIDE_STRING":s+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":s+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":s+="]";break;case"INSIDE_LITERAL":{const t=e.substring(r,e.length);"true".startsWith(t)?s+="true".slice(t.length):"false".startsWith(t)?s+="false".slice(t.length):"null".startsWith(t)&&(s+="null".slice(t.length))}}}return s}async function mr(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=await Xt({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Xt({text:hr(e)}
3),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function gr(e){return"text"===e.type}function yr(e){return e.type.startsWith("tool-")}function vr(e){return yr(e)||function(e){return"dynamic-tool"===e.type}(e)}function xr(e){return e.type.split("-").slice(1).join("-")}function br({lastMessage:e,messageId:t}){return{message:"assistant"===(null==e?void 0:e.role)?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:pr(),activeReasoningParts:pr(),partialToolCalls:pr()}}function kr({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:a,onToolCall:o,onData:i}){return e.pipeThrough(new TransformStream({async transform(e,s){await r((async({state:r,write:l})=>{var c,u,d,p;function f(e){const t=r.message.parts.filter(yr).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function h(e){const t=r.message.parts.filter((e=>"dynamic-tool"===e.type)).find((t=>t.toolCallId===e));if(null==t)throw new Error("tool-output-error must be preceded by a tool-input-available");return t}function m(e){var t;const n=r.message.parts.find((t=>yr(t)&&t.toolCallId===e.toolCallId)),a=e,o=n;null!=n?(n.state=e.state,o.input=a.input,o.output=a.output,o.errorText=a.errorText,o.rawInput=a.rawInput,o.preliminary=a.preliminary,o.providerExecuted=null!=(t=a.providerExecuted)?t:n.providerExecuted,null!=a.providerMetadata&&"input-available"===n.state&&(n.callProviderMetadata=a.providerMetadata)):r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,input:a.input,output:a.output,rawInput:a.rawInput,errorText:a.errorText,providerExecuted:a.providerExecuted,preliminary:a.preliminary,...null!=a.providerMetadata?{callProviderMetadata:a.providerMetadata}:{}})}function g(e){var t,n;const a=r.message.parts.find((t=>"dynamic-tool"===t.type&&t.toolCallId===e.toolCallId)),o=e,i=a;null!=a?(a.state=e.state,i.toolName=e.toolName,i.input=o.input,i.output=o.output,i.errorText=o.errorText,i.rawInput=null!=(t=o.rawInput)?t:i.rawInput,i.preliminary=o.preliminary,i.providerExecuted=null!=(n=o.providerExecuted)?n:a.providerExecuted,null!=o.providerMetadata&&"input-available"===a.state&&(a.callProviderMetadata=o.providerMetadata)):r.message.parts.push({type:"dynamic-tool",toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:o.input,output:o.output,errorText:o.errorText,preliminary:o.preliminary,providerExecuted:o.providerExecuted,...null!=o.providerMetadata?{callProviderMetadata:o.providerMetadata}:{}})}async function y(e){if(null!=e){const n=null!=r.message.metadata?fr(r.message.metadata,e):e;null!=t&&await Kt({value:n,schema:t}),r.message.metadata=n}}switch(e.type){case"text-start":{const t={type:"text",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeTextParts[e.id]=t,r.message.parts.push(t),l();break}case"text-delta":{const t=r.activeTextParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(c=e.providerMetadata)?c:t.providerMetadata,l();break}case"text-end":{const t=r.activeTextParts[e.id];t.state="done",t.providerMetadata=null!=(u=e.providerMetadata)?u:t.providerMetadata,delete r.activeTextParts[e.id],l();break}case"reasoning-start":{const t={type:"reasoning",text:"",providerMetadata:e.providerMetadata,state:"streaming"};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),l();break}case"reasoning-delta":{const t=r.activeReasoningParts[e.id];t.text+=e.delta,t.providerMetadata=null!=(d=e.providerMetadata)?d:t.providerMetadata,l();break}case"reasoning-end":{const t=r.activeReasoningParts[e.id];t.providerMetadata=null!=(p=e.providerMetadata)?p:t.providerMetadata,t.state="done",delete r.activeReasoningParts[e.id],l();break}case"file":r.message.parts.push({type:"file",mediaType:e.mediaType,url:e.url}),l();break;case"source-url":r.message.parts.push({type:"source-url",sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),l();break;case"source-document":r.message.parts.push({type:"source-document",sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),l();break;case"tool-input-start":{const t=r.message.parts.filter(yr);r.partialToolCalls[e.toolCallId]={text:"",toolName:e.toolName,index:t.length,dynamic:e.dynamic},e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-streaming",input:void 0,providerExecuted:e.providerExecuted}),l();break}case"tool-input-delta":{const t=r.partialToolCalls[e.toolCallId];t.text+=e.inputTextDelta;const{value:n}=await mr(t.text);t.dynamic?g({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}):m({toolCallId:e.toolCallId,toolName:t.toolName,state:"input-streaming",input:n}),l();break}case"tool-input-available":e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"input-available",input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l(),o&&!e.providerExecuted&&await o({toolCall:e});break;case"tool-input-error":e.dynamic?g({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}):m({toolCallId:e.toolCallId,toolName:e.toolName,state:"output-error",input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata}),l();break;case"tool-output-available":if(e.dynamic){const t=h(e.toolCallId);g({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-available",input:t.input,output:e.output,preliminary:e.preliminary})}else{const t=f(e.toolCallId);m({toolCallId:e.toolCallId,toolName:xr(t),state:"output-available",input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary})}l();break;case"tool-output-error":if(e.dynamic){const t=h(e.toolCallId);g({toolCallId:e.toolCallId,toolName:t.toolName,state:"output-error",input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted})}else{const t=f(e.toolCallId);m({toolCallId:e.toolCallId,toolName:xr(t),state:"output-error",input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted})}l();break;case"start-step":r.message.parts.push({type:"step-start"});break;case"finish-step":r.activeTextParts=pr(),r.activeReasoningParts=pr();break;case"start":null!=e.messageId&&(r.message.id=e.messageId),await y(e.messageMetadata),null==e.messageId&&null==e.messageMetadata||l();break;
3case"finish":null!=e.finishReason&&(r.finishReason=e.finishReason),await y(e.messageMetadata),null!=e.messageMetadata&&l();break;case"message-metadata":await y(e.messageMetadata),null!=e.messageMetadata&&l();break;case"error":null==a||a(new Error(e.errorText));break;default:if(function(e){return e.type.startsWith("data-")}(e)){null!=(null==n?void 0:n[e.type])&&await Kt({value:e.data,schema:n[e.type]});const t=e;if(t.transient){null==i||i(t);break}const a=null!=t.id?r.message.parts.find((e=>t.type===e.type&&t.id===e.id)):void 0;null!=a?a.data=t.data:r.message.parts.push(t),null==i||i(t),l()}}s.enqueue(e)}))}}))}Ut({prefix:"aitxt",size:24}),Ut({prefix:"aiobj",size:24});Ut({prefix:"aiobj",size:24});((e,t)=>{for(var n in t)Hn(e,n,{get:t[n],enumerable:!0})})({},{object:()=>Sr,text:()=>wr});var wr=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:e}){return{partial:e}},async parseOutput({text:e}){return e}}),Sr=({schema:e})=>{const t=Un(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:e}){const t=await mr(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value};default:{const e=t.state;throw new Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:e},n){const r=await Xt({text:e});if(!r.success)throw new Jn({message:"No object generated: could not parse the response.",cause:r.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});const a=await Qt({value:r.value,schema:t});if(!a.success)throw new Jn({message:"No object generated: response did not match schema.",cause:a.error,text:e,response:n.response,usage:n.usage,finishReason:n.finishReason});return a.value}}};Symbol.for("vercel.ai.error.AI_NoSuchProviderError");var Er,Ir,Cr,zr,jr,_r,Ar,Tr,Nr,Dr=class{constructor({api:e="/api/chat",credentials:t,headers:n,body:r,fetch:a,prepareSendMessagesRequest:o,prepareReconnectToStreamRequest:i}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=a,this.prepareSendMessagesRequest=o,this.prepareReconnectToStreamRequest=i}async sendMessages({abortSignal:e,...t}){var n,r,a,o,i;const s=await en(this.body),l=await en(this.headers),c=await en(this.credentials),u={...$t(l),...$t(t.headers)},d=await(null==(n=this.prepareSendMessagesRequest)?void 0:n.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...s,...t.body},headers:u,credentials:c,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),p=null!=(r=null==d?void 0:d.api)?r:this.api,f=void 0!==(null==d?void 0:d.headers)?$t(d.headers):u,h=void 0!==(null==d?void 0:d.body)?d.body:{...s,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},m=null!=(a=null==d?void 0:d.credentials)?a:c,g=null!=(o=this.fetch)?o:globalThis.fetch,y=await g(p,{method:"POST",headers:{"Content-Type":"application/json",...f},body:JSON.stringify(h),credentials:m,signal:e});if(!y.ok)throw new Error(null!=(i=await y.text())?i:"Failed to fetch the chat response.");if(!y.body)throw new Error("The response body is empty.");return this.processResponseStream(y.body)}async reconnectToStream(e){var t,n,r,a,o;const i=await en(this.body),s=await en(this.headers),l=await en(this.credentials),c={...$t(s),...$t(e.headers)},u=await(null==(t=this.prepareReconnectToStreamRequest)?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...i,...e.body},headers:c,credentials:l,requestMetadata:e.metadata})),d=null!=(n=null==u?void 0:u.api)?n:`${this.api}/${e.chatId}/stream`,p=void 0!==(null==u?void 0:u.headers)?$t(u.headers):c,f=null!=(r=null==u?void 0:u.credentials)?r:l,h=null!=(a=this.fetch)?a:globalThis.fetch,m=await h(d,{method:"GET",headers:p,credentials:f});if(204===m.status)return null;if(!m.ok)throw new Error(null!=(o=await m.text())?o:"Failed to fetch the chat response.");if(!m.body)throw new Error("The response body is empty.");return this.processResponseStream(m.body)}},Mr=class extends Dr{constructor(e={}){super(e)}processResponseStream(e){return function({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Ot).pipeThrough(new TransformStream({async transform({data:e},n){"[DONE]"!==e&&n.enqueue(await Xt({text:e,schema:t}))}}))}({stream:e,schema:dr}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},Lr=class{constructor({generateId:e=Vt,id:t=e(),transport:n=new Mr,messageMetadataSchema:r,dataPartSchemas:a,state:o,onError:i,onToolCall:s,onFinish:l,onData:c,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise(((t,n)=>{this.queue.push((async()=>{try{await e(),t()}catch(e){n(e)}})),this.processQueue()}))}},this.sendMessage=async(e,t)=>{var n,r,a,o;
vendor: 4,581 bytes, line 3
3if(null==e)return void await this.makeRequest({trigger:"submit-message",messageId:null==(n=this.lastMessage)?void 0:n.id,...t});let i;if("text"in e||"files"in e){const t=Array.isArray(e.files)?e.files:await async function(e){if(null==e)return[];if(!(globalThis.FileList&&e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map((async e=>{const{name:t,type:n}=e;return{type:"file",mediaType:n,filename:t,url:await new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null==(n=e.target)?void 0:n.result)},r.onerror=e=>n(e),r.readAsDataURL(e)}))}})))}(e.files);i={parts:[...t,..."text"in e&&null!=e.text?[{type:"text",text:e.text}]:[]]}}else i=e;if(null!=e.messageId){const t=this.state.messages.findIndex((t=>t.id===e.messageId));if(-1===t)throw new Error(`message with id ${e.messageId} not found`);if("user"!==this.state.messages[t].role)throw new Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...i,id:e.messageId,role:null!=(r=i.role)?r:"user",metadata:e.metadata})}else this.state.pushMessage({...i,id:null!=(a=i.id)?a:this.generateId(),role:null!=(o=i.role)?o:"user",metadata:e.metadata});await this.makeRequest({trigger:"submit-message",messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{const n=null==e?this.state.messages.length-1:this.state.messages.findIndex((t=>t.id===e));if(-1===n)throw new Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,"assistant"===this.messages[n].role?n:n+1),await this.makeRequest({trigger:"regenerate-message",messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:"resume-stream",...e})},this.clearError=()=>{"error"===this.status&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:e="output-available",tool:t,toolCallId:n,output:r,errorText:a})=>this.jobExecutor.run((async()=>{var t,o;const i=this.state.messages,s=i[i.length-1];this.state.replaceMessage(i.length-1,{...s,parts:s.parts.map((t=>vr(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:a}:t))}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map((t=>vr(t)&&t.toolCallId===n?{...t,state:e,output:r,errorText:a}:t))),"streaming"!==this.status&&"submitted"!==this.status&&(null==(t=this.sendAutomaticallyWhen)?void 0:t.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:null==(o=this.lastMessage)?void 0:o.id})})),this.addToolResult=this.addToolOutput,this.stop=async()=>{var e;"streaming"!==this.status&&"submitted"!==this.status||(null==(e=this.activeResponse)?void 0:e.abortController)&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=a,this.state=o,this.onError=i,this.onToolCall=s,this.onFinish=l,this.onData=c,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:a}){var o,i,s,l;this.setStatus({status:"submitted",error:void 0});const c=this.lastMessage;let u=!1,d=!1,p=!1;try{const s={state:br({lastMessage:this.state.snapshot(c),messageId:this.generateId()}),abortController:new AbortController};let l;if(s.abortController.signal.addEventListener("abort",(()=>{u=!0})),this.activeResponse=s,"resume-stream"===e){const e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(null==e)return void this.setStatus({status:"ready"});l=e}else l=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:s.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:a});const f=e=>this.jobExecutor.run((()=>e({state:s.state,write:()=>{var e;this.setStatus({status:"streaming"});s.state.message.id===(null==(e=this.lastMessage)?void 0:e.id)?this.state.replaceMessage(this.state.messages.length-1,s.state.message):this.state.pushMessage(s.state.message)}})));await async function({stream:e,onError:t}){const n=e.getReader();try{for(;;){const{done:e}=await n.read();if(e)break}}catch(e){null==t||t(e)}finally{n.releaseLock()}}
3({stream:kr({stream:l,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:f,onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:"ready"})}catch(e){if(u||"AbortError"===e.name)return u=!0,this.setStatus({status:"ready"}),null;p=!0,e instanceof TypeError&&(e.message.toLowerCase().includes("fetch")||e.message.toLowerCase().includes("network"))&&(d=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:"error",error:e})}finally{try{null==(i=this.onFinish)||i.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:u,isDisconnect:d,isError:p,finishReason:null==(o=this.activeResponse)?void 0:o.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}(null==(s=this.sendAutomaticallyWhen)?void 0:s.call(this,{messages:this.state.messages}))&&!p&&await this.makeRequest({trigger:"submit-message",messageId:null==(l=this.lastMessage)?void 0:l.id,metadata:t,headers:n,body:r})}},Pr=(Gt((()=>Bn(m.z.array(m.z.object({id:m.z.string(),role:m.z.enum(["system","user","assistant"]),metadata:m.z.unknown().optional(),parts:m.z.array(m.z.union([m.z.object({type:m.z.literal("text"),text:m.z.string(),state:m.z.enum(["streaming","done"]).optional(),providerMetadata:Xn.optional()}),m.z.object({type:m.z.literal("reasoning"),text:m.z.string(),state:m.z.enum(["streaming","done"]).optional(),providerMetadata:Xn.optional()}),m.z.object({type:m.z.literal("source-url"),sourceId:m.z.string(),url:m.z.string(),title:m.z.string().optional(),providerMetadata:Xn.optional()}),m.z.object({type:m.z.literal("source-document"),sourceId:m.z.string(),mediaType:m.z.string(),title:m.z.string(),filename:m.z.string().optional(),providerMetadata:Xn.optional()}),m.z.object({type:m.z.literal("file"),mediaType:m.z.string(),filename:m.z.string().optional(),url:m.z.string(),providerMetadata:Xn.optional()}),m.z.object({type:m.z.literal("step-start")}),m.z.object({type:m.z.string().startsWith("data-"),id:m.z.string().optional(),data:m.z.unknown()}),m.z.object({type:m.z.literal("dynamic-tool"),toolName:m.z.string(),toolCallId:m.z.string(),state:m.z.literal("input-streaming"),input:m.z.unknown().optional(),providerExecuted:m.z.boolean().optional(),output:m.z.never().optional(),errorText:m.z.never().optional()}),m.z.object({type:m.z.literal("dynamic-tool"),toolName:m.z.string(),toolCallId:m.z.string(),state:m.z.literal("input-available"),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),output:m.z.never().optional(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional()}),m.z.object({type:m.z.literal("dynamic-tool"),toolName:m.z.string(),toolCallId:m.z.string(),state:m.z.literal("output-available"),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),output:m.z.unknown(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),preliminary:m.z.boolean().optional()}),m.z.object({type:m.z.literal("dynamic-tool"),toolName:m.z.string(),toolCallId:m.z.string(),state:m.z.literal("output-error"),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),output:m.z.never().optional(),errorText:m.z.string(),callProviderMetadata:Xn.optional()}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("input-streaming"),providerExecuted:m.z.boolean().optional(),input:m.z.unknown().optional(),output:m.z.never().optional(),errorText:m.z.never().optional(),approval:m.z.never().optional()}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("input-available"),providerExecuted:m.z.boolean().optional(),input:m.z.unknown(),output:m.z.never().optional(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),approval:m.z.never().optional()}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("approval-requested"),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),output:m.z.never().optional(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),approval:m.z.object({id:m.z.string(),approved:m.z.never().optional(),reason:m.z.never().optional()})}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("approval-responded"),input:m.z.unknown(),providerExecuted:m.z.boolean().optional(),output:m.z.never().optional(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),approval:m.z.object({id:m.z.string(),approved:m.z.boolean(),reason:m.z.string().optional()})}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("output-available"),providerExecuted:m.z.boolean().optional(),input
3:m.z.unknown(),output:m.z.unknown(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),preliminary:m.z.boolean().optional(),approval:m.z.object({id:m.z.string(),approved:m.z.literal(!0),reason:m.z.string().optional()}).optional()}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("output-error"),providerExecuted:m.z.boolean().optional(),input:m.z.unknown(),output:m.z.never().optional(),errorText:m.z.string(),callProviderMetadata:Xn.optional(),approval:m.z.object({id:m.z.string(),approved:m.z.literal(!0),reason:m.z.string().optional()}).optional()}),m.z.object({type:m.z.string().startsWith("tool-"),toolCallId:m.z.string(),state:m.z.literal("output-denied"),providerExecuted:m.z.boolean().optional(),input:m.z.unknown(),output:m.z.never().optional(),errorText:m.z.never().optional(),callProviderMetadata:Xn.optional(),approval:m.z.object({id:m.z.string(),approved:m.z.literal(!1),reason:m.z.string().optional()})})])).nonempty("Message must contain at least one part")})).nonempty("Messages array must not be empty")))),class extends Error{code;constructor(e){super(e),this.name="AIChatRunError",this.code=e}}),Rr=e=>e instanceof Error&&"AIChatRunError"===e.name,Or=class extends Error{code;resetAt;perDayCount;retryAfterSeconds;constructor(e,t){if(super(e),this.name="AIChatUserError",this.code=e,void 0!==t?.resetAt){const e=new Date(t.resetAt);Number.isNaN(e.getTime())||(this.resetAt=e)}this.perDayCount=t?.perDayCount,this.retryAfterSeconds=t?.retryAfterSeconds}},Fr=e=>e instanceof Error&&"AIChatUserError"===e.name,qr=e=>{const t="string"==typeof e?Number(e):e;if("number"==typeof t)return Number.isInteger(t)&&t>0?t:void 0},Br=class extends Error{code;constructor(e){super(e),this.name="AIChatMessageError",this.code=e}},Ur=e=>"data-chart"===e.type,Vr=e=>"data-link-button"===e.type,$r={core_company_data:{description:"Simply Wall St standardized Company Financial Data",link:"https://simplywall.st/analysis-and-financial-data-sources"},financial_time_series:{description:"Simply Wall St Historical Financial Data",link:"https://simplywall.st/analysis-and-financial-data-sources"},dividends:{description:"Dividends Data",link:"https://simplywall.st/analysis-and-financial-data-sources"},company_statements:{description:"Simply Wall St Analysis Insights",link:"https://simplywall.st/analysis-and-financial-data-sources"},company_info:{description:"Simply Wall St Company Profile",link:"https://simplywall.st/analysis-and-financial-data-sources"},company_feed:{description:"Simply Wall St Company Briefs",link:"https://simplywall.st/analysis-and-financial-data-sources"},key_developments:{description:"Key Developments & News",link:"https://simplywall.st/analysis-and-financial-data-sources"},analyst_estimates:{description:"Analyst Estimates & Coverage",link:"https://simplywall.st/analysis-and-financial-data-sources"},price_targets_and_surprises:{description:"Analyst Price Targets & Earnings Surprises",link:"https://simplywall.st/analysis-and-financial-data-sources"},get_insider_trading:{description:"Insider Trading Activity",link:"https://simplywall.st/analysis-and-financial-data-sources"},get_transcripts:{description:"Earnings Call Transcripts",link:void 0},search_transcripts:{description:"Earnings Call Transcripts",link:void 0},market_industry_performance:{description:"Industry & Market Performance",link:"https://simplywall.st/analysis-and-financial-data-sources"},exchange_rate:{description:"Currency Exchange Rates",link:void 0},render_time_series_chart:{description:"Time Series Chart",link:void 0},render_bar_chart:{description:"Bar Chart",link:void 0},resolve_company_id_by_name:{description:"Company Lookup",link:void 0},resolve_company_id_by_symbol:{description:"Company Lookup",link:void 0},consult_portfolio_specialist:{description:"Portfolio Insights",link:void 0},portfolio_movers:{description:"Portfolio Movers",link:void 0},portfolio_news_digest:{description:"Portfolio News Digest",link:void 0}},Hr=e=>e.split(/[_-]+/).filter(Boolean).map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),Yr=e=>$r[e]??{description:Hr(e),link:void 0},Zr=e=>"dynamic-tool"===e.type&&"toolCallId"in e&&void 0!==e.toolCallId,Wr=e=>"string"==typeof e.type&&e.type.startsWith("tool-")&&"toolCallId"in e&&void 0!==e.toolCallId,Gr=e=>"source-url"===e.type,Jr=e=>"source-document"===e.type,Kr={url:"url",documentId:"document_id",publisher:"publisher",published:"published",fiscalPeriod:"fiscal_period",companyName:"company_name",companyId:"company_id"},Qr=(e,t)=>
3{const n=e.providerMetadata?.sws?.[t];return"string"==typeof n?n:void 0},Xr=(e,t,n)=>{for(const r of n){const n=Qr(t,Kr[r]);void 0!==n&&(e[r]=n)}return e},ea=[8,4,4,4,12],ta=/^[0-9a-f]+$/i,na=(e,t)=>{const n=Qr(e,t);return void 0!==n&&(e=>{const t=e.split("-");return t.length===ea.length&&t.every(((e,t)=>e.length===ea[t]&&ta.test(e)))})(n)?n:void 0},ra=(e,t,n)=>{const r=na(t,Kr[n]);return void 0!==r&&(e[n]=r),e},aa=new Set(["earnings_transcript","earnings_report","news","web","sws_article","sws_narrative","sws_brief","sws_event","sws_statement","url","document"]),oa=e=>{const t=Qr(e,"kind");return void 0!==t&&(e=>aa.has(e))(t)?t:void 0},ia=e=>{const t=Xr({id:e.sourceId,kind:oa(e)??"url",title:e.title??e.url,url:e.url},e,["publisher","published","fiscalPeriod","companyName"]);return ra(t,e,"documentId"),ra(t,e,"companyId"),t},sa=e=>{const t=Xr({id:e.sourceId,kind:oa(e)??"document",title:e.title},e,["url","publisher","published","fiscalPeriod","companyName"]);return ra(t,e,"documentId"),ra(t,e,"companyId"),t},la=e=>e.documentId??e.url??e.id,ca=e=>{const t=new Set;return e.filter((e=>{const n=la(e);return!t.has(n)&&(t.add(n),!0)}))},ua=e=>{if(!Array.isArray(e))return;const t=e.filter((e=>"string"==typeof e));return t.length>0?t:void 0},da=/\b(\d{4}-\d{2}-\d{2})\b/,pa=e=>{const t=e.parts.filter(gr).map((e=>e.text)).join(" ");return da.exec(t)?.[1]},fa=e=>{const t=[];let n;const r=[],a=[],o=[],i=new Map;for(const l of e)if("system"===l.role&&(n=pa(l)??n),"user"===l.role||"assistant"===l.role){const e=new Map,c=[],u=[],d=[];let p="",f="success";for(const t of l.parts){if(Zr(t)&&e.set(t.toolName,{id:t.toolCallId,name:t.toolName,source:Yr(t.toolName)}),Wr(t)){const n=t.type.replace("tool-","");e.set(n,{id:t.toolCallId,name:n,source:Yr(n)})}gr(t)&&(p+=t.text,"streaming"===t.state&&(f="pending"),("tool_call_error"===(s=l.metadata?.error??"")||"unknown_error"===s)&&(f="failed")),Ur(t)&&c.push(t.data),Vr(t)&&u.push(t.data),Gr(t)&&d.push(ia(t)),Jr(t)&&d.push(sa(t))}for(const[t,n]of e)i.set(t,n);r.push(...c),a.push(...u),o.push(...d),(p.length>0||"failed"===f)&&(t.push({id:l.id,content:p,tools:Array.from(i.values()),charts:[...r],linkButtons:[...a],sources:ca(o),role:l.role,status:f,scheduledAt:"assistant"===l.role?n:void 0,suggestions:"assistant"===l.role?ua(l.metadata?.suggestions):void 0}),n=void 0,i.clear(),r.length=0,a.length=0,o.length=0)}var s;return t},ha=(e,t,n)=>["vibe","chat-history",e,t??"__none__",n],ma=e=>({thread_id:e,title:void 0,state_context:void 0,message_history:[]}),ga=async(e,t,n,r,a)=>{if(a||"new"===r)return ma(n);const o=await(async(e,t,n)=>{const r=await t(),a=await fetch(`${e}/history/${n}`,{headers:fe(r)});if(!a.ok)return{status:a.status,data:void 0};const o=await a.json();return{status:a.status,data:o}})(e,t,n);if(404===o.status||!o.data)return console.error("Chat history not found",n),{thread_id:n,title:void 0,state_context:void 0,message_history:[]};const i=o.data;if(!pe(i.thread_id))throw new Error("Invalid chat history thread ID");return{thread_id:i.thread_id,title:i.title,state_context:i.state_context,message_history:i.message_history}},ya=({api:e,getToken:t,userId:n,threadId:r,threadStatus:a,notifyOnChangeProps:o})=>(0,f.jQ)({queryKey:ha(e,n,r),queryFn:()=>ga(e,t,r,a,void 0===n),initialData:"new"===a?ma(r):void 0,initialDataUpdatedAt:"new"===a?Date.now():void 0,select(e){return{threadId:e.thread_id,title:e.title,state:null!==e.state_context&&void 0!==e.state_context?{context:e.state_context.page_state?.context??ue(e.state_context.page_state??{})}:{},messages:[...e.message_history]}},staleTime:e=>0===(e.state.data?.message_history.length??0)?0:5e3,notifyOnChangeProps:o}),va=()=>{const{transport:e}=ae();return(0,f.n_)({mutationFn:t=>(async(e,t,n)=>{const r=await t(),a=await fetch(`${e}/history/${n}`,{method:"DELETE",headers:fe(r)});if(!a.ok)throw new Error(`Failed to delete chat history: ${a.status}`)})(e.api,e.getToken,t)})},xa=()=>{const{transport:e}=ae();return(0,f.n_)({mutationFn:({threadId:t,title:n})=>(async(e,t,n,r)=>{const a=await t(),o=await fetch(`${e}/history/${n}`,{method:"PATCH",headers:{...fe(a),"Content-Type":"application/json"},body:JSON.stringify({title:r})});if(!o.ok)throw new Error(`Failed to rename chat history: ${o.status}`)})(e.api,e.getToken,t,n)})},ba=(0,c.createContext)({new:()=>{},load:()=>{},delete:()=>{},rename:()=>Promise.resolve(),active:{threadId:de(),status:"new",messageCount:0,messages:[],state:{value:{},getSnapshot:()=>({})},title:""},history:[]}),ka=(0,c.createContext)({onMessageReceived:()=>{},publishMessages:()=>{}}),wa=()=>{const e=(0,c.useContext)(ba);if(!e)throw new Error("useChatManager must be used within a ChatManagerProvider");return e},Sa=({state:e,children:t})=>{const n=ie(),{transport:r,user:a}=ae(),o=(0,f.jE)(),i=(()=>{const{transport:e,user:t}=ae(),n=t?.id?t.id:void 0;return(0,f.UX)({queryKey:he(e.api,n),queryFn:()=>me(e.api,e.getToken,void 0===n),select(e){return{chats:e.chats.map((e=>({threadId:e.thread_id,title:e.title,chatInitiator:e.chat_initiator,state:null!==e.state_context&&void 0!==e.state_context?{context:e.state_context.page_state?.context??ue(e.state_context.page_state??{})}:{}}))),total:e.total}},staleTime:2e3})})(),s=a?.id?a.id:void 0,[l,u]=(0,c.useState)(null);(0,c.useEffect)((()=>n.bridge.state.subscribe(u)),[n.bridge]);const p=l??e,[h,m]=(0,c.useState)((()=>({threadId:de(),status:"new"}))),[g,y]=(0,c.useState)(void 0),v=(({api:e,getToken:t,userId:n,threadId:r,threadStatus:a})=>(0,f.IT)(ya({api:e,getToken:t,userId:n,threadId:r,threadStatus:a,notifyOnChangeProps:["data"]})))({api:r.api,getToken:r.getToken,userId:s,threadId:h.threadId,threadStatus:h.status}),[x,b]=(0,c.useState)(null),k=(0,c.useCallback)(((e,t)=>{b({threadId:e,messages:t})}),[]),w=(0,c.useRef)(e);(0,c.useEffect)((()=>{w.current=e}));const S=(0,c.useCallback)((()=>{m({threadId:de(),status:"new"}),y(void 0)}),[]),E=(0,c.useCallback)((e=>{pe(e)?(m({threadId:e,status:"saved"}),y(void 0)):S()}),[S]),I=va(),C=(0,c.useCallback)((e=>{I.mutate(e,{onSuccess:()=>{h.threadId===e&&S(),i.refetch()}})}),[h.threadId,I,i,S]),z=xa(),j=(0,c.useCallback)((async(e,t)=>{await z.mutateAsync({threadId:e,title:t}),await i.refetch()}),[z,i]),_=(0,c.useCallback)((()=>{"new"===h.status&&(y((n.bridge.state.latest??w.current).context?.anchor),m((e=>({...e,status:"saved"}))),i.refetch())}),[h.status,i,n.bridge]),A=(0,c.useRef)({threadId:h.threadId,status:h.status});(0,c.useEffect)((()=>{const e=A.current;A.current={threadId:h.threadId,status:h.status},e.threadId===h.threadId&&"new"===e.status&&"saved"===h.status&&o.invalidateQueries({queryKey:h
3a(r.api,s,h.threadId)})}),[h.threadId,h.status,o,r.api,s]);const T="new"===h.status?p.context?.anchor:v.data?.state?.context?.anchor??i.data.chats.find((e=>e.threadId===h.threadId))?.state?.context?.anchor??g,N=(0,c.useMemo)((()=>({context:void 0===p.context&&void 0===T?void 0:{...p.context,anchor:T}})),[p.context,T]),D=(0,c.useMemo)((()=>{const e=i.data.chats.find((e=>e.threadId===h.threadId));if(e?.title)return e.title;if(v.data?.title)return v.data.title;const t=ce(T)?T:void 0;return void 0!==t?.label?`Research ${t.label}`:""}),[h.threadId,T,i.data.chats,v.data]),M=(0,c.useMemo)((()=>x?.threadId===h.threadId?x.messages:fa([...v.data?.messages??[]])),[x,h.threadId,v.data]),L=(0,c.useRef)({locked:!1,anchor:void 0});(0,c.useEffect)((()=>{L.current={locked:"new"!==h.status,anchor:T}}));const P=(0,c.useCallback)((()=>{const e={...n.bridge.state.latest??w.current};return L.current.locked?{...e,context:void 0===e.context&&void 0===L.current.anchor?void 0:{...e.context,anchor:L.current.anchor}}:e}),[n.bridge]),R=(0,c.useMemo)((()=>({new:S,load:E,delete:C,rename:j,active:{threadId:h.threadId,status:h.status,messageCount:v.data?.messages.length??0,messages:M,state:{value:N,getSnapshot:P},title:D},history:i.data.chats})),[S,E,C,j,h.threadId,h.status,v.data,M,N,P,D,i.data.chats]),O=(0,c.useMemo)((()=>({onMessageReceived:_,publishMessages:k})),[_,k]);return(0,d.jsx)(ba.Provider,{value:R,children:(0,d.jsx)(ka.Provider,{value:O,children:t})})},Ea=()=>(0,d.jsxs)("div",{"data-testid":"chat-skeleton",className:"flex h-full flex-col",children:[(0,d.jsx)("div",{className:"scrollbar grow overflow-y-auto px-2 py-4 [scrollbar-gutter:stable_both-edges]"}),(0,d.jsxs)("div",{className:"grid h-[81px] grid-cols-[1fr_max-content] items-center gap-5 border-0 border-t border-solid border-t-subtle p-x2",children:[(0,d.jsx)("div",{className:"bones h-6 w-full animate-pulse rounded-sm"}),(0,d.jsx)("div",{className:"bones mr-2 h-10 w-11 animate-pulse rounded-sm"})]})]}),Ia=({focus:e,logo:t,label:n,sublabel:r})=>{const a=n??e.label,o=r??e.display?.subtitle??(ce(e)?e.unique_symbol:void 0),i=e.display?.logo_url;return(0,d.jsxs)(d.Fragment,{children:[void 0!==t?t:void 0!==i?(0,d.jsx)("img",{src:i,alt:"",className:"size-8 shrink-0 rounded-md bg-p-white-100 object-contain p-x0_5"}):(0,d.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-md bg-surface-3 text-xs font-bold text-softer",children:e.label?.charAt(0)??"?"}),(0,d.jsxs)("div",{className:"flex min-w-0 flex-col",children:[void 0!==a&&(0,d.jsx)("span",{className:"truncate text-tiny font-medium text-solid",children:a}),void 0!==o&&(0,d.jsx)("span",{className:"truncate text-xs text-softer",children:o})]})]})},Ca=({className:e,...t})=>{const n=wa().active.state.value.context?.focus?.[0];if(void 0!==t.content){void 0===t.logo&&void 0===t.label&&void 0===t.sublabel||console.error("ChatFocusEntity: `content` is mutually exclusive with `logo`/`label`/`sublabel` â the part props are ignored.");const r=t.content;return(0,d.jsx)("div",{className:(0,u.cn)("flex items-center gap-x1 border-b border-subtle bg-surface-2 light:bg-surface-1 p-x1 h-14 empty:hidden",e),children:(0,d.jsx)(r,{focus:n})})}return null==n?null:(0,d.jsx)("div",{className:(0,u.cn)("flex items-center gap-x1 border-b border-subtle bg-surface-2 light:bg-surface-1 p-x1 h-14 empty:hidden",e),children:(0,d.jsx)(Ia,{focus:n,logo:t.logo,label:t.label,sublabel:t.sublabel})})},za=Z(W(),1),ja=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},_a=(e,t,n)=>(ja(e,t,"read from private field"),n?n.call(e):t.get(e)),Aa=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ta=(e,t,n,r)=>(ja(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Na;Er=new WeakMap,Ir=new WeakMap,Cr=new WeakMap,zr=new WeakMap,jr=new WeakMap,_r=new WeakMap,Ar=new WeakMap,Tr=new WeakMap,Nr=new WeakMap;var Da=class extends Lr{constructor({messages:e,...t}){const n=new class{constructor(e=[]){Aa(this,Er,void 0),Aa(this,Ir,"ready"),Aa(this,Cr,void 0),Aa(this,zr,new Set),Aa(this,jr,new Set),Aa(this,_r,new Set),this.pushMessage=e=>{Ta(this,Er,_a(this,Er).concat(e)),_a(this,Ar).call(this)},this.popMessage=()=>{Ta(this,Er,_a(this,Er).slice(0,-1)),_a(this,Ar).call(this)},this.replaceMessage=(e,t)=>
3{Ta(this,Er,[..._a(this,Er).slice(0,e),this.snapshot(t),..._a(this,Er).slice(e+1)]),_a(this,Ar).call(this)},this.snapshot=e=>structuredClone(e),this["~registerMessagesCallback"]=(e,t)=>{const n=t?(r=e,null!=(a=t)?(0,za.default)(r,a):r):e;var r,a;return _a(this,zr).add(n),()=>{_a(this,zr).delete(n)}},this["~registerStatusCallback"]=e=>(_a(this,jr).add(e),()=>{_a(this,jr).delete(e)}),this["~registerErrorCallback"]=e=>(_a(this,_r).add(e),()=>{_a(this,_r).delete(e)}),Aa(this,Ar,(()=>{_a(this,zr).forEach((e=>e()))})),Aa(this,Tr,(()=>{_a(this,jr).forEach((e=>e()))})),Aa(this,Nr,(()=>{_a(this,_r).forEach((e=>e()))})),Ta(this,Er,e)}get status(){return _a(this,Ir)}set status(e){Ta(this,Ir,e),_a(this,Tr).call(this)}get error(){return _a(this,Cr)}set error(e){Ta(this,Cr,e),_a(this,Nr).call(this)}get messages(){return _a(this,Er)}set messages(e){Ta(this,Er,[...e]),_a(this,Ar).call(this)}}(e);super({...t,state:n}),Aa(this,Na,void 0),this["~registerMessagesCallback"]=(e,t)=>_a(this,Na)["~registerMessagesCallback"](e,t),this["~registerStatusCallback"]=e=>_a(this,Na)["~registerStatusCallback"](e),this["~registerErrorCallback"]=e=>_a(this,Na)["~registerErrorCallback"](e),Ta(this,Na,n)}};Na=new WeakMap;var Ma=()=>{const{transport:e}=ae(),{bridge:t,registerChatInstance:n}=ie(),r=wa(),a=(0,c.useContext)(ka);(0,c.useEffect)((()=>{const e=n();if(!e)throw new Error("useChat() may only be used by one component within a <ChatProvider>. A second active useChat instance was detected â render useChat in exactly one place and read chat state elsewhere via useChatManager().");return e}),[n]);const o=((e,t)=>{const{transport:n,user:r}=ae(),a=r?.id?r.id:void 0;return(0,f.UX)(ya({api:n.api,getToken:n.getToken,userId:a,threadId:e,threadStatus:t}))})(r.active.threadId,r.active.status),[i,s,l]=(e=>{const[t,n]=(0,c.useState)(e),r=(0,c.useRef)(t);return[t,(0,c.useCallback)((e=>{const t="function"==typeof e?e(r.current):e;r.current=t,n(t)}),[]),r]})(void 0),u=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=(0,c.useRef)("chat"in n?n.chat:new Da(n));("chat"in n&&n.chat!==r.current||"id"in n&&r.current.id!==n.id)&&(r.current="chat"in n?n.chat:new Da(n));const a=(0,c.useCallback)((t=>r.current["~registerMessagesCallback"](t,e)),[e,r.current.id]),o=(0,c.useSyncExternalStore)(a,(()=>r.current.messages),(()=>r.current.messages)),i=(0,c.useSyncExternalStore)(r.current["~registerStatusCallback"],(()=>r.current.status),(()=>r.current.status)),s=(0,c.useSyncExternalStore)(r.current["~registerErrorCallback"],(()=>r.current.error),(()=>r.current.error)),l=(0,c.useCallback)((e=>{"function"==typeof e&&(e=e(r.current.messages)),r.current.messages=e}),[r]);return(0,c.useEffect)((()=>{t&&r.current.resumeStream()}),[t,r]),{id:r.current.id,messages:o,setMessages:l,sendMessage:r.current.sendMessage,regenerate:r.current.regenerate,clearError:r.current.clearError,stop:r.current.stop,error:s,resumeStream:r.current.resumeStream,status:i,addToolResult:r.current.addToolOutput,addToolOutput:r.current.addToolOutput}}({id:r.active.threadId,messages:o.data?.messages??[],transport:new Mr({api:e.api,fetch:async(t,n)=>{try{const r=await e.getToken(),a=new Headers(n?.headers);a.set("Authorization",`Bearer ${r}`);const o=await fetch(t,{...n,headers:a});if(!o.ok){const e=await(async e=>{if(429!==e.status)switch(e.status){case 401:return new Pr("unauthorized");case 403:return new Pr("feature_disabled");default:return new Pr("unknown_error")}const t=qr(e.headers.get("retry-after"));try{const n=await e.json();if((e=>{const t=e?.detail?.reset_at;return void 0!==e&&"string"==typeof e?.detail?.code&&("string"==typeof t||null===t)&&"number"==typeof e?.detail?.per_day_count})(n)&&"user_chat_limit_reached"===n.detail.code)return new Or("user_chat_limit_reached",{resetAt:n.detail.reset_at??void 0,perDayCount:n.detail.per_day_count});if((e=>"client_rate_limited"===e?.detail?.code)(n))return new Or("client_rate_limited",{retryAfterSeconds:qr(n.detail.retry_after_seconds)??t})}catch(e){console.error(e)}return new Pr("usage_limit_exceeded")})(o.clone());s(e)}return o}catch(e){throw console.error(e),s(new Pr("unknown_error")),e}}}),onFinish:e=>{a.onMessageReceived(),e.isError&&void 0===l.current&&(s(new Br("unknown_error")),u.setMessages((e=>[...e,{id:Vt(),role:"assistant",metadata:{error:"unknown_error"},parts:[{type:"text",text:"",state:"done"}]}])))}}),d=o.data?.messages;(0,c.useEffect)((()=>{d&&"streaming"!==u.status&&"submitted"!==u.status&&0!==d.length&&d.length>u.messages.length&&u.setMessages(d)}),[d,u]);const p=Fr(i)?i:void 0;(0,c.useEffect)((()=>
3{if(Rr(i))throw i}),[i]);const h=(0,c.useMemo)((()=>fa(u.messages)),[u.messages]),{threadId:m}=r.active,{publishMessages:g}=a,y=u.status;(0,c.useEffect)((()=>{"streaming"!==y&&"submitted"!==y&&g(m,h)}),[m,h,y,g]);const v=(0,c.useMemo)((()=>(e=>{const t=e[e.length-1];if(!t||"assistant"!==t.role)return null;if(t.parts.some((e=>gr(e)&&e.text.length>0)))return null;let n=null;for(const e of t.parts)if(Zr(e))n={id:e.toolCallId,name:e.toolName,source:Yr(e.toolName)};else if(Wr(e)){const t=e.type.replace("tool-","");n={id:e.toolCallId,name:t,source:Yr(t)}}return n})(u.messages)),[u.messages]),x=(0,c.useMemo)((()=>h.filter((e=>"user"===e.role)).length),[h]),b=x>0,k=x>=20,w=(0,c.useCallback)((async(e,t)=>{try{s(void 0),u.clearError();const n=r.active.state.getSnapshot();await u.sendMessage({text:e},{body:{state:{context:n.context},origin:t?.origin}})}catch(e){console.error(e)}}),[u,r,s]),[S,E]=(0,c.useState)(null),I=(0,c.useRef)(0);return(0,c.useEffect)((()=>t.prompt.setHandler((({message:e,origin:t})=>E((n=>({message:e,origin:t,seq:(n?.seq??0)+1})))))),[t]),(0,c.useEffect)((()=>{null!==S&&S.seq!==I.current&&(I.current=S.seq,w(S.message,{origin:S.origin}))}),[S,w]),{threadId:r.active.threadId,title:r.active.title,state:r.active.state.value,messages:h,activeTool:v,error:p,isLoading:"submitted"===u.status||"streaming"===u.status,hasUserMessages:b,hasTruncatedMessages:k,send:w}},La=({className:e,children:t})=>(0,d.jsx)("div",{className:(0,u.cn)("grid animate-fade-in grid-cols-1 gap-y-1 py-4",e),children:t});var Pa=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ra=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oa={};function Fa(e,t){return((t||Oa).jsx?Ra:Pa).test(e)}var qa=/[ \t\n\f\r]/g;function Ba(e){return""===e.replace(qa,"")}var Ua=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};function Va(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ua(n,r,t)}function $a(e){return e.toLowerCase()}Ua.prototype.normal={},Ua.prototype.property={},Ua.prototype.space=void 0;var Ha=class{constructor(e,t){this.attribute=t,this.property=e}};Ha.prototype.attribute="",Ha.prototype.booleanish=!1,Ha.prototype.boolean=!1,Ha.prototype.commaOrSpaceSeparated=!1,Ha.prototype.commaSeparated=!1,Ha.prototype.defined=!1,Ha.prototype.mustUseProperty=!1,Ha.prototype.number=!1,Ha.prototype.overloadedBoolean=!1,Ha.prototype.property="",Ha.prototype.spaceSeparated=!1,Ha.prototype.space=void 0;var Ya={};Y(Ya,{boolean:()=>Wa,booleanish:()=>Ga,commaOrSpaceSeparated:()=>eo,commaSeparated:()=>Xa,number:()=>Ka,overloadedBoolean:()=>Ja,spaceSeparated:()=>Qa});var Za=0,Wa=to(),Ga=to(),Ja=to(),Ka=to(),Qa=to(),Xa=to(),eo=to();function to(){return 2**++Za}var no=Object.keys(Ya),ro=class extends Ha{constructor(e,t,n,r){let a=-1;if(super(e,t),ao(this,"space",r),"number"==typeof n)for(;++a<no.length;){const e=no[a];ao(this,no[a],(n&Ya[e])===Ya[e])}}};function ao(e,t,n){n&&(e[t]=n)}function oo(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new ro(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[$a(r)]=r,n[$a(o.attribute)]=r}return new Ua(t,n,e.space)}ro.prototype.defined=!0;var io=oo({properties:{ariaActiveDescendant:null,ariaAtomic:Ga,ariaAutoComplete:null,ariaBusy:Ga,ariaChecked:Ga,ariaColCount:Ka,ariaColIndex:Ka,ariaColSpan:Ka,ariaControls:Qa,ariaCurrent:null,ariaDescribedBy:Qa,ariaDetails:null,ariaDisabled:Ga,ariaDropEffect:Qa,ariaErrorMessage:null,ariaExpanded:Ga,ariaFlowTo:Qa,ariaGrabbed:Ga,ariaHasPopup:null,ariaHidden:Ga,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qa,ariaLevel:Ka,ariaLive:null,ariaModal:Ga,ariaMultiLine:Ga,ariaMultiSelectable:Ga,ariaOrientation:null,ariaOwns:Qa,ariaPlaceholder:null,ariaPosInSet:Ka,ariaPressed:Ga,ariaReadOnly:Ga,ariaRelevant:null,ariaRequired:Ga,ariaRoleDescription:Qa,ariaRowCount:Ka,ariaRowIndex:Ka,ariaRowSpan:Ka,ariaSelected:Ga,ariaSetSize:Ka,ariaSort:null,ariaValueMax:Ka,ariaValueMin:Ka,ariaValueNow:Ka,ariaValueText:null,role:null},transform(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()}});function so(e,t){return t in e?e[t]:t}function lo(e,t){return so(e,t.toLowerCase())}var co=oo({attributes:{acceptcharset:"accept-charset",classname:"
3class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Xa,acceptCharset:Qa,accessKey:Qa,action:null,allow:null,allowFullScreen:Wa,allowPaymentRequest:Wa,allowUserMedia:Wa,alt:null,as:null,async:Wa,autoCapitalize:null,autoComplete:Qa,autoFocus:Wa,autoPlay:Wa,blocking:Qa,capture:null,charSet:null,checked:Wa,cite:null,className:Qa,cols:Ka,colSpan:null,content:null,contentEditable:Ga,controls:Wa,controlsList:Qa,coords:Ka|Xa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Wa,defer:Wa,dir:null,dirName:null,disabled:Wa,download:Ja,draggable:Ga,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Wa,formTarget:null,headers:Qa,height:Ka,hidden:Ja,high:Ka,href:null,hrefLang:null,htmlFor:Qa,httpEquiv:Qa,id:null,imageSizes:null,imageSrcSet:null,inert:Wa,inputMode:null,integrity:null,is:null,isMap:Wa,itemId:null,itemProp:Qa,itemRef:Qa,itemScope:Wa,itemType:Qa,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Wa,low:Ka,manifest:null,max:null,maxLength:Ka,media:null,method:null,min:null,minLength:Ka,multiple:Wa,muted:Wa,name:null,nonce:null,noModule:Wa,noValidate:Wa,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Wa,optimum:Ka,pattern:null,ping:Qa,placeholder:null,playsInline:Wa,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Wa,referrerPolicy:null,rel:Qa,required:Wa,reversed:Wa,rows:Ka,rowSpan:Ka,sandbox:Qa,scope:null,scoped:Wa,seamless:Wa,selected:Wa,shadowRootClonable:Wa,shadowRootDelegatesFocus:Wa,shadowRootMode:null,shape:null,size:Ka,sizes:null,slot:null,span:Ka,spellCheck:Ga,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ka,step:null,style:null,tabIndex:Ka,target:null,title:null,translate:null,type:null,typeMustMatch:Wa,useMap:null,value:Ga,width:Ka,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qa,axis:null,background:null,bgColor:null,border:Ka,borderColor:null,bottomMargin:Ka,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Wa,declare:Wa,event:null,face:null,frame:null,frameBorder:null,hSpace:Ka,leftMargin:Ka,link:null,longDesc:null,lowSrc:null,marginHeight:Ka,marginWidth:Ka,noResize:Wa,noHref:Wa,noShade:Wa,noWrap:Wa,object:null,profile:null,prompt:null,rev:null,rightMargin:Ka,rules:null,scheme:null,scrolling:Ga,standby:null,summary:null,text:null,topMargin:Ka,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ka,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Wa,disableRemotePlayback:Wa,prefix:null,property:null,results:Ka,security:null,unselectable:null},space:"html",transform:lo}),uo=oo({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",colorRen
3dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:eo,accentHeight:Ka,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ka,amplitude:Ka,arabicForm:null,ascent:Ka,attributeName:null,attributeType:null,azimuth:Ka,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ka,by:null,calcMode:null,capHeight:Ka,className:Qa,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
3dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ka,diffuseConstant:Ka,direction:null,display:null,dur:null,divisor:Ka,dominantBaseline:null,download:Wa,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ka,enableBackground:null,end:null,event:null,exponent:Ka,externalResourcesRequired:null,fill:null,fillOpacity:Ka,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:Xa,g2:Xa,glyphName:Xa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ka,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ka,horizOriginX:Ka,horizOriginY:Ka,id:null,ideographic:Ka,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ka,k:Ka,k1:Ka,k2:Ka,k3:Ka,k4:Ka,kernelMatrix:eo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ka,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:Ka,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ka,overlineThickness:Ka,paintOrder:null,panose1:null,path:null,pathLength:Ka,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qa,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ka,pointsAtY:Ka,pointsAtZ:Ka,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:eo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:eo,rev:eo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:eo,requiredFeatures:eo,requiredFonts:eo,requiredFormats:eo,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:Ka,specularExponent:Ka,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ka,strikethroughThickness:Ka,string:null,stroke:null,strokeDashArray:eo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ka,strokeOpacity:Ka,strokeWidth:null,style:null,surfaceScale:Ka,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:eo,tabIndex:Ka,tableValues:null,target:null,targetX:Ka,targetY:Ka,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:eo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ka,underlineThickness:Ka,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ka,values:null,vAlphabetic:Ka,vMathematical:Ka,vectorEffect:null,vHanging:Ka,vIdeographic:Ka,version:null,vertAdvY:Ka,vertOriginX:Ka,vertOriginY:Ka,viewB
3ox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ka,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:so}),po=oo({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),fo=oo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lo}),ho=oo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),mo={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"},go=/[A-Z]/g,yo=/-[a-z]/g,vo=/^data[-\w.:]+$/i;function xo(e){return"-"+e.toLowerCase()}function bo(e){return e.charAt(1).toUpperCase()}var ko=Va([io,co,po,fo,ho],"html"),wo=Va([io,uo,po,fo,ho],"svg");var So=Z(Q(),1),Eo=Co("end"),Io=Co("start");function Co(e){return function(t){const 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 zo(e){return e&&"object"==typeof e?"position"in e||"type"in e?_o(e.position):"start"in e||"end"in e?_o(e):"line"in e||"column"in e?jo(e):"":""}function jo(e){return Ao(e&&e.line)+":"+Ao(e&&e.column)}function _o(e){return jo(e&&e.start)+"-"+jo(e&&e.end)}function Ao(e){return e&&"number"==typeof e?e:1}var To=class extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="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:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=zo(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};To.prototype.file="",To.prototype.name="",To.prototype.reason="",To.prototype.message="",To.prototype.stack="",To.prototype.column=void 0,To.prototype.line=void 0,To.prototype.ancestors=void 0,To.prototype.cause=void 0,To.prototype.fatal=void 0,To.prototype.place=void 0,To.prototype.ruleId=void 0,To.prototype.source=void 0;var No={}.hasOwnProperty,Do=new Map,Mo=/[A-Z]/g,Lo=new Set(["table","tbody","thead","tfoot","tr"]),Po=new Set(["td","th"]),Ro="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Oo(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=Io(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");
vendor: 6,319 bytes, line 3
3if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?wo:ko,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Fo(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Fo(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=wo,e.schema=a);e.ancestors.push(t);const o=$o(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&No.call(t.properties,a)){const o=Vo(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Po.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Uo(e,t);Lo.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&Ba(t.value):Ba(t));var t})));return qo(e,i,o,t),Bo(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ho(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=wo,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:$o(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Ho(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else Ho(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Uo(e,t);return qo(e,i,o,t),Bo(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ho(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Bo(r,Uo(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function qo(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bo(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Uo(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Do;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=Fo(e,o,i);void 0!==s&&n.push(s)}return n}function Vo(e,t,n){const r=function(e,t){const n=$a(t);let r=t,a=Ha;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&vo.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(yo,bo);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!yo.test(e)){let n=e.replace(go,xo);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=ro}return new a(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e,t){const n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return(0,So.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new To("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ro+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)No.call(e,n)&&(t[Yo(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?mo[r.property]||r.property:r.attribute,n]}}function $o(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=Fa(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=Fa(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return No.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ho(e)}function Ho(e,t){const n=new To("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=Ro+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Yo(e){let t=e.replace(Mo,Zo);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Zo(e){return"-"+e.toLowerCase()}var Wo={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"]},Go={};function Jo(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){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 Ko(e.children,t,n)}return Array.isArray(e)?Ko(e,t,n):""}function Ko(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=Jo(e[a],t,n);return r.join("")}var Qo
vendor: 6,270 bytes, line 3
3={AElig:"Ã",AMP:"&",Aacute:"Ã",Abreve:"Ä",Acirc:"Ã",Acy:"Ð",Afr:"ð",Agrave:"Ã",Alpha:"Î",Amacr:"Ä",And:"â©",Aogon:"Ä",Aopf:"ð¸",ApplyFunction:"â¡",Aring:"Ã
",Ascr:"ð",Assign:"â",Atilde:"Ã",Auml:"Ã",Backslash:"â",Barv:"â«§",Barwed:"â",Bcy:"Ð",Because:"âµ",Bernoullis:"â¬",Beta:"Î",Bfr:"ð
",Bopf:"ð¹",Breve:"Ë",Bscr:"â¬",Bumpeq:"â",CHcy:"Ч",COPY:"©",Cacute:"Ä",Cap:"â",CapitalDifferentialD:"â
",Cayleys:"â",Ccaron:"Ä",Ccedil:"Ã",Ccirc:"Ä",Cconint:"â°",Cdot:"Ä",Cedilla:"¸",CenterDot:"·",Cfr:"â",Chi:"Χ",CircleDot:"â",CircleMinus:"â",CirclePlus:"â",CircleTimes:"â",ClockwiseContourIntegral:"â²",CloseCurlyDoubleQuote:"â",CloseCurlyQuote:"â",Colon:"â·",Colone:"â©´",Congruent:"â¡",Conint:"â¯",ContourIntegral:"â®",Copf:"â",Coproduct:"â",CounterClockwiseContourIntegral:"â³",Cross:"⨯",Cscr:"ð",Cup:"â",CupCap:"â",DD:"â
",DDotrahd:"â¤",DJcy:"Ð",DScy:"Ð
",DZcy:"Ð",Dagger:"â¡",Darr:"â¡",Dashv:"⫤",Dcaron:"Ä",Dcy:"Ð",Del:"â",Delta:"Î",Dfr:"ð",DiacriticalAcute:"´",DiacriticalDot:"Ë",DiacriticalDoubleAcute:"Ë",DiacriticalGrave:"`",DiacriticalTilde:"Ë",Diamond:"â",DifferentialD:"â
",Dopf:"ð»",Dot:"¨",DotDot:"â",DotEqual:"â",DoubleContourIntegral:"â¯",DoubleDot:"¨",DoubleDownArrow:"â",DoubleLeftArrow:"â",DoubleLeftRightArrow:"â",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"â¸",DoubleLongLeftRightArrow:"âº",DoubleLongRightArrow:"â¹",DoubleRightArrow:"â",DoubleRightTee:"â¨",DoubleUpArrow:"â",DoubleUpDownArrow:"â",DoubleVerticalBar:"â¥",DownArrow:"â",DownArrowBar:"â¤",DownArrowUpArrow:"âµ",DownBreve:"Ì",DownLeftRightVector:"â¥",DownLeftTeeVector:"â¥",DownLeftVector:"â½",DownLeftVectorBar:"â¥",DownRightTeeVector:"â¥",DownRightVector:"â",DownRightVectorBar:"â¥",DownTee:"â¤",DownTeeArrow:"â§",Downarrow:"â",Dscr:"ð",Dstrok:"Ä",ENG:"Å",ETH:"Ã",Eacute:"Ã",Ecaron:"Ä",Ecirc:"Ã",Ecy:"Ð",Edot:"Ä",Efr:"ð",Egrave:"Ã",Element:"â",Emacr:"Ä",EmptySmallSquare:"â»",EmptyVerySmallSquare:"â«",Eogon:"Ä",Eopf:"ð¼",Epsilon:"Î",Equal:"⩵",EqualTilde:"â",Equilibrium:"â",Escr:"â°",Esim:"⩳",Eta:"Î",Euml:"Ã",Exists:"â",ExponentialE:"â
",Fcy:"Ф",Ffr:"ð",FilledSmallSquare:"â¼",FilledVerySmallSquare:"âª",Fopf:"ð½",ForAll:"â",Fouriertrf:"â±",Fscr:"â±",GJcy:"Ð",GT:">",Gamma:"Î",Gammad:"Ï",Gbreve:"Ä",Gcedil:"Ä¢",Gcirc:"Ä",Gcy:"Ð",Gdot:"Ä ",Gfr:"ð",Gg:"â",Gopf:"ð¾",GreaterEqual:"â¥",GreaterEqualLess:"â",GreaterFullEqual:"â§",GreaterGreater:"⪢",GreaterLess:"â·",GreaterSlantEqual:"⩾",GreaterTilde:"â³",Gscr:"ð¢",Gt:"â«",HARDcy:"Ъ",Hacek:"Ë",Hat:"^",Hcirc:"Ĥ",Hfr:"â",HilbertSpace:"â",Hopf:"â",HorizontalLine:"â",Hscr:"â",Hstrok:"Ħ",HumpDownHump:"â",HumpEqual:"â",IEcy:"Ð",IJlig:"IJ",IOcy:"Ð",Iacute:"Ã",Icirc:"Ã",Icy:"Ð",Idot:"İ",Ifr:"â",Igrave:"Ã",Im:"â",Imacr:"Ī",ImaginaryI:"â
",Implies:"â",Int:"â¬",Integral:"â«",Intersection:"â",InvisibleComma:"â£",InvisibleTimes:"â¢",Iogon:"Ä®",Iopf:"ð",Iota:"Î",Iscr:"â",Itilde:"Ĩ",Iukcy:"Ð",Iuml:"Ã",Jcirc:"Ä´",Jcy:"Ð",Jfr:"ð",Jopf:"ð",Jscr:"ð¥",Jsercy:"Ð",Jukcy:"Ð",KHcy:"Ð¥",KJcy:"Ð",Kappa:"Î",Kcedil:"Ķ",Kcy:"Ð",Kfr:"ð",Kopf:"ð",Kscr:"ð¦",LJcy:"Ð",LT:"<",Lacute:"Ĺ",Lambda:"Î",Lang:"âª",Laplacetrf:"â",Larr:"â",Lcaron:"Ľ",Lcedil:"Ä»",Lcy:"Ð",LeftAngleBracket:"â¨",LeftArrow:"â",LeftArrowBar:"â¤",LeftArrowRightArrow:"â",LeftCeiling:"â",LeftDoubleBracket:"â¦",LeftDownTeeVector:"⥡",LeftDownVector:"â",LeftDownVectorBar:"â¥",LeftFloor:"â",LeftRightArrow:"â",LeftRightVector:"â¥",LeftTee:"â£",LeftTeeArrow:"â¤",LeftTeeVector:"â¥",LeftTriangle:"â²",LeftTriangleBar:"â§",LeftTriangleEqual:"â´",LeftUpDownVector:"â¥",LeftUpTeeVector:"⥠",LeftUpVector:"â¿",LeftUpVectorBar:"â¥",LeftVector:"â¼",LeftVectorBar:"â¥",Leftarrow:"â",Leftrightarrow:"â",LessEqualGreater:"â",LessFullEqual:"â¦",LessGreater:"â¶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"â²",Lfr:"ð",Ll:"â",Lleftarrow:"â",Lmidot:"Ä¿",LongLeftArrow:"âµ",LongLeftRightArrow:"â·",LongRightArrow:"â¶",Longleftarrow:"â¸",Longleftrightarrow:"âº",Longrightarrow:"â¹",Lopf:"ð",LowerLeftArrow:"â",LowerRightArrow:"â",Lscr:"â",Lsh:"â°",Lstrok:"Å",Lt:"âª",Map:"â¤
",Mcy:"Ð",MediumSpace:"â",Mellintrf:"â³",Mfr:"ð",MinusPlus:"â",Mopf:"ð",Mscr:"â³",Mu:"Î",NJcy:"Ð",Nacute:"Å",Ncaron:"Å",Ncedil:"Å
",Ncy:"Ð",NegativeMediumSpace:"â",NegativeThickSpace:"â",NegativeThinSpace:"â",NegativeVeryThinSpace:"â",NestedGreaterGreater:"â«",NestedLessLess:"âª",NewLine:"\n",Nfr:"ð",NoBreak:"â ",NonBreakingSpace:" ",Nopf:"â",Not:"⫬",NotCongruent:"â¢",NotCupCap:"â",NotDoubleVerticalBar:"â¦",NotElement:"â",NotEqual:"â ",NotEqualTilde:"â̸",NotExists:"â",NotGreater:"â¯",NotGreaterEqual:"â±",NotGreaterFullEqual:"â§Ì¸",NotGreaterGreater:"â«Ì¸",NotGreaterLess:"â¹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"âµ",NotHumpDownHump:"â̸",NotHumpEqual:"â̸",NotLeftTriangle:"âª",NotLeftTriangleBar:"â§Ì¸",NotLeftTriangleEqual:"â¬",NotLess:"â®",NotLessEqual:"â°",NotLessGreater:"â¸",NotLessLess:"âªÌ¸",NotLessSlantEqual:"⩽̸",NotLessTilde:"â´",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"â",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"â ",NotReverseElement:"â",NotRightTriangle:"â«",NotRightTriangleBar:"â§Ì¸",NotRightTriangleEqual:"â",NotSquareSubset:"â̸",NotSquareSubsetEqual:"â¢",NotSquareSuperset:"â̸",NotSquareSupersetEqual:"â£",NotSubset:"ââ",NotSubsetEqual:"â",NotSucceeds:"â",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"â¡",NotSucceedsTilde:"â¿Ì¸",NotSuperset:"ââ",NotSupersetEqual:"â",NotTilde:"â",NotTildeEqual:"â",NotTildeFullEqual:"â",NotTildeTilde:"â",NotVerticalBar:"â¤",Nscr:"ð©",Ntilde:"Ã",Nu:"Î",OElig:"Å",Oacute:"Ã",Ocirc:"Ã",Ocy:"Ð",Odblac:"Å",Ofr:"ð",Ograve:"Ã",Omacr:"Å",Omega:"Ω",Omicron:"Î",Oopf:"ð",OpenCurlyDoubleQuote:"â",OpenCurlyQuote:"â",Or:"â©",Oscr:"ðª",Oslash:"Ã",Otilde:"Ã",Otimes:"⨷",Ouml:"Ã",OverBar:"â¾",OverBrace:"â",OverBracket:"â´",OverParenthesis:"â",PartialD:"â",Pcy:"Ð",Pfr:"ð",Phi:"Φ",Pi:"Î ",PlusMinus:"±",Poincareplane
vendor: 22,456 bytes, line 3
3:"â",Popf:"â",Pr:"⪻",Precedes:"âº",PrecedesEqual:"⪯",PrecedesSlantEqual:"â¼",PrecedesTilde:"â¾",Prime:"â³",Product:"â",Proportion:"â·",Proportional:"â",Pscr:"ð«",Psi:"Ψ",QUOT:'"',Qfr:"ð",Qopf:"â",Qscr:"ð¬",RBarr:"â¤",REG:"®",Racute:"Å",Rang:"â«",Rarr:"â ",Rarrtl:"â¤",Rcaron:"Å",Rcedil:"Å",Rcy:"Ð ",Re:"â",ReverseElement:"â",ReverseEquilibrium:"â",ReverseUpEquilibrium:"⥯",Rfr:"â",Rho:"Ρ",RightAngleBracket:"â©",RightArrow:"â",RightArrowBar:"â¥",RightArrowLeftArrow:"â",RightCeiling:"â",RightDoubleBracket:"â§",RightDownTeeVector:"â¥",RightDownVector:"â",RightDownVectorBar:"â¥",RightFloor:"â",RightTee:"â¢",RightTeeArrow:"â¦",RightTeeVector:"â¥",RightTriangle:"â³",RightTriangleBar:"â§",RightTriangleEqual:"âµ",RightUpDownVector:"â¥",RightUpTeeVector:"â¥",RightUpVector:"â¾",RightUpVectorBar:"â¥",RightVector:"â",RightVectorBar:"â¥",Rightarrow:"â",Ropf:"â",RoundImplies:"⥰",Rrightarrow:"â",Rscr:"â",Rsh:"â±",RuleDelayed:"â§´",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Å",Sc:"⪼",Scaron:"Å ",Scedil:"Å",Scirc:"Å",Scy:"С",Sfr:"ð",ShortDownArrow:"â",ShortLeftArrow:"â",ShortRightArrow:"â",ShortUpArrow:"â",Sigma:"Σ",SmallCircle:"â",Sopf:"ð",Sqrt:"â",Square:"â¡",SquareIntersection:"â",SquareSubset:"â",SquareSubsetEqual:"â",SquareSuperset:"â",SquareSupersetEqual:"â",SquareUnion:"â",Sscr:"ð®",Star:"â",Sub:"â",Subset:"â",SubsetEqual:"â",Succeeds:"â»",SucceedsEqual:"⪰",SucceedsSlantEqual:"â½",SucceedsTilde:"â¿",SuchThat:"â",Sum:"â",Sup:"â",Superset:"â",SupersetEqual:"â",Supset:"â",THORN:"Ã",TRADE:"â¢",TSHcy:"Ð",TScy:"Ц",Tab:"\t",Tau:"Τ",Tcaron:"Ť",Tcedil:"Å¢",Tcy:"Т",Tfr:"ð",Therefore:"â´",Theta:"Î",ThickSpace:"ââ",ThinSpace:"â",Tilde:"â¼",TildeEqual:"â",TildeFullEqual:"â
",TildeTilde:"â",Topf:"ð",TripleDot:"â",Tscr:"ð¯",Tstrok:"Ŧ",Uacute:"Ã",Uarr:"â",Uarrocir:"â¥",Ubrcy:"Ð",Ubreve:"Ŭ",Ucirc:"Ã",Ucy:"У",Udblac:"Ű",Ufr:"ð",Ugrave:"Ã",Umacr:"Ū",UnderBar:"_",UnderBrace:"â",UnderBracket:"âµ",UnderParenthesis:"â",Union:"â",UnionPlus:"â",Uogon:"Ų",Uopf:"ð",UpArrow:"â",UpArrowBar:"â¤",UpArrowDownArrow:"â
",UpDownArrow:"â",UpEquilibrium:"⥮",UpTee:"â¥",UpTeeArrow:"â¥",Uparrow:"â",Updownarrow:"â",UpperLeftArrow:"â",UpperRightArrow:"â",Upsi:"Ï",Upsilon:"Î¥",Uring:"Å®",Uscr:"ð°",Utilde:"Ũ",Uuml:"Ã",VDash:"â«",Vbar:"â««",Vcy:"Ð",Vdash:"â©",Vdashl:"⫦",Vee:"â",Verbar:"â",Vert:"â",VerticalBar:"â£",VerticalLine:"|",VerticalSeparator:"â",VerticalTilde:"â",VeryThinSpace:"â",Vfr:"ð",Vopf:"ð",Vscr:"ð±",Vvdash:"âª",Wcirc:"Å´",Wedge:"â",Wfr:"ð",Wopf:"ð",Wscr:"ð²",Xfr:"ð",Xi:"Î",Xopf:"ð",Xscr:"ð³",YAcy:"Я",YIcy:"Ð",YUcy:"Ю",Yacute:"Ã",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"ð",Yopf:"ð",Yscr:"ð´",Yuml:"Ÿ",ZHcy:"Ð",Zacute:"Ź",Zcaron:"Ž",Zcy:"Ð",Zdot:"Å»",ZeroWidthSpace:"â",Zeta:"Î",Zfr:"â¨",Zopf:"â¤",Zscr:"ðµ",aacute:"á",abreve:"Ä",ac:"â¾",acE:"â¾Ì³",acd:"â¿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"â¡",afr:"ð",agrave:"à ",alefsym:"âµ",aleph:"âµ",alpha:"α",amacr:"Ä",amalg:"⨿",amp:"&",and:"â§",andand:"â©",andd:"â©",andslope:"â©",andv:"â©",ang:"â ",ange:"⦤",angle:"â ",angmsd:"â¡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"â¦",angmsdag:"⦮",angmsdah:"⦯",angrt:"â",angrtvb:"â¾",angrtvbd:"â¦",angsph:"â¢",angst:"Ã
",angzarr:"â¼",aogon:"Ä
",aopf:"ð",ap:"â",apE:"â©°",apacir:"⩯",ape:"â",apid:"â",apos:"'",approx:"â",approxeq:"â",aring:"Ã¥",ascr:"ð¶",ast:"*",asymp:"â",asympeq:"â",atilde:"ã",auml:"ä",awconint:"â³",awint:"â¨",bNot:"â«",backcong:"â",backepsilon:"϶",backprime:"âµ",backsim:"â½",backsimeq:"â",barvee:"â½",barwed:"â
",barwedge:"â
",bbrk:"âµ",bbrktbrk:"â¶",bcong:"â",bcy:"б",bdquo:"â",becaus:"âµ",because:"âµ",bemptyv:"⦰",bepsi:"϶",bernou:"â¬",beta:"β",beth:"â¶",between:"â¬",bfr:"ð",bigcap:"â",bigcirc:"â¯",bigcup:"â",bigodot:"â¨",bigoplus:"â¨",bigotimes:"â¨",bigsqcup:"â¨",bigstar:"â
",bigtriangledown:"â½",bigtriangleup:"â³",biguplus:"â¨",bigvee:"â",bigwedge:"â",bkarow:"â¤",blacklozenge:"â§«",blacksquare:"âª",blacktriangle:"â´",blacktriangledown:"â¾",blacktriangleleft:"â",blacktriangleright:"â¸",blank:"â£",blk12:"â",blk14:"â",blk34:"â",block:"â",bne:"=â¥",bnequiv:"â¡â¥",bnot:"â",bopf:"ð",bot:"â¥",bottom:"â¥",bowtie:"â",boxDL:"â",boxDR:"â",boxDl:"â",boxDr:"â",boxH:"â",boxHD:"â¦",boxHU:"â©",boxHd:"â¤",boxHu:"â§",boxUL:"â",boxUR:"â",boxUl:"â",boxUr:"â",boxV:"â",boxVH:"â¬",boxVL:"â£",boxVR:"â ",boxVh:"â«",boxVl:"â¢",boxVr:"â",boxbox:"â§",boxdL:"â",boxdR:"â",boxdl:"â",boxdr:"â",boxh:"â",boxhD:"â¥",boxhU:"â¨",boxhd:"â¬",boxhu:"â´",boxminus:"â",boxplus:"â",boxtimes:"â ",boxuL:"â",boxuR:"â",boxul:"â",boxur:"â",boxv:"â",boxvH:"âª",boxvL:"â¡",boxvR:"â",boxvh:"â¼",boxvl:"â¤",boxvr:"â",bprime:"âµ",breve:"Ë",brvbar:"¦",bscr:"ð·",bsemi:"â",bsim:"â½",bsime:"â",bsol:"\\",bsolb:"â§
",bsolhsub:"â",bull:"â¢",bullet:"â¢",bump:"â",bumpE:"⪮",bumpe:"â",bumpeq:"â",cacute:"Ä",cap:"â©",capand:"â©",capbrcup:"â©",capcap:"â©",capcup:"â©",capdot:"â©",caps:"â©ï¸",caret:"â",caron:"Ë",ccaps:"â©",ccaron:"Ä",ccedil:"ç",ccirc:"Ä",ccups:"â©",ccupssm:"â©",cdot:"Ä",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"ð ",chcy:"Ñ",check:"â",checkmark:"â",chi:"Ï",cir:"â",cirE:"â§",circ:"Ë",circeq:"â",circlearrowleft:"âº",circlearrowright:"â»",circledR:"®",circledS:"â",circledast:"â",circledcirc:"â",circleddash:"â",cire:"â",cirfnint:"â¨",cirmid:"⫯",cirscir:"â§",clubs:"â£",clubsuit:"â£",colon:":",colone:"â",coloneq:"â",comma:",",commat:"@",comp:"â",compfn:"â",complement:"â",complexes:"â",cong:"â
",congdot:"â©",conint:"â®",copf:"ð",coprod:"â",copy:"©",copysr:"â",crarr:"âµ",cross:"â",cscr:"ð¸",csub:"â«",csube:"â«",csup:"â«",csupe:"â«",ctdot:"â¯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"â",cuesc:"â",cularr:"â¶",cularrp:"⤽",cup:"âª",cupbrcap:"â©",cupcap:"â©",cupcup:"â©",cupdot:"â",cupor:"â©
",cups:"âªï¸",curarr:"â·",curarrm:"⤼",curlyeqprec:"â",curlyeqsucc:"â",curlyvee:"â",curlywedge:"â",curren:"¤",curvearrowleft:"â¶",curvearrowright:"â·",cuvee:"â",cuwed:"â",cwconint:"â²",cwint:"â±",cylcty:"â",dArr:"â",dHar:"⥥",dagger:"â ",daleth:"â¸",darr:"â",dash:"â",dashv:"â£",dbkarow:"â¤",dblac:"Ë",dcaron:"Ä",dcy:"д",dd:"â
",ddagger:"â¡",ddarr:"â",ddotseq:"â©·",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"ð¡",dharl:"â",dharr:"â",diam:"â",diamond:"â",diamondsuit:"â¦",diams:"â¦",die:"¨",digamma:"Ï",disin:"â²",div:"÷",divide:"÷",divideontimes:"â",divonx:"â",djcy:"Ñ",dlcorn:"â",dlcrop:"â",dollar:"$",dopf:"ð",dot:"Ë",doteq:"â",doteqdot:"â",dotminus:"â¸",dotplus:"â",dotsquare:"â¡",doublebarwedge:"â",downarrow:"â",downdownarrows:"â",downharpoonleft:"â",downharpoonright:"â",drbkarow:"â¤",drcorn:"â",drcrop:"â",dscr:"ð¹",dscy:"Ñ",dsol:"â§¶",dstrok:"Ä",dtdot:"â±",dtri:"â¿",dtrif:"â¾",duarr:"âµ",duhar:"⥯",dwangle:"⦦",dzcy:"Ñ",dzigrarr:"â¿",eDDot:"â©·",eDot:"â",eacute:"é",easter:"â©®",ecaron:"Ä",ecir:"â",ecirc:"ê",ecolon:"â",ecy:"Ñ",edot:"Ä",ee:"â
",efDot:"â",efr:"ð¢",eg:"âª",egrave:"è",egs:"âª",egsdot:"âª",el:"âª",elinters:"â§",ell:"â",els:"âª",elsdot:"âª",emacr:"Ä",empty:"â
",emptyset:"â
",emptyv:"â
",emsp13:"â",emsp14:"â
",emsp:"â",eng:"Å",ensp:"â",eogon:"Ä",eopf:"ð",epar:"â",eparsl:"â§£",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"â",eqcolon:"â",eqsim:"â",eqslantgtr:"âª",eqslantless:"âª",equals:"=",equest:"â",equiv:"â¡",equivDD:"⩸",eqvparsl:"â§¥",erDot:"â",erarr:"⥱",escr:"â¯",esdot:"â",esim:"â",eta:"η",eth:"ð",euml:"ë",euro:"â¬",excl:"!",exist:"â",expectation:"â°",exponentiale:"â
",fallingdotseq:"â",fcy:"Ñ",female:"â",ffilig:"ï¬",fflig:"ï¬",ffllig:"ï¬",ffr:"ð£",filig:"ï¬",fjlig:"fj",flat:"â",fllig:"ï¬",fltns:"â±",fnof:"Æ",fopf:"ð",forall:"â",fork:"â",forkv:"â«",fpartint:"â¨",frac12:"½",frac13:"â
",frac14:"¼",frac15:"â
",frac16:"â
",frac18:"â
",frac23:"â
",frac25:"â
",frac34:"¾",frac35:"â
",frac38:"â
",frac45:"â
",frac56:"â
",frac58:"â
",frac78:"â
",frasl:"â",frown:"â¢",fscr:"ð»",gE:"â§",gEl:"âª",gacute:"ǵ",gamma:"γ",gammad:"Ï",gap:"âª",gbreve:"Ä",gcirc:"Ä",gcy:"г",gdot:"Ä¡",ge:"â¥",gel:"â",geq:"â¥",geqq:"â§",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"âª",gesdoto:"âª",gesdotol:"âª",gesl:"âï¸",gesles:"âª",gfr:"ð¤",gg:"â«",ggg:"â",gimel:"â·",gjcy:"Ñ",gl:"â·",glE:"âª",gla:"⪥",glj:"⪤",gnE:"â©",gnap:"âª",gnapprox:"âª",gne:"âª",gneq:"âª",gneqq:"â©",gnsim:"â§",gopf:"ð",grave:"`",gscr:"â",gsim:"â³",gsime:"âª",gsiml:"âª",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"â",gtlPar:"â¦",gtquest:"⩼",gtrapprox:"âª",gtrarr:"⥸",gtrdot:"â",gtreqless:"â",gtreqqless:"âª",gtrless:"â·",gtrsim:"â³",gvertneqq:"â©ï¸",gvnE:"â©ï¸",hArr:"â",hairsp:"â",half:"½",hamilt:"â",hardcy:"Ñ",harr:"â",harrcir:"â¥",harrw:"â",hbar:"â",hcirc:"Ä¥",hearts:"â¥",heartsuit:"â¥",hellip:"â¦",hercon:"â¹",hfr:"ð¥",hksearow:"⤥",hkswarow:"⤦",hoarr:"â¿",homtht:"â»",hookleftarrow:"â©",hookrightarrow:"âª",hopf:"ð",horbar:"â",hscr:"ð½",hslash:"â",hstrok:"ħ",hybull:"â",hyphen:"â",iacute:"Ã",ic:"â£",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"â",ifr:"ð¦",igrave:"ì",ii:"â
",iiiint:"â¨",iiint:"â",iinfin:"â§",iiota:"â©",ijlig:"ij",imacr:"Ä«",image:"â",imagline:"â",imagpart:"â",imath:"ı",imof:"â·",imped:"Ƶ",in:"â",incare:"â
",infin:"â",infintie:"â§",inodot:"ı",int:"â«",intcal:"âº",integers:"â¤",intercal:"âº",intlarhk:"â¨",intprod:"⨼",iocy:"Ñ",iogon:"į",iopf:"ð",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"ð¾",isin:"â",isinE:"â¹",isindot:"âµ",isins:"â´",isinsv:"â³",isinv:"â",it:"â¢",itilde:"Ä©",iukcy:"Ñ",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"ð§",jmath:"È·",jopf:"ð",jscr:"ð¿",jsercy:"Ñ",jukcy:"Ñ",kappa:"κ",kappav:"ϰ",kcedil:"Ä·",kcy:"к",kfr:"ð¨",kgreen:"ĸ",khcy:"Ñ
",kjcy:"Ñ",kopf:"ð",kscr:"ð",lAarr:"â",lArr:"â",lAtail:"â¤",lBarr:"â¤",lE:"â¦",lEg:"âª",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"â",lambda:"λ",lang:"â¨",langd:"â¦",langle:"â¨",lap:"âª
",laquo:"«",larr:"â",larrb:"â¤",larrbfs:"â¤",larrfs:"â¤",larrhk:"â©",larrlp:"â«",larrpl:"⤹",larrsim:"⥳",larrtl:"â¢",lat:"⪫",latail:"â¤",late:"âª",lates:"âªï¸",lbarr:"â¤",lbbrk:"â²",lbrace:"{",lbrack:"[",lbrke:"â¦",lbrksld:"â¦",lbrkslu:"â¦",lcaron:"ľ",lcedil:"ļ",lceil:"â",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"â",ldquor:"â",ldrdhar:"⥧",ldrushar:"â¥",ldsh:"â²",le:"â¤",leftarrow:"â",leftarrowtail:"â¢",leftharpoondown:"â½",leftharpoonup:"â¼",leftleftarrows:"â",leftrightarrow:"â",leftrightarrows:"â",leftrightharpoons:"â",leftrightsquigarrow:"â",leftthreetimes:"â",leg:"â",leq:"â¤",leqq:"â¦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"â©¿",lesdoto:"âª",lesdotor:"âª",lesg:"âï¸",lesges:"âª",lessapprox:"âª
",lessdot:"â",lesseqgtr:"â",lesseqqgtr:"âª",lessgtr:"â¶",lesssim:"â²",lfisht:"⥼",lfloor:"â",lfr:"ð©",lg:"â¶",lgE:"âª",lhard:"â½",lharu:"â¼",lharul:"⥪",lhblk:"â",ljcy:"Ñ",ll:"âª",llarr:"â",llcorner:"â",llhard:"⥫",lltri:"âº",lmidot:"Å",lmoust:"â°",lmoustache:"â°",lnE:"â¨",lnap:"âª",lnapprox:"âª",lne:"âª",lneq:"âª",lneqq:"â¨",lnsim:"â¦",loang:"â¬",loarr:"â½",lobrk:"â¦",longleftarrow:"âµ",longleftrightarrow:"â·",longmapsto:"â¼",longrightarrow:"â¶",looparrowleft:"â«",looparrowright:"â¬",lopar:"â¦
",lopf:"ð",loplus:"â¨",lotimes:"⨴",lowast:"â",lowbar:"_",loz:"â",lozenge:"â",lozf:"â§«",lpar:"(",lparlt:"â¦",lrarr:"â",lrcorner:"â",lrhar:"â",lrhard:"â¥",lrm:"â",lrtri:"â¿",lsaquo:"â¹",lscr:"ð",lsh:"â°",lsim:"â²",lsime:"âª",lsimg:"âª",lsqb:"[",lsquo:"â",lsquor:"â",lstrok:"Å",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"â",lthree:"â",ltimes:"â",ltlarr:"⥶",ltquest:"â©»",ltrPar:"â¦",ltri:"â",ltrie:"â´",ltrif:"â",lurdshar:"â¥",luruhar:"⥦",lvertneqq:"â¨ï¸",lvnE:"â¨ï¸",mDDot:"âº",macr:"¯",male:"â",malt:"â ",maltese:"â ",map:"â¦",mapsto:"â¦",mapstodown:"â§",mapstoleft:"â¤",mapstoup:"â¥",marker:"â®",mcomma:"⨩",mcy:"м",mdash:"â",measuredangle:"â¡",mfr:"ðª",mho:"â§",micro:"µ",mid:"â£",midast:"*",midcir:"â«°",middot:"·",minus:"â",minusb:"â",minusd:"â¸",minusdu:"⨪",mlcp:"â«",mldr:"â¦",mnplus:"â",models:"â§",mopf:"ð",mp:"â",mscr:"ð",mstpos:"â¾",mu:"μ",multimap:"â¸",mumap:"â¸",nGg:"â̸",nGt:"â«â",nGtv:"â«Ì¸",nLeftarrow:"â",nLeftrightarrow:"â",nLl:"â̸",nLt:"âªâ",nLtv:"âªÌ¸",nRightarrow:"â",nVDash:"â¯",nVdash:"â®",nabla:"â",nacute:"Å",nang:"â â",nap:"â",napE:"⩰̸",napid:"â̸",napos:"Å",napprox:"â",natur:"â®",natural:"â®",naturals:"â",nbsp:" ",nbump:"â̸",nbumpe:"â̸",ncap:"â©",ncaron:"Å",ncedil:"Å",ncong:"â",ncongdot:"â©Ì¸",ncup:"â©",ncy:"н",ndash:"â",ne:"â ",neArr:"â",nearhk:"⤤",nearr:"â",nearrow:"â",nedot:"â̸",nequiv:"â¢",nesear:"⤨",nesim:"â̸",nexist:"â",nexists:"â",nfr:"ð«",ngE:"â§Ì¸",nge:"â±",ngeq:"â±",ngeqq:"â§Ì¸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"âµ",ngt:"â¯",ngtr:"â¯",nhArr:"â",nharr:"â®",nhpar:"⫲",ni:"â",nis:"â¼",nisd:"âº",niv:"â",njcy:"Ñ",nlArr:"â",nlE:"â¦Ì¸",nlarr:"â",nldr:"â¥",nle:"â°",nleftarrow:"â",nleftrightarrow:"â®",nleq:"â°",nleqq:"â¦Ì¸",nleqslant:"⩽̸",nles:"⩽̸",nless:"â®",nlsim:"â´",nlt:"â®",nltri:"âª",nltrie:"â¬",nmid:"â¤",nopf:"ð",not:"¬",notin:"â",notinE:"â¹Ì¸",notindot:"âµÌ¸",notinva:"â",notinvb:"â·",notinvc:"â¶",notni:"â",notniva:"â",notnivb:"â¾",notnivc:"â½",npar:"â¦",nparallel:"â¦",nparsl:"⫽â¥",npart:"â̸",npolint:"â¨",npr:"â",nprcue:"â ",npre:"⪯̸",nprec:"â",npreceq:"⪯̸",nrArr:"â",nrarr:"â",nrarrc:"⤳̸",nrarrw:"â̸",nrightarrow:"â",nrtri:"â«",nrtrie:"â",nsc:"â",nsccue:"â¡",nsce:"⪰̸",nscr:"ð",nshortmid:"â¤",nshortparallel:"â¦",nsim:"â",nsime:"â",nsimeq:"â",nsmid:"â¤",nspar:"â¦",nsqsube:"â¢",nsqsupe:"â£",nsub:"â",nsubE:"â«
̸",nsube:"â",nsubset:"ââ",nsubseteq:"â",nsubseteqq:"â«
̸",nsucc:"â",nsucceq:"⪰̸",nsup:"â
",nsupE:"â«Ì¸",nsupe:"â",nsupset:"ââ",nsupseteq:"â",nsupseteqq:"â«Ì¸",ntgl:"â¹",ntilde:"ñ",ntlg:"â¸",ntriangleleft:"âª",ntrianglelefteq:"â¬",ntriangleright:"â«",ntrianglerighteq:"â",nu:"ν",num:"#",numero:"â",numsp:"â",nvDash:"â",nvHarr:"â¤",nvap:"ââ",nvdash:"â¬",nvge:"â¥â",nvgt:">â",nvinfin:"â§",nvlArr:"â¤",nvle:"â¤â",nvlt:"<â",nvltrie:"â´â",nvrArr:"â¤",nvrtrie:"âµâ",nvsim:"â¼â",nwArr:"â",nwarhk:"⤣",nwarr:"â",nwarrow:"â",nwnear:"⤧",oS:"â",oacute:"ó",oast:"â",ocir:"â",ocirc:"ô",ocy:"о",odash:"â",odblac:"Å",odiv:"⨸",odot:"â",odsold:"⦼",oelig:"Å",ofcir:"⦿",ofr:"ð¬",ogon:"Ë",ograve:"ò",ogt:"â§",ohbar:"⦵",ohm:"Ω",oint:"â®",olarr:"âº",olcir:"⦾",olcross:"⦻",oline:"â¾",olt:"â§",omacr:"Å",omega:"Ï",omicron:"ο",omid:"⦶",ominus:"â",oopf:"ð ",opar:"⦷",operp:"⦹",oplus:"â",or:"â¨",orarr:"â»",ord:"â©",order:"â´",orderof:"â´",ordf:"ª",ordm:"º",origof:"â¶",oror:"â©",orslope:"â©",orv:"â©",oscr:"â´",oslash:"ø",osol:"â",otilde:"õ",otimes:"â",otimesas:"⨶",ouml:"ö",ovbar:"â½",par:"â¥",para:"¶",parallel:"â¥",parsim:"⫳",parsl:"⫽",part:"â",pcy:"п",percnt:"%",period:".",permil:"â°",perp:"â¥",pertenk:"â±",pfr:"ð",phi:"Ï",phiv:"Ï",phmmat:"â³",phone:"â",pi:"Ï",pitchfork:"â",piv:"Ï",planck:"â",planckh:"â",plankv:"â",plus:"+",plusacir:"⨣",plusb:"â",pluscir:"⨢",plusdo:"â",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"â¨",popf:"ð¡",pound:"£",pr:"âº",prE:"⪳",prap:"⪷",prcue:"â¼",pre:"⪯",prec:"âº",precapprox:"⪷",preccurlyeq:"â¼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"â¨",precsim:"â¾",prime:"â²",primes:"â",prnE:"⪵",prnap:"⪹",prnsim:"â¨",prod:"â",profalar:"â®",profline:"â",profsurf:"â",prop:"â",propto:"â",prsim:"â¾",prurel:"â°",pscr:"ð
",psi:"Ï",puncsp:"â",qfr:"ð®",qint:"â¨",qopf:"ð¢",qprime:"â",qscr:"ð",quaternions:"â",quatint:"â¨",quest:"?",questeq:"â",quot:'"',rAarr:"â",rArr:"â",rAtail:"â¤",rBarr:"â¤",rHar:"⥤",race:"â½Ì±",racute:"Å",radic:"â",raemptyv:"⦳",rang:"â©",rangd:"â¦",range:"⦥",rangle:"â©",raquo:"»",rarr:"â",rarrap:"⥵",rarrb:"â¥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"â¤",rarrhk:"âª",rarrlp:"â¬",rarrpl:"â¥
",rarrsim:"⥴",rarrtl:"â£",rarrw:"â",ratail:"â¤",ratio:"â¶",rationals:"â",rbarr:"â¤",rbbrk:"â³",rbrace:"}",rbrack:"]",rbrke:"â¦",rbrksld:"â¦",rbrkslu:"â¦",rcaron:"Å",rcedil:"Å",rceil:"â",rcub:"}",rcy:"Ñ",rdca:"⤷",rdldhar:"⥩",rdquo:"â",rdquor:"â",rdsh:"â³",real:"â",realine:"â",realpart:"â",reals:"â",rect:"â",reg:"®",rfisht:"⥽",rfloor:"â",rfr:"ð¯",rhard:"â",rharu:"â",rharul:"⥬",rho:"Ï",rhov:"ϱ",rightarrow:"â",rightarrowtail:"â£",rightharpoondown:"â",rightharpoonup:"â",rightleftarrows:"â",rightleftharpoons:"â",rightrightarrows:"â",rightsquigarrow:"â",rightthreetimes:"â",ring:"Ë",risingdotseq:"â",rlarr:"â",rlhar:"â",rlm:"â",rmoust:"â±",rmoustache:"â±",rnmid:"â«®",roang:"â",roarr:"â¾",robrk:"â§",ropar:"â¦",ropf:"ð£",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"â¦",rppolint:"â¨",rrarr:"â",rsaquo:"âº",rscr:"ð",rsh:"â±",rsqb:"]",rsquo:"â",rsquor:"â",rthree:"â",rtimes:"â",rtri:"â¹",rtrie:"âµ",rtrif:"â¸",rtriltri:"â§",ruluhar:"⥨",rx:"â",sacute:"Å",sbquo:"â",sc:"â»",scE:"⪴",scap:"⪸",scaron:"Å¡",sccue:"â½",sce:"⪰",scedil:"Å",scirc:"Å",scnE:"⪶",scnap:"⪺",scnsim:"â©",scpolint:"â¨",scsim:"â¿",scy:"Ñ",sdot:"â
",sdotb:"â¡",sdote:"⩦",seArr:"â",searhk:"⤥",searr:"â",searrow:"â",sect:"§",semi:";",seswar:"⤩",setminus:"â",setmn:"â",sext:"â¶",sfr:"ð°",sfrown:"â¢",sharp:"â¯",shchcy:"Ñ",shcy:"Ñ",shortmid:"â£",shortparallel:"â¥",shy:"Â",sigma:"Ï",sigmaf:"Ï",sigmav:"Ï",sim:"â¼",simdot:"⩪",sime:"â",simeq:"â",simg:"âª",simgE:"⪠",siml:"âª",simlE:"âª",simne:"â",simplus:"⨤",simrarr:"⥲",slarr:"â",smallsetminus:"â",smashp:"⨳",smeparsl:"⧤",smid:"â£",smile:"â£",smt:"⪪",smte:"⪬",smtes:"⪬ï¸",softcy:"Ñ",sol:"/",solb:"â§",solbar:"â¿",sopf:"ð¤",spades:"â ",spadesuit:"â ",spar:"â¥",sqcap:"â",sqcaps:"âï¸",sqcup:"â",sqcups:"âï¸",sqsub:"â",sqsube:"â",sqsubset:"â",sqsubseteq:"â",sqsup:"â",sqsupe:"â",sqsupset:"â",sqsupseteq:"â",squ:"â¡",square:"â¡",squarf:"âª",squf:"âª",srarr:"â",sscr:"ð",ssetmn:"â",ssmile:"â£",sstarf:"â",star:"â",starf:"â
",straightepsilon:"ϵ",straightphi:"Ï",strns:"¯",sub:"â",subE:"â«
",subdot:"⪽",sube:"â",subedot:"â«",submult:"â«",subnE:"â«",subne:"â",subplus:"⪿",subrarr:"⥹",subset:"â",subseteq:"â",subseteqq:"â«
",subsetneq:"â",subsetneqq:"â«",subsim:"â«",subsub:"â«",subsup:"â«",succ:"â»",succapprox:"⪸",succcurlyeq:"â½",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"â©",succsim:"â¿",sum:"â",sung:"âª",sup1:"¹",sup2:"²",sup3:"³",sup:"â",supE:"â«",supdot:"⪾",supdsub:"â«",supe:"â",supedot:"â«",suphsol:"â",suphsub:"â«",suplarr:"⥻",supmult:"â«",supnE:"â«",supne:"â",supplus:"â«",supset:"â",supseteq:"â",supseteqq:"â«",supsetneq:"â",supsetneqq:"â«",supsim:"â«",supsub:"â«",supsup:"â«",swArr:"â",swarhk:"⤦",swarr:"â",swarrow:"â",swnwar:"⤪",szlig:"Ã",target:"â",tau:"Ï",tbrk:"â´",tcaron:"Å¥",tcedil:"Å£",tcy:"Ñ",tdot:"â",telrec:"â",tfr:"ð±",there4:"â´",therefore:"â´",theta:"θ",thetasym:"Ï",thetav:"Ï",thickapprox:"â",thicksim:"â¼",thinsp:"â",thkap:"â",thksim:"â¼",thorn:"þ",tilde:"Ë",times:"Ã",timesb:"â ",timesbar:"⨱",timesd:"⨰",tint:"â",toea:"⤨",top:"â¤",topbot:"â¶",topcir:"⫱",topf:"ð¥",topfork:"â«",tosa:"⤩",tprime:"â´",trade:"â¢",triangle:"âµ",triangledown:"â¿",triangleleft:"â",trianglelefteq:"â´",triangleq:"â",triangleright:"â¹",trianglerighteq:"âµ",tridot:"â¬",trie:"â",triminus:"⨺",triplus:"⨹",trisb:"â§",tritime:"⨻",trpezium:"â¢",tscr:"ð",tscy:"Ñ",tshcy:"Ñ",tstrok:"ŧ",twixt:"â¬",twoheadleftarrow:"â",twoheadrightarrow:"â ",uArr:"â",uHar:"⥣",uacute:"ú",uarr:"â",ubrcy:"Ñ",ubreve:"Å",ucirc:"û",ucy:"Ñ",udarr:"â
",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"ð²",ugrave:"ù",uharl:"â¿",uharr:"â¾",uhblk:"â",ulcorn:"â",ulcorner:"â",ulcrop:"â",ultri:"â¸",umacr:"Å«",uml:"¨",uogon:"ų",uopf:"ð¦",uparrow:"â",updownarrow:"â",upharpoonleft:"â¿",upharpoonright:"â¾",uplus:"â",upsi:"Ï
",upsih:"Ï",upsilon:"Ï
",upuparrows:"â",urcorn:"â",urcorner:"â",urcrop:"â",uring:"ů",urtri:"â¹",uscr:"ð",utdot:"â°",utilde:"Å©",utri:"âµ",utrif:"â´",uuarr:"â",uuml:"ü",uwangle:"⦧",vArr:"â",vBar:"⫨",vBarv:"â«©",vDash:"â¨",vangrt:"â¦",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"â
",varphi:"Ï",varpi:"Ï",varpropto:"â",varr:"â",varrho:"ϱ",varsigma:"Ï",varsubsetneq:"âï¸",varsubsetneqq:"â«ï¸",varsupsetneq:"âï¸",varsupsetneqq:"â«ï¸",vartheta:"Ï",vartriangleleft:"â²",vartriangleright:"â³",vcy:"в",vdash:"â¢",vee:"â¨",veebar:"â»",veeeq:"â",vellip:"â®",verbar:"|",vert:"|",vfr:"ð³",vltri:"â²",vnsub:"ââ",vnsup:"ââ",vopf:"ð§",vprop:"â",vrtri:"â³",vscr:"ð",vsubnE:"â«ï¸",vsubne:"âï¸",vsupnE:"â«ï¸",vsupne:"âï¸",vzigzag:"â¦",wcirc:"ŵ",wedbar:"â©",wedge:"â§",wedgeq:"â",weierp:"â",wfr:"ð´",wopf:"ð¨",wp:"â",wr:"â",wreath:"â",wscr:"ð",xcap:"â",xcirc:"â¯",xcup:"â",xdtri:"â½",xfr:"ðµ",xhArr:"âº",xharr:"â·",xi:"ξ",xlArr:"â¸",xlarr:"âµ",xmap:"â¼",xnis:"â»",xodot:"â¨",xopf:"ð©",xoplus:"â¨",xotime:"â¨",xrArr:"â¹",xrarr:"â¶",xscr:"ð",xsqcup:"â¨",xuplus:"â¨",xutri:"â³",xvee:"â",xwedge:"â",yacute:"ý",yacy:"Ñ",ycirc:"Å·",ycy:"Ñ",yen:"Â¥",yfr:"ð¶",yicy:"Ñ",yopf:"ðª",yscr:"ð",yucy:"Ñ",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"â¨",zeta:"ζ",zfr:"ð·",zhcy:"ж",zigrarr:"â",zopf:"ð«",zscr:"ð",zwj:"â",zwnj:"â"},
3Xo={}.hasOwnProperty;function ei(e){return!!Xo.call(Qo,e)&&Qo[e]}function ti(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function ni(e,t){return e.length>0?(ti(e,e.length,0,t),e):t}var ri={}.hasOwnProperty;function ai(e){const t={};let n=-1;for(;++n<e.length;)oi(t,e[n]);return t}function oi(e,t){let n;for(n in t){const r=(ri.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){ri.call(r,o)||(r[o]=[]);const e=a[o];ii(r[o],Array.isArray(e)?e:e?[e]:[])}}}function ii(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);ti(e,0,0,r)}function si(e,t){const 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==(65535&n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function li(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ci=ki(/[A-Za-z]/),ui=ki(/[\dA-Za-z]/),di=ki(/[#-'*+\--9=?A-Z^-~]/);function pi(e){return null!==e&&(e<32||127===e)}var fi=ki(/\d/),hi=ki(/[\dA-Fa-f]/),mi=ki(/[!-/:-@[-`{-~]/);function gi(e){return null!==e&&e<-2}function yi(e){return null!==e&&(e<0||32===e)}function vi(e){return-2===e||-1===e||32===e}var xi=ki(new RegExp("\\p{P}|\\p{S}","u")),bi=ki(/\s/);function ki(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function wi(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ui(e.charCodeAt(n+1))&&ui(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);
vendor: 9,130 bytes, line 3
3i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Si(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(vi(r))return e.enter(n),i(r);return t(r)};function i(r){return vi(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}var Ei={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Si(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):gi(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};var Ii={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&v();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return ti(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ci,u,d)(a)}function u(e){return r&&v(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(Ci,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&v(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):gi(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;ti(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},Ci={tokenize:function(e,t,n){return Si(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function zi(e){return null===e||yi(e)||bi(e)?1:xi(e)?2:void 0}function ji(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}var _i={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,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[n][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;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Ai(d,-s),Ai(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=ni(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=ni(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=ni(l,ji(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=ni(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=ni(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,ti(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=zi(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=zi(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Ai(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ti={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"),a};function a(t){return ci(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ui(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||ui(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(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||pi(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):di(t)?(e.consume(t),l):n(t)}function c(e){return ui(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||ui(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};var Ni={partial:!0,tokenize:function(e,t,n){return function(t){return vi(t)?Si(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||gi(e)?t(e):n(e)}}};var Di={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(vi(t))return Si(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Di,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const 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"),a}return n(t)};function a(n){return vi(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};var Mi={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 mi(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};var Li={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ui,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=hi,c):(e.enter("characterReferenceValue"),a=7,o=fi,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ui||ei(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};var Pi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Ri={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),vi(t)?Si(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}
vendor: 6,866 bytes, line 3
3function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),vi(t)?Si(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||gi(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),vi(t)?Si(e,c,"whitespace")(t):c(t))}function c(n){return null===n||gi(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Pi,f,v)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||gi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):vi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Si(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||gi(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||gi(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,v,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&vi(t)?Si(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||gi(t)?e.check(Pi,f,v)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||gi(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function v(n){return e.exit("codeFenced"),t(n)}}};var Oi={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),Si(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):gi(t)?e.attempt(Fi,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||gi(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Fi={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):gi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):Si(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):gi(e)?a(e):n(e)}}};var qi={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,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++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,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):gi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||gi(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};function Bi(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 Ui(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new 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){const n=null==t?Number.POSITIVE_INFINITY: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){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Bi(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Bi(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Bi(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){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Bi(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Bi(this.left,t.reverse())}}}(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,Vi(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return ti(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function Vi(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSki
vendor: 23,642 bytes, line 3
3p(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}var $i={resolve:function(e){return Ui(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?a(t):gi(t)?e.check(Hi,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Hi={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Si(e,a,"linePrefix")};function a(a){if(null===a||gi(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Yi(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||pi(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||gi(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!yi(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||pi(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Zi(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):gi(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||gi(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!vi(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Wi(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):gi(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),Si(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||gi(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Gi(e,t){let n;return function r(a){if(gi(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(vi(a))return Si(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}var Ji={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return Zi.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return yi(t)?Gi(e,s)(t):s(t)}function s(t){return Yi(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Ki,c,c)(t)}function c(t){return vi(t)?Si(e,u,"whitespace")(t):u(t)}function u(o){return null===o||gi(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Ki={partial:!0,tokenize:function(e,t,n){return function(t){return yi(t)?Gi(e,r)(t):n(t)};function r(t){return Wi(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return vi(t)?Si(e,o,"whitespace")(t):o(t)}function o(e){return null===e||gi(e)?t(e):n(e)}}};var Qi={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return gi(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};var Xi={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},ti(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||yi(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||gi(n)?(e.exit("atxHeading"),t(n)):vi(n)?Si(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||yi(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};var es=["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"],ts=["pre","script","style","textarea"],ns={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););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));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:M):ci(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):ci(o)?(e.consume(o),a=4,r.interrupt?t:M):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:M):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),s===o.length?r.interrupt?t:C:p):n(a)}function f(t){return ci(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||yi(s)){const l=47===s,c=i.toLowerCase();return l||o||!ts.includes(c)?es.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):C(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):C(s))}return 45===s||ui(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:C):n(a)}function g(t){return vi(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||ci(t)?(e.consume(t),v):vi(t)?(e.consume(t),y):E(t)}function v(t){return 45===t||46===t||58===t||95===t||ui(t)?(e.consume(t),v):x(t)}function x(t){return 61===t?(e.consume(t),b):vi(t)?(e.consume(t),x):y(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,k):vi(t)?(e.consume(t),b):w(t)}function k(t){return t===l?(e.consume(t),l=null,S):null===t||gi(t)?n(t):(e.consume(t),k)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||yi(t)?x(t):(e.consume(t),w)}function S(e){return 47===e||62===e||vi(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),I):n(t)}function I(t){return null===t||gi(t)?C(t):vi(t)?(e.consume(t),I):n(t)}function C(t){return 45===t&&2===a?(e.consume(t),A):60===t&&1===a?(e.consume(t),T):62===t&&4===a?(e.consume(t),L):63===t&&3===a?(e.consume(t),M):93===t&&5===a?(e.consume(t),D):!gi(t)||6!==a&&7!==a?null===t||gi(t)?(e.exit("htmlFlowData"),z(t)):(e.consume(t),C):(e.exit("htmlFlowData"),e.check(rs,P,z)(t))}function z(t){return e.check(as,j,P)(t)}function j(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),_}function _(t){return null===t||gi(t)?z(t):(e.enter("htmlFlowData"),C(t))}function A(t){return 45===t?(e.consume(t),M):C(t)}function T(t){return 47===t?(e.consume(t),i="",N):C(t)}function N(t){if(62===t){const n=i.toLowerCase();return ts.includes(n)?(e.consume(t),L):C(t)}return ci(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),N):C(t)}function D(t){return 93===t?(e.consume(t),M):C(t)}function M(t){return 62===t?(e.consume(t),L):45===t&&2===a?(e.consume(t),M):C(t)}function L(t){return null===t||gi(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),L)}function P(n){return e.exit("htmlFlow"),t(n)}}},rs={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ni,t,n)}}},as={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(gi(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};var os={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),b):63===t?(e.consume(t),v):ci(t)?(e.consume(t),S):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):ci(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):gi(t)?(i=u,N(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?T(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),o===r.length?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):gi(t)?(i=h,N(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?T(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?T(t):gi(t)?(i=y,N(t)):(e.consume(t),y)}function v(t){return null===t?n(t):63===t?(e.consume(t),x):gi(t)?(i=v,N(t)):(e.consume(t),v)}function x(e){return 62===e?T(e):v(e)}function b(t){return ci(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||ui(t)?(e.consume(t),k):w(t)}function w(t){return gi(t)?(i=w,N(t)):vi(t)?(e.consume(t),w):T(t)}function S(t){return 45===t||ui(t)?(e.consume(t),S):47===t||62===t||yi(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),T):58===t||95===t||ci(t)?(e.consume(t),I):gi(t)?(i=E,N(t)):vi(t)?(e.consume(t),E):T(t)}function I(t){return 45===t||46===t||58===t||95===t||ui(t)?(e.consume(t),I):C(t)}function C(t){return 61===t?(e.consume(t),z):gi(t)?(i=C,N(t)):vi(t)?(e.consume(t),C):E(t)}function z(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,j):gi(t)?(i=z,N(t)):vi(t)?(e.consume(t),z):(e.consume(t),_)}function j(t){return t===a?(e.consume(t),a=void 0,A):null===t?n(t):gi(t)?(i=j,N(t)):(e.consume(t),j)}function _(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||yi(t)?E(t):(e.consume(t),_)}function A(e){return 47===e||62===e||yi(e)?E(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function N(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),D}function D(t){return vi(t)?Si(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),i(t)}}};var is={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&ti(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={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[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=ni(o,e.slice(r+1,r+s+3)),o=ni(o,[["enter",u,t]]),o=ni(o,ji(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=ni(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=ni(o,e.slice(a+1)),o=ni(o,[["exit",l,t]]),ti(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(li(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(ss,c,o?c:u)(t):91===t?e.attempt(ls,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(cs,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},ss={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 yi(t)?Gi(e,a)(t):a(t)}function a(t){return 41===t?c(t):Yi(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return yi(t)?Gi(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Wi(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return yi(t)?Gi(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)}}},ls={tokenize:function(e,t,n){const r=this;return function(t){return Zi.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(li(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},cs={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)}}};var us={name:"labelStartImage",resolveAll:is.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};var ds={name:"labelStartLink",resolveAll:is.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};var ps={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Si(e,t,"linePrefix")}}};var fs={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||gi(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),vi(t)?Si(e,o,"whitespace")(t):o(t))}}};var hs={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ni,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Si(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!vi(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gs,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Si(e,e.attempt(hs,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:fi(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(fs,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return fi(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Ni,r.interrupt?n:c,e.attempt(ms,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return vi(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},ms={partial:!0,tokenize:function(e,t,n){const r=this;return Si(e,(function(e){const a=r.events[r.events.length-1];return!vi(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},gs={partial:!0,tokenize:function(e,t,n){const r=this;return Si(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};var ys={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),vi(t)?Si(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||gi(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};var vs={tokenize:function(e){const t=this,n=e.attempt(Ni,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,Si(e,e.attempt(this.parser.constructs.flow,r,e.attempt($i,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};var xs={resolveAll:Ss()},bs=ws("string"),ks=ws("text");function ws(e){return{resolveAll:Ss("text"===e?Es:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function Ss(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function Es(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}var Is={};Y(Is,{attentionMarkers:()=>Ds,contentInitial:()=>zs,disable:()=>Ms,document:()=>Cs,flow:()=>_s,flowInitial:()=>js,insideSpan:()=>Ns,string:()=>As,text:()=>Ts});var Cs={42:hs,43:hs,45:hs,48:hs,49:hs,50:hs,51:hs,52:hs,53:hs,54:hs,55:hs,56:hs,57:hs,62:Di},zs={91:Ji},js={[-2]:Oi,[-1]:Oi,32:Oi},_s={35:Xi,42:fs,45:[ys,fs],60:ns,61:ys,95:fs,96:Ri,126:Ri},As={38:Li,92:Mi},Ts={[-5]:ps,[-4]:ps,[-3]:ps,33:us,38:Li,42:_i,60:[Ti,os],91:ds,92:[Qi,Mi],93:is,95:_i,96:qi},Ns={null:[_i,xs]},Ds={null:[42,95]},Ms={null:[]};function Ls(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 13,300 bytes, line 3
3olumn:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let i=[],s=[],l=!0;const c={attempt:v((function(e,t){x(e,t.from)})),check:v(y),consume:function(e){gi(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));u.previous=e,l=!0},enter:function(e,t){const n=t||{};return n.type=e,n.start=h(),u.events.push(["enter",n,u]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=h(),u.events.push(["exit",t,u]),t},interrupt:v(y,{interrupt:!0})},u={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:h,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(f(e),t)},sliceStream:f,write:function(e){if(i=ni(i,e),m(),null!==i[i.length-1])return[];return x(t,0),u.events=ji(o,u.events,u),u.events}};let d,p=t.tokenize.call(u,c);return t.resolveAll&&o.push(t),u;function f(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function h(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function m(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)g(t.charCodeAt(r._bufferIndex));else g(t)}}function g(e){l=void 0,d=e,p=p(e)}function y(e,t){t.restore()}function v(e,t){return function(n,a,o){let i,d,p,f;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return m([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function m(e){return i=e,d=0,0===e.length?o:g(e[d])}function g(e){return function(n){f=function(){const e=h(),t=u.previous,n=u.currentConstruct,a=u.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=a,s=o,b()}}(),p=e,e.partial||(u.currentConstruct=e);if(e.name&&u.parser.constructs.disable.null.includes(e.name))return v(n);return e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,y,v)(n)}}function y(t){return l=!0,e(p,f),a}function v(e){return l=!0,f.restore(),++d<i.length?g(i[d]):o}}}function x(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&ti(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}var Ps=/[\0\t\n\r]/g;var Rs=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Os(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return si(n.slice(t?2:1),t?16:10)}return ei(n)||e}var Fs={}.hasOwnProperty;function qs(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(K),blockQuote:o(Y),characterEscape:I,characterReference:I,codeFenced:o(Z),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(Z,i),codeText:o(W,i),codeTextData:I,data:I,codeFlowValue:I,definition:o(G),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(J),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(X,i),htmlFlowData:I,htmlText:o(X,i),htmlTextData:I,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:F,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(K),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:k,autolink:l(),autolinkEmail:H,autolinkProtocol:$,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:U,characterReference:V,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:C,codeIndented:l(y),codeText:l(T),codeTextData:C,data:C,definition:l(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:x,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(_),htmlFlowData:C,htmlText:l(A),htmlTextData:C,image:l(D),label:L,labelText:M,lineEnding:z,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:q,resourceDestinationString:P,resourceTitleString:R,resource:O,setextHeading:l(E),setextHeadingLineSequence:S,setextHeadingText:w,strong:l(),thematicBreak:l()}};Us(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Fs.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||$s).call(o,void 0,e[0])}for(r.position={start:Bs(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Bs(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(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:Bs(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+zo({start:e.start,end:e.end})+"): itâs not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||$s).call(this,e,r[0])}n.position.end=Bs(e.end)}function u(){return function(e,t){const n=t||Go;return Jo(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function v(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=li(this.sliceSerialize(e)).toLowerCase()}function x(){const e=this.resume();this.stack[this.stack.length-1].title=e}function b(){const e=this.resume();this.stack[this.stack.length-1].url=e}function k(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function S(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function I(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Bs(e.start),end:void 0},t.push(n)),this.stack.push(n)}function C(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Bs(e.end)}function z(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Bs(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(I.call(this,e),C.call(this,e))}function j(){this.data.atHardBreak=!0}function _(){const e=this.resume();this.stack[this.stack.length-1].value=e}function A(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function N(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const 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}function D(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const 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}function M(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(Rs,Os)}(t),n.identifier=li(t).toLowerCase()}function L(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function P(){const e=this.resume();this.stack[this.stack.length-1].url=e}function R(){const e=this.resume();this.stack[this.stack.length-1].title=e}function O(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function q(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=li(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=si(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=ei(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=Bs(e.end)}function $(e){C.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function H(e){C.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function X(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Ui(e););return e}(function(e){const t={constructs:ai([Is,...(e||{}).extensions||[]]),content:n(Ei),defined:[],document:n(Ii),flow:n(vs),lazy:{},string:n(bs),text:n(ks)};return t;function n(e){return function(n){return Ls(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCo
vendor: 8,605 bytes, line 3
3deAt(0)&&u++,r=void 0);u<a.length;){if(Ps.lastIndex=u,l=Ps.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Bs(e){return{line:e.line,column:e.column,offset:e.offset}}function Us(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Us(e,r):Vs(e,r)}}function Vs(e,t){let n;for(n in t)if(Fs.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function $s(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zo({start:t.start,end:t.end})+") is still open")}function Hs(e){const t=this;t.parser=function(n){return qs(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Ys(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function Zs(e){const t=e.spread;return null==t?e.children.length>1:t}function Ws(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push(Gs(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push(Gs(t.slice(a),a>0,!1)),o.join("")}function Gs(e,t,n){let r=0,a=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(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}var Js={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=wi(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const 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){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ys(e,t);const a={src:wi(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:wi(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ys(e,t);const a={href:wi(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:wi(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Zs(n[r])}return t}(n):Zs(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];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}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Io(t.children[1]),i=Eo(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Ws(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Ks,yaml:Ks,definition:Ks,footnoteDefinition:Ks};function Ks(){}var Qs="object"==typeof self?self:globalThis,Xs=(e,t)=>
vendor: 2,170 bytes, line 3
3{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Qs[e](t)},el=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(Xs(e,t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(Xs(o,i),a)};return r})(new Map,e)(0),tl="",{toString:nl}={},{keys:rl}=Object,al=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=nl.call(e).slice(8,-1);switch(n){case"Array":return[1,tl];case"Object":return[2,tl];case"Date":return[3,tl];case"RegExp":return[4,tl];case"Map":return[5,tl];case"Set":return[6,tl];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},ol=([e,t])=>0===e&&("function"===t||"symbol"===t),il=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=al(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const t of r)e.push(o(t));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);
vendor: 4,783 bytes, line 3
3for(const t of rl(r))!e&&ol(al(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[n,a]of r)(e||!ol(al(n))&&!ol(al(a)))&&t.push([o(n),o(a)]);return n}case 6:{const t=[],n=a([i,t],r);for(const n of r)!e&&ol(al(n))||t.push(o(n));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},sl="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?el(il(e,t)):structuredClone(e):(e,t)=>el(il(e,t));function ll(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function cl(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var ul=function(e){if(null==e)return pl;if("function"==typeof e)return dl(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ul(e[n]);return dl(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return dl(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return dl(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function dl(e){return function(t,n,r){return Boolean(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 pl(){return!0}var fl=[];function hl(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=ul(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=fl;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[true,e];return null==e?fl:[e]}(n(a,l)),false===p[0]))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),false===c[0])return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function ml(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),hl(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}var gl={}.hasOwnProperty,yl={};function vl(e,t){e.position&&(t.position=function(e){const t=Io(e),n=Eo(e);if(t&&n)return{start:t,end:n}}(e))}function xl(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,sl(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function bl(e,t){const n=t.data||{},r=!("value"in t)||gl.call(n,"hProperties")||gl.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function kl(e,t){const n=[];let 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 wl(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function Sl(e,t){const n=function(e,t){const n=t||yl,r=new Map,a=new Map,o=new Map,i={...Js,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=wl(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=wl(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:xl,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(gl.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=sl(n);return r.children=s.all(e),r}return sl(e)}return(s.options.unknownHandler||bl)(s,e,t)},options:n,patch:vl,wrap:kl};return ml(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.o
vendor: 6,405 bytes, line 3
3ptions.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||ll,r=e.options.footnoteBackLabel||cl,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=wi(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,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(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...sl(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function El(e,t){return e&&"run"in e?async function(n,r){const a=Sl(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Sl(n,{file:r,...e||t})}}function Il(e){if(e)throw e}var Cl=Z(X(),1);function zl(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function jl(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let i;r&&t.push(a);try{i=e.apply(this,t)}catch(e){if(r&&n)throw e;return a(e)}r||(i&&i.then&&"function"==typeof i.then?i.then(o,a):i instanceof Error?a(i):o(i))}function a(e,...r){n||(n=!0,t(e,...r))}function o(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}var _l={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Al(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(Al(e),0===e.length)return".";let t,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)},extname:function(e){Al(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Al(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Al(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Al(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var Tl={cwd:function(){return"/"}};function Nl(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Dl(e){if("string"==typeof e)e=new URL(e);else if(!Nl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}var Ml=["history","path","basename","stem","extname","dirname"],Ll=class{constructor(e){let t;t=e?Nl(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Tl.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<Ml.length;){const e=Ml[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)Ml.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?_l.basename(this.path):void 0}
vendor: 8,617 bytes, line 3
3set basename(e){Rl(e,"basename"),Pl(e,"basename"),this.path=_l.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?_l.dirname(this.path):void 0}set dirname(e){Ol(this.basename,"dirname"),this.path=_l.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?_l.extname(this.path):void 0}set extname(e){if(Pl(e,"extname"),Ol(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=_l.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Nl(e)&&(e=Dl(e)),Rl(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?_l.basename(this.path,this.extname):void 0}set stem(e){Rl(e,"stem"),Pl(e,"stem"),this.path=_l.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new To(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){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}};function Pl(e,t){if(e&&e.includes(_l.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+_l.sep+"`")}function Rl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ol(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var Fl=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},ql={}.hasOwnProperty,Bl=(new class e extends Fl{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=jl()}copy(){const t=new e;let n=-1;for(;++n<this.attachers.length;){const e=this.attachers[n];t.use(...e)}return t.data((0,Cl.default)(!0,{},this.namespace)),t}data(e,t){return"string"==typeof e?2===arguments.length?($l("data",this.frozen),this.namespace[e]=t,this):ql.call(this.namespace,e)&&this.namespace[e]||void 0:e?($l("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Zl(e),n=this.parser||this.Parser;return Ul("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Ul("process",this.parser||this.Parser),Vl("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=Zl(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Ul("processSync",this.parser||this.Parser),Vl("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Il(e),t=r})),Yl("processSync","process",n),t}run(e,t,n){Hl(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=Zl(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Il(e),n=t,r=!0})),Yl("runSync","run",r),n}stringify(e,t){this.freeze();const n=Zl(t),r=this.compiler||this.Compiler;return Vl("stringify",r),Hl(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if($l("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");i(e.plugins),e.settings&&(r.settings=(0,Cl.default)(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];zl(i)&&zl(r)&&(r=(0,Cl.default)(!0,i,r)),n[a]=[e,r,...o]}}}}).freeze();function Ul(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Vl(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function $l(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hl(e){if(!zl(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Yl(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Zl(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new Ll(e)}var Wl=[],Gl={allowDangerousHtml:!0},Jl=/^(https?|ircs?|mailto|xmpp)$/i,Kl=[{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 Ql(e){const t=function(e){const t=e.rehypePlugins||Wl,n=e.remarkPlugins||Wl,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gl}:Gl,a=Bl().use(Hs).use(n).use(El,r).use(t);return a}(e),n=function(e){const t=e.children||"",n=new Ll;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,o=t.disallowedElements,i=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||Xl;for(const e of Kl)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);return ml(e,c),Oo(e,{Fragment:d.Fragment,components:a,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function c(e,t,a){if("raw"===e.type&&a&&"number"==typeof t)return i?a.children.splice(t,1):a.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in Wo)if(Object.hasOwn(Wo,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=Wo[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let i=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!i&&r&&"number"==typeof t&&(i=!r(e,t,a)),i&&a&&"number"==typeof t)return s&&e.children?a.children.splice(t,1,...e.children):a.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function Xl(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||Jl.test(e.slice(0,t))?e:""}var ec={tokenize:function(e,t,n){const r=this;return Si(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};
vendor: 4,928 bytes, line 3
3function tc(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=li(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function nc(e,t){let n,r=e.length;for(;r--;)if("labelImage"===e[r][1].type&&"enter"===e[r][0]){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[r+1],e[r+2],["enter",a,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(r,e.length-r+1,...l),e}function rc(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||yi(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(li(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return yi(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function ac(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(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(s>999||93===t&&!i||null===t||91===t||yi(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=li(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return yi(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),Si(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function oc(e,t,n){return e.check(Ni,t,e.attempt(ec,t,n))}function ic(e){e.exit("gfmFootnoteDefinition")}function sc(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=zi(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=zi(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(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";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&ti(i,i.length,0,ji(s,e.slice(r+1,n),t)),ti(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]
vendor: 9,726 bytes, line 3
3),ti(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}function lc(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function cc(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?b:s;if(o===b&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):gi(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):vi(t)?Si(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||yi(t)?(e.exit("data"),l(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 r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,vi(t)?Si(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):x(t)}function f(t){return vi(t)?Si(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||gi(t)?v(t):x(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):x(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return vi(t)?Si(e,v,"whitespace")(t):v(t)}function v(n){return 124===n?p(n):(null===n||gi(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):x(n)}function x(e){return n(e)}function b(t){return e.enter("tableRow"),k(t)}function k(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),k):null===n||gi(n)?(e.exit("tableRow"),t(n)):vi(n)?Si(e,k,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||yi(t)?(e.exit("data"),k(t)):(e.consume(t),92===t?S:w)}function S(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function uc(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new class{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0!==n||0!==r.length){for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=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;const 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(const t of r)e.push(t);r=n.pop()}this.map.length=0}};for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(pc(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=dc(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=dc(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=dc(p,t,l,s,o,a)):0!==c[1]&&(a=dc(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&pc(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=lc(t.events,o))}return e}function dc(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},fc(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=fc(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=fc(t.events,n[2]),o=fc(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},fc(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function pc(e,t,n,r,a){const o=[],i=fc(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function fc(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}var hc={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return yi(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return gi(r)?t(r):vi(r)?e.check({tokenize:mc},t,n)(r):n(r)}}};function mc(e,t,n){return Si(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}function gc(){this.buffer()}function yc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function vc(){this.buffer()}function xc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=li(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kc(e){this.exit(e)}function wc(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=li(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Sc(e){this.exit(e)}function Ec(e){this.enter({type:"delete",children:[]},e)}function Ic(e){this.exit(e)}function Cc(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function zc(e){this.exit(e),this.data.inTable=void 0}function jc(e){this.enter({type:"tableRow",children:[]},e)}function _c(e){this.exit(e)}function Ac(e){this.enter({type:"tableCell",children:[]},e)}function Tc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nc));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nc(e,t){return"|"===t?t:e}function Dc(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Mc(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===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)}var Lc={};var Pc=({className:e,id:t="default"})=>(0,d.jsxs)("svg",{fill:"none",viewBox:"0 0 140 131",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"Simply Wall St",className:(0,u.cn)(e,"[--logo-default-color:currentColor] [--logo-highlight-color:var(--s-color-brand-02)]",'[[data-theme="dark"]_&]:[--logo-default-color:#EDEBE1] [[data-theme="dark"]_&]:[--logo-highlight-color:#D9B97A]','[[data-theme="light"]_&]:[--logo-default-color:currentColor] [[data-theme="light"]_&]:[--logo-highlight-color:var(--s-color-brand-02)]'),children:[(0,d.jsx)("defs",{children:(0,d.jsxs)("linearGradient",{id:`sws-logo-small-gradient-${t}`,x1:"0",x2:"0",y1:"1",y2:"0",children:[(0,d.jsx)("stop",{offset:"0%",stopColor:"var(--logo-highlight-color)"}),(0,d.jsx)("stop",{offset:"52%",stopColor:"var(--logo-default-color)"})]})}),(0,d.jsxs)("g",{children:[(0,d.jsx)("path",{fill:"var(--logo-default-color)",d:"M106.133 17.305c1.305 2.648 1.785 5.373 1.535 7.963-.48 4.817-3.761 9.326-8.903 11.705-.384.173-.384.73 0 .94 0 0 2.823 1.388 5.89 2.82s6.122 2.803 6.122 2.803c.211.115.479.038.633-.134 3.895-4.932 5.488-11.053 4.509-17.02a21.3 21.3 0 0 0-.959-3.723 20.2 20.2 0 0 0-2.341-4.625c-3.377-5.008-8.501-8.846-14.775-9.21-.403-.039-.557.556-.
3192.729 3.607 1.765 6.658 4.164 8.462 7.79z"}),(0,d.jsx)("path",{fill:`url(#sws-logo-small-gradient-${t})`,d:"M120.562 83.87a64 64 0 0 1 3.3-.192c5.507-.25 10.611-3.377 12.991-8.577 2.897-6.332 3.934-13.586 1.285-18.498-1.074-1.995-2.993-3.377-5.2-3.857-3.204-.71-6.792-1.151-6.792-1.151a84.4 84.4 0 0 1-19.899-6.467l-9.575-4.509c-19.745-10.726-28.84-8.846-38.607-7.445-22.47 3.224-31.24-9.44-31.24-9.44-4.24-5.259-4.087-12.243.058-17.443a14.1 14.1 0 0 1 2.974-2.802c1.727-1.228.403-3.972-1.63-3.415-2.495.69-4.875 1.9-7.043 3.607-4.47 3.512-7.637 9.172-7.963 15.543-.825 16.08 14.506 26.749 28.63 31.718a.465.465 0 0 1 .076.845c-4.72 2.724-8.904 5.737-13.01 9.287-3.3 2.84-6.87 4.95-11.417 5.469-.307.038-.422.422-.192.633 5.45 4.989 12.799 5.833 20.206 4.644.115-.02.191.134.115.21L0 107.78c23.386 11.571 48.175 22.547 75.2 23.18a185.8 185.8 0 0 0-36.996-29.551L19.956 90.337s0-.039.02 0c2.935 1.362 11.014 4.95 21.337 8.289 10.343 3.339 22.93 6.447 34.885 6.793l-.384 7.023 7.81 6.908-2.02 11.609c7.848-.346 15.48-1.291 23.369-4.293l-13.021-10.041-.269-7.407-4.222-4.413.538-.096a41 41 0 0 0 6.908-1.804c.901 1.593 4.279 7.58 8.116 14.449l.346.633c1.093 2.031 2.351 4.652 3.636 7.664h.039c.441-.287 5.689-3.749 8.663-9.237a96.8 96.8 0 0 0-18.114-12.358l-2.61-1.247c1.19-3.454 2.975-9.019 5.392-12.971 1.478-2.418 3.915-4.087 6.678-4.644.326-.058.652-.096.998-.134zM85.946 54.109c-.73.978-2.86-.595-7.12-.308-4.26.288-8.864 3.301-9.651 1.229-.365-.96 5.833-5.373 10.074-5.661 4.26-.288 7.234 4.03 6.697 4.74"})]})]}),Rc=(0,u.cn)("inline-flex items-center gap-1","border border-[--s-color-surface-2] bg-surface-3","text-xs !no-underline","mx-px -my-0.5 max-w-full rounded-sm px-1 align-middle","!font-normal text-soft","hover:border-subtle hover:text-solid"),Oc=({href:e,image:t,children:n})=>{const{components:r}=ie(),a=r.Link;return(0,d.jsxs)(a,{href:e??"#",className:Rc,children:[t,null!=n&&(0,d.jsx)("span",{className:"truncate",children:n})]})},Fc=e=>{if(!e)return!1;try{const{hostname:t}=new URL(e,"https://simplywall.st");return"simplywall.st"===t||t.endsWith(".simplywall.st")}catch{return!1}},qc=[function(e){const t=e||Lc,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]);r.push(ai([{document:{91:{name:"gfmFootnoteDefinition",tokenize:ac,continuation:{tokenize:oc},exit:ic}},text:{91:{name:"gfmFootnoteCall",tokenize:rc},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tc,resolveTo:nc}}},sc(t),{flow:{null:{name:"table",tokenize:cc,resolveAll:uc}}},{text:{91:hc}}])),a.push([{enter:{gfmFootnoteCallString:gc,gfmFootnoteCall:yc,gfmFootnoteDefinitionLabelString:vc,gfmFootnoteDefinition:xc},exit:{gfmFootnoteCallString:bc,gfmFootnoteCall:kc,gfmFootnoteDefinitionLabelString:wc,gfmFootnoteDefinition:Sc}},{canContainEols:["delete"],enter:{strikethrough:Ec},exit:{strikethrough:Ic}},{enter:{table:Cc,tableData:Ac,tableHeader:Ac,tableRow:jc},exit:{codeText:Tc,table:zc,tableData:_c,tableHeader:_c,tableRow:_c}},{exit:{taskListCheckValueChecked:Dc,taskListCheckValueUnchecked:Dc,paragraph:Mc}}])}],Bc=({children:e})=>{const t=ie(),n=t.components.Link,r=(0,c.useMemo)((()=>((e,t)=>({a:({href:n,children:r})=>{const a=e?.a({href:n,children:r});return a||(Fc(n)?(0,d.jsx)(Oc,{href:n,image:(0,d.jsx)(Pc,{className:"size-4 shrink-0"}),children:r}):(0,d.jsxs)(t,{href:n??"#",className:"relative inline-block items-center text-sm hover:text-solid",children:[r,(0,d.jsx)("div",{className:"relative -ml-px mb-px inline-block h-[17px] w-5 border-0 border-b border-current align-text-bottom",children:(0,d.jsx)(w.A,{className:"absolute -bottom-1 -end-[2px] size-[22px] fill-current"})})]}))},table:({children:e})=>(0,d.jsx)("div",{className:"max-w-full overflow-x-auto",children:(0,d.jsx)("table",{children:e})})}))(t.markdownComponents,n)),[t.markdownComponents,n]);return(0,d.jsx)(Ql,{components:r,remarkPlugins:qc,children:e})},Uc=(0,u.cn)("prose","max-w-none","min-w-0","max-w-full","text-sm","text-pretty","leading-relaxed","prose-strong:text-solid","prose-code:text-solid","prose-blockquote:text-solid","prose-p:text-sm","prose-p:my-2","prose-p:text-pretty","prose-p:leading-relaxed","prose-h3:text-xl","prose-h3:text-solid","prose-h3:mb-x1","prose-h4:text-lg","prose-h4:text-solid","prose-a:font-normal","prose-a:text-soft","prose-a:underline","prose-a:decoration-soft","prose-ul:my-2","prose-ul:text-solid","prose-ol:my-2","prose-ol:text-solid","prose-li:marker:text-brand-02","prose-li:text-pretty","[&_ul>li]:list-disc","[&_ol>li]:list-decimal"),Vc=({isoDate:e})=>{const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),n=t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3])):new Date(e);if(Number.isNaN(n.getTime()))return null;const r=n.getFullYear()===(new Date).getFullYear();return(0,d.jsx)("time",{dateTime:e,className:"self-start px-x1_25 pt-x1 text-tiny text-softer",children:n.toLocaleDateString(void 0,{day:"numeric",month:"long",...r?{}:{year:"numeric"}})})},$c=({children:e})=>"string"!=typeof e?null:(0,d.jsx)("div",{className:(0,u.cn)("self-start px-x1_25 text-left text-solid",Uc),children:(0,d.jsx)(Bc,{children:e})}),Hc=({children:e})=>"string"!=typeof e?null:(0,d.jsx)("div",{"data-theme":"light",className:(0,u.cn)("my-2 self
3-end rounded-x2 bg-surface-3 px-x2 text-left font-medium text-solid",Uc),children:(0,d.jsx)(Bc,{children:e})}),Yc=({error:e})=>(0,d.jsx)("div",{className:(0,u.cn)("flex items-center gap-1 justify-self-start self-start px-x1_25 text-left text-solid",Uc),children:"client_rate_limited"===e?.code?(0,d.jsxs)("p",{children:["You're sending messages too quickly.",void 0!==e.retryAfterSeconds?` Try again in ${e.retryAfterSeconds} seconds.`:" Please wait a moment and try again."]}):(0,d.jsxs)("p",{children:["You've used the ",e?.perDayCount," message limit.",void 0!==e?.resetAt&&` Reset at ${e?.resetAt?.toLocaleString()}.`]})}),Zc=({className:e})=>(0,d.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:e,children:(0,d.jsx)("path",{d:"M11.9993 4.5V0H10.4993V4.5C10.4993 4.83105 10.3675 5.14943 10.1331 5.3838C9.89876 5.61818 9.5804 5.75 9.24932 5.75H2.55882L5.30882 3L4.24925 1.94043L0.219 5.96968C-0.073 6.26265 -0.073 6.73725 0.219 7.03022L4.24925 11.0595L5.30882 9.9999L2.55882 7.2499H9.24932C10.7679 7.2499 11.9993 6.01855 11.9993 4.5Z",fill:"currentColor"})}),Wc=e=>{const t=e.label?.length>70,n=(0,d.jsxs)(u.$n,{variant:"outline",className:(0,u.cn)("flex h-auto whitespace-break-spaces border border-subtle py-2 text-start bg-surface-1/25 light:bg-surface-2/50 backdrop-blur-sm [scroll-snap-align:start]",t?"w-full flex-col items-start gap-y-1":e.isFullWidth?"w-full items-center gap-x1 @md:max-w-72 @md:shrink-0 @md:flex-col @md:items-start @md:gap-y-1":"max-w-72 shrink-0 flex-col items-start gap-y-1"),onClick:e.onClick,children:[(0,d.jsx)("span",{className:(0,u.cn)(!t&&"line-clamp-2",!t&&e.isFullWidth&&"min-w-0 flex-1"),children:e.label}),(0,d.jsx)(Zc,{className:(0,u.cn)("!size-x1_5 shrink-0 text-accent",!t&&e.isFullWidth&&"m-2.5 @md:m-0")})]});if(!t)return n;const r=7*Math.ceil(e.label.length/2)+40;return(0,d.jsx)("div",{className:"shrink-0 [scroll-snap-align:start]",style:{width:`${r}px`,maxWidth:"100%"},children:n})},Gc=["var(--s-color-chart-01)","var(--s-color-chart-02)","var(--s-color-chart-03)","var(--s-color-chart-04)","var(--s-color-chart-05)","var(--s-color-chart-06)"],Jc=e=>Gc[e%Gc.length],Kc=({label:e,color:t,x:n,y:r,chartWidth:a})=>{const o=((0,z.Qq)(e,{fontSize:12})??0)+8,i=o/2,s=Math.min(Math.max(i,n),a-i);return(0,d.jsxs)(C.Y,{left:s-i,top:r-10,children:[(0,d.jsx)("rect",{x:0,y:0,width:o,height:20,className:"fill-[var(--s-color-surface-3)] shadow-crisp",rx:4,ry:4}),(0,d.jsx)(z.EY,{x:4,y:4,dy:"0.1em",verticalAnchor:"start",className:"text-tiny",fill:t,children:e})]})},Qc=({title:e,series:t,height:n=200,formatValue:r})=>{const{ref:a,width:o}=(0,N.A)(),i=o??0,s=(0,c.useMemo)((()=>t.flatMap((e=>e.data.map((e=>e.date))))),[t]),l=(0,c.useMemo)((()=>t.flatMap((e=>e.data.map((e=>e.value))))),[t]),[p,f]=(0,j.Xx)(s),[h,m]=(0,j.Xx)(l),[g,y]=(0,c.useState)(null),{current:v}=(0,c.useRef)((0,A.Pp)());v.range([8,i-55]),v.domain([p??new Date,f??new Date]);const{current:x}=(0,c.useRef)((0,E.m4)());x.range([n-24,8]);const b=h??0,k=m??0,w=.05*(k-b);x.domain([b-w,k]).nice();const C=(0,c.useMemo)((()=>{const e=Math.max(2,Math.floor((i-8-55)/65));return v.ticks(e)}),[i,p,f,v]),z=v.tickFormat(void 0,"%b '%y"),M=r??(e=>(0,D.toTruncated)(e,0)),L=(0,c.useMemo)((()=>(0,j.yl)((e=>e.date)).left),[]),P=(0,c.useMemo)((()=>{if(null===g||0===i)return null;const e=v.invert(g);return t.map((t=>{const n=L(t.data,e,1),r=t.data[n-1],a=t.data[n];let o;return o=r?a&&e.getTime()-r.date.getTime()>a.date.getTime()-e.getTime()?a:r:a,{s:t,point:o}}))}),[g,i,v,t,L]),R=e=>{const t=(0,T.localPoint)(e);null!==t&&y(t.x)};return(0,d.jsxs)("div",{ref:a,children:[e&&(0,d.jsx)("p",{className:"mb-1 text-xs text-softer",children:e}),(0,d.jsx)("div",{className:(0,u.cn)("mb-1 flex flex-wrap gap-3"),children:t.map(((e,t)=>(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-full",style:{backgroundColor:Jc(t)}}),(0,d.jsx)("span",{className:"text-xs text-soft",children:e.name})]},e.name)))}),(0,d.jsxs)("svg",{width:i,height:n,className:"overflow-visible",children:[(0,d.jsx)("defs",{children:t.map(((e,t)=>(0,d.jsxs)("linearGradient",{id:`area-gradient-${t}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,d.jsx)("stop",{offset:"0%",style:{stopColor:Jc(t),stopOpacity:.12}}),(0,d.jsx)("stop",{offset:"100%",style:{stopColor:Jc(t),stopOpacity:0}})]},t)))}),null!==g&&(0,d.jsx)("line",{x1:g,x2:g,y1:8,y2:n-24,strokeWidth:1,strokeLinecap:"round",strokeDasharray:"4",className:"stroke-p-white-170"}),(0,d.jsx)("g",{transform:`translate(${i-55}, 0)`,children:(0,d.jsx)(S._0,{orientation:"right",stroke:"var(--s-color-p-white-170)",tickStroke:"var(--s-color-p-white-170)",tickLabelProps:()=>({fill:"var(--s-color-text-softer)",fontSize:10,textAnchor:"start",dy:3,dx:2}),tickFormat:e=>M(e),scale:x,tickLength:4,numTicks:4})}),(0,d.jsx)("g",{transform:`translate(0, ${n-24})`,children:(0,d.jsx)(S._0,{orientation:"bottom",scale:v,stroke:"var(--s-color-p-white-170)",tickFormat:e=>z(e),tickLabelProps:()=>({fill:"var(--s-color-text-softer)",fontSize:10,textAnchor:"middle",dy:0,dx:0}),tickLength:4,tickValues:C})}),t.map(((e,t)=>(0,d.jsx)(I.Y3,{curve:_.nV,data:e.data,x:e=>v(e.date),y:e=>x(e.value),yScale:x,fill:`url(#area-gradient-${t})`,y0:()=>n-24},e.name))),t.map(((e,t)=>(0,d.jsx)(I.Wi,{curve:_.nV,data:e.data,x:e=>v(e.date),y:e=>x(e.value),stroke:Jc(t),strokeWidth:2,strokeLinecap:"round"},e.name))),null!==P&&P.map((({s:e,point:t},n)=>{const r=x(t.value),a=P.slice(0,n).reduce(((e,t)=>{const n=x(t.point.value),a=Math.abs(r-n);return a<24?e+(24-a):e}),0);return(0,d.jsx)(Kc,{label:`${e.name}: ${M(t.value)}`,color:Jc(n),x:v(t.date),y:r-a-20,chartWidth:i},e.name)})),(0,d.jsx)("rect",{x:8,y:8,width:Math.max(0,i-8-55),height:Math.max(0,n-8-24),fill:"transparent",onMouseMove:R,onMouseLeave:()=>y(null),onTouchMove:R})]})]})},Xc=10,eu=({title:e,categories:t,series:n,height:r=200,stacked:a=!1,formatValue:o})=>{const{ref:i,width:s}=(0,N.A)(),l=s??0,u=Math.max(0,l-8-50),p=Math.max(0,r-20-20),f=(0,c.useMemo)((()=>a?t.map(((e,t)=>[n.reduce(((e,n)=>e+Math.max(0,n.value[t]??0)),0),n.reduce(((e,n)=>e+Math.min(0,n.value[t]??0)),0)])):n.flatMap((e=>e.value))),[n,t,a]),[h,m]=(0,c.useMemo)((()=>
3{if(a){const e=f.flat();return[Math.min(0,...e),Math.max(0,...e)]}const e=f;return[Math.min(0,...e),Math.max(0,...e)]}),[f,a]),g=(0,c.useMemo)((()=>(0,E.WH)({padding:.1}).domain(t).range([8,8+u])),[t,u]),y=g.bandwidth()/n.length,v=.9*y,x=(0,c.useMemo)((()=>(0,E.m4)().domain([h,m]).range([20+p,20])),[h,m,p]),b=o??(e=>String(e)),k=x(0);return(0,d.jsxs)("div",{ref:i,children:[e&&(0,d.jsx)("p",{className:"mb-1 text-xs text-softer",children:e}),(0,d.jsx)("div",{className:"mb-1 flex flex-wrap gap-3",children:n.map(((e,t)=>(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-full",style:{backgroundColor:Jc(t)}}),(0,d.jsx)("span",{className:"text-xs text-soft",children:e.name})]},e.name)))}),(0,d.jsxs)("svg",{width:l,height:r,className:"overflow-visible",children:[(0,d.jsx)("line",{x1:8,x2:8+u,y1:k,y2:k,stroke:"var(--s-color-border-soft)",strokeWidth:1}),a?t.map(((e,t)=>{const r=g(e)??0,a=g.bandwidth();let o=k,i=k;return(0,d.jsx)(C.Y,{children:n.map(((e,n)=>{const s=e.value[t]??0,l=Jc(n);if(0===s)return null;if(s>0){const t=Math.abs(x(s)-x(0));o-=t;const n=o;return(0,d.jsxs)(C.Y,{children:[(0,d.jsx)("rect",{x:r,y:n,width:a,height:t,fill:l}),(0,d.jsx)("text",{x:r+a/2,y:n-3,textAnchor:"middle",fontSize:Xc,fill:l,children:b(s)})]},e.name)}{const t=Math.abs(x(s)-x(0)),n=i;return i+=t,(0,d.jsxs)(C.Y,{children:[(0,d.jsx)("rect",{x:r,y:n,width:a,height:t,fill:l}),(0,d.jsx)("text",{x:r+a/2,y:n+t+Xc,textAnchor:"middle",fontSize:Xc,fill:l,children:b(s)})]},e.name)}}))},e)})):t.map(((e,t)=>{const r=g(e)??0;return(0,d.jsx)(C.Y,{left:r,children:n.map(((e,n)=>{const r=e.value[t]??0,a=n*y+(y-v)/2,o=r>=0?x(r):k,i=Math.abs(x(r)-k),s=a+v/2,l=r>=0?o-3:o+i+Xc;return(0,d.jsxs)(C.Y,{children:[(0,d.jsx)("rect",{x:a,y:o,width:v,height:i,fill:Jc(n)}),(0,d.jsx)("text",{x:s,y:l,textAnchor:"middle",fontSize:Xc,fill:Jc(n),children:b(r)})]},e.name)}))},e)})),(0,d.jsx)("g",{transform:`translate(${l-50}, 0)`,children:(0,d.jsx)(S._0,{orientation:"right",scale:x,stroke:"var(--s-color-p-white-170)",tickStroke:"var(--s-color-p-white-170)",tickLabelProps:()=>({fill:"var(--s-color-text-softer)",fontSize:Xc,textAnchor:"start",dy:3,dx:2}),tickFormat:e=>b(e),tickValues:x.domain(),tickLength:4,numTicks:2})}),(0,d.jsx)("g",{transform:`translate(0, ${r-20})`,children:(0,d.jsx)(S._0,{orientation:"bottom",scale:g,stroke:"var(--s-color-p-white-170)",tickLabelProps:()=>({fill:"var(--s-color-text-softer)",fontSize:Xc,textAnchor:"middle",dy:0,dx:0}),tickLength:4})})]})]})},tu=({title:e,data:t,height:n=200})=>{const{ref:r,width:a}=(0,N.A)(),o=a??0,i=Math.min(o,n)/2,s=.55*i,l=o/2,c=n/2,u=t.reduce(((e,t)=>e+t.value),0);return(0,d.jsxs)("div",{ref:r,children:[e&&(0,d.jsx)("p",{className:"mb-1 text-xs text-softer",children:e}),(0,d.jsx)("svg",{width:o,height:n,children:(0,d.jsx)(C.Y,{top:c,left:l,children:(0,d.jsx)(I.Fq,{data:t,pieValue:e=>e.value,outerRadius:i-10,innerRadius:s,padAngle:.02,children:e=>e.arcs.map(((t,n)=>(0,d.jsx)("path",{d:e.path(t)??"",fill:Jc(n)},t.data.name)))})})}),(0,d.jsx)("div",{className:"mt-2 flex flex-wrap gap-3",children:t.map(((e,t)=>(0,d.jsxs)("div",{className:"flex items-center gap-1",children:[(0,d.jsx)("span",{className:"inline-block size-2 rounded-full",style:{backgroundColor:Jc(t)}}),(0,d.jsxs)("span",{className:"text-xs text-soft",children:[e.name," (",u>0?(e.value/u*100).toFixed(0):0,"%)"]})]},e.name)))})]})},nu=e=>"number"===e||"percentage"===e||"currency"===e,ru=(e,t,n)=>{try{switch(t){case"currency":return(0,D.toCurrencyTruncated)(e,1,n);case"percentage":return(0,D.toPercentage)(e/100,1);default:return(0,D.toSignificant)(e,1)}}catch(t){return`${e}`}},au=e=>"string"==typeof e&&e.length>0,ou=({data:e})=>{if("time_series"===e.chart_type){const t=e.series.map((e=>({name:e.name,data:e.data.map((e=>({date:new Date(e.date),value:e.value})))}))),n=au(e.currency)?e.currency:"USD",r=nu(e.format)?e.format:"number";return(0,d.jsx)("div",{className:"px-5 py-4",children:(0,d.jsx)(Qc,{title:e.title,series:t,height:200,formatValue:e=>ru(e,r,n)})})}if("bar"===e.chart_type){const t=e.series.map((e=>({name:e.name,value:e.data}))),n=au(e.currency)?e.currency:"USD",r=nu(e.format)?e.format:"number";return(0,d.jsx)("div",{className:"px-5 py-4",children:(0,d.jsx)(eu,{title:e.title,categories:e.categories,series:t,height:180,formatValue:e=>ru(e,r,n)})})}return"snowflake"===e.chart_type?(0,d.jsx)("div",{className:"px-5 py-4",children:(0,d.jsx)("span",{children:"Sorry, snowflake charts are not supported yet."})}):"donut"===e.chart_type?(0,d.jsx)("div",{className:"px-5 py-4",children:(0,d.jsx)(tu,{title:e.title,data:e.data,height:200})}):null},iu=({data:e})=>{const t=(n=e.url).startsWith("/")&&!n.startsWith("//");var n;if(!t&&!(e=>{try{return"https:"===new URL(e).protocol}catch{return!1}})(e.url))return null;const r=!t;return(0,d.jsx)("div",{className:"px-5 py-2",children:(0,d.jsxs)(u.$n,{href:e.url,variant:"primary",...r&&{target:"_blank",rel:"noopener noreferrer"},children:[(0,d.jsx)(b.A,{className:"size-4"}),(0,d.jsx)("span",{children:e.label})]})})},su=e=>e.startsWith("/")&&!e.startsWith("//")&&!e.startsWith("/\\"),lu=e=>{if(void 0!==e)return su(e)||(e=>{try{return"https:"===new URL(e).protocol}catch{return!1}})(e)?e:void 0},cu=(0,u.cn)("inline-flex items-center gap-1","text-xs !no-underline text-left font-normal
3!text-softer rounded-sm","max-w-64 px-2 py-0.5 bg-surface-1"),uu=(0,u.cn)(cu,"hover:text-soft hover:bg-surface-2","focus-outline"),du=({source:e})=>{const{components:t}=ie(),n=t.Link,r=lu(e.url),a=(e=>{const t=[e.publisher,e.companyName,e.published].filter((e=>void 0!==e&&e.length>0)).join(" · ");return t.length>0?t:void 0})(e);if(void 0!==r){if(Fc(r))return(0,d.jsxs)(n,{href:r,className:uu,children:[(0,d.jsx)(Pc,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{title:a,className:"truncate",children:e.title})]});const t=!su(r);return(0,d.jsxs)(n,{href:r,className:uu,...t&&{target:"_blank",rel:"noopener noreferrer"},children:[(0,d.jsx)("span",{title:a,className:"truncate",children:e.title}),(0,d.jsx)(b.A,{"aria-hidden":"true",className:"size-5 shrink-0 fill-subtle"})]})}return(0,d.jsx)("span",{title:a,className:cu,children:(0,d.jsx)("span",{className:"truncate",children:e.title})})},pu=({sources:e})=>{const{components:t}=ie(),[n,r]=(0,c.useState)(!1);if(0===e.length)return null;const a=e[0];return(0,d.jsxs)("ul",{role:"list","aria-label":"Sources",className:"m-0 flex list-none flex-wrap gap-1 p-2",children:[(0,d.jsx)("li",{className:"min-w-0 animate-fade-in",children:t.SourceChip?.({source:a})??(0,d.jsx)(du,{source:a})},la(a)),!n&&e.length>1&&(0,d.jsx)("li",{className:"min-w-0 animate-fade-in",children:(0,d.jsxs)("button",{className:(0,u.cn)("inline-flex items-center gap-1","text-xs !no-underline text-left font-normal !text-softer rounded-sm","max-w-64 px-2 py-0.5 bg-surface-1"),onClick:()=>r(!0),children:["+",e.length-1," more"]})}),n&&(0,d.jsx)(d.Fragment,{children:e.slice(1).map((e=>(0,d.jsx)("li",{className:"min-w-0 animate-fade-in",children:t.SourceChip?.({source:e})??(0,d.jsx)(du,{source:e})},la(e))))})]})},fu=(0,u.cn)("min-h-[45px] w-full rounded-x0_5 border-0 bg-transparent p-2 px-3.5 pt-3","outline-none opacity-70 transition-opacity focus:opacity-100 [.s-focus-kb_&:focus]:outline-dotted [.s-focus-kb_&:focus]:outline-2 [.s-focus-kb_&:focus]:outline-brand-01","scrollbar select-none resize-none","font-[inherit] text-xs font-normal text-[--s-field-input-color-text] caret-brand-01","placeholder:text-softer"),hu=({isDisabled:e=!1,isLoading:t=!1,onSubmit:n})=>{const[r,a]=(0,c.useState)(""),o=(0,c.useRef)(null),i=()=>{t||""===r||(n(r),a(""))};return(0,c.useEffect)((()=>{const e=o.current;if(!e)return;const t=()=>{e.style.height="auto";const t=Math.min(e.scrollHeight,300);e.style.height=`${t+4}px`};t();const n=new MutationObserver(t);return n.observe(e,{attributes:!0,attributeFilter:["value"],childList:!0,characterData:!0,subtree:!0}),setTimeout((()=>e.focus()),100),e.addEventListener("paste",(()=>{setTimeout(t,0)})),()=>{n.disconnect(),e.removeEventListener("paste",t)}}),[]),(0,d.jsxs)("form",{onSubmit:e=>{e.preventDefault(),i()},className:"grid min-h-14 grid-cols-[1fr_max-content] items-end gap-x1 p-x0_5 ps-x1 focus-within:placeholder:text-soft",children:[(0,d.jsx)("textarea",{placeholder:"Ask anything",ref:o,disabled:e,name:"message","aria-label":""!==r&&void 0!==r?r:"Ask anything",onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},onChange:e=>a(e.target.value),value:r,className:fu,rows:1}),(0,d.jsx)("div",{className:"flex h-full items-center pr-1.5",children:(0,d.jsxs)(u.$n,{isDisabled:""===r||e,variant:"secondary",size:"medium",type:"submit","aria-label":"Send",className:(0,u.cn)("!border-none w-8 rounded-full px-0 disabled:!border-[--s-button-secondary-color-bg] disabled:!bg-[--s-button-secondary-color-bg] disabled:!text-[--s-button-secondary-color-text]",t&&"animate-pulse"),children:[!t&&(0,d.jsx)(Zc,{className:"!size-x1_5 !opacity-100"}),t&&(0,d.jsxs)("span",{className:"relative pb-2 text-lg","aria-hidden":"true",children:[(0,d.jsx)("span",{className:"invisible",children:"..."}),(0,d.jsx)("span",{className:"absolute inset-y-0 start-0 animate-ellipsis overflow-hidden whitespace-nowrap",children:"..."})]})]})})]})},mu=e=>(0,c.isValidElement)(e)&&e.type===La,gu=e=>(0,c.isValidElement)(e)&&e.type===Ca,yu=e=>(0,c.isValidElement)(e)&&e.type===Wc,vu=({errorMessage:e,onTrack:t,onFeedbackClick:n,children:r})=>{const a=e,[o,i]=(0,c.useState)(null),s=c.Children.toArray(r),l=s.find(mu),f=s.find(gu),h=s.filter(yu).map((e=>({label:e.props.label,prompt:e.props.prompt}
3))),m=s.filter((e=>!mu(e)&&!gu(e)&&!yu(e))),g=void 0!==l,[w,S]=(0,c.useState)(null),E=(0,c.useRef)(null),I=(0,c.useRef)(null),C=(0,c.useRef)(null),z=(e=>{const t=(0,c.useRef)(0),n=(0,c.useRef)(null),r=(0,c.useRef)(null),a=(0,c.useCallback)((()=>{null!==n.current&&(cancelAnimationFrame(n.current),n.current=null),t.current=0,r.current=null,e.current?.style.removeProperty("scroll-snap-type")}),[e]),o=(0,c.useCallback)((()=>{const o=e.current;if(null===o||null!==n.current)return;o.style.setProperty("scroll-snap-type","none");const i=o=>{const s=e.current;if(null===s||0===t.current)return void a();const l=null===r.current?16.666666666666668:o-r.current;r.current=o,s.scrollLeft+=500*t.current*l/1e3,n.current=requestAnimationFrame(i)};n.current=requestAnimationFrame(i)}),[e,a]),i=(0,c.useCallback)((n=>{if("mouse"!==n.pointerType)return;const r=e.current;if(null===r||r.scrollWidth<=r.clientWidth)return void a();const{left:i,width:s}=r.getBoundingClientRect(),l=n.clientX-i;t.current=l<48?-1:l>s-48?1:0,0!==t.current?o():a()}),[e,o,a]);return(0,c.useEffect)((()=>a),[a]),{onPointerMove:i,onPointerLeave:a}})(C),[j,_]=(0,c.useState)(!1),[A,T]=(0,c.useState)(!1),N=(0,c.useRef)(null),D=(0,c.useCallback)((()=>{null!==N.current&&(clearTimeout(N.current),N.current=null)}),[]),M=(0,c.useCallback)((()=>{D(),N.current=setTimeout((()=>{N.current=null,E.current?.scrollIntoView({behavior:"smooth"})}),200)}),[D]),L=(0,c.useRef)(!1);(0,c.useEffect)((()=>{L.current||(L.current=!0,E.current?.scrollIntoView({behavior:"auto"}))}),[]);const{bridge:P}=ie();(0,c.useEffect)((()=>P.prompt.on((()=>M()))),[P,M]);const R=Ma(),{containerRef:O,isAtBottom:F,registerAssistantRef:q}=((e,t)=>{const n=(0,c.useRef)(null),[r,a]=(0,c.useState)(!0),o=(0,c.useRef)(new Map),i=[...e].reverse().find((e=>"assistant"===e.role))?.id??null,s=(0,c.useRef)(i);return(0,c.useEffect)((()=>{if(null===i)return;if(s.current===i)return;const e=o.current.get(i);e&&(s.current=i,t(),setTimeout((()=>{e.scrollIntoView({behavior:"smooth",block:"start"})}),50))}),[i,t]),(0,c.useEffect)((()=>{const e=n.current;if(!e)return;const t=()=>{const t=e.scrollHeight-e.clientHeight-e.scrollTop;a(t<=32)};t(),e.addEventListener("scroll",t,{passive:!0});const r=new ResizeObserver(t);return r.observe(e),()=>{e.removeEventListener("scroll",t),r.disconnect()}}),[]),{containerRef:n,isAtBottom:r,registerAssistantRef:e=>t=>{t?o.current.set(e,t):o.current.delete(e)}}})(R.messages,D),B=R.messages.at(-1),U="assistant"===B?.role&&"success"===B.status?B.suggestions??[]:[],V=U.length>0?U.map((e=>({label:e,prompt:void 0}))):h,$=!R.isLoading&&V.length>0,{canScrollLeft:H,canScrollRight:Y}=((e,t)=>{const[n,r]=(0,c.useState)({canScrollLeft:!1,canScrollRight:!1});return(0,c.useEffect)((()=>{const n=e.current;if(!t||null===n)return void r((e=>e.canScrollLeft||e.canScrollRight?{canScrollLeft:!1,canScrollRight:!1}:e));const a=()=>{const e=n.scrollWidth-n.clientWidth;r((t=>{const r={canScrollLeft:n.scrollLeft>1,canScrollRight:n.scrollLeft<e-1};return r.canScrollLeft===t.canScrollLeft&&r.canScrollRight===t.canScrollRight?t:r}))};a(),n.addEventListener("scroll",a,{passive:!0});const o=new ResizeObserver(a);o.observe(n);for(const e of Array.from(n.children))o.observe(e);return()=>{n.removeEventListener("scroll",a),o.disconnect()}}),[e,t]),n})(C,$);(0,c.useEffect)((()=>{const e=O.current;if(!e)return;const t=()=>{const t=$?C.current?.offsetHeight??0:0,n=E.current?.offsetTop??0;_(n>e.clientHeight-t+32),T(e.scrollTop>0)};t(),e.addEventListener("scroll",t,{passive:!0});const n=new ResizeObserver(t);return n.observe(e),I.current&&n.observe(I.current),()=>{e.removeEventListener("scroll",t),n.disconnect()}}),[$,O,R.messages.length]);const Z=B?.id??null,W=!R.isLoading&&void 0!==B&&"pending"!==B.status;g?null===w&&W&&null!==Z&&S(Z):null!==w&&S(null);const G=(e,t)=>(0,d.jsxs)(c.Fragment,{children:[t,l&&e.id===w?l:null]},e.id);return(0,d.jsxs)("div",{className:"grid h-full min-h-0 grow grid-cols-[minmax(0,1fr)] grid-rows-[auto_min-content] @container",children:[(0,d.jsxs)("div",{ref:O,className:"scrollbar relative grow overflow-y-auto px-2 pb-0 pt-4 [scrollbar-gutter:stable_both-edges]",children:[A&&(0,d.jsx)("div",{className:"pointer-events-none sticky -top-4 z-10 -mb-20 h-20 bg-gradient-to-b from-surface to-transparent"}),m,(0,d.jsxs)("div",{ref:I,className:"grid grid-cols-1 gap-y-1",children:[R.hasTruncatedMessages&&(0,d.jsxs)("div",{className:"flex items-center gap-1 justify-self-start px-x1_25 py-x0_75 text-left text-sm text-softer",children:[(0,d.jsx)(v.A,{className:"size-6 fill-softer"}),(0,d.jsx)("span",{children:"Only the last 20 messages are saved."})]}),R.messages.map(((e,r)=>{const a=r===R.messages.length-1,s=a&&R.isLoading&&(""===e.content||void 0===e.content),l=(""!==e.content||"failed"===e.status)&&(a&&!R.isLoading||!a);return"assistant"===e.role?G(e,(0,d.jsxs)("div",{ref:q(e.id),className:"flex min-w-0 flex-col",children:[void 0!==e.scheduledAt&&(0,d.jsx)(Vc,{isoDate:e.scheduledAt}),(0,d.jsx)($c,{children:e.content}),e.charts.map(((e,t)=>(0,d.jsx)(p.ErrorBoundary,{fallback:(0,d.jsxs)("div",{className:"flex items-center gap-2 justify-self-start px-x1_25 py-x0_75 text-left text-sm text-bad",children:[(0,d.jsx)(k.A,{className:"fill-bad"}),(0,d.jsx)("span",{children:"Error displaying chart. Please try again."})]}),children:(0,d.jsx)(ou,{data:e})},t))),e.linkButtons.map(((e,t)=>(0,d.jsx)(p.ErrorBoundary,{fallback:(0,d.jsx)(d.Fragment,{}),children:(0,d.jsx)(iu,{data:e})},`link-button-${t}`))),(0,d.jsx)(p.ErrorBoundary,{fallback:(0,d.jsx)(d.Fragment,{}),children:(0,d.jsx)(pu,{sources:e.sources})}),"failed"===e.status&&(0,d.jsxs)("div",{className:"flex items-center gap-2 justify-self-start px-x1_25 py-x0_75 text-left text-sm text-bad",children:[(0,d.jsx)(k.A,{className:"fill-bad"}),(0,d.jsx)("span",{children:"Something went wrong. Please try again."})]}),l&&"pending"!==e.status&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-1 justify-self-start",children:[(0,d.jsx)(u.m_,{content:"Give feedback",children:(0,d.jsx)(u.$
3n,{variant:"subtle",className:"size-8 rounded-full p-1 text-subtle transition-all hocus:text-soft",onClick:()=>n?.({threadId:R.threadId,messageId:e.id,sentiment:"up"}),children:(0,d.jsx)(x.A,{className:"mb-0.5 size-4"})})}),(0,d.jsx)(u.m_,{content:"Give feedback",children:(0,d.jsx)(u.$n,{variant:"subtle",className:"size-8 rounded-full p-1 text-subtle transition-all hocus:text-soft",onClick:()=>n?.({threadId:R.threadId,messageId:e.id,sentiment:"down"}),children:(0,d.jsx)(x.A,{className:"mt-1 size-4 rotate-180"})})}),e.tools.length>0&&(0,d.jsx)(u.m_,{content:"Data sources",children:(0,d.jsx)(u.$n,{variant:o===e.id?"outline":"subtle",className:"size-8 rounded-full p-1 text-subtle transition-all hocus:text-soft",onClick:()=>{i(o===e.id?null:e.id),a&&M(),t?.({action:"click",subject:"chat-panel",modifier:"sources",message_id:e.id})},children:(0,d.jsx)(v.A,{className:"size-4"})})})]}),(0,d.jsxs)("div",{className:(0,u.cn)("flex flex-col gap-2 justify-self-start px-4 py-3 pb-5 text-left text-sm text-softer opacity-0 transition-all duration-300",o===e.id?"max-h-96 opacity-100":"max-h-0 overflow-hidden py-0 opacity-0"),children:[(0,d.jsx)("span",{children:"Data sources:"}),(0,d.jsx)("ul",{className:"list-inside list-disc",children:e.tools.map((e=>(0,d.jsx)("li",{children:(0,d.jsxs)("span",{children:[e.source.description,e.source.link&&(0,d.jsx)(u.$n,{variant:"subtle",className:"ml-1 size-6 rounded-full p-1 align-middle text-subtle transition-all hocus:text-soft",href:e.source.link,target:"_blank",rel:"noopener noreferrer",children:(0,d.jsx)(b.A,{className:"size-8"})})]})},e.id)))})]})]}),s&&(0,d.jsx)("div",{className:"s-vibechat-loading mb-x2 animate-pulse justify-self-start px-x1_25 py-x0_75 text-left text-sm text-softer",children:R.activeTool?`Looking up ${R.activeTool.source.description}`:"Thinking"})]},e.id)):G(e,(0,d.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,d.jsx)(Hc,{children:e.content}),a&&R.isLoading&&(0,d.jsx)("div",{className:"s-vibechat-loading mb-x2 animate-pulse justify-self-start px-x1_25 py-x0_75 text-left text-sm text-softer",children:R.activeTool?(0,d.jsxs)(d.Fragment,{children:["Looking up"," ",(0,d.jsx)("strong",{className:"font-bold",children:R.activeTool.source.description})]}):"Thinking"})]},e.id))}
3)),R.error&&a&&(0,d.jsx)(a,{error:R.error})]}),(0,d.jsx)("div",{ref:E,className:(0,u.cn)("h-16",$&&"h-32")}),j&&(0,d.jsx)("div",{className:(0,u.cn)("pointer-events-none sticky bottom-0",!$&&"-mt-20 h-20 bg-gradient-to-t from-surface to-transparent",$&&"-mt-44 h-44 bg-gradient-to-t from-surface via-surface/90 to-transparent")}),!F&&(0,d.jsx)("div",{className:(0,u.cn)("pointer-events-none sticky bottom-2 flex h-0 -translate-y-2 items-center justify-center pb-4 pr-2",$&&"-translate-y-28"),children:(0,d.jsx)("div",{className:"flex size-9 items-center rounded-full bg-surface shadow-soft",children:(0,d.jsx)(u.m_,{content:"Scroll to latest",children:(0,d.jsx)(u.$n,{variant:"outline",className:"pointer-events-auto size-9 animate-fade-in rounded-full p-1 text-subtle shadow transition-all hocus:text-soft",onClick:M,"aria-label":"Scroll to latest message",children:(0,d.jsx)(y.A,{className:"size-4"})})})})})]}),(0,d.jsxs)("div",{className:"relative",children:[$&&(0,d.jsx)("div",{ref:C,className:(0,u.cn)("absolute inset-x-0 bottom-full mx-4 mb-3 flex gap-x1 overflow-x-auto scrollbar-hidden","[@media(pointer:coarse)]:[scroll-snap-type:x_proximity]",H&&!Y&&"[mask-image:linear-gradient(to_right,transparent,black_2rem)]",!H&&Y&&"[mask-image:linear-gradient(to_left,transparent,black_2rem)]",H&&Y&&"[mask-image:linear-gradient(to_right,transparent,black_2rem,black_calc(100%_-_2rem),transparent)]"),...z,children:V.map((({label:e,prompt:n},r)=>(0,d.jsx)(Wc,{label:e,isFullWidth:1===V.length,onClick:()=>{R.send(n??e),M(),t?.({action:"send",subject:"chat-panel",modifier:"suggestion"})}},`${e}-${r}`)))}),(0,d.jsxs)("div",{className:"border m-4 mt-0 overflow-hidden rounded-lg border-subtle bg-surface-1 light:bg-surface-3",children:[f,(0,d.jsx)(hu,{isDisabled:!!R.error&&"client_rate_limited"!==R.error.code,isLoading:R.isLoading,onSubmit:e=>{R.send(e),M(),t?.({action:"send",subject:"chat-panel",modifier:"message"})}})]})]})]})},xu=({errorMessage:e=Yc,onTrack:t,onFeedbackClick:n,children:r})=>{const a=wa();return(0,d.jsx)(c.Suspense,{fallback:(0,d.jsx)("div",{className:"min-h-0 grow",children:(0,d.jsx)(Ea,{})}),children:(0,d.jsx)(vu,{errorMessage:e,onTrack:t,onFeedbackClick:n,children:r},a.active.threadId)})};xu.Disclaimer=({className:e,children:t})=>(0,d.jsx)("div",{className:(0,u.cn)("grid grid-cols-1 gap-y-1",e),children:t}),xu.Interstitial=La,xu.FocusEntity=Ca,xu.Suggestion=Wc;var bu=({anchor:e,logo:t,label:n})=>{const r=e.label,a=e.display?.subtitle??(ce(e)?e.unique_symbol:void 0),o=n??(void 0!==r&&void 0!==a?`${r} (${a})`:r??a),i=e.display?.logo_url;return(0,d.jsxs)(d.Fragment,{children:[void 0!==t?t:void 0!==i?(0,d.jsx)("img",{src:i,alt:"",className:"size-4 shrink-0 rounded-md bg-p-white-100 object-contain p-x0_5"}):(0,d.jsx)("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-md bg-surface-3 text-tiny font-bold text-softer",children:e.label?.charAt(0)??"?"}),(0,d.jsx)("div",{className:"flex min-w-0",children:void 0!==o&&(0,d.jsx)("span",{className:"truncate text-xs font-medium text-softer",children:o})})]})},ku=({className:e,...t})=>{const n=wa().active.state.value.context?.anchor;if(void 0!==t.content){void 0===t.logo&&void 0===t.label||console.error("ChatHeaderAnchorEntity: `content` is mutually exclusive with `logo`/`label`/`sublabel` â the part props are ignored.");const r=t.content;return(0,d.jsx)("div",{"data-slot":"header-anchor-entity",className:(0,u.cn)("flex min-w-0 max-w-full animate-fade-in items-center gap-x1 empty:hidden",e),children:(0,d.jsx)(r,{anchor:n})})}return null==n?null:(0,d.jsx)("div",{"data-slot":"header-anchor-entity",className:(0,u.cn)("flex min-w-0 max-w-full animate-fade-in items-center gap-x1 empty:hidden",e),children:(0,d.jsx)(bu,{anchor:n,logo:t.logo,label:t.label})})},wu=({onClick:e})=>(0,d.jsx)(u.m_,{content:"Chat history",children:(0,d.jsx)(u.$n,{variant:"subtle",className:"mt-2.5 rounded-full px-2",onClick:e,children:(0,d.jsx)(M.A,{className:"size-6"})})}),Su=({onClick:e})=>{const t=wa();return(0,d.jsx)(u.m_,{content:"New chat",children:(0,d.jsx)(u.$n,{variant:"subtle",className:"mt-2.5 rounded-full px-2",onClick:()=>{t.new(),e?.()},children:(0,d.jsx)(L.A,{className:"size-6"})})})},Eu=()=>(0,d.jsx)("div",{className:"size-10"}),Iu=({title:e,className:t,children:n})=>{const r=wa(),a=e||r.active.title||"New Chat";
3let o=null,i=null,s=null;const l=[];return c.Children.forEach(n,(e=>{(0,c.isValidElement)(e)?e.type!==wu?e.type!==Su?e.type!==ku?l.push(e):s=e:i=e:o=e:null!=e&&!1!==e&&l.push(e)})),(0,d.jsx)("div",{className:"flex shrink-0 flex-col",children:(0,d.jsxs)("div",{className:(0,u.cn)("flex min-h-14 items-start p-2",t),children:[null==o?(0,d.jsx)(Eu,{}):o,(0,d.jsxs)("div",{className:(0,u.cn)("flex min-w-0 grow flex-col items-start py-4 gap-1 text-center","has-[[data-slot=header-anchor-entity]:not(:empty)]:pt-2","has-[[data-slot=header-anchor-entity]:not(:empty)]:pb-0","has-[[data-slot=header-anchor-entity]:not(:empty)]:pl-3","has-[[data-slot=header-anchor-entity]:not(:empty)]:text-left"),children:[(0,d.jsx)("h3",{className:"m-0 mt-1 w-full min-w-0 truncate text-xs font-normal text-soft",children:a}),s]}),i,l]})})};Iu.HistoryButton=wu,Iu.NewChatButton=Su,Iu.AnchorEntity=ku;var Cu=({threadId:e,currentTitle:t,onClose:n})=>{const r=wa(),[a,o]=(0,c.useState)(t),[i,s]=(0,c.useState)(!1),[l,p]=(0,c.useState)(null),f=a.trim(),h=f.length>0&&f!==t,m=async()=>{if(h){s(!0),p(null);try{await r.rename(e,f),n()}catch{p("Failed to save. Please try again."),s(!1)}}};return(0,d.jsxs)(u.aF,{isOpen:!0,title:"Edit chat title",onClose:i?void 0:n,className:"w-[400px] max-w-[calc(100vw_-_32px)]",children:[(0,d.jsx)(u.aF.Body,{children:(0,d.jsx)(u.A_,{"aria-label":"Chat title",value:a,onChange:e=>o((e??"").slice(0,150)),error:l,isDisabled:i,onKeyDown:e=>{"Enter"===e.key&&m()},autoFocus:!0})}),(0,d.jsxs)(u.aF.Actions,{children:[(0,d.jsx)(u.$n,{variant:"outline",onClick:n,isDisabled:i,children:"Cancel"}),(0,d.jsx)(u.$n,{variant:"primary",onClick:m,isLoading:i,isDisabled:!h,children:"Save"})]})]})},zu=({chat:e,onClickChat:t,onEdit:n,onTrack:r})=>{const a=wa(),o="agent"===e.chatInitiator,i=e.state.context?.anchor,s=ce(i)?i.label:void 0,l=()=>{a.load(e.threadId),t(e),r?.({action:"click",subject:"chat-history-panel",modifier:"load-chat",threadId:e.threadId})};return o?(0,d.jsx)("div",{className:"group border relative grid grid-cols-[1fr_min-content] items-center rounded-md border-transparent pr-1 hover:border-subtle hover:bg-surface-2/60",children:(0,d.jsx)("button",{type:"button",className:"w-full cursor-pointer text-left no-underline",onClick:l,children:(0,d.jsxs)("div",{className:"flex flex-col rounded-md px-4 py-3",children:[(0,d.jsx)("div",{className:"text-sm text-solid",children:"Daily Review Agent"}),(0,d.jsx)("div",{className:"text-xs text-subtle",children:"Quick daily updates for your stocks"})]})})}):(0,d.jsxs)("div",{className:"group border relative grid grid-cols-[1fr_min-content] items-center rounded-md border-transparent pr-1 hover:border-subtle hover:bg-surface-2/60",children:[(0,d.jsx)("button",{type:"button",className:"w-full cursor-pointer text-left no-underline",onClick:l,children:(0,d.jsxs)("div",{className:"flex flex-col rounded-md px-4 py-3",children:[(0,d.jsx)("div",{className:"text-sm text-solid",children:e.title}),(0,d.jsx)("div",{className:"text-xs text-subtle",children:s})]})}),(0,d.jsxs)("div",{className:"flex items-center",children:[(0,d.jsx)(u.m_,{content:"Edit Chat",children:(0,d.jsx)(u.$n,{variant:"subtle","aria-label":"Edit Chat",className:"rounded-full px-2 text-subtle hover:text-solid",onClick:()=>{n?.(),r?.({action:"click",subject:"chat-history-panel",modifier:"edit-chat",threadId:e.threadId})},children:(0,d.jsx)(R.A,{className:"size-4"})})}),(0,d.jsx)(u.m_,{content:"Delete Chat",children:(0,d.jsx)(u.$n,{variant:"subtle","aria-label":"Delete Chat",className:"rounded-full px-2 text-subtle hover:text-solid",onClick:()=>{a.delete(e.threadId),r?.({action:"click",subject:"chat-history-panel",modifier:"delete-chat",threadId:e.threadId})},children:(0,d.jsx)(P.A,{className:"size-4"})})})]})]})},ju=({onClickChat:e,onTrack:t})=>{const n=wa(),[r,a]=(0,c.useState)(null),o=n.history.filter((e=>"agent"===e.chatInitiator)),i=n.history.filter((e=>"agent"!==e.chatInitiator));return(0,d.jsxs)("div",{className:"grid h-full min-h-0 grow grid-rows-[auto_min-content_min-content]",children:[0===n.history.length&&(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6 px-4 py-3 pt-5 text-sm text-subtle",children:[(0,d.jsx)("div",{className:"text-center",children:"Create a new chat to get started."}),(0,d.jsxs)(u.$n,{variant:"secondary",onClick:()=>{e(),n.new()},children:[(0,d.jsx)(L.A,{className:"size-4"})," New Chat"]})]}),n.history.length>0&&(0,d.jsx)("div",{className:"scrollbar grow overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 px-2 py-4 pr-3",children:[o.map((n=>(0,d.jsx)(zu,{chat:n,onClickChat:e,onTrack:t},n.threadId))),o.length>0&&i.length>0&&(0,d.jsx)("hr",{className:"my-1 border-subtle"}),i.map((n=>(0,d.jsx)(zu,{chat:n,onClickChat:e,onEdit:()=>a({threadId:n.threadId,title:n.title}),onTrack:t},n.threadId))),i.length>=20&&(0,d.jsxs)("div",{className:"flex items-center gap-1 px-4 py-3 pt-5 text-sm text-subtle",children:[(0,d.jsx)(v.A,{className:"size-6 fill-subtle"}),(0,d.jsxs)("span",{children:["Only the last ",20," chats are stored."]})]})]})}),r&&(0,d.jsx)(Cu,{threadId:r.threadId,currentTitle:r.title,onClose:()=>a(null)},r.threadId)]})},_u=({error:e,resetError:t})=>{const n=Rr(e)?e:void 0;return(0,d.jsx)("div",{className:"flex h-full flex-col",children:(0,d.jsx)("div",{className:"scrollbar grow overflow-y-auto px-2 py-4 [scrollbar-gutter:stable_both-edges]",children:(0,d.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-8",children:[(0,d.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-sm text-subtle",children:[(0,d.jsx)(k.A,{className:"size-4 fill-subtle"}),"Something went wrong."]}),"usage_limit_exceeded"===n?.code&&(0,d.jsx)("div",{className:"px-4 text-center text-sm text-subtle",children:"Daily AI usage limit exceeded. Please try again later."}),("unauthorized"===n?.code||"feature_disabled"===n?.code)&&(0,d.jsx)("div",{className:"px-4 text-center text-sm text-subtle",children:"AI Chat is inaccessible or not currently enabled for your account."})]}),(0,d.jsxs)(u.$n,{variant:"secondary",onClick:t,children:[(0,d.jsx)(O.A,{className:"size-4"})," Reload"]})]})})})},Au=(0,c.createContext)(void 0),Tu=()=>{if(void 0===(0,c.useContext)(Au))throw new Error("ChatPanel.Chat and ChatPanel.History must be rendered inside <ChatPanel>")},Nu=e=>(Tu(),(0,d.jsx)(xu,{...e}));Nu.Disclaimer=xu.Disclaimer,Nu.Interstitial=xu.Interstitial,Nu.FocusEntity=xu.FocusEntity,Nu.Suggestion=xu.Suggestion;var Du=({state:e={},children:t})=>{try{(0,f.jE)()}catch(e){throw console.error(e),new Error("<ChatPanel> requires a <QueryClientProvider> ancestor from @tanstack/react-query.")}return(0,d.jsx)(Au.Provider,{value:!0,children:(0,d.jsx)(f.Ul,{children:({reset:n})=>(0,d.jsx)(p.ErrorBoundary,{fallback:({error:e,resetError:t})=>(0,d.jsx)(_u,{error:e,resetError:()=>{n(),t()}}),children:(0,d.jsx)(c.Suspense,{fallback:(0,d.jsx)(Ea,{}),children:(0,d.jsx)(Sa,{state:e,children:(0,d.jsx)(c.Suspense,{fallback:(0,d.jsx)(Ea,{}),children:(0,d.jsx)("div",{className:"flex h-full flex-col",children:t})})})})})})})};Du.Chat=Nu,Du.History=e=>(Tu(),(0,d.jsx)(ju,{...e})),Du.Header=Iu},92891:function(e,t,n){n.d(t,{m:function(){return o}});var r=class{buffered=null;handler=null;listeners=new Set;
3send(e){this.listeners.forEach((t=>t(e))),null!==this.handler?this.handler(e):this.buffered=e}setHandler(e){if(this.handler=e,null!==this.buffered){const t=this.buffered;this.buffered=null,e(t)}return()=>{this.handler===e&&(this.handler=null)}}on(e){return this.listeners.add(e),null!==this.buffered&&e(this.buffered),()=>{this.listeners.delete(e)}}peek(){return this.buffered??void 0}clear(){this.buffered=null}},a=class{stored=null;subscribers=new Set;get latest(){return this.stored??void 0}set(e){this.stored=e,this.subscribers.forEach((t=>t(e)))}subscribe(e){return this.subscribers.add(e),null!==this.stored&&e(this.stored),()=>{this.subscribers.delete(e)}}clear(){this.stored=null}},o=()=>({state:new a,prompt:new r,thread:new r})}}]); 4//# sourceMappingURL=charlie-chat.modern.b48b0fb4.js.map 5//# debugId=c76066a5-d18f-564e-aa68-945ac10f6d1b
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.