|
|
|
@@ -0,0 +1,52 @@
|
|
|
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/workflows-view-xQJlxU4f.js","assets/workflow-engine-ClbuiuAZ.js","assets/workflow-engine-BZV40eAE.css","assets/playground-view-COPXwfh8.js"])))=>i.map(i=>d[i]);
|
|
|
|
|
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function u(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();function nf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uc={exports:{}},Ba={};var Tp;function N1(){if(Tp)return Ba;Tp=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(u,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var d in s)d!=="key"&&(c[d]=s[d])}else c=s;return s=c.ref,{$$typeof:n,type:u,key:f,ref:s!==void 0?s:null,props:c}}return Ba.Fragment=l,Ba.jsx=a,Ba.jsxs=a,Ba}var Ap;function O1(){return Ap||(Ap=1,uc.exports=N1()),uc.exports}var p=O1(),sc={exports:{}},be={};var _p;function z1(){if(_p)return be;_p=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function S(M){return M===null||typeof M!="object"?null:(M=b&&M[b]||M["@@iterator"],typeof M=="function"?M:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,T={};function C(M,G,E){this.props=M,this.context=G,this.refs=T,this.updater=E||k}C.prototype.isReactComponent={},C.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,G,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function H(){}H.prototype=C.prototype;function O(M,G,E){this.props=M,this.context=G,this.refs=T,this.updater=E||k}var X=O.prototype=new H;X.constructor=O,_(X,C.prototype),X.isPureReactComponent=!0;var J=Array.isArray;function R(){}var $={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function ie(M,G,E){var re=E.ref;return{$$typeof:n,type:M,key:G,ref:re!==void 0?re:null,props:E}}function U(M,G){return ie(M.type,G,M.props)}function le(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function Z(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(E){return G[E]})}var me=/\/+/g;function se(M,G){return typeof M=="object"&&M!==null&&M.key!=null?Z(""+M.key):G.toString(36)}function K(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(R,R):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function D(M,G,E,re,ne){var ue=typeof M;(ue==="undefined"||ue==="boolean")&&(M=null);var xe=!1;if(M===null)xe=!0;else switch(ue){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(M.$$typeof){case n:case l:xe=!0;break;case x:return xe=M._init,D(xe(M._payload),G,E,re,ne)}}if(xe)return ne=ne(M),xe=re===""?"."+se(M,0):re,J(ne)?(E="",xe!=null&&(E=xe.replace(me,"$&/")+"/"),D(ne,G,E,"",function(Tt){return Tt})):ne!=null&&(le(ne)&&(ne=U(ne,E+(ne.key==null||M&&M.key===ne.key?"":(""+ne.key).replace(me,"$&/")+"/")+xe)),G.push(ne)),1;xe=0;var He=re===""?".":re+":";if(J(M))for(var Me=0;Me<M.length;Me++)re=M[Me],ue=He+se(re,Me),xe+=D(re,G,E,ue,ne);else if(Me=S(M),typeof Me=="function")for(M=Me.call(M),Me=0;!(re=M.next()).done;)re=re.value,ue=He+se(re,Me++),xe+=D(re,G,E,ue,ne);else if(ue==="object"){if(typeof M.then=="function")return D(K(M),G,E,re,ne);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return xe}function W(M,G,E){if(M==null)return M;var re=[],ne=0;return D(M,re,"","",function(ue){return G.call(E,ue,ne++)}),re}function oe(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(E){(M._status===0||M._status===-1)&&(M._status=1,M._result=E)},function(E){(M._status===0||M._status===-1)&&(M._status=2,MLine truncated
|
|
|
|
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
|
|
|
`+bt+e+Ji}var ve=!1;function gn(e,t){if(!e||ve)return"";ve=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(V){var q=V}Reflect.construct(e,[],P)}else{try{P.call()}catch(V){q=V}e.call(P.prototype)}}else{try{throw Error()}catch(V){q=V}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(V){if(V&&q&&typeof V.stack=="string")return[V.stack,q.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),v=h[0],w=h[1];if(v&&w){var A=v.split(`
|
|
|
|
|
`),B=w.split(`
|
|
|
|
|
`);for(o=r=0;r<A.length&&!A[r].includes("DetermineComponentFrameRoot");)r++;for(;o<B.length&&!B[o].includes("DetermineComponentFrameRoot");)o++;if(r===A.length||o===B.length)for(r=A.length-1,o=B.length-1;1<=r&&0<=o&&A[r]!==B[o];)o--;for(;1<=r&&0<=o;r--,o--)if(A[r]!==B[o]){if(r!==1||o!==1)do if(r--,o--,0>o||A[r]!==B[o]){var F=`
|
|
|
|
|
`+A[r].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=r&&0<=o);break}}}finally{ve=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?on(i):""}function tr(e,t){switch(e.tag){case 26:case 27:case 5:return on(e.type);case 16:return on("Lazy");case 13:return e.child!==t&&t!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return gn(e.type,!1);case 11:return gn(e.type.render,!1);case 1:return gn(e.type,!0);case 31:return on("Activity");default:return""}}function nr(e){try{var t="",i=null;do t+=tr(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
|
|
|
|
|
Error generating stack: `+r.message+`
|
|
|
|
|
`+r.stack}}var Pi=Object.prototype.hasOwnProperty,Wi=n.unstable_scheduleCallback,Il=n.unstable_cancelCallback,Yu=n.unstable_shouldYield,Iu=n.unstable_requestPaint,St=n.unstable_now,Xu=n.unstable_getCurrentPriorityLevel,Y=n.unstable_ImmediatePriority,ae=n.unstable_UserBlockingPriority,ye=n.unstable_NormalPriority,je=n.unstable_LowPriority,Be=n.unstable_IdlePriority,Bt=n.log,En=n.unstable_setDisableYieldValue,wt=null,ut=null;function At(e){if(typeof Bt=="function"&&En(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(wt,e)}catch{}}var Ye=Math.clz32?Math.clz32:yx,In=Math.log,cn=Math.LN2;function yx(e){return e>>>=0,e===0?32:31-(In(e)/cn|0)|0}var ir=256,lr=262144,ar=4194304;function wi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function rr(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var o=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~h,r!==0?o=wi(r):(v&=w,v!==0?o=wi(v):i||(i=w&~e,i!==0&&(o=wi(i))))):(w=r&~h,w!==0?o=wi(w):v!==0?o=wi(v):i||(i=r&~e,i!==0&&(o=wi(i)))),o===0?0:t!==0&&t!==o&&(t&h)===0&&(h=o&-o,i=t&-t,h>=i||h===32&&(i&4194048)!==0)?t:o}function Xl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Nf(){var e=ar;return ar<<=1,(ar&62914560)===0&&(ar=4194304),e}function Ku(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Kl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vx(e,t,i,r,o,h){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var w=e.entanglements,A=e.expirationTimes,B=e.hiddenUpdates;for(i=v&~i;0<i;){var F=31-Ye(i),P=1<<F;w[F]=0,A[F]=-1;var q=B[F];if(q!==null)for(B[F]=null,F=0;F<q.length;F++){var V=q[F];V!==null&&(V.lane&=-536870913)}i&=~P}r!==0&&Of(e,r,0),h!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~t))}function Of(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function zf(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Ye(i),o=1<<r;o&t|e[r]&t&&(e[r]|=t),i&=~o}}function Df(e,t){var i=t&-t;return i=(i&42)!==0?1:Zu(i),(i&(e.suspendedLanes|t))!==0?0:i}function Zu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ju(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rf(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:bp(e.type))}function Lf(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var Xn=Math.random().toString(36).slice(2),ht="__reactFiber$"+Xn,_t="__reactProps$"+Xn,$i="__reactContainer$"+Xn,Pu="__reactEvents$"+Xn,bx="__reactListeners$"+Xn,Sx="__reactHandles$"+Xn,Uf="__reactResources$"+Xn,Zl="__reactMarker$"+Xn;function Wu(e){delete e[ht],delete e[_t],delete e[Pu],delete e[bx],delete e[Sx]}function el(e){var t=e[ht];if(t)return t;for(var i=e.parentNode;i;){if(t=i[$i]||i[ht]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=lp(e);e!==null;){if(i=e[ht])return i;e=lp(e)}return t}e=i,i=e.parentNode}return null}function tl(e){if(e=e[ht]||e[$i]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Jl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function nl(e){var t=e[Uf];return t||(t=e[Uf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[Zl]=!0}var Bf=new Set,Hf={};function ki(e,t){il(e,t),il(e+"Capture",t)}function il(e,t){for(Hf[e]=t,e=0;e<t.length;e++)Bf.add(t[e])}var wx=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218
Line truncated
|
|
|
|
|
`).replace($0,"")}function Km(e,t){return t=Xm(t),Xm(e)===t}function Ge(e,t,i,r,o,h){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||al(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&al(e,""+r);break;case"className":sr(e,"class",r);break;case"tabIndex":sr(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":sr(e,i,r);break;case"style":Kf(e,r,h);break;case"data":if(t!=="object"){sr(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=cr(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(i==="formAction"?(t!=="input"&&Ge(e,t,"name",o.name,o,null),Ge(e,t,"formEncType",o.formEncType,o,null),Ge(e,t,"formMethod",o.formMethod,o,null),Ge(e,t,"formTarget",o.formTarget,o,null)):(Ge(e,t,"encType",o.encType,o,null),Ge(e,t,"method",o.method,o,null),Ge(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=cr(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=jn);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(i=r.__html,i!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=cr(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),ur(e,"popover",r);break;case"xlinkActuate":Cn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Cn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Cn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Cn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Cn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Cn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Cn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ur(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Tx.get(i)||i,ur(e,i,r))}}function Go(e,t,i,r,o,h){switch(i){case"style":Kf(e,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(u(61));if(i=r.__html,i!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=i}}break;case"children":typeof r=="string"?al(e,r):(typeof r=="number"||typeof r=="bigint")&&al(e,""+r);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"onClick":r!=null&&(e.onclick=jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
|
|
|
|
`);l.push(u),l.push("")}return l.join(`
|
|
|
|
|
`)}const Pv="https://api.venice.ai/api/v1",Wv=new Set([408,425,429,500,502,503,504]),$v=2;class Ou extends Error{status;code;suggestedPrompt;constructor(l,a,u,s){super(l),this.name="VeniceAPIError",this.status=a,this.code=u,this.suggestedPrompt=s}}function eb(){const n=pn.getState().apiKey;if(!n)throw new Ou('API key not set. Click "API Key" in the header to connect.',401);return n}const Pp=n=>new Promise(l=>setTimeout(l,n));function Wp(n,l){if(l){const u=Number(l);if(Number.isFinite(u)&&u>0)return Math.min(u*1e3,3e4)}const a=500*2**n;return a+Math.random()*a*.25}async function tb(n){let l=`HTTP ${n.status}`,a,u;try{const s=await n.json();l=s.error?.message??l,a=s.error?.code,u=s.error?.suggested_prompt}catch{}return new Ou(l,n.status,a,u)}async function hf(n,l){const{stream:a,noAuth:u,retries:s=$v,...c}=l,f=new Headers(c.headers);u||f.set("Authorization",`Bearer ${eb()}`),c.body&&typeof c.body=="string"&&f.set("Content-Type","application/json");let d;for(let g=0;g<=s;g++)try{const m=await fetch(`${Pv}${n}`,{...c,headers:f});if(m.ok)return m;if(!Wv.has(m.status)||g===s)throw await tb(m);try{await m.arrayBuffer()}catch{}await Pp(Wp(g,m.headers.get("Retry-After")));continue}catch(m){if(d=m,m instanceof Ou||m instanceof DOMException&&m.name==="AbortError")throw m;if(g===s)break;await Pp(Wp(g))}throw d instanceof Error?d:new Ou("Network error",0)}async function Gn(n,l={}){const a=await hf(n,l);return l.stream?a.body:a.json()}async function nb(n,l,a={}){return(await hf(n,{method:"POST",body:l,signal:a.signal})).json()}async function Hu(n,l,a={}){return(await hf(n,{method:"POST",body:JSON.stringify(l),signal:a.signal})).blob()}function Ki(n){return ay({queryKey:["models",n],queryFn:()=>Gn(`/models${n?`?type=${n}`:""}`,{noAuth:!0}),staleTime:300*1e3,select:l=>l.data.filter(a=>!a.model_spec?.offline).sort((a,u)=>a.id.localeCompare(u.id))})}function ib(){const n=Ki("video"),l=[];if(n.data){const a=new Map;for(const u of n.data){const s=u.model_spec?.constraints;if(!s)continue;const c=u.model_spec?.name||u.id,f=c.toLowerCase();a.has(f)||a.set(f,{name:c,sets:u.model_spec?.model_sets||[]});const d=a.get(f);s.model_type==="text-to-video"?d.textModel=u:s.model_type==="image-to-video"&&(d.imageModel=u);const g=u.model_spec?.model_sets||[];for(const m of g)d.sets.includes(m)||d.sets.push(m)}l.push(...a.values())}return{...n,groups:l}}function bi({value:n,onChange:l,options:a,placeholder:u="Select...",searchable:s=!1,className:c}){const[f,d]=Q.useState(!1),[g,m]=Q.useState(""),x=Q.useRef(null),y=Q.useRef(null);Q.useEffect(()=>{const k=_=>{x.current&&!x.current.contains(_.target)&&d(!1)};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[]),Q.useEffect(()=>{f&&s&&y.current?.focus()},[f,s]);const b=Q.useMemo(()=>g?a.filter(k=>k.label.toLowerCase().includes(g.toLowerCase())):a,[a,g]),S=a.find(k=>k.value===n)?.label||u;return p.jsxs("div",{ref:x,className:Ee("relative",c),children:[p.jsxs("button",{onClick:()=>{const k=!f;d(k),k||m("")},className:Ee("w-full flex items-center justify-between gap-2 bg-transparent border border-white/[0.06] rounded-md px-2.5 py-1.5 text-[15px] hover:border-white/[0.12] transition-colors outline-none",f&&"border-white/[0.15]"),children:[p.jsx("span",{className:Ee("truncate text-[15px]",n?"text-white/70":"text-white/20"),children:S}),p.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",className:Ee("shrink-0 text-white/20 transition-transform duration-150",f&&"rotate-180"),children:p.jsx("path",{d:"M2.5 3.75L5 6.25L7.5 3.75"})})]}),f&&p.jsxs("div",{className:"absolute z-50 w-full mt-0.5 bg-[#0e0e0e] border border-white/[0.08] rounded-lg shadow-2xl shadow-black/50 animate-scale-in overflow-hidden",children:[s&&p.jsx("div",{className:"p-1 border-b border-white/[0.04]",children:p.jsx("input",{ref:y,value:g,onChange:k=>m(k.target.value),placeholder:"Search...",className:"w-full bg-white/[0.03] rounded px-2 py-1 text-[15px] text-white/70 outline-none placeholder:text-white/12"})}),p.jsx("div",{className:"max-h-60 overflow-y-auto p-0.5",children:b.length===0?p.jsx("div",{className:"px-2.5 py-2.5 text-[14px] text-white/15 text-center",children:"No results"}):b.map(k=>p.jsx("button",{onClick:()=>{l(k.value),d(!1)},className:Ee("w-full text-left px-3 py-[6px] text-[15px] rounded transition-colors",k.value===n?"bg-white/[0.07] text-white/80":"text-white/40 hover:bg-white/[0.04] hover:text-white/70"),children:k.label},k.value))})]})]})}function lb({className:n}){return p.jsxs("svg",{className:Ee("animate-spin h-3.5 w-3.5",n),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[p.jsx("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),p.jsx("path",{className:"opacity-80",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}function Ce({children:n,htmlFor:l,hint:a}){return p.jsxs("div",{className:"flex
Line truncated
|
|
|
|
|
`).split(`
|
|
|
|
|
|
|
|
|
|
`);s=m.pop()??"";for(const x of m){const y=[];for(const S of x.split(`
|
|
|
|
|
`))if(!(!S||S.startsWith(":"))&&S.startsWith("data:")){const k=S.slice(5);y.push(k.startsWith(" ")?k.slice(1):k)}if(y.length===0)continue;const b=y.join(`
|
|
|
|
|
`);if(b==="[DONE]")return;try{yield JSON.parse(b)}catch{}}}}finally{l.signal&&l.signal.removeEventListener("abort",c);try{a.releaseLock()}catch{}}}function mb(){const n=Q.useRef(null),{addMessage:l,appendToLastAssistant:a,appendReasoningToLastAssistant:u,deleteMessage:s,setStreaming:c,isStreaming:f,veniceParams:d,systemPrompt:g,temperature:m,topP:x,maxTokens:y,createConversation:b}=Ct(),S=Q.useCallback(async(C,H,O)=>{const X=Ct.getState().conversations.find(ee=>ee.id===C);if(!X)return;const J=X.messages.filter(ee=>typeof ee.content=="string"?ee.content!=="":!0);g.trim()&&J.unshift({role:"system",content:g.trim()});const $=await Gn("/chat/completions",{method:"POST",body:JSON.stringify({model:H,messages:J,stream:!0,temperature:m,top_p:x,max_tokens:y,venice_parameters:d}),stream:!0,signal:O.signal});for await(const ee of db($,{signal:O.signal})){const ie=ee.choices[0]?.delta;ie?.content&&a(C,ie.content),ie?.reasoning_content&&u(C,ie.reasoning_content)}},[a,u,d,g,m,x,y]),k=Q.useCallback(async(C,H,O)=>{let X=Ct.getState().activeConversationId;X||(X=b(H));let J;O&&O.length>0?J={role:"user",content:[{type:"text",text:C},...O.map(ee=>({type:"image_url",image_url:{url:ee}}))]}:J={role:"user",content:C},l(X,J),l(X,{role:"assistant",content:""}),c(!0);const R=new AbortController;n.current=R;try{await S(X,H,R)}catch($){if($ instanceof DOMException&&$.name==="AbortError")return;const ee=$ instanceof Error?$.message:"Unknown error";a(X,`
|
|
|
|
|
|
|
|
|
|
[Error: ${ee}]`)}finally{c(!1),n.current=null}},[l,a,b,c,S]),_=Q.useCallback(async C=>{const H=Ct.getState().activeConversationId;if(!H)return;const O=Ct.getState().conversations.find(R=>R.id===H);if(!O)return;const X=O.messages.length-1;O.messages[X]?.role==="assistant"&&s(H,X),l(H,{role:"assistant",content:""}),c(!0);const J=new AbortController;n.current=J;try{await S(H,C,J)}catch(R){if(R instanceof DOMException&&R.name==="AbortError")return;const $=R instanceof Error?R.message:"Unknown error";a(H,`
|
|
|
|
|
|
|
|
|
|
[Error: ${$}]`)}finally{c(!1),n.current=null}},[l,a,s,c,S]),T=Q.useCallback(()=>{n.current?.abort(),c(!1)},[c]);return{send:k,stop:T,regenerate:_,isStreaming:f}}function pb(n,l){const a={};return(n[n.length-1]===""?[...n,""]:n).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const gb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xb={};function $p(n,l){return(xb.jsx?yb:gb).test(n)}const vb=/[ \t\n\f\r]/g;function bb(n){return typeof n=="object"?n.type==="text"?eg(n.value):!1:eg(n)}function eg(n){return n.replace(vb,"")===""}class Pa{constructor(l,a,u){this.normal=a,this.property=l,u&&(this.space=u)}}Pa.prototype.normal={};Pa.prototype.property={};Pa.prototype.space=void 0;function cy(n,l){const a={},u={};for(const s of n)Object.assign(a,s.property),Object.assign(u,s.normal);return new Pa(a,u,l)}function Yc(n){return n.toLowerCase()}class Ut{constructor(l,a){this.attribute=a,this.property=l}}Ut.prototype.attribute="";Ut.prototype.booleanish=!1;Ut.prototype.boolean=!1;Ut.prototype.commaOrSpaceSeparated=!1;Ut.prototype.commaSeparated=!1;Ut.prototype.defined=!1;Ut.prototype.mustUseProperty=!1;Ut.prototype.number=!1;Ut.prototype.overloadedBoolean=!1;Ut.prototype.property="";Ut.prototype.spaceSeparated=!1;Ut.prototype.space=void 0;let Sb=0;const ke=Zi(),rt=Zi(),Ic=Zi(),te=Zi(),Ke=Zi(),Ql=Zi(),It=Zi();function Zi(){return 2**++Sb}const Xc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ke,booleanish:rt,commaOrSpaceSeparated:It,commaSeparated:Ql,number:te,overloadedBoolean:Ic,spaceSeparated:Ke},Symbol.toStringTag,{value:"Module"})),pc=Object.keys(Xc);class df extends Ut{constructor(l,a,u,s){let c=-1;if(super(l,a),tg(this,"space",s),typeof u=="number")for(;++c<pc.length;){const f=pc[c];tg(this,pc[c],(u&Xc[f])===Xc[f])}}}df.prototype.defined=!0;function tg(n,l,a){a&&(n[l]=a)}function Fl(n){const l={},a={};for(const[u,s]of Object.entries(n.properties)){const c=new df(u,n.transform(n.attributes||{},u),s,n.space);n.mustUseProperty&&n.mustUseProperty.includes(u)&&(c.mustUseProperty=!0),l[u]=c,a[Yc(u)]=u,a[Yc(c.attribute)]=u}return new Pa(l,a,n.space)}const fy=Fl({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:Ke,ariaCurrent:null,ariaDescribedBy:Ke,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:Ke,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:Ke,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ke,ariaLevel:te,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:Ke,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:Ke,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:rt,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null},transform(n,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function hy(n,l){return l in n?n[l]:l}function dy(n,l){return hy(n,l.toLowerCase())}const wb=Fl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ql,acceptCharset:Ke,accessKey:Ke,action:null,allow:null,allowFullScreen:ke,allowPaymentRequest:ke,allowUserMedia:ke,alt:null,as:null,async:ke,autoCapitalize:null,autoComplete:Ke,autoFocus:ke,autoPlay:ke,blocking:Ke,capture:null,charSet:null,checked:ke,cite:null,className:Ke,cols:te,colSpan:null,content:null,contentEditable:rt,controls:ke,controlsList:Ke,coords:te|Ql,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ke,defer:ke,dir:null,dirName:null,disabled:ke,download:Ic,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ke,formTarget:null,headers:Ke,height:te,hidden:Ic,high:te,href:null,hrefLang:null,htmlFor:Ke,httpEquiv:Ke,id:null,imageSizes:null,imageSrcSet:null,inert:ke,inputMode:null,integrity:null,is:null,isMap:ke,itemId:null,itemProp:Ke,itemRef:Ke,itemScope:ke,itemType:Ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ke,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:ke,muted:ke,name:null,nonce:null,noModule:ke,noValidate:ke,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,onEnd
Line truncated
|
|
|
|
|
`,m="/",x="*",y="",b="comment",S="declaration";function k(T,C){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];C=C||{};var H=1,O=1;function X(se){var K=se.match(l);K&&(H+=K.length);var D=se.lastIndexOf(g);O=~D?se.length-D:O+se.length}function J(){var se={line:H,column:O};return function(K){return K.position=new R(se),ie(),K}}function R(se){this.start=se,this.end={line:H,column:O},this.source=C.source}R.prototype.content=T;function $(se){var K=new Error(C.source+":"+H+":"+O+": "+se);if(K.reason=se,K.filename=C.source,K.line=H,K.column=O,K.source=T,!C.silent)throw K}function ee(se){var K=se.exec(T);if(K){var D=K[0];return X(D),T=T.slice(D.length),K}}function ie(){ee(a)}function U(se){var K;for(se=se||[];K=le();)K!==!1&&se.push(K);return se}function le(){var se=J();if(!(m!=T.charAt(0)||x!=T.charAt(1))){for(var K=2;y!=T.charAt(K)&&(x!=T.charAt(K)||m!=T.charAt(K+1));)++K;if(K+=2,y===T.charAt(K-1))return $("End of comment missing");var D=T.slice(2,K-2);return O+=2,X(D),T=T.slice(K),O+=2,se({type:b,comment:D})}}function Z(){var se=J(),K=ee(u);if(K){if(le(),!ee(s))return $("property missing ':'");var D=ee(c),W=se({type:S,property:_(K[0].replace(n,y)),value:D?_(D[0].replace(n,y)):y});return ee(f),W}}function me(){var se=[];U(se);for(var K;K=Z();)K!==!1&&(se.push(K),U(se));return se}return ie(),me()}function _(T){return T?T.replace(d,y):y}return gc=k,gc}var lg;function zb(){if(lg)return Ul;lg=1;var n=Ul&&Ul.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.default=a;const l=n(Ob());function a(u,s){let c=null;if(!u||typeof u!="string")return c;const f=(0,l.default)(u),d=typeof s=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:x}=g;d?s(m,x,g):x&&(c=c||{},c[m]=x)}),c}return Ul}var Qa={},ag;function Db(){if(ag)return Qa;ag=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||a.test(m)||n.test(m)},f=function(m,x){return x.toUpperCase()},d=function(m,x){return"".concat(x,"-")},g=function(m,x){return x===void 0&&(x={}),c(m)?m:(m=m.toLowerCase(),x.reactCompat?m=m.replace(s,d):m=m.replace(u,d),m.replace(l,f))};return Qa.camelCase=g,Qa}var Va,rg;function Rb(){if(rg)return Va;rg=1;var n=Va&&Va.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=n(zb()),a=Db();function u(s,c){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(d,g){d&&g&&(f[(0,a.camelCase)(d,c)]=g)}),f}return u.default=u,Va=u,Va}var Lb=Rb();const Ub=nf(Lb),yy=xy("end"),pf=xy("start");function xy(n){return l;function l(a){const u=a&&a.position&&a.position[n]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function Bb(n){const l=pf(n),a=yy(n);if(l&&a)return{start:l,end:a}}function Ya(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?ug(n.position):"start"in n||"end"in n?ug(n):"line"in n||"column"in n?Kc(n):""}function Kc(n){return sg(n&&n.line)+":"+sg(n&&n.column)}function ug(n){return Kc(n&&n.start)+"-"+Kc(n&&n.end)}function sg(n){return n&&typeof n=="number"?n:1}class vt extends Error{constructor(l,a,u){super(),typeof a=="string"&&(u=a,a=void 0);let s="",c={},f=!1;if(a&&("line"in a&&"column"in a?c={place:a}:"start"in a&&"end"in a?c={place:a}:"type"in a?c={ancestors:[a],place:a.position}:c={...a}),typeof l=="string"?s=l:!c.cause&&l&&(f=!0,s=l.message,c.cause=l),!c.ruleId&&!c.source&&typeof u=="string"){const g=u.indexOf(":");g===-1?c.ruleId=u:(c.source=u.slice(0,g),c.ruleId=u.slice(g+1))}if(!c.place&&c.ancestors&&c.ancestors){const g=c.ancestors[c.ancestors.length-1];g&&(c.place=g.position)}const d=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=Ya(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vt.prototype.file="";vt.prototype.name="";vt.prototype.reason="";vt.prototype.message="";vt.prototype.stack="";vt.prototype.column=void 0;vt.prototype.line=void 0;vt.prototype.ancestors=void 0;vt.prototype.cause=void 0;vt.prototype.fatal=void 0;vt.prototype.place=void 0;vt.prototype.ruleId=void 0;vt.prototype.source=void 0;const gf={}.hasOwnProperty,Hb=new Map,qb=/[A-Z]/g,Qb=new Set(["table","tbody","thead","tfoot","tr"]),Vb=new Set(["td","th"]),vy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Gb(n,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=l.filePath||vo
Line truncated
|
|
|
|
|
`;break}case-3:{f=`\r
|
|
|
|
|
`;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&s)continue;f=" ";break}default:f=String.fromCharCode(c)}s=c===-2,u.push(f)}return u.join("")}function PS(n){const u={constructs:Ey([XS,...(n||{}).extensions||[]]),content:s(h2),defined:[],document:s(m2),flow:s(OS),lazy:{},string:s(RS),text:s(LS)};return u;function s(c){return f;function f(d){return KS(u,c,d)}}}function WS(n){for(;!_y(n););return n}const xg=/[\0\t\n\r]/g;function $S(){let n=1,l="",a=!0,u;return s;function s(c,f,d){const g=[];let m,x,y,b,S;for(c=l+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),y=0,l="",a&&(c.charCodeAt(0)===65279&&y++,a=void 0);y<c.length;){if(xg.lastIndex=y,m=xg.exec(c),b=m&&m.index!==void 0?m.index:c.length,S=c.charCodeAt(b),!m){l=c.slice(y);break}if(S===10&&y===b&&u)g.push(-3),u=void 0;else switch(u&&(g.push(-5),u=void 0),y<b&&(g.push(c.slice(y,b)),n+=b-y),S){case 0:{g.push(65533),n++;break}case 9:{for(x=Math.ceil(n/4)*4,g.push(-2);n++<x;)g.push(-1);break}case 10:{g.push(-4),n=1;break}default:u=!0,n=1}y=b+1}return d&&(u&&g.push(-5),l&&g.push(l),g.push(null)),g}}const ew=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tw(n){return n.replace(ew,nw)}function nw(n,l,a){if(l)return l;if(a.charCodeAt(0)===35){const s=a.charCodeAt(1),c=s===120||s===88;return Cy(a.slice(c?2:1),c?16:10)}return bf(a)||n}const Ry={}.hasOwnProperty;function iw(n,l,a){return l&&typeof l=="object"&&(a=l,l=void 0),lw(a)(WS(PS(a).document().write($S()(n,l,!0))))}function lw(n){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(Pi),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:c(ve),blockQuote:c(Tt),characterEscape:ie,characterReference:ie,codeFenced:c(sn),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(sn,f),codeText:c(bt,f),codeTextData:ie,data:ie,codeFlowValue:ie,definition:c(Ji),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(on),hardBreakEscape:c(gn),hardBreakTrailing:c(gn),htmlFlow:c(tr,f),htmlFlowData:ie,htmlText:c(tr,f),htmlTextData:ie,image:c(nr),label:f,link:c(Pi),listItem:c(Il),listItemValue:b,listOrdered:c(Wi,y),listUnordered:c(Wi),paragraph:c(Yu),reference:E,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(ve),strong:c(Iu),thematicBreak:c(Xu)},exit:{atxHeading:g(),atxHeadingSequence:J,autolink:g(),autolinkEmail:Me,autolinkProtocol:He,blockQuote:g(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:ue,characterReference:xe,codeFenced:g(T),codeFencedFence:_,codeFencedFenceInfo:S,codeFencedFenceMeta:k,codeFlowValue:U,codeIndented:g(C),codeText:g(K),codeTextData:U,data:U,definition:g(),definitionDestinationString:X,definitionLabelString:H,definitionTitleString:O,emphasis:g(),hardBreakEscape:g(Z),hardBreakTrailing:g(Z),htmlFlow:g(me),htmlFlowData:U,htmlText:g(se),htmlTextData:U,image:g(W),label:de,labelText:oe,lineEnding:le,link:g(D),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:re,resourceDestinationString:j,resourceTitleString:M,resource:G,setextHeading:g(ee),setextHeadingLineSequence:$,setextHeadingText:R,strong:g(),thematicBreak:g()}};Ly(l,(n||{}).mdastExtensions||[]);const a={};return u;function u(Y){let ae={type:"root",children:[]};const ye={stack:[ae],tokenStack:[],config:l,enter:d,exit:m,buffer:f,resume:x,data:a},je=[];let Be=-1;for(;++Be<Y.length;)if(Y[Be][1].type==="listOrdered"||Y[Be][1].type==="listUnordered")if(Y[Be][0]==="enter")je.push(Be);else{const Bt=je.pop();Be=s(Y,Bt,Be)}for(Be=-1;++Be<Y.length;){const Bt=l[Y[Be][0]];Ry.call(Bt,Y[Be][1].type)&&Bt[Y[Be][1].type].call(Object.assign({sliceSerialize:Y[Be][2].sliceSerialize},ye),Y[Be][1])}if(ye.tokenStack.length>0){const Bt=ye.tokenStack[ye.tokenStack.length-1];(Bt[1]||vg).call(ye,void 0,Bt[0])}for(ae.position={start:yi(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:yi(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<l.transforms.length;)ae=l.transforms[Be](ae)||ae;return ae}function s(Y,ae,ye){let je=ae-1,Be=-1,Bt=!1,En,wt,ut,At;for(;++je<=ye;){const Ye=Y[je];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Be++:Be--,At=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(En&&!At&&!Be&&!ut&&(ut=je),At=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:At=void 0}if(!Be&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Be===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(En){let In=je;for(wt=void 0;In--;){const cn=Y[In];if(cn[1].type==="lineEnding"||cn[1].type==="lineEndingBlank"){if(cn[0]==="exit")continue;wt&&(Y[wt][1].type="lineEndingBlank",Bt=!0),cn[1].type="lineEnding",wt=In}else if(!(cn[1].type==="linePrefix"||cn[1].type==="blockQuotePrefix"||cn[1].type==="blockQuotePrefixWhitespace"||cn[Line truncated
|
|
|
|
|
`}]}function ow(n,l){const a=l.value?l.value+`
|
|
|
|
|
`:"",u={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(u.className=["language-"+s[0]]);let c={type:"element",tagName:"code",properties:u,children:[{type:"text",value:a}]};return l.meta&&(c.data={meta:l.meta}),n.patch(l,c),c=n.applyData(l,c),c={type:"element",tagName:"pre",properties:{},children:[c]},n.patch(l,c),c}function cw(n,l){const a={type:"element",tagName:"del",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function fw(n,l){const a={type:"element",tagName:"em",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function hw(n,l){const a=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",u=String(l.identifier).toUpperCase(),s=Yl(u.toLowerCase()),c=n.footnoteOrder.indexOf(u);let f,d=n.footnoteCounts.get(u);d===void 0?(d=0,n.footnoteOrder.push(u),f=n.footnoteOrder.length):f=c+1,d+=1,n.footnoteCounts.set(u,d);const g={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+s,id:a+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(l,g);const m={type:"element",tagName:"sup",properties:{},children:[g]};return n.patch(l,m),n.applyData(l,m)}function dw(n,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function mw(n,l){if(n.options.allowDangerousHtml){const a={type:"raw",value:l.value};return n.patch(l,a),n.applyData(l,a)}}function Uy(n,l){const a=l.referenceType;let u="]";if(a==="collapsed"?u+="[]":a==="full"&&(u+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+u}];const s=n.all(l),c=s[0];c&&c.type==="text"?c.value="["+c.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=u:s.push({type:"text",value:u}),s}function pw(n,l){const a=String(l.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return Uy(n,l);const s={src:Yl(u.url||""),alt:l.alt};u.title!==null&&u.title!==void 0&&(s.title=u.title);const c={type:"element",tagName:"img",properties:s,children:[]};return n.patch(l,c),n.applyData(l,c)}function gw(n,l){const a={src:Yl(l.url)};l.alt!==null&&l.alt!==void 0&&(a.alt=l.alt),l.title!==null&&l.title!==void 0&&(a.title=l.title);const u={type:"element",tagName:"img",properties:a,children:[]};return n.patch(l,u),n.applyData(l,u)}function yw(n,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};n.patch(l,a);const u={type:"element",tagName:"code",properties:{},children:[a]};return n.patch(l,u),n.applyData(l,u)}function xw(n,l){const a=String(l.identifier).toUpperCase(),u=n.definitionById.get(a);if(!u)return Uy(n,l);const s={href:Yl(u.url||"")};u.title!==null&&u.title!==void 0&&(s.title=u.title);const c={type:"element",tagName:"a",properties:s,children:n.all(l)};return n.patch(l,c),n.applyData(l,c)}function vw(n,l){const a={href:Yl(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const u={type:"element",tagName:"a",properties:a,children:n.all(l)};return n.patch(l,u),n.applyData(l,u)}function bw(n,l,a){const u=n.all(l),s=a?Sw(a):By(l),c={},f=[];if(typeof l.checked=="boolean"){const x=u[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},u.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let d=-1;for(;++d<u.length;){const x=u[d];(s||d!==0||x.type!=="element"||x.tagName!=="p")&&f.push({type:"text",value:`
|
|
|
|
|
`}),x.type==="element"&&x.tagName==="p"&&!s?f.push(...x.children):f.push(x)}const g=u[u.length-1];g&&(s||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
|
|
|
|
|
`});const m={type:"element",tagName:"li",properties:c,children:f};return n.patch(l,m),n.applyData(l,m)}function Sw(n){let l=!1;if(n.type==="list"){l=n.spread||!1;const a=n.children;let u=-1;for(;!l&&++u<a.length;)l=By(a[u])}return l}function By(n){const l=n.spread;return l??n.children.length>1}function ww(n,l){const a={},u=n.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(a.start=l.start);++s<u.length;){const f=u[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const c={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:n.wrap(u,!0)};return n.patch(l,c),n.applyData(l,c)}function kw(n,l){const a={type:"element",tagName:"p",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function Ew(n,l){const a={type:"root",children:n.wrap(n.all(l))};return n.patch(l,a),n.applyData(l,a)}function Cw(n,l){const a={type:"element",tagName:"strong",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}function jw(n,l){const a=n.all(l),u=a.shift(),s=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([u],!0)};n.patch(l.children[0],f),s.push(f)}if(a.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(a,!0)},d=pf(l.children[1]),g=yy(l.children[l.children.length-1]);d&&g&&(f.position={start:d,end:g}),s.push(f)}const c={type:"element",tagName:"table",properties:{},children:n.wrap(s,!0)};return n.patch(l,c),n.applyData(l,c)}function Tw(n,l,a){const u=a?a.children:void 0,c=(u?u.indexOf(l):1)===0?"th":"td",f=a&&a.type==="table"?a.align:void 0,d=f?f.length:l.children.length;let g=-1;const m=[];for(;++g<d;){const y=l.children[g],b={},S=f?f[g]:void 0;S&&(b.align=S);let k={type:"element",tagName:c,properties:b,children:[]};y&&(k.children=n.all(y),n.patch(y,k),k=n.applyData(y,k)),m.push(k)}const x={type:"element",tagName:"tr",properties:{},children:n.wrap(m,!0)};return n.patch(l,x),n.applyData(l,x)}function Aw(n,l){const a={type:"element",tagName:"td",properties:{},children:n.all(l)};return n.patch(l,a),n.applyData(l,a)}const bg=9,Sg=32;function _w(n){const l=String(n),a=/\r?\n|\r/g;let u=a.exec(l),s=0;const c=[];for(;u;)c.push(wg(l.slice(s,u.index),s>0,!0),u[0]),s=u.index+u[0].length,u=a.exec(l);return c.push(wg(l.slice(s),s>0,!1)),c.join("")}function wg(n,l,a){let u=0,s=n.length;if(l){let c=n.codePointAt(u);for(;c===bg||c===Sg;)u++,c=n.codePointAt(u)}if(a){let c=n.codePointAt(s-1);for(;c===bg||c===Sg;)s--,c=n.codePointAt(s-1)}return s>u?n.slice(u,s):""}function Mw(n,l){const a={type:"text",value:_w(String(l.value))};return n.patch(l,a),n.applyData(l,a)}function Nw(n,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(l,a),n.applyData(l,a)}const Ow={blockquote:uw,break:sw,code:ow,delete:cw,emphasis:fw,footnoteReference:hw,heading:dw,html:mw,imageReference:pw,image:gw,inlineCode:yw,linkReference:xw,link:vw,listItem:bw,list:ww,paragraph:kw,root:Ew,strong:Cw,table:jw,tableCell:Aw,tableRow:Tw,text:Mw,thematicBreak:Nw,toml:Su,yaml:Su,definition:Su,footnoteDefinition:Su};function Su(){}const Hy=-1,Vu=0,Xa=1,Ru=2,wf=3,kf=4,Ef=5,Cf=6,qy=7,Qy=8,kg=typeof self=="object"?self:globalThis,zw=(n,l)=>{const a=(s,c)=>(n.set(c,s),s),u=s=>{if(n.has(s))return n.get(s);const[c,f]=l[s];switch(c){case Vu:case Hy:return a(f,s);case Xa:{const d=a([],s);for(const g of f)d.push(u(g));return d}case Ru:{const d=a({},s);for(const[g,m]of f)d[u(g)]=u(m);return d}case wf:return a(new Date(f),s);case kf:{const{source:d,flags:g}=f;return a(new RegExp(d,g),s)}case Ef:{const d=a(new Map,s);for(const[g,m]of f)d.set(u(g),u(m));return d}case Cf:{const d=a(new Set,s);for(const g of f)d.add(u(g));return d}case qy:{const{name:d,message:g}=f;return a(new kg[d](g),s)}case Qy:return a(BigInt(f),s);case"BigInt":return a(Object(BigInt(f)),s);case"ArrayBuffer":return a(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:d}=new Uint8Array(f);return a(new DataView(d),f)}}return a(new kg[c](f),s)};return u},Eg=n=>zw(new Map,n)(0),Bl="",{toString:Dw}={},{keys:Rw}=Object,Fa=n=>{const l=typeof n;if(l!=="object"||!n)return[Vu,l];const a=Dw.call(n).slice(8,-1);switch(a){case"Array":return[Xa,Bl];case"Object":return[Ru,Bl];case"Date":return[wf,Bl];case"RegExp":return[kf,Bl];case"Map":return[Ef,Bl];case"Set":return[Cf,Bl];case"DataView":return[Xa,a]}return a.includes("Array")?[Xa,a]:a.includes("Error")?[qy,a]:[Ru,a]},wu=([n,l])=>n===Vu&&(l==="function"||l==="symbol"),Lw=(n,l,a,u)=>{const s=(f,d)=>{const g=u.push(f)-1;return a.set(d,g),g},c=f=>{if(a.has(f))return a.get(f);let[d,g]=Fa(f);switch(d){case Vu:{let x=f;switch(g){case"bigint":d=Qy,x=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+g);x=null;break;case"undefined":return s([Hy],f)}return s([d,x],f)}case Xa:{if(g){let b=f;return g==="DataView"?b=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(b=new Uint8Array(
Line truncated
|
|
|
|
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(d,!0)},{type:"text",value:`
|
|
|
|
|
`}]}}const Gu=(function(n){if(n==null)return Gw;if(typeof n=="function")return Fu(n);if(typeof n=="object")return Array.isArray(n)?qw(n):Qw(n);if(typeof n=="string")return Vw(n);throw new Error("Expected function, string, or object as test")});function qw(n){const l=[];let a=-1;for(;++a<n.length;)l[a]=Gu(n[a]);return Fu(u);function u(...s){let c=-1;for(;++c<l.length;)if(l[c].apply(this,s))return!0;return!1}}function Qw(n){const l=n;return Fu(a);function a(u){const s=u;let c;for(c in n)if(s[c]!==l[c])return!1;return!0}}function Vw(n){return Fu(l);function l(a){return a&&a.type===n}}function Fu(n){return l;function l(a,u,s){return!!(Fw(a)&&n.call(this,a,typeof u=="number"?u:void 0,s||void 0))}}function Gw(){return!0}function Fw(n){return n!==null&&typeof n=="object"&&"type"in n}const Vy=[],Yw=!0,Pc=!1,Iw="skip";function Gy(n,l,a,u){let s;typeof l=="function"&&typeof a!="function"?(u=a,a=l):s=l;const c=Gu(s),f=u?-1:1;d(n,void 0,[])();function d(g,m,x){const y=g&&typeof g=="object"?g:{};if(typeof y.type=="string"){const S=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(g.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=Vy,k,_,T;if((!l||c(g,m,x[x.length-1]||void 0))&&(S=Xw(a(g,x)),S[0]===Pc))return S;if("children"in g&&g.children){const C=g;if(C.children&&S[0]!==Iw)for(_=(u?C.children.length:-1)+f,T=x.concat(C);_>-1&&_<C.children.length;){const H=C.children[_];if(k=d(H,_,T)(),k[0]===Pc)return k;_=typeof k[1]=="number"?k[1]:_+f}}return S}}}function Xw(n){return Array.isArray(n)?n:typeof n=="number"?[Yw,n]:n==null?Vy:[n]}function jf(n,l,a,u){let s,c,f;typeof l=="function"&&typeof a!="function"?(c=void 0,f=l,s=a):(c=l,f=a,s=u),Gy(n,c,d,s);function d(g,m){const x=m[m.length-1],y=x?x.children.indexOf(g):void 0;return f(g,y,x)}}const Wc={}.hasOwnProperty,Kw={};function Zw(n,l){const a=l||Kw,u=new Map,s=new Map,c=new Map,f={...Ow,...a.handlers},d={all:m,applyData:Pw,definitionById:u,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:f,one:g,options:a,patch:Jw,wrap:$w};return jf(n,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?u:s,b=String(x.identifier).toUpperCase();y.has(b)||y.set(b,x)}}),d;function g(x,y){const b=x.type,S=d.handlers[b];if(Wc.call(d.handlers,b)&&S)return S(d,x,y);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in x){const{children:_,...T}=x,C=Lu(T);return C.children=d.all(x),C}return Lu(x)}return(d.options.unknownHandler||Ww)(d,x,y)}function m(x){const y=[];if("children"in x){const b=x.children;let S=-1;for(;++S<b.length;){const k=d.one(b[S],x);if(k){if(S&&b[S-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=jg(k.value)),!Array.isArray(k)&&k.type==="element")){const _=k.children[0];_&&_.type==="text"&&(_.value=jg(_.value))}Array.isArray(k)?y.push(...k):y.push(k)}}}return y}}function Jw(n,l){n.position&&(l.position=Bb(n))}function Pw(n,l){let a=l;if(n&&n.data){const u=n.data.hName,s=n.data.hChildren,c=n.data.hProperties;if(typeof u=="string")if(a.type==="element")a.tagName=u;else{const f="children"in a?a.children:[a];a={type:"element",tagName:u,properties:{},children:f}}a.type==="element"&&c&&Object.assign(a.properties,Lu(c)),"children"in a&&a.children&&s!==null&&s!==void 0&&(a.children=s)}return a}function Ww(n,l){const a=l.data||{},u="value"in l&&!(Wc.call(a,"hProperties")||Wc.call(a,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:n.all(l)};return n.patch(l,u),n.applyData(l,u)}function $w(n,l){const a=[];let u=-1;for(l&&a.push({type:"text",value:`
|
|
|
|
|
`});++u<n.length;)u&&a.push({type:"text",value:`
|
|
|
|
|
`}),a.push(n[u]);return l&&n.length>0&&a.push({type:"text",value:`
|
|
|
|
|
`}),a}function jg(n){let l=0,a=n.charCodeAt(l);for(;a===9||a===32;)l++,a=n.charCodeAt(l);return n.slice(l)}function Tg(n,l){const a=Zw(n,l),u=a.one(n,void 0),s=Hw(a),c=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
|
|
|
|
|
`},s),c}function ek(n,l){return n&&"run"in n?async function(a,u){const s=Tg(a,{file:u,...l});await n.run(s,u)}:function(a,u){return Tg(a,{file:u,...n||l})}}function Ag(n){if(n)throw n}var bc,_g;function tk(){if(_g)return bc;_g=1;var n=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},c=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var x=n.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&n.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var b;for(b in m);return typeof b>"u"||n.call(m,b)},f=function(m,x){a&&x.name==="__proto__"?a(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},d=function(m,x){if(x==="__proto__")if(n.call(m,x)){if(u)return u(m,x).value}else return;return m[x]};return bc=function g(){var m,x,y,b,S,k,_=arguments[0],T=1,C=arguments.length,H=!1;for(typeof _=="boolean"&&(H=_,_=arguments[1]||{},T=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});T<C;++T)if(m=arguments[T],m!=null)for(x in m)y=d(_,x),b=d(m,x),_!==b&&(H&&b&&(c(b)||(S=s(b)))?(S?(S=!1,k=y&&s(y)?y:[]):k=y&&c(y)?y:{},f(_,{name:x,newValue:g(H,k,b)})):typeof b<"u"&&f(_,{name:x,newValue:b}));return _},bc}var nk=tk();const Sc=nf(nk);function $c(n){if(typeof n!="object"||n===null)return!1;const l=Object.getPrototypeOf(n);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function ik(){const n=[],l={run:a,use:u};return l;function a(...s){let c=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);d(null,...s);function d(g,...m){const x=n[++c];let y=-1;if(g){f(g);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,x?lk(x,d)(...m):f(null,...m)}}function u(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return n.push(s),l}}function lk(n,l){let a;return u;function u(...f){const d=n.length>f.length;let g;d&&f.push(s);try{g=n.apply(this,f)}catch(m){const x=m;if(d&&a)throw x;return s(x)}d||(g&&g.then&&typeof g.then=="function"?g.then(c,s):g instanceof Error?s(g):c(g))}function s(f,...d){a||(a=!0,l(f,...d))}function c(f){s(null,f)}}const Sn={basename:ak,dirname:rk,extname:uk,join:sk,sep:"/"};function ak(n,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');$a(n);let a=0,u=-1,s=n.length,c;if(l===void 0||l.length===0||l.length>n.length){for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else u<0&&(c=!0,u=s+1);return u<0?"":n.slice(a,u)}if(l===n)return"";let f=-1,d=l.length-1;for(;s--;)if(n.codePointAt(s)===47){if(c){a=s+1;break}}else f<0&&(c=!0,f=s+1),d>-1&&(n.codePointAt(s)===l.codePointAt(d--)?d<0&&(u=s):(d=-1,u=f));return a===u?u=f:u<0&&(u=n.length),n.slice(a,u)}function rk(n){if($a(n),n.length===0)return".";let l=-1,a=n.length,u;for(;--a;)if(n.codePointAt(a)===47){if(u){l=a;break}}else u||(u=!0);return l<0?n.codePointAt(0)===47?"/":".":l===1&&n.codePointAt(0)===47?"//":n.slice(0,l)}function uk(n){$a(n);let l=n.length,a=-1,u=0,s=-1,c=0,f;for(;l--;){const d=n.codePointAt(l);if(d===47){if(f){u=l+1;break}continue}a<0&&(f=!0,a=l+1),d===46?s<0?s=l:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||a<0||c===0||c===1&&s===a-1&&s===u+1?"":n.slice(s,a)}function sk(...n){let l=-1,a;for(;++l<n.length;)$a(n[l]),n[l]&&(a=a===void 0?n[l]:a+"/"+n[l]);return a===void 0?".":ok(a)}function ok(n){$a(n);const l=n.codePointAt(0)===47;let a=ck(n,!l);return a.length===0&&!l&&(a="."),a.length>0&&n.codePointAt(n.length-1)===47&&(a+="/"),l?"/"+a:a}function ck(n,l){let a="",u=0,s=-1,c=0,f=-1,d,g;for(;++f<=n.length;){if(f<n.length)d=n.codePointAt(f);else{if(d===47)break;d=47}if(d===47){if(!(s===f-1||c===1))if(s!==f-1&&c===2){if(a.length<2||u!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(g=a.lastIndexOf("/"),g!==a.length-1){g<0?(a="",u=0):(a=a.slice(0,g),u=a.length-1-a.lastIndexOf("/")),s=f,c=0;continue}}else if(a.length>0){a="",u=0,s=f,c=0;continue}}l&&(a=a.length>0?a+"/..":"..",u=2)}else a.length>0?a+="/"+n.slice(s+1,f):a=n.slice(s+1,f),u=f-s-1;s=f,c=0}else d===46&&c>-1?c++:c=-1}return a}function $a(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const fk={cwd:hk};function hk(){return"/"}function ef(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function dk(n){if(typeof n=="string")n=new URL(n);else if(!ef(n)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(n.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return mk(n)}function mk(n){if(n.hostname!==""){consLine truncated
|
|
|
|
|
`:" ")+c.indentLines(c.containerFlow(u,d.current()),l?Ky:iE))),m(),g}}function iE(n,l,a){return l===0?n:Ky(n,l,a)}function Ky(n,l,a){return(a?"":" ")+n}const lE=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zy.peek=oE;function aE(){return{canContainEols:["delete"],enter:{strikethrough:uE},exit:{strikethrough:sE}}}function rE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lE}],handlers:{delete:Zy}}}function uE(n){this.enter({type:"delete",children:[]},n)}function sE(n){this.exit(n)}function Zy(n,l,a,u){const s=a.createTracker(u),c=a.enter("strikethrough");let f=s.move("~~");return f+=a.containerPhrasing(n,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),c(),f}function oE(){return"~"}function cE(n){return n.length}function fE(n,l){const a=l||{},u=(a.align||[]).concat(),s=a.stringLength||cE,c=[],f=[],d=[],g=[];let m=0,x=-1;for(;++x<n.length;){const _=[],T=[];let C=-1;for(n[x].length>m&&(m=n[x].length);++C<n[x].length;){const H=hE(n[x][C]);if(a.alignDelimiters!==!1){const O=s(H);T[C]=O,(g[C]===void 0||O>g[C])&&(g[C]=O)}_.push(H)}f[x]=_,d[x]=T}let y=-1;if(typeof u=="object"&&"length"in u)for(;++y<m;)c[y]=Lg(u[y]);else{const _=Lg(u);for(;++y<m;)c[y]=_}y=-1;const b=[],S=[];for(;++y<m;){const _=c[y];let T="",C="";_===99?(T=":",C=":"):_===108?T=":":_===114&&(C=":");let H=a.alignDelimiters===!1?1:Math.max(1,g[y]-T.length-C.length);const O=T+"-".repeat(H)+C;a.alignDelimiters!==!1&&(H=T.length+H+C.length,H>g[y]&&(g[y]=H),S[y]=H),b[y]=O}f.splice(1,0,b),d.splice(1,0,S),x=-1;const k=[];for(;++x<f.length;){const _=f[x],T=d[x];y=-1;const C=[];for(;++y<m;){const H=_[y]||"";let O="",X="";if(a.alignDelimiters!==!1){const J=g[y]-(T[y]||0),R=c[y];R===114?O=" ".repeat(J):R===99?J%2?(O=" ".repeat(J/2+.5),X=" ".repeat(J/2-.5)):(O=" ".repeat(J/2),X=O):X=" ".repeat(J)}a.delimiterStart!==!1&&!y&&C.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&H==="")&&(a.delimiterStart!==!1||y)&&C.push(" "),a.alignDelimiters!==!1&&C.push(O),C.push(H),a.alignDelimiters!==!1&&C.push(X),a.padding!==!1&&C.push(" "),(a.delimiterEnd!==!1||y!==m-1)&&C.push("|")}k.push(a.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return k.join(`
|
|
|
|
|
`)}function hE(n){return n==null?"":String(n)}function Lg(n){const l=typeof n=="string"?n.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function dE(n,l,a,u){const s=a.enter("blockquote"),c=a.createTracker(u);c.move("> "),c.shift(2);const f=a.indentLines(a.containerFlow(n,c.current()),mE);return s(),f}function mE(n,l,a){return">"+(a?"":" ")+n}function pE(n,l){return Ug(n,l.inConstruct,!0)&&!Ug(n,l.notInConstruct,!1)}function Ug(n,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let u=-1;for(;++u<l.length;)if(n.includes(l[u]))return!0;return!1}function Bg(n,l,a,u){let s=-1;for(;++s<a.unsafe.length;)if(a.unsafe[s].character===`
|
|
|
|
|
`&&pE(a.stack,a.unsafe[s]))return/[ \t]/.test(u.before)?"":" ";return`\\
|
|
|
|
|
`}function gE(n,l){const a=String(n);let u=a.indexOf(l),s=u,c=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===s?++c>f&&(f=c):c=1,s=u+l.length,u=a.indexOf(l,s);return f}function yE(n,l){return!!(l.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function xE(n){const l=n.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function vE(n,l,a,u){const s=xE(a),c=n.value||"",f=s==="`"?"GraveAccent":"Tilde";if(yE(n,a)){const y=a.enter("codeIndented"),b=a.indentLines(c,bE);return y(),b}const d=a.createTracker(u),g=s.repeat(Math.max(gE(c,s)+1,3)),m=a.enter("codeFenced");let x=d.move(g);if(n.lang){const y=a.enter(`codeFencedLang${f}`);x+=d.move(a.safe(n.lang,{before:x,after:" ",encode:["`"],...d.current()})),y()}if(n.lang&&n.meta){const y=a.enter(`codeFencedMeta${f}`);x+=d.move(" "),x+=d.move(a.safe(n.meta,{before:x,after:`
|
|
|
|
|
`,encode:["`"],...d.current()})),y()}return x+=d.move(`
|
|
|
|
|
`),c&&(x+=d.move(c+`
|
|
|
|
|
`)),x+=d.move(g),m(),x}function bE(n,l,a){return(a?"":" ")+n}function Af(n){const l=n.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function SE(n,l,a,u){const s=Af(a),c=s==='"'?"Quote":"Apostrophe",f=a.enter("definition");let d=a.enter("label");const g=a.createTracker(u);let m=g.move("[");return m+=g.move(a.safe(a.associationId(n),{before:m,after:"]",...g.current()})),m+=g.move("]: "),d(),!n.url||/[\0- \u007F]/.test(n.url)?(d=a.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(a.safe(n.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(d=a.enter("destinationRaw"),m+=g.move(a.safe(n.url,{before:m,after:n.title?" ":`
|
|
|
|
|
`,...g.current()}))),d(),n.title&&(d=a.enter(`title${c}`),m+=g.move(" "+s),m+=g.move(a.safe(n.title,{before:m,after:s,...g.current()})),m+=g.move(s),d()),f(),m}function wE(n){const l=n.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Ja(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Uu(n,l,a){const u=Vl(n),s=Vl(l);return u===void 0?s===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Jy.peek=kE;function Jy(n,l,a,u){const s=wE(a),c=a.enter("emphasis"),f=a.createTracker(u),d=f.move(s);let g=f.move(a.containerPhrasing(n,{after:s,before:d,...f.current()}));const m=g.charCodeAt(0),x=Uu(u.before.charCodeAt(u.before.length-1),m,s);x.inside&&(g=Ja(m)+g.slice(1));const y=g.charCodeAt(g.length-1),b=Uu(u.after.charCodeAt(0),y,s);b.inside&&(g=g.slice(0,-1)+Ja(y));const S=f.move(s);return c(),a.attentionEncodeSurroundingInfo={after:b.outside,before:x.outside},d+g+S}function kE(n,l,a){return a.options.emphasis||"*"}function EE(n,l){let a=!1;return jf(n,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return a=!0,Pc}),!!((!n.depth||n.depth<3)&&vf(n)&&(l.options.setext||a))}function CE(n,l,a,u){const s=Math.max(Math.min(6,n.depth||1),1),c=a.createTracker(u);if(EE(n,a)){const x=a.enter("headingSetext"),y=a.enter("phrasing"),b=a.containerPhrasing(n,{...c.current(),before:`
|
|
|
|
|
`,after:`
|
|
|
|
|
`});return y(),x(),b+`
|
|
|
|
|
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
|
|
|
`))+1))}const f="#".repeat(s),d=a.enter("headingAtx"),g=a.enter("phrasing");c.move(f+" ");let m=a.containerPhrasing(n,{before:"# ",after:`
|
|
|
|
|
`,...c.current()});return/^[\t ]/.test(m)&&(m=Ja(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,a.options.closeAtx&&(m+=" "+f),g(),d(),m}Py.peek=jE;function Py(n){return n.value||""}function jE(){return"<"}Wy.peek=TE;function Wy(n,l,a,u){const s=Af(a),c=s==='"'?"Quote":"Apostrophe",f=a.enter("image");let d=a.enter("label");const g=a.createTracker(u);let m=g.move("![");return m+=g.move(a.safe(n.alt,{before:m,after:"]",...g.current()})),m+=g.move("]("),d(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(d=a.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(a.safe(n.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(d=a.enter("destinationRaw"),m+=g.move(a.safe(n.url,{before:m,after:n.title?" ":")",...g.current()}))),d(),n.title&&(d=a.enter(`title${c}`),m+=g.move(" "+s),m+=g.move(a.safe(n.title,{before:m,after:s,...g.current()})),m+=g.move(s),d()),m+=g.move(")"),f(),m}function TE(){return"!"}$y.peek=AE;function $y(n,l,a,u){const s=n.referenceType,c=a.enter("imageReference");let f=a.enter("label");const d=a.createTracker(u);let g=d.move("![");const m=a.safe(n.alt,{before:g,after:"]",...d.current()});g+=d.move(m+"]["),f();const x=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:g,after:"]",...d.current()});return f(),a.stack=x,c(),s==="full"||!m||m!==y?g+=d.move(y+"]"):s==="shortcut"?g=g.slice(0,-1):g+=d.move("]"),g}function AE(){return"!"}ex.peek=_E;function ex(n,l,a){let u=n.value||"",s="`",c=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(u);)s+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++c<a.unsafe.length;){const f=a.unsafe[c],d=a.compilePattern(f);let g;if(f.atBreak)for(;g=d.exec(u);){let m=g.index;u.charCodeAt(m)===10&&u.charCodeAt(m-1)===13&&m--,u=u.slice(0,m)+" "+u.slice(g.index+1)}}return s+u+s}function _E(){return"`"}function tx(n,l){const a=vf(n);return!!(!l.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(a===n.url||"mailto:"+a===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}nx.peek=ME;function nx(n,l,a,u){const s=Af(a),c=s==='"'?"Quote":"Apostrophe",f=a.createTracker(u);let d,g;if(tx(n,a)){const x=a.stack;a.stack=[],d=a.enter("autolink");let y=f.move("<");return y+=f.move(a.containerPhrasing(n,{before:y,after:">",...f.current()})),y+=f.move(">"),d(),a.stack=x,y}d=a.enter("link"),g=a.enter("label");let m=f.move("[");return m+=f.move(a.containerPhrasing(n,{before:m,after:"](",...f.current()})),m+=f.move("]("),g(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(g=a.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(a.safe(n.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(g=a.enter("destinationRaw"),m+=f.move(a.safe(n.url,{before:m,after:n.title?" ":")",...f.current()}))),g(),n.title&&(g=a.enter(`title${c}`),m+=f.move(" "+s),m+=f.move(a.safe(n.title,{before:m,after:s,...f.current()})),m+=f.move(s),g()),m+=f.move(")"),d(),m}function ME(n,l,a){return tx(n,a)?"<":"["}ix.peek=NE;function ix(n,l,a,u){const s=n.referenceType,c=a.enter("linkReference");let f=a.enter("label");const d=a.createTracker(u);let g=d.move("[");const m=a.containerPhrasing(n,{before:g,after:"]",...d.current()});g+=d.move(m+"]["),f();const x=a.stack;a.stack=[],f=a.enter("reference");const y=a.safe(a.associationId(n),{before:g,after:"]",...d.current()});return f(),a.stack=x,c(),s==="full"||!m||m!==y?g+=d.move(y+"]"):s==="shortcut"?g=g.slice(0,-1):g+=d.move("]"),g}function NE(){return"["}function _f(n){const l=n.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function OE(n){const l=_f(n),a=n.options.bulletOther;if(!a)return l==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+a+"`) to be different");return a}function zE(n){const l=n.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function lx(n){const l=n.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function DE(n,l,a,u){const s=a.enter("list"),c=a.bulletCurrent;let f=n.ordered?zE(a):_f(a);const d=n.ordered?f==="."?")":".":OE(a);let g=l&&a.bulletLastUsed?f===a.bulletLastUsed:!1;if(!n.ordered){const x=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&x&&(!x.children||!x.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(g=!0),lx(a)===f&&x){let y=-1;for(;++y<n.chilLine truncated
|
|
|
|
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:f,tableCell:g,tableRow:d}};function f(S,k,_,T){return m(x(S,_,T),S.align)}function d(S,k,_,T){const C=y(S,_,T),H=m([C]);return H.slice(0,H.indexOf(`
|
|
|
|
|
`))}function g(S,k,_,T){const C=_.enter("tableCell"),H=_.enter("phrasing"),O=_.containerPhrasing(S,{...T,before:c,after:c});return H(),C(),O}function m(S,k){return fE(S,{align:k,alignDelimiters:u,padding:a,stringLength:s})}function x(S,k,_){const T=S.children;let C=-1;const H=[],O=k.enter("table");for(;++C<T.length;)H[C]=y(T[C],k,_);return O(),H}function y(S,k,_){const T=S.children;let C=-1;const H=[],O=k.enter("tableRow");for(;++C<T.length;)H[C]=g(T[C],S,k,_);return O(),H}function b(S,k,_){let T=rx.inlineCode(S,k,_);return _.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function WE(){return{exit:{taskListCheckValueChecked:qg,taskListCheckValueUnchecked:qg,paragraph:eC}}}function $E(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tC}}}function qg(n){const l=this.stack[this.stack.length-2];l.type,l.checked=n.type==="taskListCheckValueChecked"}function eC(n){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const u=a.children[0];if(u&&u.type==="text"){const s=l.children;let c=-1,f;for(;++c<s.length;){const d=s[c];if(d.type==="paragraph"){f=d;break}}f===a&&(u.value=u.value.slice(1),u.value.length===0?a.children.shift():a.position&&u.position&&typeof u.position.start.offset=="number"&&(u.position.start.column++,u.position.start.offset++,a.position.start=Object.assign({},u.position.start)))}}this.exit(n)}function tC(n,l,a,u){const s=n.children[0],c=typeof n.checked=="boolean"&&s&&s.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",d=a.createTracker(u);c&&d.move(f);let g=rx.listItem(n,l,a,{...u,...d.current()});return c&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(x){return x+f}}function nC(){return[Dk(),tE(),aE(),YE(),WE()]}function iC(n){return{extensions:[Rk(),nE(n),rE(),PE(n),$E()]}}const lC={tokenize:cC,partial:!0},ux={tokenize:fC,partial:!0},sx={tokenize:hC,partial:!0},ox={tokenize:dC,partial:!0},aC={tokenize:mC,partial:!0},cx={name:"wwwAutolink",tokenize:sC,previous:hx},fx={name:"protocolAutolink",tokenize:oC,previous:dx},Yn={name:"emailAutolink",tokenize:uC,previous:mx},kn={};function rC(){return{text:kn}}let qi=48;for(;qi<123;)kn[qi]=Yn,qi++,qi===58?qi=65:qi===91&&(qi=97);kn[43]=Yn;kn[45]=Yn;kn[46]=Yn;kn[95]=Yn;kn[72]=[Yn,fx];kn[104]=[Yn,fx];kn[87]=[Yn,cx];kn[119]=[Yn,cx];function uC(n,l,a){const u=this;let s,c;return f;function f(y){return!tf(y)||!mx.call(u,u.previous)||Mf(u.events)?a(y):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),d(y))}function d(y){return tf(y)?(n.consume(y),d):y===64?(n.consume(y),g):a(y)}function g(y){return y===46?n.check(aC,x,m)(y):y===45||y===95||xt(y)?(c=!0,n.consume(y),g):x(y)}function m(y){return n.consume(y),s=!0,g}function x(y){return c&&s&&jt(u.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),l(y)):a(y)}}function sC(n,l,a){const u=this;return s;function s(f){return f!==87&&f!==119||!hx.call(u,u.previous)||Mf(u.events)?a(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(lC,n.attempt(ux,n.attempt(sx,c),a),a)(f))}function c(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),l(f)}}function oC(n,l,a){const u=this;let s="",c=!1;return f;function f(y){return(y===72||y===104)&&dx.call(u,u.previous)&&!Mf(u.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),n.consume(y),d):a(y)}function d(y){if(jt(y)&&s.length<5)return s+=String.fromCodePoint(y),n.consume(y),d;if(y===58){const b=s.toLowerCase();if(b==="http"||b==="https")return n.consume(y),g}return a(y)}function g(y){return y===47?(n.consume(y),c?m:(c=!0,g)):a(y)}function m(y){return y===null||Du(y)||Xe(y)||Xi(y)||qu(y)?a(y):n.attempt(ux,n.attempt(sx,x),a)(y)}function x(y){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),l(y)}}function cC(n,l,a){let u=0;return s;function s(f){return(f===87||f===119)&&u<3?(u++,n.consume(f),s):f===46&&u===3?(n.consume(f),c):a(f)}function c(f){return f===null?a(f):l(f)}}function fC(n,l,a){let u,s,c;return f;function f(m){return m===46||m===95?n.check(ox,g,d)(m):m===null||Xe(m)||Xi(m)||m!==45&&qu(m)?g(m):(c=!0,n.consume(m),f)}function d(m){return m===95?u=!0:(s=u,u=void 0),n.consume(m),f}function g(m){return s||u||!c?a(m):l(m)}}function hC(n,l){let a=0,u=0;return s;function s(f){return f===40?(a++,n.consume(f),s):f===41&&u<a?c(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(ox,l,c)(f):f===null||Xe(f)||Xi(f)?l(f):(n.consume(f),s)}function c(f){return f===41&&u++,n.consume(f),s}}function dC(n,l,a){return u;function u(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(n.consume(d),u):d===38?(n.consume(d),c):d===93?(n.consume(d),s):d===60||d===null||Xe(d)||Xi(d)?l(d):a(d)}function s(d){return d===null||d===40||d===91||Xe(d)||Xi(d)?l(d):u(d)}function c(d){return jt(d)?f(d):a(d)}function f(d){re
Line truncated
|
|
|
|
|
`)?p.jsx("code",{className:l,...a,children:n}):p.jsxs("div",{className:"relative group/code",children:[s&&p.jsx("div",{className:"absolute top-0 left-0 px-3 py-1.5 text-[13px] text-white/15 font-mono uppercase tracking-wider select-none",children:s}),p.jsx("button",{onClick:()=>{navigator.clipboard.writeText(c),d(!0),setTimeout(()=>d(!1),1500)},className:"absolute top-1.5 right-1.5 px-2 py-1 text-[13px] font-medium text-white/15 hover:text-white/40 bg-white/[0.03] hover:bg-white/[0.06] rounded-md transition-all opacity-0 group-hover/code:opacity-100",children:f?"Copied":"Copy"}),p.jsx("code",{className:l,...a,children:n})]})}function QC(n){if(typeof n=="string")return{text:n,images:[]};let l="";const a=[];for(const u of n)u.type==="text"&&u.text&&(l+=u.text),u.type==="image_url"&&u.image_url?.url&&a.push(u.image_url.url);return{text:l,images:a}}function VC({message:n,onCopy:l,onDelete:a,onRegenerate:u}){const[s,c]=Q.useState(!1),[f,d]=Q.useState(!1),[g,m]=Q.useState(!1),x=n.role==="user",{text:y,images:b}=QC(n.content),S=()=>{navigator.clipboard.writeText(y),d(!0),l(),setTimeout(()=>d(!1),1500)},k=p.jsxs("div",{className:`flex items-center gap-0.5 h-6 transition-opacity duration-150 ${s?"opacity-100":"opacity-0"}`,children:[p.jsx(Oc,{label:f?"Copied":"Copy",onClick:S,children:f?p.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M20 6L9 17l-5-5"})}):p.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2"}),p.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})}),!x&&u&&p.jsx(Oc,{label:"Regenerate",onClick:u,children:p.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M1 4v6h6"}),p.jsx("path",{d:"M3.51 15a9 9 0 102.13-9.36L1 10"})]})}),p.jsx(Oc,{label:"Delete",onClick:a,children:p.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"})})})]});return x?p.jsx("div",{className:"flex justify-end",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:p.jsxs("div",{className:"flex items-end gap-1.5 max-w-[78%]",children:[k,p.jsxs("div",{className:"bg-white/[0.07] border border-white/[0.05] rounded-2xl rounded-br-md px-4 py-2.5 shadow-sm",children:[b.length>0&&p.jsx("div",{className:"flex gap-1.5 mb-2",children:b.map((_,T)=>p.jsx("img",{src:_,alt:`Attachment ${T+1}`,className:"h-24 rounded-lg border border-white/[0.06]"},T))}),p.jsx("div",{className:"text-white/95 text-[15.5px] leading-relaxed whitespace-pre-wrap break-words",children:y})]})]})}):p.jsxs("div",{className:"flex gap-3",onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-white/95 to-white/75 flex items-center justify-center shrink-0 mt-0.5 shadow-sm",children:p.jsx("svg",{viewBox:"0 0 32 32",width:"14",height:"14",fill:"none",children:p.jsxs("g",{fill:"#0a0a0c",children:[p.jsx("rect",{x:"6.2",y:"7.5",width:"1.6",height:"18",rx:"0.8",transform:"rotate(-42 6.2 7.5)"}),p.jsx("rect",{x:"24.2",y:"6.3",width:"1.6",height:"18",rx:"0.8",transform:"rotate(42 24.2 6.3)"}),p.jsx("polygon",{points:"7.2,8.8 3.8,7.2 4.5,5.5 8.5,7.2"}),p.jsx("polygon",{points:"24.8,8.8 28.2,7.2 27.5,5.5 23.5,7.2"}),p.jsx("rect",{x:"14.3",y:"14.3",width:"3.4",height:"3.4",rx:"0.4",transform:"rotate(45 16 16)"}),p.jsx("circle",{cx:"9.2",cy:"24.5",r:"4"}),p.jsx("circle",{cx:"9.2",cy:"24.5",r:"1.7",fill:"#fff"}),p.jsx("circle",{cx:"22.8",cy:"24.5",r:"4"}),p.jsx("circle",{cx:"22.8",cy:"24.5",r:"1.7",fill:"#fff"}),p.jsx("path",{d:"M16 5.5L12.5 8.5V12.5L16 10.5L19.5 12.5V8.5Z"})]})})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[n.reasoning_content&&p.jsxs("div",{className:"mb-2",children:[p.jsxs("button",{onClick:()=>m(!g),className:"flex items-center gap-1.5 text-[14px] text-white/20 hover:text-white/35 transition-colors mb-1",children:[p.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",className:Ee("transition-transform duration-150",g&&"rotate-90"),children:p.jsx("path",{d:"M3.5 2L6.5 5L3.5 8"})}),"Thinking"]}),g&&p.jsx("div",{className:"bg-white/[0.02] border border-white/[0.04] rounded-lg px-3 py-2 text-[15px] text-white/30 leading-relaxed whitespace-pre-wrap animate-fade-in max-h-60 overflow-y-auto",children:n.reasoning_content})]}),y?p.jsx("div",{className:"prose-venice text-[15.5px] leading-relaxed text-white/85",children:p.jsx(Ck,{remarkPlugins:[UC],urlTransform:HC,components:{code:qC,a:({href:_,childre
Line truncated
|
|
|
|
|
|
|
|
|
|
${n.stack}`:""]})]}),p.jsxs("div",{className:"flex gap-2 justify-center",children:[p.jsx("button",{onClick:l,className:"px-4 py-2 text-[14px] font-medium bg-white text-black rounded-md hover:bg-white/90 transition-colors",children:"Try again"}),p.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 text-[14px] font-medium border border-white/[0.1] text-white/60 hover:text-white/80 hover:border-white/[0.2] rounded-md transition-colors",children:"Reload page"})]})]})})}const C5={info:"border-white/[0.08] bg-[#111]",success:"border-green-500/30 bg-green-500/[0.06]",error:"border-red-500/30 bg-red-500/[0.06]"},j5={info:"text-white/75",success:"text-green-200/85",error:"text-red-200/85"};function T5(){const n=ql(a=>a.toasts),l=ql(a=>a.dismiss);return n.length===0?null:p.jsx("div",{className:"fixed bottom-4 right-4 z-[100] flex flex-col gap-2 max-w-sm pointer-events-none",role:"region","aria-live":"polite","aria-label":"Notifications",children:n.map(a=>p.jsx("div",{role:a.variant==="error"?"alert":"status",className:Ee("pointer-events-auto rounded-lg border px-3.5 py-2.5 shadow-xl shadow-black/60 backdrop-blur-md animate-scale-in",C5[a.variant]),children:p.jsxs("div",{className:"flex items-start gap-3",children:[p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:Ee("text-[13.5px] font-medium",j5[a.variant]),children:a.title}),a.description&&p.jsx("div",{className:"text-[12.5px] text-white/45 mt-0.5 leading-relaxed break-words",children:a.description}),a.action&&p.jsx("button",{onClick:()=>{a.action?.onClick(),l(a.id)},className:"mt-1.5 text-[12.5px] font-medium text-white/70 hover:text-white underline underline-offset-2",children:a.action.label})]}),p.jsx("button",{onClick:()=>l(a.id),"aria-label":"Dismiss notification",className:"text-white/25 hover:text-white/60 transition-colors p-0.5 -m-0.5 shrink-0 rounded focus-visible:outline focus-visible:outline-1 focus-visible:outline-white/30",children:p.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:[p.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),p.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},a.id))})}const A5=Q.lazy(()=>ry(()=>import("./workflows-view-xQJlxU4f.js"),__vite__mapDeps([0,1,2])).then(n=>({default:n.WorkflowsView})));function _5(){return p.jsx(Q.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center h-full text-[12px] text-white/30",children:"Loading workflows…"}),children:p.jsx(A5,{})})}const M5=Q.lazy(()=>ry(()=>import("./playground-view-COPXwfh8.js"),__vite__mapDeps([3,1,2])).then(n=>({default:n.PlaygroundView})));function N5(){return p.jsx(Q.Suspense,{fallback:p.jsx("div",{className:"flex items-center justify-center h-full text-[12px] text-white/30",children:"Loading playground…"}),children:p.jsx(M5,{})})}const O5={chat:IC,image:l5,audio:c5,music:m5,video:v5,embeddings:k5,workflows:_5,playground:N5},Xg=["chat","image","audio","music","video","embeddings","workflows","playground"];function z5(){const n=pn(g=>g.hasEncrypted&&!g.apiKey),[l,a]=Q.useState(n),[u,s]=Q.useState(!1),c=un(g=>g.activeTab),f=un(g=>g.setActiveTab),d=O5[c];return Q.useEffect(()=>{const g=m=>{if(!(m.metaKey||m.ctrlKey))return;if(m.key==="n"){m.preventDefault(),f("chat"),s(!1),Ct.getState().setActiveConversation(null);return}const y=parseInt(m.key,10);if(y>=1&&y<=Xg.length){m.preventDefault(),f(Xg[y-1]),s(!1);return}};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[f]),p.jsxs("div",{className:"flex h-[100dvh] w-screen overflow-hidden",children:[u&&p.jsx("button",{"aria-label":"Close menu",className:"md:hidden fixed inset-0 z-30 bg-black/60 backdrop-blur-sm animate-fade-in",onClick:()=>s(!1)}),p.jsx(Kv,{mobileOpen:u,onMobileClose:()=>s(!1)}),p.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[p.jsx(fb,{onOpenApiKey:()=>a(!0),onOpenMobileSidebar:()=>s(!0)}),p.jsx("main",{className:"flex-1 min-h-0 overflow-hidden",children:p.jsx(gx,{children:p.jsx(d,{})},c)})]}),p.jsx(hb,{open:l,onClose:()=>a(!1)}),p.jsx(T5,{})]})}const D5=new cv({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});window.addEventListener("unhandledrejection",n=>{console.error("[unhandledrejection]",n.reason)});q1.createRoot(document.getElementById("root")).render(p.jsx(Q.StrictMode,{children:p.jsx(gx,{children:p.jsx(fv,{client:D5,children:p.jsx(z5,{})})})}));export{un as A,lf as B,nf as C,U1 as D,Hu as E,nv as Q,vu as R,bi as S,Gl as a,Zg as b,Ee as c,iy as d,hv as e,pv as f,Nv as g,vv as h,gv as i,p as j,yv as k,Et as l,Sv as m,ot as n,Xp as o,xv as p,Bu as q,Q as r,Mu as s,Vi as t,Ki as u,uy as v,cf as w,sy as x,Gn as y,pn as z};
|