mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-09-29 18:16:07 +00:00
1121 lines
1.7 MiB
JavaScript
1121 lines
1.7 MiB
JavaScript
![]() |
var lH=Object.defineProperty;var sH=(e,t,n)=>t in e?lH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ea=(e,t,n)=>sH(e,typeof t!="symbol"?t+"":t,n);function uH(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var _d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function an(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cH(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var Qg={exports:{}},Ns={};/**
|
||
|
* @license React
|
||
|
* react-jsx-runtime.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var j1;function dH(){if(j1)return Ns;j1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var l=null;if(i!==void 0&&(l=""+i),a.key!==void 0&&(l=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:l,ref:a!==void 0?a:null,props:i}}return Ns.Fragment=t,Ns.jsx=n,Ns.jsxs=n,Ns}var G1;function fH(){return G1||(G1=1,Qg.exports=dH()),Qg.exports}var w=fH(),Jg={exports:{}},at={};/**
|
||
|
* @license React
|
||
|
* react.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var H1;function pH(){if(H1)return at;H1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function b(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,v={};function k(I,V,B){this.props=I,this.context=V,this.refs=v,this.updater=B||m}k.prototype.isReactComponent={},k.prototype.setState=function(I,V){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,V,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function R(){}R.prototype=k.prototype;function x(I,V,B){this.props=I,this.context=V,this.refs=v,this.updater=B||m}var T=x.prototype=new R;T.constructor=x,S(T,k.prototype),T.isPureReactComponent=!0;var O=Array.isArray,N={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function C(I,V,B,L,Y,Q){return B=Q.ref,{$$typeof:e,type:I,key:V,ref:B!==void 0?B:null,props:Q}}function z(I,V){return C(I.type,V,void 0,void 0,void 0,I.props)}function D(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function M(I){var V={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(B){return V[B]})}var H=/\/+/g;function $(I,V){return typeof I=="object"&&I!==null&&I.key!=null?M(""+I.key):V.toString(36)}function U(){}function W(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(U,U):(I.status="pending",I.then(function(V){I.status==="pending"&&(I.status="fulfilled",I.value=V)},function(V){I.status==="pending"&&(I.status="rejected",I.reason=V)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function Z(I,V,B,L,Y){var Q=typeof I;(Q==="undefined"||Q==="boolean")&&(I=null);var se=!1;if(I===null)se=!0;else switch(Q){case"bigint":case"string":case"number":se=!0;break;case"object":switch(I.$$typeof){case e:case t:se=!0;break;case p:return se=I._init,Z(se(I._payload),V,B,L,Y)}}if(se)return Y=Y(I),se=L===""?"."+$(I,0):L,O(Y)?(B="",se!=null&&(B=se.replace(H,"$&/")+"/"),Z(Y,V,B,"",function(Ae){return Ae})):Y!=null&&(D(Y)&&(Y=z(Y,B+(Y.key==null||I&&I.key===Y.key?"":(""+Y.key).replace(H,"$&/")+"/")+se)),V.push(Y)),1;se=0;var re=L===""?".":L+":";if(O(I))for(var le=0;le<I.length;le++)L=I[le],Q=re+$(L,le),se+=Z(L,V,B,Q,Y);else if(le=b(I),typeof le=="function")for(I=le.call(I),le=0;!(L=I.next()).done;)L=L.value,Q=re+$(L,le++),se+=Z(L,V,B,Q,Y);else if(Q==="object"){if(typeof I.then=="function")return Z(W(I),V,B,L,Y);throw V=String(I),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return se}function j(I,V,B){if(I==null)return I;var L=[],Y=0;return Z(I,L,"","",function(Q){return V.call(B,Q,Y++)}),L}function G(I){if(I._status===-1){var V=I._result;V=V(),V.then(function(B){(I._status===0||I._status===-1)&&(I._status=1,I._result=B)},function(B){(I._status===0||I._status===-1)&&(I._status=2,I._result=B)}),I._status===-1&&(I._status=0,I._result=V)}if(I._status===1)return I._result.default;throw I._result}var P=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof p
|
||
|
* @license React
|
||
|
* scheduler.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var $1;function hH(){return $1||($1=1,function(e){function t(j,G){var P=j.length;j.push(G);e:for(;0<P;){var X=P-1>>>1,I=j[X];if(0<a(I,G))j[X]=G,j[P]=I,P=X;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var G=j[0],P=j.pop();if(P!==G){j[0]=P;e:for(var X=0,I=j.length,V=I>>>1;X<V;){var B=2*(X+1)-1,L=j[B],Y=B+1,Q=j[Y];if(0>a(L,P))Y<I&&0>a(Q,L)?(j[X]=Q,j[Y]=P,X=Y):(j[X]=L,j[B]=P,X=B);else if(Y<I&&0>a(Q,P))j[X]=Q,j[Y]=P,X=Y;else break e}}return G}function a(j,G){var P=j.sortIndex-G.sortIndex;return P!==0?P:j.id-G.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,u=l.now();e.unstable_now=function(){return l.now()-u}}var c=[],f=[],p=1,g=null,b=3,m=!1,S=!1,v=!1,k=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function T(j){for(var G=n(f);G!==null;){if(G.callback===null)r(f);else if(G.startTime<=j)r(f),G.sortIndex=G.expirationTime,t(c,G);else break;G=n(f)}}function O(j){if(v=!1,T(j),!S)if(n(c)!==null)S=!0,W();else{var G=n(f);G!==null&&Z(O,G.startTime-j)}}var N=!1,_=-1,C=5,z=-1;function D(){return!(e.unstable_now()-z<C)}function M(){if(N){var j=e.unstable_now();z=j;var G=!0;try{e:{S=!1,v&&(v=!1,R(_),_=-1),m=!0;var P=b;try{t:{for(T(j),g=n(c);g!==null&&!(g.expirationTime>j&&D());){var X=g.callback;if(typeof X=="function"){g.callback=null,b=g.priorityLevel;var I=X(g.expirationTime<=j);if(j=e.unstable_now(),typeof I=="function"){g.callback=I,T(j),G=!0;break t}g===n(c)&&r(c),T(j)}else r(c);g=n(c)}if(g!==null)G=!0;else{var V=n(f);V!==null&&Z(O,V.startTime-j),G=!1}}break e}finally{g=null,b=P,m=!1}G=void 0}}finally{G?H():N=!1}}}var H;if(typeof x=="function")H=function(){x(M)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,U=$.port2;$.port1.onmessage=M,H=function(){U.postMessage(null)}}else H=function(){k(M,0)};function W(){N||(N=!0,H())}function Z(j,G){_=k(function(){j(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){S||m||(S=!0,W())},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(j){switch(b){case 1:case 2:case 3:var G=3;break;default:G=b}var P=b;b=G;try{return j()}finally{b=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var P=b;b=j;try{return G()}finally{b=P}},e.unstable_scheduleCallback=function(j,G,P){var X=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?X+P:X):P=X,j){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=P+I,j={id:p++,callback:G,priorityLevel:j,startTime:P,expirationTime:I,sortIndex:-1},P>X?(j.sortIndex=P,t(f,j),n(c)===null&&j===n(f)&&(v?(R(_),_=-1):v=!0,Z(O,P-X))):(j.sortIndex=I,t(c,j),S||m||(S=!0,W())),j},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(j){var G=b;return function(){var P=b;b=G;try{return j.apply(this,arguments)}finally{b=P}}}}(nh)),nh}var V1;function mH(){return V1||(V1=1,th.exports=hH()),th.exports}var rh={exports:{}},bn={};/**
|
||
|
* @license React
|
||
|
* react-dom.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var W1;function bH(){if(W1)return bn;W1=1;var e=ef();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(c,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:g==null?null:""+g,children:c,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,bn.createPortal=function(c,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(c,f,null,p)},bn.flushSync=function(c){var f=l.T,p=r.p;try{if(l.T=null,r.p=2,c)return c()}finally{l.T=f,r.p=p,r.d.f()}},bn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},bn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},bn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var p=f.as,g=u(p,f.crossOrigin),b=typeof f.integrity=="string"?f.integrity:void 0,m=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:m}):p==="script"&&r.d.X(c,{crossOrigin:g,integrity:b,fetchPriority:m,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},bn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},bn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=u(p,f.crossOrigin);r.d.L(c,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},bn.preloadModule=function(c,f){if(typeof c=="string")if(f){var p=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},bn.requestFormReset=function(c){r.d.r(c)},bn.unstable_batchedUpdates=function(c,f){return c(f)},bn.useFormState=function(c,f,p){return l.H.useFormState(c,f,p)},bn.useFormStatus=function(){return l.H.useHostTransitionStatus()},bn.version="19.0.0",bn}var Y1;function pz(){if(Y1)return rh.exports;Y1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),rh.exports=bH(),rh.exports}/**
|
||
|
* @license React
|
||
|
* react-dom-client.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var K1;function yH(){if(K1)return Os;K1=1;var e=mH(),t=ef(),n=pz();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}var i=Symbol.for("react.element"),l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),b=Symbol.for("react.consumer"),m=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),T=Symbol.for("react.offscreen"),O=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function _(o){return o===null||typeof o!="object"?null:(o=N&&o[N]||o["@@iterator"],typeof o=="function"?o:null)}var C=Symbol.for("react.client.reference");function z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===C?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case c:return"Fragment";case u:return"Portal";case p:return"Profiler";case f:return"StrictMode";case v:return"Suspense";case k:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case m:return(o.displayName||"Context")+".Provider";case b:return(o._context.displayName||"Context")+".Consumer";case S:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case R:return s=o.displayName||null,s!==null?s:z(o.type)||"Memo";case x:s=o._payload,o=o._init;try{return z(o(s))}catch{}}return null}var D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=Object.assign,H,$;function U(o){if(H===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);H=s&&s[1]||"",$=-1<d.stack.indexOf(`
|
||
|
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
|
`+H+o+$}var W=!1;function Z(o,s){if(!o||W)return"";W=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ge){var de=ge}Reflect.construct(o,[],Te)}else{try{Te.call()}catch(ge){de=ge}o.call(Te.prototype)}}else{try{throw Error()}catch(ge){de=ge}(Te=o())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&de&&typeof ge.stack=="string")return[ge.stack,de.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=h.DetermineComponentFrameRoot(),F=E[0],q=E[1];if(F&&q){var K=F.split(`
|
||
|
`),ne=q.split(`
|
||
|
`);for(y=h=0;h<K.length&&!K[h].includes("DetermineComponentFrameRoot");)h++;for(;y<ne.length&&!ne[y].includes("DetermineComponentFrameRoot");)y++;if(h===K.length||y===ne.length)for(h=K.length-1,y=ne.length-1;1<=h&&0<=y&&K[h]!==ne[y];)y--;for(;1<=h&&0<=y;h--,y--)if(K[h]!==ne[y]){if(h!==1||y!==1)do if(h--,y--,0>y||K[h]!==ne[y]){var be=`
|
||
|
`+K[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=y);break}}}finally{W=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?U(d):""}function j(o){switch(o.tag){case 26:case 27:case 5:return U(o.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 15:return o=Z(o.type,!1),o;case 11:return o=Z(o.type.render,!1),o;case 1:return o=Z(o.type,!0),o;default:return""}}function G(o){try{var s="";do s+=j(o),o=o.return;while(o);return s}catch(d){return`
|
||
|
Error generating stack: `+d.message+`
|
||
|
`+d.stack}}function P(o){var s=o,d=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,s.flags&4098&&(d=s.return),o=s.return;while(o)}return s.tag===3?d:null}function X(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function I(o){if(P(o)!==o)throw Error(r(188))}function V(o){var s=o.alternate;if(!s){if(s=P(o),s===null)throw Error(r(188));return s!==o?null:o}for(var d=o,h=s;;){var y=d.return;if(y===null)break;var E=y.alternate;if(E===null){if(h=y.return,h!==null){d=h;continue}break}if(y.child===E.child){for(E=y.child;E;){if(E===d)return I(y),o;if(E===h)return I(y),s;E=E.sibling}throw Error(r(188))}if(d.return!==h.return)d=y,h=E;else{for(var F=!1,q=y.child;q;){if(q===d){F=!0,d=y,h=E;break}if(q===h){F=!0,h=y,d=E;break}q=q.sibling}if(!F){for(q=E.child;q;){if(q===d){F=!0,d=E,h=y;break}if(q===h){F=!0,h=E,d=y;break}q=q.sibling}if(!F)throw Error(r(189))}}if(d.alternate!==h)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?o:s}function B(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=B(o),s!==null)return s;o=o.sibling}return null}var L=Array.isArray,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},se=[],re=-1;function le(o){return{current:o}}function Ae(o){0>re||(o.current=se[re],se[re]=null,re--)}function ae(o,s){re++,se[re]=o.current,o.current=s}var we=le(null),xe=le(null),De=le(null),Ce=le(null);function Ee(o,s){switch(ae(De,s),ae(xe,o),ae(we,null),o=s.nodeType,o){case 9:case 11:s=(s=s.documentElement)&&(s=s.namespaceURI)?m1(s):0;break;default:if(o=o===8?s.parentNode:s,s=o.tagName,o=o.namespaceURI)o=m1(o),s=b1(o,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}Ae(we),ae(we,s)}function J(){Ae(we),Ae(xe),Ae(De)}function fe(o){o.memoizedState!==null&&ae(Ce,o);var s=we.current,d=b1(s,o.type);s!==d&&(ae(xe,o),ae(we,d))}function ke(o){xe.current===o&&(Ae(we),Ae(xe)),Ce.current===o&&(Ae(Ce),As._currentValue=Q)}var me=Object.prototype.hasOwnProperty,ve=e.unstable_scheduleCallback,ie=e.unstable_cancelCallback,ze=e.unstable_shouldYield,Pe=e.unstable_requestPaint,he=e.unstable_now,Ne=e.unstable_getCurrentPriorityLevel,ee=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,Me=e.unstable_LowPriority,$e=e.unstable_IdlePriority,mt=e.log,St=e.unstable_setDisableYieldValue,pt=null,Qe=null;function Et(o){if(Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(pt,o,void 0,(o.current.flags&128)===128)}catch{}}function rt(o){if(typeof mt=="function"&&St(o),Qe&&typeof Qe.setStrictMode=="function")try{Qe.setStrictMode(pt,o)}catch{}}var bt=Math.clz32?Math.clz32:Mt,Bt=Math.log,sn=Math.LN2;function Mt(o){return o>>>=0,o===0?32:31-(Bt(o)/sn|0)|0}var er=128,zr=4194304;function Kt(o){var s=o&42;if(s!==0)return s;switch(o&-o){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: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 o&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function na(o,s){var d=o.pendingLanes;if(d===0)return 0;var h=0,y=o.suspendedLanes,E=o.pingedLanes,F=o.warmLanes;o=o.finishedLanes!==0;var q=d&134217727;return q!==0?(d=q&~y,d!==0?h=Kt(d):(E&=q,E!==0?h=Kt(E):o||(F=q&~F,F!==0&&(h=Kt(F))))):(q=d&~y,q!==0?h=Kt(q):E!==0?h=Kt(E):o||(F=d&~F,F!==0&&(h=Kt(F)))),h===0?0:s!==0&&s!==h&&!(s&y)&&(y=h&-h,F=s&-s,y>=F||y===32&&(F&4194176)!==0)?s:h}function Ye(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function gt(o,s){switch(o){case 1:case 2:case 4:case 8:return s+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2
|
||
|
`).replace(N6,"")}function h1(o,s){return s=g1(s),g1(o)===s}function Ec(){}function At(o,s,d,h,y,E){switch(d){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||yi(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&yi(o,""+h);break;case"className":Cu(o,"class",h);break;case"tabIndex":Cu(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Cu(o,d,h);break;case"style":AA(o,h,E);break;case"data":if(s!=="object"){Cu(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||d!=="href")){o.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(d);break}h=Iu(""+h),o.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(d,"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 E=="function"&&(d==="formAction"?(s!=="input"&&At(o,s,"name",y.name,y,null),At(o,s,"formEncType",y.formEncType,y,null),At(o,s,"formMethod",y.formMethod,y,null),At(o,s,"formTarget",y.formTarget,y,null)):(At(o,s,"encType",y.encType,y,null),At(o,s,"method",y.method,y,null),At(o,s,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(d);break}h=Iu(""+h),o.setAttribute(d,h);break;case"onClick":h!=null&&(o.onclick=Ec);break;case"onScroll":h!=null&&dt("scroll",o);break;case"onScrollEnd":h!=null&&dt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(d=h.__html,d!=null){if(y.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}d=Iu(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(d,""+h):o.removeAttribute(d);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":h===!0?o.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(d,h):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(d,h):o.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(d):o.setAttribute(d,h);break;case"popover":dt("beforetoggle",o),dt("toggle",o),Ru(o,"popover",h);break;case"xlinkActuate":oa(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":oa(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":oa(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":oa(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":oa(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":oa(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":oa(o,"http://www.w3.org/XML/1998/nam
|
||
|
`).forEach(function(l){a=l.indexOf(":"),n=l.substring(0,a).trim().toLowerCase(),r=l.substring(a+1).trim(),!(!n||t[n]&&Nq[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fR=Symbol("internals");function Is(e){return e&&String(e).trim().toLowerCase()}function dd(e){return e===!1||e==null?e:pe.isArray(e)?e.map(dd):String(e)}function Iq(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Dq=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lh(e,t,n,r,a){if(pe.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!pe.isString(t)){if(pe.isString(r))return t.indexOf(r)!==-1;if(pe.isRegExp(r))return r.test(t)}}function Lq(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mq(e,t){const n=pe.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let zn=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(u,c,f){const p=Is(c);if(!p)throw new Error("header name must be a non-empty string");const g=pe.findKey(a,p);(!g||a[g]===void 0||f===!0||f===void 0&&a[g]!==!1)&&(a[g||c]=dd(u))}const l=(u,c)=>pe.forEach(u,(f,p)=>i(f,p,c));if(pe.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(pe.isString(t)&&(t=t.trim())&&!Dq(t))l(Oq(t),n);else if(pe.isHeaders(t))for(const[u,c]of t.entries())i(c,u,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=Is(t),t){const r=pe.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return Iq(a);if(pe.isFunction(n))return n.call(this,a,r);if(pe.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Is(t),t){const r=pe.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lh(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=Is(l),l){const u=pe.findKey(r,l);u&&(!n||lh(r,r[u],u,n))&&(delete r[u],a=!0)}}return pe.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||lh(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return pe.forEach(this,(a,i)=>{const l=pe.findKey(r,i);if(l){n[l]=dd(a),delete n[i];return}const u=t?Lq(i):String(i).trim();u!==i&&delete n[i],n[u]=dd(a),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return pe.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&pe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[fR]=this[fR]={accessors:{}}).accessors,a=this.prototype;function i(l){const u=Is(l);r[u]||(Mq(a,l),r[u]=!0)}return pe.isArray(t)?t.forEach(i):i(t),this}};zn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);pe.reduceDescriptors(zn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});pe.freezeMethods(zn);function sh(e,t){const n=this||du,r=t||n,a=zn.from(r.headers);let i=r.data;return pe.forEach(e,function(u){i=u.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Vz(e){return!!(e&&e.__CANCEL__)}function kl(e,t,n){nt.call(this,e??"canceled",nt.ERR_CANCELED,t,n),this.name="CanceledError"}pe.inherits(kl,nt,{__CANCEL__:!0});function Wz(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nt("Request failed with status code "+n.status,[nt.ERR_BAD_REQUEST,nt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Fq(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zq(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(c){const f=Date.now(),p=r[i];l||(l=f),n[a]=c,r[a]=f;let g=i,b=0;for(;g!==a;)b+=n[g++],g=g%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),f-l<t)return;const m=p&&f-p;return m?Math.round(b*1e3/m):void 0}}function Pq(e,t){let n=0,r=1e3/t,a,i;const l=(f,p=Date.now())=>{n=p,a=null,i&&(clearTimeout(i),i=null),e.apply(null,f)};return[(...f)=>{const p=Date.now(),g=p-n;g>=r?l(f,p):(a=f,i||(i=setTimeout(()=>{i=null,l(a)},r-g)))},()=>a&&l(a)]}const Rd=(e,t,n=3)=>{let r=0;const a=zq(50,250);return Pq(i=>{const l=i.loaded,u=i.lengthComputable?i.total:void 0,c=l-r,f=a(c),p=l<=u;r=l;const g={loaded:l,total:u,progress:u?l/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&p?(u-l)/f:void 0,event:i,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},pR=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},gR=e=>(...t)=>pe.asap(()=>e(...t)),Bq=yn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,yn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(yn.origin),yn.navigator&&/(msie|trident)/i.test(yn.navigator.userAgent)):()=>!0,Uq=yn.hasStandardBrowserEnv?{write(e,t,n,r,a,i){const l=[e+"="+encodeURIComponent(t)];pe.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),pe.isString(r)&&l.push("path="+r),pe.isString(a)&&l.push("domain="+a),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function jq(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gq(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Yz(e,t){return e&&!jq(t)?Gq(e,t):t}const hR=e=>e instanceof zn?{...e}:e;function ni(e,t){t=t||{};const n={};function r(f,p,g,b){return pe.isPlainObject(f)&&pe.isPlainObject(p)?pe.merge.call({caseless:b},f,p):pe.isPlainObject(p)?pe.merge({},p):pe.isArray(p)?p.slice():p}function a(f,p,g,b){if(pe.isUndefined(p)){if(!pe.isUndefined(f))return r(void 0,f,g,b)}else return r(f,p,g,b)}function i(f,p){if(!pe.isUndefined(p))return r(void 0,p)}function l(f,p){if(pe.isUndefined(p)){if(!pe.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function u(f,p,g){if(g in t)return r(f,p);if(g in e)return r(void 0,f)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateSt
|
||
|
`+i.map(yR).join(`
|
||
|
`):" "+yR(i[0]):"as no adapter specified";throw new nt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:mx};function uh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new kl(null,e)}function vR(e){return uh(e),e.headers=zn.from(e.headers),e.data=sh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Qz.getAdapter(e.adapter||du.adapter)(e).then(function(r){return uh(e),r.data=sh.call(e,e.transformResponse,r),r.headers=zn.from(r.headers),r},function(r){return Vz(r)||(uh(e),r&&r.response&&(r.response.data=sh.call(e,e.transformResponse,r.response),r.response.headers=zn.from(r.response.headers))),Promise.reject(r)})}const Jz="1.7.9",lf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const SR={};lf.transitional=function(t,n,r){function a(i,l){return"[Axios v"+Jz+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,u)=>{if(t===!1)throw new nt(a(l," has been removed"+(n?" in "+n:"")),nt.ERR_DEPRECATED);return n&&!SR[l]&&(SR[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,u):!0}};lf.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function t$(e,t,n){if(typeof e!="object")throw new nt("options must be an object",nt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=t[i];if(l){const u=e[i],c=u===void 0||l(u,i,e);if(c!==!0)throw new nt("option "+i+" must be "+c,nt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nt("Unknown option "+i,nt.ERR_BAD_OPTION)}}const fd={assertOptions:t$,validators:lf},Hr=fd.validators;let ti=class{constructor(t){this.defaults=t,this.interceptors={request:new dR,response:new dR}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
||
|
`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ni(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&fd.assertOptions(r,{silentJSONParsing:Hr.transitional(Hr.boolean),forcedJSONParsing:Hr.transitional(Hr.boolean),clarifyTimeoutError:Hr.transitional(Hr.boolean)},!1),a!=null&&(pe.isFunction(a)?n.paramsSerializer={serialize:a}:fd.assertOptions(a,{encode:Hr.function,serialize:Hr.function},!0)),fd.assertOptions(n,{baseUrl:Hr.spelling("baseURL"),withXsrfToken:Hr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&pe.merge(i.common,i[n.method]);i&&pe.forEach(["delete","get","head","post","put","patch","common"],S=>{delete i[S]}),n.headers=zn.concat(l,i);const u=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,u.unshift(v.fulfilled,v.rejected))});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,g=0,b;if(!c){const S=[vR.bind(this),void 0];for(S.unshift.apply(S,u),S.push.apply(S,f),b=S.length,p=Promise.resolve(n);g<b;)p=p.then(S[g++],S[g++]);return p}b=u.length;let m=n;for(g=0;g<b;){const S=u[g++],v=u[g++];try{m=S(m)}catch(k){v.call(this,k);break}}try{p=vR.call(this,m)}catch(S){return Promise.reject(S)}for(g=0,b=f.length;g<b;)p=p.then(f[g++],f[g++]);return p}getUri(t){t=ni(this.defaults,t);const n=Yz(t.baseURL,t.url);return Hz(n,t.params,t.paramsSerializer)}};pe.forEach(["delete","get","head","options"],function(t){ti.prototype[t]=function(n,r){return this.request(ni(r||{},{method:t,url:n,data:(r||{}).data}))}});pe.forEach(["post","put","patch"],function(t){function n(r){return function(i,l,u){return this.request(ni(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}ti.prototype[t]=n(),ti.prototype[t+"Form"]=n(!0)});let n$=class eP{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(u=>{r.subscribe(u),i=u}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,u){r.reason||(r.reason=new kl(i,l,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new eP(function(a){t=a}),cancel:t}}};function r$(e){return function(n){return e.apply(null,n)}}function a$(e){return pe.isObject(e)&&e.isAxiosError===!0}const bx={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupport
|
||
|
${JSON.stringify(e.response.data)}
|
||
|
${(t=e.config)==null?void 0:t.url}`):e});const o$=async e=>(await Mr.get(`/graphs?label=${e}`)).data,i$=async()=>(await Mr.get("/graph/label/list")).data,l$=async()=>{try{return(await Mr.get("/health")).data}catch(e){return{status:"error",message:Nr(e)}}},s$=async()=>(await Mr.get("/documents")).data,u$=async()=>(await Mr.post("/documents/scan")).data,c$=async e=>(await Mr.post("/query",e)).data,d$=async(e,t,n)=>{try{let r="";if(await Mr.post("/query/stream",e,{responseType:"text",headers:{Accept:"application/x-ndjson"},transformResponse:[a=>{r+=a;const i=r.split(`
|
||
|
`);r=i.pop()||"";for(const l of i)if(l.trim())try{const u=JSON.parse(l);u.response?t(u.response):u.error&&n&&n(u.error)}catch(u){console.error("Error parsing stream chunk:",u),n&&n("Error parsing server response")}return a}]}).catch(a=>{n&&n(Nr(a))}),r.trim())try{const a=JSON.parse(r);a.response?t(a.response):a.error&&n&&n(a.error)}catch(a){console.error("Error parsing final chunk:",a),n&&n("Error parsing server response")}}catch(r){const a=Nr(r);console.error("Stream request failed:",a),n&&n(a)}},f$=async(e,t)=>{const n=new FormData;return n.append("file",e),(await Mr.post("/documents/upload",n,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t!==void 0?a=>{const i=Math.round(a.loaded*100/a.total);t(i)}:void 0})).data},p$=async()=>(await Mr.delete("/documents")).data,g$=vk()(e=>({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:null,check:async()=>{const t=await l$();return t.status==="healthy"?(e({health:!0,message:null,messageTitle:null,lastCheckTime:Date.now(),status:t}),!0):(e({health:!1,message:t.message,messageTitle:"Backend Health Check Error!",lastCheckTime:Date.now(),status:null}),!1)},clear:()=>{e({health:!0,message:null,messageTitle:null})},setErrorMessage:(t,n)=>{e({health:!1,message:t,messageTitle:n})}})),Pn=wk(g$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const h$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aP=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/var m$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const b$=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...u},c)=>A.createElement("svg",{ref:c,...m$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:aP("lucide",a),...u},[...l.map(([f,p])=>A.createElement(f,p)),...Array.isArray(i)?i:[i]]));/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const xt=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(b$,{ref:i,iconNode:t,className:aP(`lucide-${h$(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const y$=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Tk=xt("Check",y$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const v$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_k=xt("ChevronDown",v$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const S$=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],oP=xt("ChevronUp",S$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const E$=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],w$=xt("ChevronsUpDown",E$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const x$=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],k$=xt("CircleAlert",x$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const A$=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],T$=xt("Copy",A$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const _$=[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]],iP=xt("Eraser",_$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const R$=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],C$=xt("FileText",R$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const N$=[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]],O$=xt("Files",N$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const I$=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]],D$=xt("Fullscreen",I$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const L$=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],M$=xt("Github",L$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const F$=[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]],z$=xt("Grip",F$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const P$=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],lP=xt("LoaderCircle",P$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const B$=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],U$=xt("Loader",B$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const j$=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],G$=xt("Maximize",j$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const H$=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],q$=xt("Minimize",H$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const $$=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],V$=xt("Moon",$$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const W$=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Y$=xt("Pause",W$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const K$=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],X$=xt("Play",K$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const Z$=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Q$=xt("RefreshCw",Z$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const J$=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],e8=xt("Search",J$);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const t8=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],n8=xt("Send",t8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const r8=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],a8=xt("Settings",r8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const o8=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],i8=xt("Sun",o8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const l8=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],yx=xt("Upload",l8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const s8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sP=xt("X",s8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const u8=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],c8=xt("Zap",u8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const d8=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],f8=xt("ZoomIn",d8);/**
|
||
|
* @license lucide-react v0.475.0 - ISC
|
||
|
*
|
||
|
* This source code is licensed under the ISC license.
|
||
|
* See the LICENSE file in the root directory of this source tree.
|
||
|
*/const p8=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],g8=xt("ZoomOut",p8),h8=()=>{const e=Pn.use.health(),t=Pn.use.message(),n=Pn.use.messageTitle(),[r,a]=A.useState(!1);return A.useEffect(()=>{setTimeout(()=>{a(!0)},50)},[]),w.jsxs(Rz,{className:Fe("bg-background/90 absolute top-12 left-1/2 flex w-auto max-w-lg -translate-x-1/2 transform items-center gap-4 shadow-md backdrop-blur-lg transition-all duration-500 ease-in-out",r?"translate-y-0 opacity-100":"-translate-y-20 opacity-0",!e&&"bg-red-700 text-white"),children:[!e&&w.jsx("div",{children:w.jsx(k$,{className:"size-4"})}),w.jsxs("div",{children:[w.jsx(Cz,{className:"font-bold",children:n}),w.jsx(Nz,{children:t})]})]})};function m8(e,t){const n=A.createContext(t),r=i=>{const{children:l,...u}=i,c=A.useMemo(()=>u,Object.values(u));return w.jsx(n.Provider,{value:c,children:l})};r.displayName=e+"Provider";function a(i){const l=A.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function mr(e,t=[]){let n=[];function r(i,l){const u=A.createContext(l),c=n.length;n=[...n,l];const f=g=>{var R;const{scope:b,children:m,...S}=g,v=((R=b==null?void 0:b[e])==null?void 0:R[c])||u,k=A.useMemo(()=>S,Object.values(S));return w.jsx(v.Provider,{value:k,children:m})};f.displayName=i+"Provider";function p(g,b){var v;const m=((v=b==null?void 0:b[e])==null?void 0:v[c])||u,S=A.useContext(m);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${g}\` must be used within \`${i}\``)}return[f,p]}const a=()=>{const i=n.map(l=>A.createContext(l));return function(u){const c=(u==null?void 0:u[e])||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:c}}),[u,c])}};return a.scopeName=e,[r,b8(a,...t)]}function b8(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((u,{useScope:c,scopeName:f})=>{const g=c(i)[`__scope${f}`];return{...u,...g}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function ER(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uP(...e){return t=>{let n=!1;const r=e.map(a=>{const i=ER(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():ER(e[a],null)}}}}function ft(...e){return A.useCallback(uP(...e),e)}function We(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var wn=globalThis!=null&&globalThis.document?A.useLayoutEffect:()=>{},y8=gH.useId||(()=>{}),v8=0;function En(e){const[t,n]=A.useState(y8());return wn(()=>{n(r=>r??String(v8++))},[e]),t?`radix-${t}`:""}function pn(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Oa({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=S8({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,u=pn(n),c=A.useCallback(f=>{if(i){const g=typeof f=="function"?f(e):f;g!==e&&u(g)}else a(f)},[i,e,a,u]);return[l,c]}function S8({defaultProp:e,onChange:t}){const n=A.useState(e),[r]=n,a=A.useRef(r),i=pn(t);return A.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}var fu=pz();const cP=an(fu);var bo=A.forwardRef((e,t)=>{const{children:n,...r}=e,a=A.Children.toArray(n),i=a.find(E8);if(i){const l=i.props.children,u=a.map(c=>c===i?A.Children.count(l)>1?A.Children.only(null):A.isValidElement(l)?l.props.children:null:c);return w.jsx(vx,{...r,ref:t,children:A.isValidElement(l)?A.cloneElement(l,void 0,u):null})}return w.jsx(vx,{...r,ref:t,children:n})});bo.displayName="Slot";var vx=A.forwardRef((e,t)=>{const{children:n,...r}=e;if(A.isValidElement(n)){const a=x8(n),i=w8(r,n.props);return n.type!==A.Fragment&&(i.ref=t?uP(t,a):a),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});vx.displayName="SlotClone";var Rk=({c
|
||
|
.`.concat(V8,` {
|
||
|
overflow: hidden `).concat(r,`;
|
||
|
padding-right: `).concat(u,"px ").concat(r,`;
|
||
|
}
|
||
|
body[`).concat(ll,`] {
|
||
|
overflow: hidden `).concat(r,`;
|
||
|
overscroll-behavior: contain;
|
||
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
||
|
padding-left: `.concat(a,`px;
|
||
|
padding-top: `).concat(i,`px;
|
||
|
padding-right: `).concat(l,`px;
|
||
|
margin-left:0;
|
||
|
margin-top:0;
|
||
|
margin-right: `).concat(u,"px ").concat(r,`;
|
||
|
`),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
|
||
|
}
|
||
|
|
||
|
.`).concat(pd,` {
|
||
|
right: `).concat(u,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(gd,` {
|
||
|
margin-right: `).concat(u,"px ").concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(pd," .").concat(pd,` {
|
||
|
right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
.`).concat(gd," .").concat(gd,` {
|
||
|
margin-right: 0 `).concat(r,`;
|
||
|
}
|
||
|
|
||
|
body[`).concat(ll,`] {
|
||
|
`).concat(W8,": ").concat(u,`px;
|
||
|
}
|
||
|
`)},NR=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},f7=function(){A.useEffect(function(){return document.body.setAttribute(ll,(NR()+1).toString()),function(){var e=NR()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[])},p7=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;f7();var i=A.useMemo(function(){return u7(a)},[a]);return A.createElement(c7,{styles:d7(i,!t,a,n?"":"!important")})},Ex=!1;if(typeof window<"u")try{var zc=Object.defineProperty({},"passive",{get:function(){return Ex=!0,!0}});window.addEventListener("test",zc,zc),window.removeEventListener("test",zc,zc)}catch{Ex=!1}var Ki=Ex?{passive:!1}:!1,g7=function(e){return e.tagName==="TEXTAREA"},yP=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!g7(e)&&n[t]==="visible")},h7=function(e){return yP(e,"overflowY")},m7=function(e){return yP(e,"overflowX")},OR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=vP(e,r);if(a){var i=SP(e,r),l=i[1],u=i[2];if(l>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},b7=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},y7=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vP=function(e,t){return e==="v"?h7(t):m7(t)},SP=function(e,t){return e==="v"?b7(t):y7(t)},v7=function(e,t){return e==="h"&&t==="rtl"?-1:1},S7=function(e,t,n,r,a){var i=v7(e,window.getComputedStyle(t).direction),l=i*r,u=n.target,c=t.contains(u),f=!1,p=l>0,g=0,b=0;do{var m=SP(e,u),S=m[0],v=m[1],k=m[2],R=v-k-i*S;(S||R)&&vP(e,u)&&(g+=R,b+=S),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return(p&&Math.abs(g)<1||!p&&Math.abs(b)<1)&&(f=!0),f},Pc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IR=function(e){return[e.deltaX,e.deltaY]},DR=function(e){return e&&"current"in e?e.current:e},E7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},w7=function(e){return`
|
||
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
|
`)},x7=0,Xi=[];function k7(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(x7++)[0],i=A.useState(bP)[0],l=A.useRef(e);A.useEffect(function(){l.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=$8([e.lockRef.current],(e.shards||[]).map(DR),!0).filter(Boolean);return v.forEach(function(k){return k.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(v,k){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!l.current.allowPinchZoom;var R=Pc(v),x=n.current,T="deltaX"in v?v.deltaX:x[0]-R[0],O="deltaY"in v?v.deltaY:x[1]-R[1],N,_=v.target,C=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in v&&C==="h"&&_.type==="range")return!1;var z=OR(C,_);if(!z)return!0;if(z?N=C:(N=C==="v"?"h":"v",z=OR(C,_)),!z)return!1;if(!r.current&&"changedTouches"in v&&(T||O)&&(r.current=N),!N)return!0;var D=r.current||N;return S7(D,k,v,D==="h"?T:O)},[]),c=A.useCallback(function(v){var k=v;if(!(!Xi.length||Xi[Xi.length-1]!==i)){var R="deltaY"in k?IR(k):Pc(k),x=t.current.filter(function(N){return N.name===k.type&&(N.target===k.target||k.target===N.shadowParent)&&E7(N.delta,R)})[0];if(x&&x.should){k.cancelable&&k.preventDefault();return}if(!x){var T=(l.current.shards||[]).map(DR).filter(Boolean).filter(function(N){return N.contains(k.target)}),O=T.length>0?u(k,T[0]):!l.current.noIsolation;O&&k.cancelable&&k.preventDefault()}}},[]),f=A.useCallback(function(v,k,R,x){var T={name:v,delta:k,target:R,should:x,shadowParent:A7(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),p=A.useCallback(function(v){n.current=Pc(v),r.current=void 0},[]),g=A.useCallback(function(v){f(v.type,IR(v),v.target,u(v,e.lockRef.current))},[]),b=A.useCallback(function(v){f(v.type,Pc(v),v.target,u(v,e.lockRef.current))},[]);A.useEffect(function(){return Xi.push(i),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:b}),document.addEventListener("wheel",c,Ki),document.addEventListener("touchmove",c,Ki),document.addEventListener("touchstart",p,Ki),function(){Xi=Xi.filter(function(v){return v!==i}),document.removeEventListener("wheel",c,Ki),document.removeEventListener("touchmove",c,Ki),document.removeEventListener("touchstart",p,Ki)}},[]);var m=e.removeScrollBar,S=e.inert;return A.createElement(A.Fragment,null,S?A.createElement(i,{styles:w7(a)}):null,m?A.createElement(p7,{gapMode:e.gapMode}):null)}function A7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const T7=e7(mP,k7);var df=A.forwardRef(function(e,t){return A.createElement(cf,Vr({},e,{ref:t,sideCar:T7}))});df.classNames=cf.classNames;var _7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Zi=new WeakMap,Bc=new WeakMap,Uc={},mh=0,EP=function(e){return e&&(e.host||EP(e.parentNode))},R7=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=EP(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},C7=function(e,t,n,r){var a=R7(t,Array.isArray(e)?e:[e]);Uc[n]||(Uc[n]=new WeakMap);var i=Uc[n],l=[],u=new Set,c=new Set(a),f=function(g){!g||u.has(g)||(u.add(g),f(g.parentNode))};a.forEach(f);var p=function(g){!g||c.has(g)||Array.prototype.forEach.call(g.children,function(b){if(u.has(b))p(b);else try{var m=b.getAttribute(r),S=m!==null&&m!=="false",v=(Zi.get(b)||0)+1,k=(i.get(b)||0)+1;Zi.set(b,v),i.set(b,k),l.push(b),v===1&&S&&Bc.set(b,!0),k===1&&b.setAttribute(n,"true"),S||b.setAttribute(r,"true")}catch(R){console.error("aria-hidden: cannot operate on ",b,R)}})};return p(t),u.clear(),mh++,function(){l.forEach(function(g){var b=Zi.get(g)-1,m=i.get(g)-1;Zi.set(g,b),i.set(g,m),b||(Bc.has(g)||g.removeAttribute(r),Bc.delete(g)),m||g.remo
|
||
|
|
||
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
|
||
|
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},z7="DialogDescriptionWarning",P7=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${PP(z7).contentName}}.`;return A.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Mk=kP,BP=TP,Fk=RP,ff=CP,pf=NP,zk=IP,Pk=LP,Bk=FP,UP="AlertDialog",[B7,Kye]=mr(UP,[xP]),La=xP(),jP=e=>{const{__scopeAlertDialog:t,...n}=e,r=La(t);return w.jsx(Mk,{...r,...n,modal:!0})};jP.displayName=UP;var U7="AlertDialogTrigger",j7=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=La(n);return w.jsx(BP,{...a,...r,ref:t})});j7.displayName=U7;var G7="AlertDialogPortal",GP=e=>{const{__scopeAlertDialog:t,...n}=e,r=La(t);return w.jsx(Fk,{...r,...n})};GP.displayName=G7;var H7="AlertDialogOverlay",HP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=La(n);return w.jsx(ff,{...a,...r,ref:t})});HP.displayName=H7;var sl="AlertDialogContent",[q7,$7]=B7(sl),qP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...a}=e,i=La(n),l=A.useRef(null),u=ft(t,l),c=A.useRef(null);return w.jsx(M7,{contentName:sl,titleName:$P,docsSlug:"alert-dialog",children:w.jsx(q7,{scope:n,cancelRef:c,children:w.jsxs(pf,{role:"alertdialog",...i,...a,ref:u,onOpenAutoFocus:We(a.onOpenAutoFocus,f=>{var p;f.preventDefault(),(p=c.current)==null||p.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[w.jsx(Rk,{children:r}),w.jsx(W7,{contentRef:l})]})})})});qP.displayName=sl;var $P="AlertDialogTitle",VP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=La(n);return w.jsx(zk,{...a,...r,ref:t})});VP.displayName=$P;var WP="AlertDialogDescription",YP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=La(n);return w.jsx(Pk,{...a,...r,ref:t})});YP.displayName=WP;var V7="AlertDialogAction",KP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,a=La(n);return w.jsx(Bk,{...a,...r,ref:t})});KP.displayName=V7;var XP="AlertDialogCancel",ZP=A.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:a}=$7(XP,n),i=La(n),l=ft(t,a);return w.jsx(Bk,{...i,...r,ref:l})});ZP.displayName=XP;var W7=({contentRef:e})=>{const t=`\`${sl}\` requires a description for the component to be accessible for screen reader users.
|
||
|
|
||
|
You can add a description to the \`${sl}\` by passing a \`${WP}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||
|
|
||
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${sl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||
|
|
||
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Y7=jP,K7=GP,QP=HP,JP=qP,eB=KP,tB=ZP,nB=VP,rB=YP;const X7=["top","right","bottom","left"],yo=Math.min,Kn=Math.max,Od=Math.round,jc=Math.floor,Kr=e=>({x:e,y:e}),Z7={left:"right",right:"left",bottom:"top",top:"bottom"},Q7={start:"end",end:"start"};function wx(e,t,n){return Kn(e,yo(t,n))}function Ia(e,t){return typeof e=="function"?e(t):e}function Da(e){return e.split("-")[0]}function Al(e){return e.split("-")[1]}function Uk(e){return e==="x"?"y":"x"}function jk(e){return e==="y"?"height":"width"}function vo(e){return["top","bottom"].includes(Da(e))?"y":"x"}function Gk(e){return Uk(vo(e))}function J7(e,t,n){n===void 0&&(n=!1);const r=Al(e),a=Gk(e),i=jk(a);let l=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Id(l)),[l,Id(l)]}function eV(e){const t=Id(e);return[xx(e),t,xx(t)]}function xx(e){return e.replace(/start|end/g,t=>Q7[t])}function tV(e,t,n){const r=["left","right"],a=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?i:l;default:return[]}}function nV(e,t,n,r){const a=Al(e);let i=tV(Da(e),n==="start",r);return a&&(i=i.map(l=>l+"-"+a),t&&(i=i.concat(i.map(xx)))),i}function Id(e){return e.replace(/left|right|bottom|top/g,t=>Z7[t])}function rV(e){return{top:0,right:0,bottom:0,left:0,...e}}function aB(e){return typeof e!="number"?rV(e):{top:e,right:e,bottom:e,left:e}}function Dd(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function LR(e,t,n){let{reference:r,floating:a}=e;const i=vo(t),l=Gk(t),u=jk(l),c=Da(t),f=i==="y",p=r.x+r.width/2-a.width/2,g=r.y+r.height/2-a.height/2,b=r[u]/2-a[u]/2;let m;switch(c){case"top":m={x:p,y:r.y-a.height};break;case"bottom":m={x:p,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:g};break;case"left":m={x:r.x-a.width,y:g};break;default:m={x:r.x,y:r.y}}switch(Al(t)){case"start":m[l]-=b*(n&&f?-1:1);break;case"end":m[l]+=b*(n&&f?-1:1);break}return m}const aV=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:l}=n,u=i.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=LR(f,r,c),b=r,m={},S=0;for(let v=0;v<u.length;v++){const{name:k,fn:R}=u[v],{x,y:T,data:O,reset:N}=await R({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:m,rects:f,platform:l,elements:{reference:e,floating:t}});p=x??p,g=T??g,m={...m,[k]:{...m[k],...O}},N&&S<=50&&(S++,typeof N=="object"&&(N.placement&&(b=N.placement),N.rects&&(f=N.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:p,y:g}=LR(f,b,c)),v=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:m}};async function Qs(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:l,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:b=!1,padding:m=0}=Ia(t,e),S=aB(m),k=u[b?g==="floating"?"reference":"floating":g],R=Dd(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(k)))==null||n?k:k.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:p,strategy:c})),x=g==="floating"?{x:r,y:a,width:l.floating.width,height:l.floating.height}:l.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),O=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},N=Dd(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:x,offsetParent:T,strategy:c}):x);return{top:(R.top-N.top+S.top)/O.y,bottom:(N.bottom-R.bottom+S.bottom)/O.y,left:(R.left-N.left+S.left)/O.x,right:(N.right
|
||
|
`);function Gc(e){return e.label!==void 0}var GW=3,HW="32px",qW="16px",GR=4e3,$W=356,VW=14,WW=20,YW=200;function Ar(...e){return e.filter(Boolean).join(" ")}function KW(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var XW=e=>{var t,n,r,a,i,l,u,c,f,p,g;let{invert:b,toast:m,unstyled:S,interacting:v,setHeights:k,visibleToasts:R,heights:x,index:T,toasts:O,expanded:N,removeToast:_,defaultRichColors:C,closeButton:z,style:D,cancelButtonStyle:M,actionButtonStyle:H,className:$="",descriptionClassName:U="",duration:W,position:Z,gap:j,loadingIcon:G,expandByDefault:P,classNames:X,icons:I,closeButtonAriaLabel:V="Close toast",pauseWhenPageIsHidden:B}=e,[L,Y]=ye.useState(null),[Q,se]=ye.useState(null),[re,le]=ye.useState(!1),[Ae,ae]=ye.useState(!1),[we,xe]=ye.useState(!1),[De,Ce]=ye.useState(!1),[Ee,J]=ye.useState(!1),[fe,ke]=ye.useState(0),[me,ve]=ye.useState(0),ie=ye.useRef(m.duration||W||GR),ze=ye.useRef(null),Pe=ye.useRef(null),he=T===0,Ne=T+1<=R,ee=m.type,ce=m.dismissible!==!1,Re=m.className||"",Me=m.descriptionClassName||"",$e=ye.useMemo(()=>x.findIndex(Ye=>Ye.toastId===m.id)||0,[x,m.id]),mt=ye.useMemo(()=>{var Ye;return(Ye=m.closeButton)!=null?Ye:z},[m.closeButton,z]),St=ye.useMemo(()=>m.duration||W||GR,[m.duration,W]),pt=ye.useRef(0),Qe=ye.useRef(0),Et=ye.useRef(0),rt=ye.useRef(null),[bt,Bt]=Z.split("-"),sn=ye.useMemo(()=>x.reduce((Ye,gt,_t)=>_t>=$e?Ye:Ye+gt.height,0),[x,$e]),Mt=LW(),er=m.invert||b,zr=ee==="loading";Qe.current=ye.useMemo(()=>$e*j+sn,[$e,sn]),ye.useEffect(()=>{ie.current=St},[St]),ye.useEffect(()=>{le(!0)},[]),ye.useEffect(()=>{let Ye=Pe.current;if(Ye){let gt=Ye.getBoundingClientRect().height;return ve(gt),k(_t=>[{toastId:m.id,height:gt,position:m.position},..._t]),()=>k(_t=>_t.filter(Rn=>Rn.toastId!==m.id))}},[k,m.id]),ye.useLayoutEffect(()=>{if(!re)return;let Ye=Pe.current,gt=Ye.style.height;Ye.style.height="auto";let _t=Ye.getBoundingClientRect().height;Ye.style.height=gt,ve(_t),k(Rn=>Rn.find(kn=>kn.toastId===m.id)?Rn.map(kn=>kn.toastId===m.id?{...kn,height:_t}:kn):[{toastId:m.id,height:_t,position:m.position},...Rn])},[re,m.title,m.description,k,m.id]);let Kt=ye.useCallback(()=>{ae(!0),ke(Qe.current),k(Ye=>Ye.filter(gt=>gt.toastId!==m.id)),setTimeout(()=>{_(m)},YW)},[m,_,k,Qe]);ye.useEffect(()=>{if(m.promise&&ee==="loading"||m.duration===1/0||m.type==="loading")return;let Ye;return N||v||B&&Mt?(()=>{if(Et.current<pt.current){let gt=new Date().getTime()-pt.current;ie.current=ie.current-gt}Et.current=new Date().getTime()})():ie.current!==1/0&&(pt.current=new Date().getTime(),Ye=setTimeout(()=>{var gt;(gt=m.onAutoClose)==null||gt.call(m,m),Kt()},ie.current)),()=>clearTimeout(Ye)},[N,v,m,ee,B,Mt,Kt]),ye.useEffect(()=>{m.delete&&Kt()},[Kt,m.delete]);function na(){var Ye,gt,_t;return I!=null&&I.loading?ye.createElement("div",{className:Ar(X==null?void 0:X.loader,(Ye=m==null?void 0:m.classNames)==null?void 0:Ye.loader,"sonner-loader"),"data-visible":ee==="loading"},I.loading):G?ye.createElement("div",{className:Ar(X==null?void 0:X.loader,(gt=m==null?void 0:m.classNames)==null?void 0:gt.loader,"sonner-loader"),"data-visible":ee==="loading"},G):ye.createElement(RW,{className:Ar(X==null?void 0:X.loader,(_t=m==null?void 0:m.classNames)==null?void 0:_t.loader),visible:ee==="loading"})}return ye.createElement("li",{tabIndex:0,ref:Pe,className:Ar($,Re,X==null?void 0:X.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,X==null?void 0:X.default,X==null?void 0:X[ee],(n=m==null?void 0:m.classNames)==null?void 0:n[ee]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:C,"data-styled":!(m.jsx||m.unstyled||S),"data-mounted":re,"data-promise":!!m.promise,"data-swiped":Ee,"data-removed":Ae,"data-visible":Ne,"data-y-position":bt,"data-x-position":Bt,"data-index":T,"data-front":he,"data-swiping":we,"data-dismissible":ce,"data-type":ee,"data-invert":er,"data-swipe-out":De,"data-swipe-direction":Q,"data-expanded":!!(N||P&&re),style:{"--index":T,"--toasts-before":T,"--z-index":O.length-T,"--offset":`${Ae?fe:Qe.current}px`,"--initial-height":P?"auto":`${me}px`,...D,...m.style},onDragEnd:()=>{
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bl(e,t){return HK(e)||qK(e,t)||MU(e,t)||$K()}var wh={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},FU=new Int8Array(4),md=new Int32Array(FU.buffer,0,1),zU=new Float32Array(FU.buffer,0,1),VK=/^\s*rgba?\s*\(/,WK=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function YK(e){var t=0,n=0,r=0,a=1;if(e[0]==="#")e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(a=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(VK.test(e)){var i=e.match(WK);i&&(t=+i[1],n=+i[2],r=+i[3],i[4]&&(a=+i[4]))}return{r:t,g:n,b:r,a}}var cl={};for(var Vc in wh)cl[Vc]=Qr(wh[Vc]),cl[wh[Vc]]=cl[Vc];function PU(e,t,n,r,a){return md[0]=r<<24|n<<16|t<<8|e,md[0]=md[0]&4278190079,zU[0]}function Qr(e){if(e=e.toLowerCase(),typeof cl[e]<"u")return cl[e];var t=YK(e),n=t.r,r=t.g,a=t.b,i=t.a;i=i*255|0;var l=PU(n,r,a,i);return cl[e]=l,l}function KK(e,t){zU[0]=Qr(e);var n=md[0],r=n&25
|
||
|
`.concat(l,`
|
||
|
`).concat(n))}return a}function QK(e,t){return jU("VERTEX",e,t)}function JK(e,t){return jU("FRAGMENT",e,t)}function eX(e,t){var n=e.createProgram();if(n===null)throw new Error("loadProgram: error while creating the program.");var r,a;for(r=0,a=t.length;r<a;r++)e.attachShader(n,t[r]);e.linkProgram(n);var i=e.getProgramParameter(n,e.LINK_STATUS);if(!i)throw e.deleteProgram(n),new Error("loadProgram: error while linking the program.");return n}function QR(e){var t=e.gl,n=e.buffer,r=e.program,a=e.vertexShader,i=e.fragmentShader;t.deleteShader(a),t.deleteShader(i),t.deleteProgram(r),t.deleteBuffer(n)}function JR(e){return e%1===0?e.toFixed(1):e.toString()}var eC=`#define PICKING_MODE
|
||
|
`,tX=_e(_e(_e(_e(_e(_e(_e(_e({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),GU=function(){function e(t,n,r){on(this,e),_e(this,"array",new Float32Array),_e(this,"constantArray",new Float32Array),_e(this,"capacity",0),_e(this,"verticesCount",0);var a=this.getDefinition();if(this.VERTICES=a.VERTICES,this.VERTEX_SHADER_SOURCE=a.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=a.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=a.UNIFORMS,this.ATTRIBUTES=a.ATTRIBUTES,this.METHOD=a.METHOD,this.CONSTANT_ATTRIBUTES="CONSTANT_ATTRIBUTES"in a?a.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA="CONSTANT_DATA"in a?a.CONSTANT_DATA:[],this.isInstanced="CONSTANT_ATTRIBUTES"in a,this.ATTRIBUTES_ITEMS_COUNT=kh(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=r,this.normalProgram=this.getProgramInfo("normal",t,a.VERTEX_SHADER_SOURCE,a.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo("pick",t,eC+a.VERTEX_SHADER_SOURCE,eC+a.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var i=kh(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES," items, received ").concat(this.CONSTANT_DATA.length," instead)"));this.constantArray=new Float32Array(this.CONSTANT_DATA.length*i);for(var l=0;l<this.CONSTANT_DATA.length;l++){var u=this.CONSTANT_DATA[l];if(u.length!==i)throw new Error("Program: error while getting constant data (one vector has ".concat(u.length," items instead of ").concat(i,")"));for(var c=0;c<u.length;c++)this.constantArray[l*i+c]=u[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return ln(e,[{key:"kill",value:function(){QR(this.normalProgram),this.pickProgram&&(QR(this.pickProgram),this.pickProgram=null)}},{key:"getProgramInfo",value:function(n,r,a,i,l){var u=this.getDefinition(),c=r.createBuffer();if(c===null)throw new Error("Program: error while creating the WebGL buffer.");var f=QK(r,a),p=JK(r,i),g=eX(r,[f,p]),b={};u.UNIFORMS.forEach(function(v){var k=r.getUniformLocation(g,v);k&&(b[v]=k)});var m={};u.ATTRIBUTES.forEach(function(v){m[v.name]=r.getAttribLocation(g,v.name)});var S;if("CONSTANT_ATTRIBUTES"in u&&(u.CONSTANT_ATTRIBUTES.forEach(function(v){m[v.name]=r.getAttribLocation(g,v.name)}),S=r.createBuffer(),S===null))throw new Error("Program: error while creating the WebGL constant buffer.");return{name:n,program:g,gl:r,frameBuffer:l,buffer:c,constantBuffer:S||{},uniformLocations:b,attributeLocations:m,isPicking:n==="pick",vertexShader:f,fragmentShader:p}}},{key:"bindProgram",value:function(n){var r=this,a=0,i=n.gl,l=n.buffer;this.isInstanced?(i.bindBuffer(i.ARRAY_BUFFER,n.constantBuffer),a=0,this.CONSTANT_ATTRIBUTES.forEach(function(u){return a+=r.bindAttribute(u,n,a,!1)}),i.bufferData(i.ARRAY_BUFFER,this.constantArray,i.STATIC_DRAW),i.bindBuffer(i.ARRAY_BUFFER,n.buffer),a=0,this.ATTRIBUTES.forEach(function(u){return a+=r.bindAttribute(u,n,a,!0)}),i.bufferData(i.ARRAY_BUFFER,this.array,i.DYNAMIC_DRAW)):(i.bindBuffer(i.ARRAY_BUFFER,l),a=0,this.ATTRIBUTES.forEach(function(u){return a+=r.bindAttribute(u,n,a)}),i.bufferData(i.ARRAY_BUFFER,this.array,i.DYNAMIC_DRAW)),i.bindBuffer(i.ARRAY_BUFFER,null)}},{key:"unbindProgram",value:function(n){var r=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(a){return r.unbindAttribute(a,n,!1)}),this.ATTRIBUTES.forEach(function(a){return r.unbindAttribute(a,n,!0)})):this.ATTRIBUTES.forEach(function(a){return r.unbindAttribute(a,n)})}},{key:"bindAttribute",value:function(n,r,a,i){var l=tX[n.type];if(typeof l!="number")throw new Error('Program.bind: yet unsupported attribute type "'.concat(n.type,'"'));var u=r.attributeLocations[n.name],c=r.gl;if(u!==-1){c.enableVertexAttribArray(u);var f=this.isInstanced?(i?this.ATTRIBUTES_ITEMS_COUNT:kh(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_C
|
||
|
precision highp float;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_diffVector;
|
||
|
varying float v_radius;
|
||
|
|
||
|
uniform float u_correctionRatio;
|
||
|
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main(void) {
|
||
|
float border = u_correctionRatio * 2.0;
|
||
|
float dist = length(v_diffVector) - v_radius + border;
|
||
|
|
||
|
// No antialiasing for picking mode:
|
||
|
#ifdef PICKING_MODE
|
||
|
if (dist > border)
|
||
|
gl_FragColor = transparent;
|
||
|
else
|
||
|
gl_FragColor = v_color;
|
||
|
|
||
|
#else
|
||
|
float t = 0.0;
|
||
|
if (dist > border)
|
||
|
t = 1.0;
|
||
|
else if (dist > 0.0)
|
||
|
t = dist / border;
|
||
|
|
||
|
gl_FragColor = mix(v_color, transparent, t);
|
||
|
#endif
|
||
|
}
|
||
|
`,oX=aX,iX=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute vec2 a_position;
|
||
|
attribute float a_size;
|
||
|
attribute float a_angle;
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_diffVector;
|
||
|
varying float v_radius;
|
||
|
varying float v_border;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
|
||
|
vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
|
||
|
vec2 position = a_position + diffVector;
|
||
|
gl_Position = vec4(
|
||
|
(u_matrix * vec3(position, 1)).xy,
|
||
|
0,
|
||
|
1
|
||
|
);
|
||
|
|
||
|
v_diffVector = diffVector;
|
||
|
v_radius = size / 2.0;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,lX=iX,$U=WebGLRenderingContext,tC=$U.UNSIGNED_BYTE,Ah=$U.FLOAT,sX=["u_sizeRatio","u_correctionRatio","u_matrix"],yu=function(e){function t(){return on(this,t),Bn(this,t,arguments)}return Un(t,e),ln(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:lX,FRAGMENT_SHADER_SOURCE:oX,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:sX,ATTRIBUTES:[{name:"a_position",size:2,type:Ah},{name:"a_size",size:1,type:Ah},{name:"a_color",size:4,type:tC,normalized:!0},{name:"a_id",size:4,type:tC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:Ah}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:"processVisibleItem",value:function(r,a,i){var l=this.array,u=Qr(i.color);l[a++]=i.x,l[a++]=i.y,l[a++]=i.size,l[a++]=u,l[a++]=r}},{key:"setUniforms",value:function(r,a){var i=a.gl,l=a.uniformLocations,u=l.u_sizeRatio,c=l.u_correctionRatio,f=l.u_matrix;i.uniform1f(c,r.correctionRatio),i.uniform1f(u,r.sizeRatio),i.uniformMatrix3fv(f,!1,r.matrix)}}])}(c0);_e(yu,"ANGLE_1",0);_e(yu,"ANGLE_2",2*Math.PI/3);_e(yu,"ANGLE_3",4*Math.PI/3);var uX=`
|
||
|
precision mediump float;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
|
||
|
void main(void) {
|
||
|
gl_FragColor = v_color;
|
||
|
}
|
||
|
`,cX=uX,dX=`
|
||
|
attribute vec2 a_position;
|
||
|
attribute vec2 a_normal;
|
||
|
attribute float a_radius;
|
||
|
attribute vec3 a_barycentric;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
attribute vec4 a_id;
|
||
|
#else
|
||
|
attribute vec4 a_color;
|
||
|
#endif
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
uniform float u_minEdgeThickness;
|
||
|
uniform float u_lengthToThicknessRatio;
|
||
|
uniform float u_widenessToThicknessRatio;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
float minThickness = u_minEdgeThickness;
|
||
|
|
||
|
float normalLength = length(a_normal);
|
||
|
vec2 unitNormal = a_normal / normalLength;
|
||
|
|
||
|
// These first computations are taken from edge.vert.glsl and
|
||
|
// edge.clamped.vert.glsl. Please read it to get better comments on what's
|
||
|
// happening:
|
||
|
float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);
|
||
|
float webGLThickness = pixelsThickness * u_correctionRatio;
|
||
|
float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;
|
||
|
float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
||
|
float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;
|
||
|
|
||
|
float da = a_barycentric.x;
|
||
|
float db = a_barycentric.y;
|
||
|
float dc = a_barycentric.z;
|
||
|
|
||
|
vec2 delta = vec2(
|
||
|
da * (webGLNodeRadius * unitNormal.y)
|
||
|
+ db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)
|
||
|
+ dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),
|
||
|
|
||
|
da * (-webGLNodeRadius * unitNormal.x)
|
||
|
+ db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)
|
||
|
+ dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)
|
||
|
);
|
||
|
|
||
|
vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;
|
||
|
|
||
|
gl_Position = vec4(position, 0, 1);
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,fX=dX,VU=WebGLRenderingContext,nC=VU.UNSIGNED_BYTE,Wc=VU.FLOAT,pX=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],vu={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function Fd(e){var t=Be(Be({},vu),e||{});return function(n){function r(){return on(this,r),Bn(this,r,arguments)}return Un(r,n),ln(r,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:fX,FRAGMENT_SHADER_SOURCE:cX,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:pX,ATTRIBUTES:[{name:"a_position",size:2,type:Wc},{name:"a_normal",size:2,type:Wc},{name:"a_radius",size:1,type:Wc},{name:"a_color",size:4,type:nC,normalized:!0},{name:"a_id",size:4,type:nC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:Wc}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(i,l,u,c,f){if(t.extremity==="source"){var p=[c,u];u=p[0],c=p[1]}var g=f.size||1,b=c.size||1,m=u.x,S=u.y,v=c.x,k=c.y,R=Qr(f.color),x=v-m,T=k-S,O=x*x+T*T,N=0,_=0;O&&(O=1/Math.sqrt(O),N=-T*O*g,_=x*O*g);var C=this.array;C[l++]=v,C[l++]=k,C[l++]=-N,C[l++]=-_,C[l++]=b,C[l++]=R,C[l++]=i}},{key:"setUniforms",value:function(i,l){var u=l.gl,c=l.uniformLocations,f=c.u_matrix,p=c.u_sizeRatio,g=c.u_correctionRatio,b=c.u_minEdgeThickness,m=c.u_lengthToThicknessRatio,S=c.u_widenessToThicknessRatio;u.uniformMatrix3fv(f,!1,i.matrix),u.uniform1f(p,i.sizeRatio),u.uniform1f(g,i.correctionRatio),u.uniform1f(b,i.minEdgeThickness),u.uniform1f(m,t.lengthToThicknessRatio),u.uniform1f(S,t.widenessToThicknessRatio)}}])}(bu)}Fd();var gX=`
|
||
|
precision mediump float;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_normal;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main(void) {
|
||
|
// We only handle antialiasing for normal mode:
|
||
|
#ifdef PICKING_MODE
|
||
|
gl_FragColor = v_color;
|
||
|
#else
|
||
|
float dist = length(v_normal) * v_thickness;
|
||
|
|
||
|
float t = smoothstep(
|
||
|
v_thickness - v_feather,
|
||
|
v_thickness,
|
||
|
dist
|
||
|
);
|
||
|
|
||
|
gl_FragColor = mix(v_color, transparent, t);
|
||
|
#endif
|
||
|
}
|
||
|
`,d0=gX,hX=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute vec2 a_normal;
|
||
|
attribute float a_normalCoef;
|
||
|
attribute vec2 a_positionStart;
|
||
|
attribute vec2 a_positionEnd;
|
||
|
attribute float a_positionCoef;
|
||
|
attribute float a_radius;
|
||
|
attribute float a_radiusCoef;
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_zoomRatio;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_pixelRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
uniform float u_minEdgeThickness;
|
||
|
uniform float u_lengthToThicknessRatio;
|
||
|
uniform float u_feather;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_normal;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
float minThickness = u_minEdgeThickness;
|
||
|
|
||
|
float radius = a_radius * a_radiusCoef;
|
||
|
vec2 normal = a_normal * a_normalCoef;
|
||
|
vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
|
||
|
|
||
|
float normalLength = length(normal);
|
||
|
vec2 unitNormal = normal / normalLength;
|
||
|
|
||
|
// These first computations are taken from edge.vert.glsl. Please read it to
|
||
|
// get better comments on what's happening:
|
||
|
float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
|
||
|
float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
|
||
|
|
||
|
// Here, we move the point to leave space for the arrow head:
|
||
|
float direction = sign(radius);
|
||
|
float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;
|
||
|
float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
||
|
|
||
|
vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);
|
||
|
|
||
|
// Here is the proper position of the vertex
|
||
|
gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);
|
||
|
|
||
|
v_thickness = webGLThickness / u_zoomRatio;
|
||
|
|
||
|
v_normal = unitNormal;
|
||
|
|
||
|
v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,mX=hX,WU=WebGLRenderingContext,rC=WU.UNSIGNED_BYTE,Yo=WU.FLOAT,bX=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],yX={lengthToThicknessRatio:vu.lengthToThicknessRatio};function YU(e){var t=Be(Be({},yX),{});return function(n){function r(){return on(this,r),Bn(this,r,arguments)}return Un(r,n),ln(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:mX,FRAGMENT_SHADER_SOURCE:d0,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:bX,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Yo},{name:"a_positionEnd",size:2,type:Yo},{name:"a_normal",size:2,type:Yo},{name:"a_color",size:4,type:rC,normalized:!0},{name:"a_id",size:4,type:rC,normalized:!0},{name:"a_radius",size:1,type:Yo}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Yo},{name:"a_normalCoef",size:1,type:Yo},{name:"a_radiusCoef",size:1,type:Yo}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(i,l,u,c,f){var p=f.size||1,g=u.x,b=u.y,m=c.x,S=c.y,v=Qr(f.color),k=m-g,R=S-b,x=c.size||1,T=k*k+R*R,O=0,N=0;T&&(T=1/Math.sqrt(T),O=-R*T*p,N=k*T*p);var _=this.array;_[l++]=g,_[l++]=b,_[l++]=m,_[l++]=S,_[l++]=O,_[l++]=N,_[l++]=v,_[l++]=i,_[l++]=x}},{key:"setUniforms",value:function(i,l){var u=l.gl,c=l.uniformLocations,f=c.u_matrix,p=c.u_zoomRatio,g=c.u_feather,b=c.u_pixelRatio,m=c.u_correctionRatio,S=c.u_sizeRatio,v=c.u_minEdgeThickness,k=c.u_lengthToThicknessRatio;u.uniformMatrix3fv(f,!1,i.matrix),u.uniform1f(p,i.zoomRatio),u.uniform1f(S,i.sizeRatio),u.uniform1f(m,i.correctionRatio),u.uniform1f(b,i.pixelRatio),u.uniform1f(g,i.antiAliasingFeather),u.uniform1f(v,i.minEdgeThickness),u.uniform1f(k,t.lengthToThicknessRatio)}}])}(bu)}YU();function vX(e){return HU([YU(),Fd(e)])}var SX=vX(),KU=SX,EX=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute vec2 a_normal;
|
||
|
attribute float a_normalCoef;
|
||
|
attribute vec2 a_positionStart;
|
||
|
attribute vec2 a_positionEnd;
|
||
|
attribute float a_positionCoef;
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_zoomRatio;
|
||
|
uniform float u_pixelRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
uniform float u_minEdgeThickness;
|
||
|
uniform float u_feather;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_normal;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
float minThickness = u_minEdgeThickness;
|
||
|
|
||
|
vec2 normal = a_normal * a_normalCoef;
|
||
|
vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
|
||
|
|
||
|
float normalLength = length(normal);
|
||
|
vec2 unitNormal = normal / normalLength;
|
||
|
|
||
|
// We require edges to be at least "minThickness" pixels thick *on screen*
|
||
|
// (so we need to compensate the size ratio):
|
||
|
float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
|
||
|
|
||
|
// Then, we need to retrieve the normalized thickness of the edge in the WebGL
|
||
|
// referential (in a ([0, 1], [0, 1]) space), using our "magic" correction
|
||
|
// ratio:
|
||
|
float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
|
||
|
|
||
|
// Here is the proper position of the vertex
|
||
|
gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);
|
||
|
|
||
|
// For the fragment shader though, we need a thickness that takes the "magic"
|
||
|
// correction ratio into account (as in webGLThickness), but so that the
|
||
|
// antialiasing effect does not depend on the zoom level. So here's yet
|
||
|
// another thickness version:
|
||
|
v_thickness = webGLThickness / u_zoomRatio;
|
||
|
|
||
|
v_normal = unitNormal;
|
||
|
|
||
|
v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,wX=EX,XU=WebGLRenderingContext,aC=XU.UNSIGNED_BYTE,Ms=XU.FLOAT,xX=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],kX=function(e){function t(){return on(this,t),Bn(this,t,arguments)}return Un(t,e),ln(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:wX,FRAGMENT_SHADER_SOURCE:d0,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:xX,ATTRIBUTES:[{name:"a_positionStart",size:2,type:Ms},{name:"a_positionEnd",size:2,type:Ms},{name:"a_normal",size:2,type:Ms},{name:"a_color",size:4,type:aC,normalized:!0},{name:"a_id",size:4,type:aC,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:Ms},{name:"a_normalCoef",size:1,type:Ms}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(r,a,i,l,u){var c=u.size||1,f=i.x,p=i.y,g=l.x,b=l.y,m=Qr(u.color),S=g-f,v=b-p,k=S*S+v*v,R=0,x=0;k&&(k=1/Math.sqrt(k),R=-v*k*c,x=S*k*c);var T=this.array;T[a++]=f,T[a++]=p,T[a++]=g,T[a++]=b,T[a++]=R,T[a++]=x,T[a++]=m,T[a++]=r}},{key:"setUniforms",value:function(r,a){var i=a.gl,l=a.uniformLocations,u=l.u_matrix,c=l.u_zoomRatio,f=l.u_feather,p=l.u_pixelRatio,g=l.u_correctionRatio,b=l.u_sizeRatio,m=l.u_minEdgeThickness;i.uniformMatrix3fv(u,!1,r.matrix),i.uniform1f(c,r.zoomRatio),i.uniform1f(b,r.sizeRatio),i.uniform1f(g,r.correctionRatio),i.uniform1f(p,r.pixelRatio),i.uniform1f(f,r.antiAliasingFeather),i.uniform1f(m,r.minEdgeThickness)}}])}(bu),f0=function(e){function t(){var n;return on(this,t),n=Bn(this,t),n.rawEmitter=n,n}return Un(t,e),ln(t)}(SU.EventEmitter),Th,oC;function Jr(){return oC||(oC=1,Th=function(t){return t!==null&&typeof t=="object"&&typeof t.addUndirectedEdgeWithKey=="function"&&typeof t.dropNode=="function"&&typeof t.multi=="boolean"}),Th}var AX=Jr();const TX=an(AX);var _X=function(t){return t},RX=function(t){return t*t},CX=function(t){return t*(2-t)},NX=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},OX=function(t){return t*t*t},IX=function(t){return--t*t*t+1},DX=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},ZU={linear:_X,quadraticIn:RX,quadraticOut:CX,quadraticInOut:NX,cubicIn:OX,cubicOut:IX,cubicInOut:DX},QU={easing:"quadraticInOut",duration:150};function LX(e,t,n,r){var a=Object.assign({},QU,n),i=typeof a.easing=="function"?a.easing:ZU[a.easing],l=Date.now(),u={};for(var c in t){var f=t[c];u[c]={};for(var p in f)u[c][p]=e.getNodeAttribute(c,p)}var g=null,b=function(){g=null;var S=(Date.now()-l)/a.duration;if(S>=1){for(var v in t){var k=t[v];for(var R in k)e.setNodeAttribute(v,R,k[R])}return}S=i(S);for(var x in t){var T=t[x],O=u[x];for(var N in T)e.setNodeAttribute(x,N,T[N]*S+O[N]*(1-S))}g=requestAnimationFrame(b)};return b(),function(){g&&cancelAnimationFrame(g)}}function _r(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function Yc(e,t,n){return e[0]=t,e[4]=typeof n=="number"?n:t,e}function iC(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function lC(e,t,n){return e[6]=t,e[7]=n,e}function io(e,t){var n=e[0],r=e[1],a=e[2],i=e[3],l=e[4],u=e[5],c=e[6],f=e[7],p=e[8],g=t[0],b=t[1],m=t[2],S=t[3],v=t[4],k=t[5],R=t[6],x=t[7],T=t[8];return e[0]=g*n+b*i+m*c,e[1]=g*r+b*l+m*f,e[2]=g*a+b*u+m*p,e[3]=S*n+v*i+k*c,e[4]=S*r+v*l+k*f,e[5]=S*a+v*u+k*p,e[6]=R*n+x*i+T*c,e[7]=R*r+x*l+T*f,e[8]=R*a+x*u+T*p,e}function Ix(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],a=e[1],i=e[3],l=e[4],u=e[6],c=e[7],f=t.x,p=t.y;return{x:f*r+p*i+u*n,y:f*a+p*l+c*n}}function MX(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function Fs(e,t,n,r,a){var i=e.angle,l=e.ratio,u=e.x,c=e.y,f=t.width,p=t.height,g=_r(),b=Math.min(f,p)-2*r,m=MX(t,n);return a?(io(g,lC(_r(),u,c)),io(g,Yc(_r(),l)),io(g,iC(_r(),i)),io(g,Yc(_r(),f/b/2/m,p/b/2/m))):(io(g,Yc(_r(),2*(b/f)*m,2*(b/p)*m)),io(g,iC(_r(),-i)),io(g,Yc(_r(),1/l)),io(g,lC(_r(),-u,-c))),g}function FX(e,t,n){var r=Ix(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),a=r.x,i=r.y;return 1/Math.sqrt(Math.pow(a,2)+Math.pow(i,2))/n.width}function zX(e){if(!e.order)re
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pC(e){return ZX(e)||QX(e)||MU(e)||JX()}function eZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Ch(e,t){if(e==null)return{};var n,r,a=eZ(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var gC=function(){function e(t,n){on(this,e),this.key=t,this.size=n}return ln(e,null,[{key:"compare",value:function(n,r){return n.size>r.size?-1:n.size<r.size||n.key>r.key?1:-1}}])}(),hC=function(){function e(){on(this,e),_e(this,"width",0),_e(this,"height",0),_e(this,"cellSize",0),_e(this,"columns",0),_e(this,"rows",0),_e(this,"cells",{})}return ln(e,[{key:"resizeAndClear",value:function(n,r){this.width=n.width,this.height=n.height,this.cellSize=r,this.columns=Math.ceil(n.width/r),this.rows=Math.ceil(n.height/r),this.cells={}}},{key:"getIndex",value:function(n){var r=Math.floor(n.x/this.cellSize),a=Math.floor(n.y/this.cellSize);return a*this.columns+r}},{key:"add",value:function(n,r,a){var i=new gC(n,r),l=this.getIndex(a),u=this.cells[l];u||(u=[],this.cells[l]=u),u.push(i)}},{key:"organize",value:function(){for(var n in this.cells){var r=this.cells[n];r.sort(gC.compare)}}},{key:"getLabelsToDisplay",value:function(n,r){var a=this.cellSize*this.cellSize,i=a/n/n,l=i*r/a,u=Math.ceil(l),c=[];for(var f in this.cells)for(var p=this.cells[f],g=0;g<Math.min(u,p.length);g++)c.push(p[g].key);return c}}])}();function tZ(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,a=e.displayedNodeLabels,i=[];return t.forEachEdge(function(l,u,c,f){(c===n||f===n||r.has(c)||r.has(f)||a.has(c)&&a.has(f))&&i.push(l)}),i}var nZ=150,rZ=50,Ca=Object.prototype.hasOwnProperty;function aZ(e,t,n){if(!Ca.call(n,"x")||!Ca.call(n,"y"))throw new Error('Sigma: could not find a valid position (x, y) for node "'.concat(t,'". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?'));return n.color||(n.color=e.defaultNodeColor),!n.label&&n.label!==""&&(n.label=null),n.label!==void 0&&n.label!==null?n.label=""+n.label:n.label=null,n.size||(n.size=2),Ca.call(n,"hidden")||(n.hidden=!1),Ca.call(n,"highlighted")||(n.highlighted=!1),Ca.call(n,"forceLabel")||(n.forceLabel=!1),(!n.type||n.type==="")&&(n.type=e.defaultNodeType),n.zIndex||(n.zIndex=0),n}function oZ(e,t,n){return n.color||(n.color=e.defaultEdgeColor),n.label||(n.label=""),n.size||(n.size=.5),Ca.call(n,"hidden")||(n.hidden=!1),Ca.call(n,"forceLabel")||(n.forceLabel=!1),(!n.type||n.type==="")&&(n.type=e.defaultEdgeType),n.zIndex||(n.zIndex=0),n}var iZ=function(e){function t(n,r){var a,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(on(this,t),a=Bn(this,t),_e(a,"elements",{}),_e(a,"canvasContexts",{}),_e(a,"webGLContexts",{}),_e(a,"pickingLayers",new Set),_e(a,"textures",{}),_e(a,"frameBuffers",{}),_e(a,"activeListeners",{}),_e(a,"labelGrid",new hC),_e(a,"nodeDataCache",{}),_e(a,"edgeDataCache",{}),_e(a,"nodeProgramIndex",{}),_e(a,"edgeProgramIndex",{}),_e(a,"nodesWithForcedLabels",new Set),_e(a,"edgesWithForcedLabels",new Set),_e(a,"nodeExtent",{x:[0,1],y:[0,1]}),_e(a,"nodeZExtent",[1/0,-1/0]),_e(a,"edgeZExtent",[1/0,-1/0]),_e(a,"matrix",_r()),_e(a,"invMatrix",_r()),_e(a,"correctionRatio",1),_e(a,"customBBox",null),_e(a,"normalizationFunction",cC({x:[0,1],y:[0,1]})),_e(a,"graphToViewportRatio",1),_e(a,"itemIDsIndex",{}),_e(a,"nodeIndices",{}),_e(a,"edgeIndices",{}),_e(a,"width",0),_e(a,"height",0),_e(a,"pixelRatio",sC()),_e(a,"pickingDownSizingRatio",2*a.pixelRatio),_e(a,"displayedNodeLabels",new Set),_e(a,"displayedEdgeLabels",new Set),_e(a,"highlightedNodes",new Set),_e(a,"hoveredNode",null),_e(a,"hoveredEdge",null),_e(a,"renderFrame",null),_e(a,"renderHighlightedNodesFrame",null),_e(a,"needToProcess",!1),_e(a,"checkEdgesEventsFrame",null),_e(a,"nodePrograms",{}),_e(a,"nodeHoverPrograms",{}),_e(a,"edgePrograms",{}),
|
||
|
precision mediump float;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying float v_border;
|
||
|
|
||
|
const float radius = 0.5;
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main(void) {
|
||
|
vec2 m = gl_PointCoord - vec2(0.5, 0.5);
|
||
|
float dist = radius - length(m);
|
||
|
|
||
|
// No antialiasing for picking mode:
|
||
|
#ifdef PICKING_MODE
|
||
|
if (dist > v_border)
|
||
|
gl_FragColor = v_color;
|
||
|
else
|
||
|
gl_FragColor = transparent;
|
||
|
|
||
|
#else
|
||
|
float t = 0.0;
|
||
|
if (dist > v_border)
|
||
|
t = 1.0;
|
||
|
else if (dist > 0.0)
|
||
|
t = dist / v_border;
|
||
|
|
||
|
gl_FragColor = mix(transparent, v_color, t);
|
||
|
#endif
|
||
|
}
|
||
|
`,fZ=dZ,pZ=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute vec2 a_position;
|
||
|
attribute float a_size;
|
||
|
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_pixelRatio;
|
||
|
uniform mat3 u_matrix;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying float v_border;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
gl_Position = vec4(
|
||
|
(u_matrix * vec3(a_position, 1)).xy,
|
||
|
0,
|
||
|
1
|
||
|
);
|
||
|
|
||
|
// Multiply the point size twice:
|
||
|
// - x SCALING_RATIO to correct the canvas scaling
|
||
|
// - x 2 to correct the formulae
|
||
|
gl_PointSize = a_size / u_sizeRatio * u_pixelRatio * 2.0;
|
||
|
|
||
|
v_border = (0.5 / a_size) * u_sizeRatio;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,gZ=pZ,o3=WebGLRenderingContext,SC=o3.UNSIGNED_BYTE,EC=o3.FLOAT,hZ=["u_sizeRatio","u_pixelRatio","u_matrix"],mZ=function(e){function t(){return on(this,t),Bn(this,t,arguments)}return Un(t,e),ln(t,[{key:"getDefinition",value:function(){return{VERTICES:1,VERTEX_SHADER_SOURCE:gZ,FRAGMENT_SHADER_SOURCE:fZ,METHOD:WebGLRenderingContext.POINTS,UNIFORMS:hZ,ATTRIBUTES:[{name:"a_position",size:2,type:EC},{name:"a_size",size:1,type:EC},{name:"a_color",size:4,type:SC,normalized:!0},{name:"a_id",size:4,type:SC,normalized:!0}]}}},{key:"processVisibleItem",value:function(r,a,i){var l=this.array;l[a++]=i.x,l[a++]=i.y,l[a++]=i.size,l[a++]=Qr(i.color),l[a++]=r}},{key:"setUniforms",value:function(r,a){var i=r.sizeRatio,l=r.pixelRatio,u=r.matrix,c=a.gl,f=a.uniformLocations,p=f.u_sizeRatio,g=f.u_pixelRatio,b=f.u_matrix;c.uniform1f(g,l),c.uniform1f(p,i),c.uniformMatrix3fv(b,!1,u)}}])}(c0),bZ=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute vec2 a_normal;
|
||
|
attribute float a_normalCoef;
|
||
|
attribute vec2 a_positionStart;
|
||
|
attribute vec2 a_positionEnd;
|
||
|
attribute float a_positionCoef;
|
||
|
attribute float a_sourceRadius;
|
||
|
attribute float a_targetRadius;
|
||
|
attribute float a_sourceRadiusCoef;
|
||
|
attribute float a_targetRadiusCoef;
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_zoomRatio;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_pixelRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
uniform float u_minEdgeThickness;
|
||
|
uniform float u_lengthToThicknessRatio;
|
||
|
uniform float u_feather;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying vec2 v_normal;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
|
||
|
void main() {
|
||
|
float minThickness = u_minEdgeThickness;
|
||
|
|
||
|
vec2 normal = a_normal * a_normalCoef;
|
||
|
vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
|
||
|
|
||
|
float normalLength = length(normal);
|
||
|
vec2 unitNormal = normal / normalLength;
|
||
|
|
||
|
// These first computations are taken from edge.vert.glsl. Please read it to
|
||
|
// get better comments on what's happening:
|
||
|
float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
|
||
|
float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
|
||
|
|
||
|
// Here, we move the point to leave space for the arrow heads:
|
||
|
// Source arrow head
|
||
|
float sourceRadius = a_sourceRadius * a_sourceRadiusCoef;
|
||
|
float sourceDirection = sign(sourceRadius);
|
||
|
float webGLSourceRadius = sourceDirection * sourceRadius * 2.0 * u_correctionRatio / u_sizeRatio;
|
||
|
float webGLSourceArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
||
|
vec2 sourceCompensationVector =
|
||
|
vec2(-sourceDirection * unitNormal.y, sourceDirection * unitNormal.x)
|
||
|
* (webGLSourceRadius + webGLSourceArrowHeadLength);
|
||
|
|
||
|
// Target arrow head
|
||
|
float targetRadius = a_targetRadius * a_targetRadiusCoef;
|
||
|
float targetDirection = sign(targetRadius);
|
||
|
float webGLTargetRadius = targetDirection * targetRadius * 2.0 * u_correctionRatio / u_sizeRatio;
|
||
|
float webGLTargetArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
||
|
vec2 targetCompensationVector =
|
||
|
vec2(-targetDirection * unitNormal.y, targetDirection * unitNormal.x)
|
||
|
* (webGLTargetRadius + webGLTargetArrowHeadLength);
|
||
|
|
||
|
// Here is the proper position of the vertex
|
||
|
gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + sourceCompensationVector + targetCompensationVector, 1)).xy, 0, 1);
|
||
|
|
||
|
v_thickness = webGLThickness / u_zoomRatio;
|
||
|
|
||
|
v_normal = unitNormal;
|
||
|
|
||
|
v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`,yZ=bZ,i3=WebGLRenderingContext,wC=i3.UNSIGNED_BYTE,wa=i3.FLOAT,vZ=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],SZ={lengthToThicknessRatio:vu.lengthToThicknessRatio};function l3(e){var t=Be(Be({},SZ),{});return function(n){function r(){return on(this,r),Bn(this,r,arguments)}return Un(r,n),ln(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:yZ,FRAGMENT_SHADER_SOURCE:d0,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:vZ,ATTRIBUTES:[{name:"a_positionStart",size:2,type:wa},{name:"a_positionEnd",size:2,type:wa},{name:"a_normal",size:2,type:wa},{name:"a_color",size:4,type:wC,normalized:!0},{name:"a_id",size:4,type:wC,normalized:!0},{name:"a_sourceRadius",size:1,type:wa},{name:"a_targetRadius",size:1,type:wa}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:wa},{name:"a_normalCoef",size:1,type:wa},{name:"a_sourceRadiusCoef",size:1,type:wa},{name:"a_targetRadiusCoef",size:1,type:wa}],CONSTANT_DATA:[[0,1,-1,0],[0,-1,1,0],[1,1,0,1],[1,1,0,1],[0,-1,1,0],[1,-1,0,-1]]}}},{key:"processVisibleItem",value:function(i,l,u,c,f){var p=f.size||1,g=u.x,b=u.y,m=c.x,S=c.y,v=Qr(f.color),k=m-g,R=S-b,x=u.size||1,T=c.size||1,O=k*k+R*R,N=0,_=0;O&&(O=1/Math.sqrt(O),N=-R*O*p,_=k*O*p);var C=this.array;C[l++]=g,C[l++]=b,C[l++]=m,C[l++]=S,C[l++]=N,C[l++]=_,C[l++]=v,C[l++]=i,C[l++]=x,C[l++]=T}},{key:"setUniforms",value:function(i,l){var u=l.gl,c=l.uniformLocations,f=c.u_matrix,p=c.u_zoomRatio,g=c.u_feather,b=c.u_pixelRatio,m=c.u_correctionRatio,S=c.u_sizeRatio,v=c.u_minEdgeThickness,k=c.u_lengthToThicknessRatio;u.uniformMatrix3fv(f,!1,i.matrix),u.uniform1f(p,i.zoomRatio),u.uniform1f(S,i.sizeRatio),u.uniform1f(m,i.correctionRatio),u.uniform1f(b,i.pixelRatio),u.uniform1f(g,i.antiAliasingFeather),u.uniform1f(v,i.minEdgeThickness),u.uniform1f(k,t.lengthToThicknessRatio)}}])}(bu)}l3();function EZ(e){return HU([l3(),Fd(e),Fd(Be(Be({},e),{},{extremity:"source"}))])}EZ();function wZ(e){if(Array.isArray(e))return e}function xZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,u=[],c=!0,f=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(p){f=!0,a=p}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(f)throw a}}return u}}function Lx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s3(e,t){if(e){if(typeof e=="string")return Lx(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lx(e,t):void 0}}function kZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AZ(e,t){return wZ(e)||xZ(e,t)||s3(e,t)||kZ()}function TZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _Z(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u3(e){var t=_Z(e,"string");return typeof t=="symbol"?t:t+""}function RZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u3(r.key),r)}}function CZ(e,t,n){return t&&RZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zd(e){return zd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zd(e)}function c3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c3=function(){return!!e})()}function Mx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NZ(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mx(e)}function OZ(e,t,n){return t=zd(t),NZ(e,c3()?Reflect.construct(t,n||[],zd(e).constructor):t.apply(e,n))}function Fx(e,t){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Fx(e,t)}function IZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fx(e,t)}function nl(e,t,n){return(t=u3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DZ(e){if(Array.isArray(e))return Lx(e)}function LZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nh(e){return DZ(e)||LZ(e)||s3(e)||MZ()}function xC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xC(Object(n),!0).forEach(function(r){nl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var FZ="relative",zZ={drawLabel:void 0,drawHover:void 0,borders:[{size:{value:.1},color:{attribute:"borderColor"}},{size:{fill:!0},color:{attribute:"color"}}]},PZ="#000000";function BZ(e){var t=e.borders,n=JR(t.filter(function(a){var i=a.size;return"fill"in i}).length),r=`
|
||
|
precision highp float;
|
||
|
|
||
|
varying vec2 v_diffVector;
|
||
|
varying float v_radius;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
varying vec4 v_color;
|
||
|
#else
|
||
|
// For normal mode, we use the border colors defined in the program:
|
||
|
`.concat(t.flatMap(function(a,i){var l=a.size;return"attribute"in l?["varying float v_borderSize_".concat(i+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
`).concat(t.flatMap(function(a,i){var l=a.color;return"attribute"in l?["varying vec4 v_borderColor_".concat(i+1,";")]:"value"in l?["uniform vec4 u_borderColor_".concat(i+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
#endif
|
||
|
|
||
|
uniform float u_correctionRatio;
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main(void) {
|
||
|
float dist = length(v_diffVector);
|
||
|
float aaBorder = 2.0 * u_correctionRatio;
|
||
|
float v_borderSize_0 = v_radius;
|
||
|
vec4 v_borderColor_0 = transparent;
|
||
|
|
||
|
// No antialiasing for picking mode:
|
||
|
#ifdef PICKING_MODE
|
||
|
if (dist > v_radius)
|
||
|
gl_FragColor = transparent;
|
||
|
else {
|
||
|
gl_FragColor = v_color;
|
||
|
gl_FragColor.a *= bias;
|
||
|
}
|
||
|
#else
|
||
|
// Sizes:
|
||
|
`).concat(t.flatMap(function(a,i){var l=a.size;if("fill"in l)return[];l=l;var u="attribute"in l?"v_borderSize_".concat(i+1):JR(l.value),c=(l.mode||FZ)==="pixels"?"u_correctionRatio":"v_radius";return[" float borderSize_".concat(i+1," = ").concat(c," * ").concat(u,";")]}).join(`
|
||
|
`),`
|
||
|
// Now, let's split the remaining space between "fill" borders:
|
||
|
float fillBorderSize = (v_radius - (`).concat(t.flatMap(function(a,i){var l=a.size;return"fill"in l?[]:["borderSize_".concat(i+1)]}).join(" + "),") ) / ").concat(n,`;
|
||
|
`).concat(t.flatMap(function(a,i){var l=a.size;return"fill"in l?[" float borderSize_".concat(i+1," = fillBorderSize;")]:[]}).join(`
|
||
|
`),`
|
||
|
|
||
|
// Finally, normalize all border sizes, to start from the full size and to end with the smallest:
|
||
|
float adjustedBorderSize_0 = v_radius;
|
||
|
`).concat(t.map(function(a,i){return" float adjustedBorderSize_".concat(i+1," = adjustedBorderSize_").concat(i," - borderSize_").concat(i+1,";")}).join(`
|
||
|
`),`
|
||
|
|
||
|
// Colors:
|
||
|
vec4 borderColor_0 = transparent;
|
||
|
`).concat(t.map(function(a,i){var l=a.color,u=[];return"attribute"in l?u.push(" vec4 borderColor_".concat(i+1," = v_borderColor_").concat(i+1,";")):"transparent"in l?u.push(" vec4 borderColor_".concat(i+1," = vec4(0.0, 0.0, 0.0, 0.0);")):u.push(" vec4 borderColor_".concat(i+1," = u_borderColor_").concat(i+1,";")),u.push(" borderColor_".concat(i+1,".a *= bias;")),u.push(" if (borderSize_".concat(i+1," <= 1.0 * u_correctionRatio) { borderColor_").concat(i+1," = borderColor_").concat(i,"; }")),u.join(`
|
||
|
`)}).join(`
|
||
|
`),`
|
||
|
if (dist > adjustedBorderSize_0) {
|
||
|
gl_FragColor = borderColor_0;
|
||
|
} else `).concat(t.map(function(a,i){return"if (dist > adjustedBorderSize_".concat(i,` - aaBorder) {
|
||
|
gl_FragColor = mix(borderColor_`).concat(i+1,", borderColor_").concat(i,", (dist - adjustedBorderSize_").concat(i,` + aaBorder) / aaBorder);
|
||
|
} else if (dist > adjustedBorderSize_`).concat(i+1,`) {
|
||
|
gl_FragColor = borderColor_`).concat(i+1,`;
|
||
|
} else `)}).join(""),` { /* Nothing to add here */ }
|
||
|
#endif
|
||
|
}
|
||
|
`);return r}function UZ(e){var t=e.borders,n=`
|
||
|
attribute vec2 a_position;
|
||
|
attribute float a_size;
|
||
|
attribute float a_angle;
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_correctionRatio;
|
||
|
|
||
|
varying vec2 v_diffVector;
|
||
|
varying float v_radius;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
attribute vec4 a_id;
|
||
|
varying vec4 v_color;
|
||
|
#else
|
||
|
`.concat(t.flatMap(function(r,a){var i=r.size;return"attribute"in i?["attribute float a_borderSize_".concat(a+1,";"),"varying float v_borderSize_".concat(a+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
`).concat(t.flatMap(function(r,a){var i=r.color;return"attribute"in i?["attribute vec4 a_borderColor_".concat(a+1,";"),"varying vec4 v_borderColor_".concat(a+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
#endif
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main() {
|
||
|
float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
|
||
|
vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
|
||
|
vec2 position = a_position + diffVector;
|
||
|
gl_Position = vec4(
|
||
|
(u_matrix * vec3(position, 1)).xy,
|
||
|
0,
|
||
|
1
|
||
|
);
|
||
|
|
||
|
v_radius = size / 2.0;
|
||
|
v_diffVector = diffVector;
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
`).concat(t.flatMap(function(r,a){var i=r.size;return"attribute"in i?[" v_borderSize_".concat(a+1," = a_borderSize_").concat(a+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
`).concat(t.flatMap(function(r,a){var i=r.color;return"attribute"in i?[" v_borderColor_".concat(a+1," = a_borderColor_").concat(a+1,";")]:[]}).join(`
|
||
|
`),`
|
||
|
#endif
|
||
|
}
|
||
|
`);return n}var d3=WebGLRenderingContext,AC=d3.UNSIGNED_BYTE,Xc=d3.FLOAT;function jZ(e){var t,n=kC(kC({},zZ),{}),r=n.borders,a=n.drawLabel,i=n.drawHover,l=["u_sizeRatio","u_correctionRatio","u_matrix"].concat(Nh(r.flatMap(function(u,c){var f=u.color;return"value"in f?["u_borderColor_".concat(c+1)]:[]})));return t=function(u){IZ(c,u);function c(){var f;TZ(this,c);for(var p=arguments.length,g=new Array(p),b=0;b<p;b++)g[b]=arguments[b];return f=OZ(this,c,[].concat(g)),nl(Mx(f),"drawLabel",a),nl(Mx(f),"drawHover",i),f}return CZ(c,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:UZ(n),FRAGMENT_SHADER_SOURCE:BZ(n),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:l,ATTRIBUTES:[{name:"a_position",size:2,type:Xc},{name:"a_id",size:4,type:AC,normalized:!0},{name:"a_size",size:1,type:Xc}].concat(Nh(r.flatMap(function(p,g){var b=p.color;return"attribute"in b?[{name:"a_borderColor_".concat(g+1),size:4,type:AC,normalized:!0}]:[]})),Nh(r.flatMap(function(p,g){var b=p.size;return"attribute"in b?[{name:"a_borderSize_".concat(g+1),size:1,type:Xc}]:[]}))),CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:Xc}],CONSTANT_DATA:[[c.ANGLE_1],[c.ANGLE_2],[c.ANGLE_3]]}}},{key:"processVisibleItem",value:function(p,g,b){var m=this.array;m[g++]=b.x,m[g++]=b.y,m[g++]=p,m[g++]=b.size,r.forEach(function(S){var v=S.color;"attribute"in v&&(m[g++]=Qr(b[v.attribute]||v.defaultValue||PZ))}),r.forEach(function(S){var v=S.size;"attribute"in v&&(m[g++]=b[v.attribute]||v.defaultValue)})}},{key:"setUniforms",value:function(p,g){var b=g.gl,m=g.uniformLocations,S=m.u_sizeRatio,v=m.u_correctionRatio,k=m.u_matrix;b.uniform1f(v,p.correctionRatio),b.uniform1f(S,p.sizeRatio),b.uniformMatrix3fv(k,!1,p.matrix),r.forEach(function(R,x){var T=R.color;if("value"in T){var O=m["u_borderColor_".concat(x+1)],N=KK(T.value),_=AZ(N,4),C=_[0],z=_[1],D=_[2],M=_[3];b.uniform4f(O,C/255,z/255,D/255,M/255)}})}}]),c}(c0),nl(t,"ANGLE_1",0),nl(t,"ANGLE_2",2*Math.PI/3),nl(t,"ANGLE_3",4*Math.PI/3),t}var GZ=jZ();function HZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function f3(e){var t=HZ(e,"string");return typeof t=="symbol"?t:t+""}function p3(e,t,n){return(t=f3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TC(Object(n),!0).forEach(function(r){p3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f3(r.key),r)}}function VZ(e,t,n){return t&&$Z(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bd(e){return Bd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bd(e)}function g3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g3=function(){return!!e})()}function h3(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WZ(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h3(e)}function YZ(e,t,n){return t=Bd(t),WZ(e,g3()?Reflect.construct(t,n||[],Bd(e).constructor):t.apply(e,n))}function zx(e,t){r
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oh(e){return XZ(e)||ZZ(e)||QZ(e)||JZ()}function m3(e,t,n,r){var a=Math.pow(1-e,2)*t.x+2*(1-e)*e*n.x+Math.pow(e,2)*r.x,i=Math.pow(1-e,2)*t.y+2*(1-e)*e*n.y+Math.pow(e,2)*r.y;return{x:a,y:i}}function eQ(e,t,n){for(var r=20,a=0,i=e,l=0;l<r;l++){var u=m3((l+1)/r,e,t,n);a+=Math.sqrt(Math.pow(i.x-u.x,2)+Math.pow(i.y-u.y,2)),i=u}return a}function tQ(e){var t=e.curvatureAttribute,n=e.defaultCurvature,r=e.keepLabelUpright,a=r===void 0?!0:r;return function(i,l,u,c,f){var p=f.edgeLabelSize,g=l[t]||n,b=f.edgeLabelFont,m=f.edgeLabelWeight,S=f.edgeLabelColor.attribute?l[f.edgeLabelColor.attribute]||f.edgeLabelColor.color||"#000":f.edgeLabelColor.color,v=l.label;if(v){i.fillStyle=S,i.font="".concat(m," ").concat(p,"px ").concat(b);var k=!a||u.x<c.x,R=k?u.x:c.x,x=k?u.y:c.y,T=k?c.x:u.x,O=k?c.y:u.y,N=(R+T)/2,_=(x+O)/2,C=T-R,z=O-x,D=Math.sqrt(Math.pow(C,2)+Math.pow(z,2)),M=k?1:-1,H=N+z*g*M,$=_-C*g*M,U=l.size*.7+5,W={x:$-x,y:-(H-R)},Z=Math.sqrt(Math.pow(W.x,2)+Math.pow(W.y,2)),j={x:O-$,y:-(T-H)},G=Math.sqrt(Math.pow(j.x,2)+Math.pow(j.y,2));R+=U*W.x/Z,x+=U*W.y/Z,T+=U*j.x/G,O+=U*j.y/G,H+=U*z/D,$-=U*C/D;var P={x:H,y:$},X={x:R,y:x},I={x:T,y:O},V=eQ(X,P,I);if(!(V<u.size+c.size)){var B=i.measureText(v).width,L=V-u.size-c.size;if(B>L){var Y="…";for(v=v+Y,B=i.measureText(v).width;B>L&&v.length>1;)v=v.slice(0,-2)+Y,B=i.measureText(v).width;if(v.length<4)return}for(var Q={},se=0,re=v.length;se<re;se++){var le=v[se];Q[le]||(Q[le]=i.measureText(le).width*(1+g*.35))}for(var Ae=.5-B/V/2,ae=0,we=v.length;ae<we;ae++){var xe=v[ae],De=m3(Ae,X,P,I),Ce=2*(1-Ae)*(H-R)+2*Ae*(T-H),Ee=2*(1-Ae)*($-x)+2*Ae*(O-$),J=Math.atan2(Ee,Ce);i.save(),i.translate(De.x,De.y),i.rotate(J),i.fillText(xe,0,0),i.restore(),Ae+=Q[xe]/V}}}}}function nQ(e){var t=e.arrowHead,n=(t==null?void 0:t.extremity)==="target"||(t==null?void 0:t.extremity)==="both",r=(t==null?void 0:t.extremity)==="source"||(t==null?void 0:t.extremity)==="both",a=`
|
||
|
precision highp float;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
varying vec2 v_cpA;
|
||
|
varying vec2 v_cpB;
|
||
|
varying vec2 v_cpC;
|
||
|
`.concat(n?`
|
||
|
varying float v_targetSize;
|
||
|
varying vec2 v_targetPoint;`:"",`
|
||
|
`).concat(r?`
|
||
|
varying float v_sourceSize;
|
||
|
varying vec2 v_sourcePoint;`:"",`
|
||
|
`).concat(t?`
|
||
|
uniform float u_lengthToThicknessRatio;
|
||
|
uniform float u_widenessToThicknessRatio;`:"",`
|
||
|
|
||
|
float det(vec2 a, vec2 b) {
|
||
|
return a.x * b.y - b.x * a.y;
|
||
|
}
|
||
|
|
||
|
vec2 getDistanceVector(vec2 b0, vec2 b1, vec2 b2) {
|
||
|
float a = det(b0, b2), b = 2.0 * det(b1, b0), d = 2.0 * det(b2, b1);
|
||
|
float f = b * d - a * a;
|
||
|
vec2 d21 = b2 - b1, d10 = b1 - b0, d20 = b2 - b0;
|
||
|
vec2 gf = 2.0 * (b * d21 + d * d10 + a * d20);
|
||
|
gf = vec2(gf.y, -gf.x);
|
||
|
vec2 pp = -f * gf / dot(gf, gf);
|
||
|
vec2 d0p = b0 - pp;
|
||
|
float ap = det(d0p, d20), bp = 2.0 * det(d10, d0p);
|
||
|
float t = clamp((ap + bp) / (2.0 * a + b + d), 0.0, 1.0);
|
||
|
return mix(mix(b0, b1, t), mix(b1, b2, t), t);
|
||
|
}
|
||
|
|
||
|
float distToQuadraticBezierCurve(vec2 p, vec2 b0, vec2 b1, vec2 b2) {
|
||
|
return length(getDistanceVector(b0 - p, b1 - p, b2 - p));
|
||
|
}
|
||
|
|
||
|
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
||
|
|
||
|
void main(void) {
|
||
|
float dist = distToQuadraticBezierCurve(gl_FragCoord.xy, v_cpA, v_cpB, v_cpC);
|
||
|
float thickness = v_thickness;
|
||
|
`).concat(n?`
|
||
|
float distToTarget = length(gl_FragCoord.xy - v_targetPoint);
|
||
|
float targetArrowLength = v_targetSize + thickness * u_lengthToThicknessRatio;
|
||
|
if (distToTarget < targetArrowLength) {
|
||
|
thickness = (distToTarget - v_targetSize) / (targetArrowLength - v_targetSize) * u_widenessToThicknessRatio * thickness;
|
||
|
}`:"",`
|
||
|
`).concat(r?`
|
||
|
float distToSource = length(gl_FragCoord.xy - v_sourcePoint);
|
||
|
float sourceArrowLength = v_sourceSize + thickness * u_lengthToThicknessRatio;
|
||
|
if (distToSource < sourceArrowLength) {
|
||
|
thickness = (distToSource - v_sourceSize) / (sourceArrowLength - v_sourceSize) * u_widenessToThicknessRatio * thickness;
|
||
|
}`:"",`
|
||
|
|
||
|
float halfThickness = thickness / 2.0;
|
||
|
if (dist < halfThickness) {
|
||
|
#ifdef PICKING_MODE
|
||
|
gl_FragColor = v_color;
|
||
|
#else
|
||
|
float t = smoothstep(
|
||
|
halfThickness - v_feather,
|
||
|
halfThickness,
|
||
|
dist
|
||
|
);
|
||
|
|
||
|
gl_FragColor = mix(v_color, transparent, t);
|
||
|
#endif
|
||
|
} else {
|
||
|
gl_FragColor = transparent;
|
||
|
}
|
||
|
}
|
||
|
`);return a}function rQ(e){var t=e.arrowHead,n=(t==null?void 0:t.extremity)==="target"||(t==null?void 0:t.extremity)==="both",r=(t==null?void 0:t.extremity)==="source"||(t==null?void 0:t.extremity)==="both",a=`
|
||
|
attribute vec4 a_id;
|
||
|
attribute vec4 a_color;
|
||
|
attribute float a_direction;
|
||
|
attribute float a_thickness;
|
||
|
attribute vec2 a_source;
|
||
|
attribute vec2 a_target;
|
||
|
attribute float a_current;
|
||
|
attribute float a_curvature;
|
||
|
`.concat(n?`attribute float a_targetSize;
|
||
|
`:"",`
|
||
|
`).concat(r?`attribute float a_sourceSize;
|
||
|
`:"",`
|
||
|
|
||
|
uniform mat3 u_matrix;
|
||
|
uniform float u_sizeRatio;
|
||
|
uniform float u_pixelRatio;
|
||
|
uniform vec2 u_dimensions;
|
||
|
uniform float u_minEdgeThickness;
|
||
|
uniform float u_feather;
|
||
|
|
||
|
varying vec4 v_color;
|
||
|
varying float v_thickness;
|
||
|
varying float v_feather;
|
||
|
varying vec2 v_cpA;
|
||
|
varying vec2 v_cpB;
|
||
|
varying vec2 v_cpC;
|
||
|
`).concat(n?`
|
||
|
varying float v_targetSize;
|
||
|
varying vec2 v_targetPoint;`:"",`
|
||
|
`).concat(r?`
|
||
|
varying float v_sourceSize;
|
||
|
varying vec2 v_sourcePoint;`:"",`
|
||
|
`).concat(t?`
|
||
|
uniform float u_widenessToThicknessRatio;`:"",`
|
||
|
|
||
|
const float bias = 255.0 / 254.0;
|
||
|
const float epsilon = 0.7;
|
||
|
|
||
|
vec2 clipspaceToViewport(vec2 pos, vec2 dimensions) {
|
||
|
return vec2(
|
||
|
(pos.x + 1.0) * dimensions.x / 2.0,
|
||
|
(pos.y + 1.0) * dimensions.y / 2.0
|
||
|
);
|
||
|
}
|
||
|
|
||
|
vec2 viewportToClipspace(vec2 pos, vec2 dimensions) {
|
||
|
return vec2(
|
||
|
pos.x / dimensions.x * 2.0 - 1.0,
|
||
|
pos.y / dimensions.y * 2.0 - 1.0
|
||
|
);
|
||
|
}
|
||
|
|
||
|
void main() {
|
||
|
float minThickness = u_minEdgeThickness;
|
||
|
|
||
|
// Selecting the correct position
|
||
|
// Branchless "position = a_source if a_current == 1.0 else a_target"
|
||
|
vec2 position = a_source * max(0.0, a_current) + a_target * max(0.0, 1.0 - a_current);
|
||
|
position = (u_matrix * vec3(position, 1)).xy;
|
||
|
|
||
|
vec2 source = (u_matrix * vec3(a_source, 1)).xy;
|
||
|
vec2 target = (u_matrix * vec3(a_target, 1)).xy;
|
||
|
|
||
|
vec2 viewportPosition = clipspaceToViewport(position, u_dimensions);
|
||
|
vec2 viewportSource = clipspaceToViewport(source, u_dimensions);
|
||
|
vec2 viewportTarget = clipspaceToViewport(target, u_dimensions);
|
||
|
|
||
|
vec2 delta = viewportTarget.xy - viewportSource.xy;
|
||
|
float len = length(delta);
|
||
|
vec2 normal = vec2(-delta.y, delta.x) * a_direction;
|
||
|
vec2 unitNormal = normal / len;
|
||
|
float boundingBoxThickness = len * a_curvature;
|
||
|
|
||
|
float curveThickness = max(minThickness, a_thickness / u_sizeRatio);
|
||
|
v_thickness = curveThickness * u_pixelRatio;
|
||
|
v_feather = u_feather;
|
||
|
|
||
|
v_cpA = viewportSource;
|
||
|
v_cpB = 0.5 * (viewportSource + viewportTarget) + unitNormal * a_direction * boundingBoxThickness;
|
||
|
v_cpC = viewportTarget;
|
||
|
|
||
|
vec2 viewportOffsetPosition = (
|
||
|
viewportPosition +
|
||
|
unitNormal * (boundingBoxThickness / 2.0 + sign(boundingBoxThickness) * (`).concat(t?"curveThickness * u_widenessToThicknessRatio":"curveThickness",` + epsilon)) *
|
||
|
max(0.0, a_direction) // NOTE: cutting the bounding box in half to avoid overdraw
|
||
|
);
|
||
|
|
||
|
position = viewportToClipspace(viewportOffsetPosition, u_dimensions);
|
||
|
gl_Position = vec4(position, 0, 1);
|
||
|
|
||
|
`).concat(n?`
|
||
|
v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio;
|
||
|
v_targetPoint = viewportTarget;
|
||
|
`:"",`
|
||
|
`).concat(r?`
|
||
|
v_sourceSize = a_sourceSize * u_pixelRatio / u_sizeRatio;
|
||
|
v_sourcePoint = viewportSource;
|
||
|
`:"",`
|
||
|
|
||
|
#ifdef PICKING_MODE
|
||
|
// For picking mode, we use the ID as the color:
|
||
|
v_color = a_id;
|
||
|
#else
|
||
|
// For normal mode, we use the color:
|
||
|
v_color = a_color;
|
||
|
#endif
|
||
|
|
||
|
v_color.a *= bias;
|
||
|
}
|
||
|
`);return a}var b3=.25,aQ={arrowHead:null,curvatureAttribute:"curvature",defaultCurvature:b3},y3=WebGLRenderingContext,_C=y3.UNSIGNED_BYTE,lo=y3.FLOAT;function h0(e){var t=Pd(Pd({},aQ),e||{}),n=t,r=n.arrowHead,a=n.curvatureAttribute,i=n.drawLabel,l=(r==null?void 0:r.extremity)==="target"||(r==null?void 0:r.extremity)==="both",u=(r==null?void 0:r.extremity)==="source"||(r==null?void 0:r.extremity)==="both",c=["u_matrix","u_sizeRatio","u_dimensions","u_pixelRatio","u_feather","u_minEdgeThickness"].concat(Oh(r?["u_lengthToThicknessRatio","u_widenessToThicknessRatio"]:[]));return function(f){KZ(p,f);function p(){var g;qZ(this,p);for(var b=arguments.length,m=new Array(b),S=0;S<b;S++)m[S]=arguments[S];return g=YZ(this,p,[].concat(m)),p3(h3(g),"drawLabel",i||tQ(t)),g}return VZ(p,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:rQ(t),FRAGMENT_SHADER_SOURCE:nQ(t),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:c,ATTRIBUTES:[{name:"a_source",size:2,type:lo},{name:"a_target",size:2,type:lo}].concat(Oh(l?[{name:"a_targetSize",size:1,type:lo}]:[]),Oh(u?[{name:"a_sourceSize",size:1,type:lo}]:[]),[{name:"a_thickness",size:1,type:lo},{name:"a_curvature",size:1,type:lo},{name:"a_color",size:4,type:_C,normalized:!0},{name:"a_id",size:4,type:_C,normalized:!0}]),CONSTANT_ATTRIBUTES:[{name:"a_current",size:1,type:lo},{name:"a_direction",size:1,type:lo}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[0,-1],[1,1],[1,-1]]}}},{key:"processVisibleItem",value:function(b,m,S,v,k){var R,x=k.size||1,T=S.x,O=S.y,N=v.x,_=v.y,C=Qr(k.color),z=(R=k[a])!==null&&R!==void 0?R:b3,D=this.array;D[m++]=T,D[m++]=O,D[m++]=N,D[m++]=_,l&&(D[m++]=v.size),u&&(D[m++]=S.size),D[m++]=x,D[m++]=z,D[m++]=C,D[m++]=b}},{key:"setUniforms",value:function(b,m){var S=m.gl,v=m.uniformLocations,k=v.u_matrix,R=v.u_pixelRatio,x=v.u_feather,T=v.u_sizeRatio,O=v.u_dimensions,N=v.u_minEdgeThickness;if(S.uniformMatrix3fv(k,!1,b.matrix),S.uniform1f(R,b.pixelRatio),S.uniform1f(T,b.sizeRatio),S.uniform1f(x,b.antiAliasingFeather),S.uniform2f(O,b.width*b.pixelRatio,b.height*b.pixelRatio),S.uniform1f(N,b.minEdgeThickness),r){var _=v.u_lengthToThicknessRatio,C=v.u_widenessToThicknessRatio;S.uniform1f(_,r.lengthToThicknessRatio),S.uniform1f(C,r.widenessToThicknessRatio)}}}]),p}(bu)}var oQ=h0(),iQ=h0({arrowHead:vu});h0({arrowHead:Pd(Pd({},vu),{},{extremity:"both"})});class lQ{constructor(){Ea(this,"nodes",[]);Ea(this,"edges",[]);Ea(this,"nodeIdMap",{});Ea(this,"edgeIdMap",{});Ea(this,"edgeDynamicIdMap",{});Ea(this,"getNode",t=>{const n=this.nodeIdMap[t];if(n!==void 0)return this.nodes[n]});Ea(this,"getEdge",(t,n=!0)=>{const r=n?this.edgeDynamicIdMap[t]:this.edgeIdMap[t];if(r!==void 0)return this.edges[r]});Ea(this,"buildDynamicMap",()=>{this.edgeDynamicIdMap={};for(let t=0;t<this.edges.length;t++){const n=this.edges[t];this.edgeDynamicIdMap[n.dynamicId]=t}})}}const sQ=vk()(e=>({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,moveToSelectedNode:!1,rawGraph:null,sigmaGraph:null,setSelectedNode:(t,n)=>e({selectedNode:t,moveToSelectedNode:n}),setFocusedNode:t=>e({focusedNode:t}),setSelectedEdge:t=>e({selectedEdge:t}),setFocusedEdge:t=>e({focusedEdge:t}),clearSelection:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null}),reset:()=>e({selectedNode:null,focusedNode:null,selectedEdge:null,focusedEdge:null,rawGraph:null,sigmaGraph:null,moveToSelectedNode:!1}),setRawGraph:t=>e({rawGraph:t}),setSigmaGraph:t=>e({sigmaGraph:t}),setMoveToSelectedNode:t=>e({moveToSelectedNode:t})})),wt=wk(sQ),uQ=({node:e,move:t})=>{const n=br(),{gotoNode:r}=a3();return A.useEffect(()=>{if(e)return n.getGraph().setNodeAttribute(e,"highlighted",!0),t&&(r(e),wt.getState().setMoveToSelectedNode(!1)),()=>{n.getGraph().setNodeAttribute(e,"highlighted",!1)}},[e,t,n,r]),null};function Ol(e,t){const n=br(),r=A.useRef(t);return Su(r.current,t)||(r.current=t),{positions:A.useCallback(()=>r.current?e(n.getGraph(),r.current):{},[n,r,e]),assign:A.useCallback(()=>{r.current&&e.assign(n.getGraph(),r.current)},[n,r,e])}}function m0(e,t){const n=br(),[r,a]=A.useState(!1),[i,l]=A.us
|
||
|
* @license React
|
||
|
* use-sync-external-store-shim.production.js
|
||
|
*
|
||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
|
*
|
||
|
* This source code is licensed under the MIT license found in the
|
||
|
* LICENSE file in the root directory of this source tree.
|
||
|
*/var eN;function iJ(){if(eN)return tm;eN=1;var e=ef();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function u(g,b){var m=b(),S=r({inst:{value:m,getSnapshot:b}}),v=S[0].inst,k=S[1];return i(function(){v.value=m,v.getSnapshot=b,c(v)&&k({inst:v})},[g,m,b]),a(function(){return c(v)&&k({inst:v}),g(function(){c(v)&&k({inst:v})})},[g]),l(m),m}function c(g){var b=g.getSnapshot;g=g.value;try{var m=b();return!n(g,m)}catch{return!0}}function f(g,b){return b()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return tm.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,tm}var tN;function lJ(){return tN||(tN=1,em.exports=iJ()),em.exports}var sJ=lJ(),Us='[cmdk-group=""]',nm='[cmdk-group-items=""]',uJ='[cmdk-group-heading=""]',y0='[cmdk-item=""]',nN=`${y0}:not([aria-disabled="true"])`,Ux="cmdk-item-select",Zo="data-value",cJ=(e,t,n)=>oJ(e,t,n),R3=A.createContext(void 0),wu=()=>A.useContext(R3),C3=A.createContext(void 0),v0=()=>A.useContext(C3),N3=A.createContext(void 0),O3=A.forwardRef((e,t)=>{let n=rl(()=>{var B,L;return{search:"",value:(L=(B=e.value)!=null?B:e.defaultValue)!=null?L:"",filtered:{count:0,items:new Map,groups:new Set}}}),r=rl(()=>new Set),a=rl(()=>new Map),i=rl(()=>new Map),l=rl(()=>new Set),u=I3(e),{label:c,children:f,value:p,onValueChange:g,filter:b,shouldFilter:m,loop:S,disablePointerSelection:v=!1,vimBindings:k=!0,...R}=e,x=En(),T=En(),O=En(),N=A.useRef(null),_=EJ();ii(()=>{if(p!==void 0){let B=p.trim();n.current.value=B,C.emit()}},[p]),ii(()=>{_(6,U)},[]);let C=A.useMemo(()=>({subscribe:B=>(l.current.add(B),()=>l.current.delete(B)),snapshot:()=>n.current,setState:(B,L,Y)=>{var Q,se,re;if(!Object.is(n.current[B],L)){if(n.current[B]=L,B==="search")$(),M(),_(1,H);else if(B==="value"&&(Y||_(5,U),((Q=u.current)==null?void 0:Q.value)!==void 0)){let le=L??"";(re=(se=u.current).onValueChange)==null||re.call(se,le);return}C.emit()}},emit:()=>{l.current.forEach(B=>B())}}),[]),z=A.useMemo(()=>({value:(B,L,Y)=>{var Q;L!==((Q=i.current.get(B))==null?void 0:Q.value)&&(i.current.set(B,{value:L,keywords:Y}),n.current.filtered.items.set(B,D(L,Y)),_(2,()=>{M(),C.emit()}))},item:(B,L)=>(r.current.add(B),L&&(a.current.has(L)?a.current.get(L).add(B):a.current.set(L,new Set([B]))),_(3,()=>{$(),M(),n.current.value||H(),C.emit()}),()=>{i.current.delete(B),r.current.delete(B),n.current.filtered.items.delete(B);let Y=W();_(4,()=>{$(),(Y==null?void 0:Y.getAttribute("id"))===B&&H(),C.emit()})}),group:B=>(a.current.has(B)||a.current.set(B,new Set),()=>{i.current.delete(B),a.current.delete(B)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>u.current.disablePointerSelection,listId:x,inputId:O,labelId:T,listInnerRef:N}),[]);function D(B,L){var Y,Q;let se=(Q=(Y=u.current)==null?void 0:Y.filter)!=null?Q:cJ;return B?se(B,n.current.search,L):0}function M(){if(!n.current.search||u.current.shouldFilter===!1)return;let B=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(Q=>{let se=a.current.get(Q),re=0;se.forEach(le=>{let Ae=B.get(le);re=Math.max(Ae,re)}),L.push([Q,re])});let Y=N.current;Z().sort((Q,se)=>{var re,le;let Ae=Q.getAttribute("id"),ae=se.getAttribute("id");return((re=B.get(ae))!=null?re:0)-((le=B.get(Ae))!=null?le:0)}).forEach(Q=>{let se=Q.closest(nm);se?se.appendChild(Q.parentElement===se?Q:Q.closest(`${nm} > *`)):Y.appendChild(Q.parentElement===Y?Q:Q.closest(`${nm} > *`))}),L.sort((Q,se)=>se[1]-Q[1]).forEach(Q=>{var se;let re=(se=N.current)==null?void 0:se.querySelector(`${Us}[${Zo}="${encodeURIComponent(Q[0])}"]`);re==null||re.parentElement.appendChild(re)})}function H(){let B=Z().find(Y=>Y.getAttribute("aria-disabled")!=="true"),L=B==null?void 0:B.getAttribute(Zo);C.setState("value",L||void 0)}function $(){var B,L,Y,Q;if(!n.current.search||u.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let re of r.curre
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vx(e){return wee(e)||xee(e)||kee(e)||Aee()}function Tee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _ee(e,t){if(e==null)return{};var n,r,a=Tee(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}const Ree={index:new mo({fields:[]})};A.createContext(Ree);const Wx=({label:e,color:t,hidden:n,labels:r={}})=>ye.createElement("div",{className:"node"},ye.createElement("span",{className:"render "+(n?"circle":"disc"),style:{backgroundColor:t||"#000"}}),ye.createElement("span",{className:`label ${n?"text-muted":""} ${e?"":"text-italic"}`},e||r.no_label||"No label")),Cee=({id:e,labels:t})=>{const n=br(),r=A.useMemo(()=>{const a=n.getGraph().getNodeAttributes(e),i=n.getSetting("nodeReducer");return Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},a),i?i(e,a):{})},[n,e]);return ye.createElement(Wx,Object.assign({},r,{labels:t}))},Nee=({label:e,color:t,source:n,target:r,hidden:a,directed:i,labels:l={}})=>ye.createElement("div",{className:"edge"},ye.createElement(Wx,Object.assign({},n,{labels:l})),ye.createElement("div",{className:"body"},ye.createElement("div",{className:"render"},ye.createElement("span",{className:a?"dotted":"dash",style:{borderColor:t||"#000"}})," ",i&&ye.createElement("span",{className:"arrow",style:{borderTopColor:t||"#000"}})),ye.createElement("span",{className:`label ${a?"text-muted":""} ${e?"":"fst-italic"}`},e||l.no_label||"No label")),ye.createElement(Wx,Object.assign({},r,{labels:l}))),Oee=({id:e,labels:t})=>{const n=br(),r=A.useMemo(()=>{const a=n.getGraph().getEdgeAttributes(e),i=n.getSetting("nodeReducer"),l=n.getSetting("edgeReducer"),u=n.getGraph().getNodeAttributes(n.getGraph().source(e)),c=n.getGraph().getNodeAttributes(n.getGraph().target(e));return Object.assign(Object.assign(Object.assign({color:n.getSetting("defaultEdgeColor"),directed:n.getGraph().isDirected(e)},a),l?l(e,a):{}),{source:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},u),i?i(e,u):{}),target:Object.assign(Object.assign({color:n.getSetting("defaultNodeColor")},c),i?i(e,c):{})})},[n,e]);return ye.createElement(Nee,Object.assign({},r,{labels:t}))};function C0(e,t){const[n,r]=A.useState(e);return A.useEffect(()=>{const a=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(a)}},[e,t]),n}function Iee({fetcher:e,preload:t,filterFn:n,renderOption:r,getOptionValue:a,notFound:i,loadingSkeleton:l,label:u,placeholder:c="Select...",value:f,onChange:p,onFocus:g,disabled:b=!1,className:m,noResultsMessage:S}){const[v,k]=A.useState(!1),[R,x]=A.useState(!1),[T,O]=A.useState([]),[N,_]=A.useState(!1),[C,z]=A.useState(null),[D,M]=A.useState(f),[H,$]=A.useState(null),[U,W]=A.useState(""),Z=C0(U,t?0:150),[j,G]=A.useState([]);A.useEffect(()=>{k(!0),M(f)},[f]),A.useEffect(()=>{v||(async()=>{try{_(!0),z(null);const V=f!==null?await e(f):[];G(V),O(V)}catch(V){z(V instanceof Error?V.message:"Failed to fetch options")}finally{_(!1)}})()},[v,e,f]),A.useEffect(()=>{const I=async()=>{try{_(!0),z(null);const V=await e(Z);G(V),O(V)}catch(V){z(V instanceof Error?V.message:"Failed to fetch options")}finally{_(!1)}};v&&t?t&&O(Z?j.filter(V=>n?n(V,Z):!0):j):I()},[e,Z,v,t,n]);const P=A.useCallback(I=>{I!==D&&(M(I),p(I)),x(!1)},[D,M,x,p]),X=A.useCallback(I=>{I!==H&&($(I),g(I))},[H,$,g]);return w.jsx("div",{className:Fe(b&&"cursor-not-allowed opacity-50",m),onFocus:()=>{x(!0)},onBlur:()=>x(!1),children:w.jsxs(Cf,{shouldFilter:!1,className:"bg-transparent",children:[w.jsxs("div",{children:[w.jsx(k0,{placeholder:c,value:U,className:"max-h-8",onValueChange:I=>{W(I),I&&!R&&x(!0)}}),N&&T.length>0&&w.jsx("div",{className:"absolute top-1/2 right-2 flex -translate-y-1/2 transform items-center",children:w.jsx(lP,{className:"h-4 w-4 animate-spin"})})]}),w.jsxs(Nf,{hidden:!R||Z.length===0,children:[C&&w.jsx("div",{className:"text-dest
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bte(e){if(Array.isArray(e))return Xx(e)}function TN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _N(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TN(Object(n),!0).forEach(function(r){o4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o4(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ou(e,t){return Ste(e)||vte(e,t)||i4(e,t)||yte()}function yte(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function i4(e,t){if(e){if(typeof e=="string")return Xx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xx(e,t)}}function Xx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,l,u;try{for(n=n.call(e);!(a=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));a=!0);}catch(c){i=!0,u=c}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw u}}return r}}function Ste(e){if(Array.isArray(e))return e}var Ete=typeof pm=="function"?pm:pm.default,wte="file-invalid-type",xte="file-too-large",kte="file-too-small",Ate="too-many-files",Tte=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:wte,message:"File type must be ".concat(r)}},RN=function(t){return{code:xte,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},CN=function(t){return{code:kte,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},_te={code:Ate,message:"Too many files"};function l4(e,t){var n=e.type==="application/x-moz-file"||Ete(e,t);return[n,n?null:Tte(t)]}function s4(e,t,n){if(Qo(e.size))if(Qo(t)&&Qo(n)){if(e.size>n)return[!1,RN(n)];if(e.size<t)return[!1,CN(t)]}else{if(Qo(t)&&e.size<t)return[!1,CN(t)];if(Qo(n)&&e.size>n)return[!1,RN(n)]}return[!0,null]}function Qo(e){return e!=null}function Rte(e){var t=e.files,n=e.accept,r=e.minSize,a=e.maxSize,i=e.multiple,l=e.maxFiles,u=e.validator;return!i&&t.length>1||i&&l>=1&&t.length>l?!1:t.every(function(c){var f=l4(c,n),p=ou(f,1),g=p[0],b=s4(c,r,a),m=ou(b,1),S=m[0],v=u?u(c):null;return g&&S&&!v})}function qd(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function rd(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function NN(e){e.preventDefault()}function Cte(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Nte(e){return e.indexOf("Edge/")!==-1}function Ote(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Cte(e)||Nte(e)}function qr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var a=arguments.length,i=new Array(a>1?a-1:0),l=1;l<a;l++)i[l-1]=arguments[l];return t.some(function(u){return!qd(r)&&u&&u.apply(void 0,[r].concat(i)),qd(r)})}}function Ite(){return"showOpenFilePicker"in window}function Dte(e){if(Qo(e)){var t=Object.entries(e).filter(function(n){var r=ou(n,2),a=r[0],i=r[1],l=!0;return u4(a)||(console.warn('Skipped "'.concat(a,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),l=!1),(!Array.isArray(i)||!i.every(c4))&&(console.warn('Skipped "'.concat(a,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,r){var a=ou(r,2),i=a[0],l=a[1];return _N(_N({},n),{},o4({},i,l))},{});return[{description:"Files",accept:t}]}return e}function Lte(e){if(Qo(e))return Object.entries(e).reduce(function(t,n){var r=ou(n,2),a=r[0],i=r[1];return[].concat(AN(t),[a],AN(i))},[]).filter(function(t){return u4(t)||c4(t)}).join(",")}function Mte(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Fte(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function u4(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function c4(e){return/^.*\.[\w]+$/.test(e)}var zte=["children"],P
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hte(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qte(e){if(Array.isArray(e))return Zx(e)}function gm(e,t){return Wte(e)||Vte(e,t)||d4(e,t)||$te()}function $te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d4(e,t){if(e){if(typeof e=="string")return Zx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zx(e,t)}}function Zx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vte(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,l,u;try{for(n=n.call(e);!(a=(l=n.next()).done)&&(r.push(l.value),!(t&&r.length===t));a=!0);}catch(c){i=!0,u=c}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw u}}return r}}function Wte(e){if(Array.isArray(e))return e}function ON(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ON(Object(n),!0).forEach(function(r){Qx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ON(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qx(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $d(e,t){if(e==null)return{};var n=Yte(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yte(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var If=A.forwardRef(function(e,t){var n=e.children,r=$d(e,zte),a=Kte(r),i=a.open,l=$d(a,Pte);return A.useImperativeHandle(t,function(){return{open:i}},[i]),ye.createElement(A.Fragment,null,n(Pt(Pt({},l),{},{open:i})))});If.displayName="Dropzone";var f4={disabled:!1,getFilesFromEvent:ate,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};If.defaultProps=f4;If.propTypes={children:Ct.func,accept:Ct.objectOf(Ct.arrayOf(Ct.string)),multiple:Ct.bool,preventDropOnDocument:Ct.bool,noClick:Ct.bool,noKeyboard:Ct.bool,noDrag:Ct.bool,noDragEventsBubbling:Ct.bool,minSize:Ct.number,maxSize:Ct.number,maxFiles:Ct.number,disabled:Ct.bool,getFilesFromEvent:Ct.func,onFileDialogCancel:Ct.func,onFileDialogOpen:Ct.func,useFsAccessApi:Ct.bool,autoFocus:Ct.bool,onDragEnter:Ct.func,onDragLeave:Ct.func,onDragOver:Ct.func,onDrop:Ct.func,onDropAccepted:Ct.func,onDropRejected:Ct.func,onError:Ct.func,validator:Ct.func};var Jx={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kte(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Pt(Pt({},f4),e),n=t.accept,r=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,l=t.minSize,u=t.multiple,c=t.maxFiles,f=t.onDragEnter,p=t.onDragLeave,g=t.onDragOver,b=t.onDrop,m=t.onDropAccepted,S=t.onDropRejected,v=t.onFileDialogCancel,k=t.onFileDialogOpen,R=t.useFsAccessApi,x=t.autoFocus,T=t.preventDropOnDocument,O=t.noClick,N=t.noKeyboard,_=t.noDrag,C=t.noDragEventsBubbling,z=t.onError,D=t.validator,M=A.useMemo(function(){return Lte(n)},[n]),H=A.useMemo(function(){return Dte(n)},[n]),$=A.useMemo(function(){return typeof k=="function"?k:IN},[k]),U=A.useMemo(function(){return typeof v=="function"?v:IN},[v]),W=A.useRef(null),Z=A.useRef(null),j=A.useReducer(Xte,Jx),G=gm(j,2),P=G[0],X=G[1],I=P.isFocused,V=P.isFileDialogActive,B=A.useRef(typeof window<"u"&&window.isSecureContext&&R&&Ite()),L=function(){!B.current&&V&&setTimeout(function(){if(Z.current){var Ne=Z.current.files;Ne.length||(X({type:"closeDialog"}),U())}},300)};A.useEffe
|
||
|
- a positive number
|
||
|
- less than the value passed to \`max\` (or ${O0} if no \`max\` prop is set)
|
||
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
||
|
|
||
|
Defaulting to \`null\`.`}var b4=p4,rne=h4;const y4=A.forwardRef(({className:e,value:t,...n},r)=>w.jsx(b4,{ref:r,className:Fe("bg-secondary relative h-4 w-full overflow-hidden rounded-full",e),...n,children:w.jsx(rne,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));y4.displayName=b4.displayName;function ek(e,[t,n]){return Math.min(n,Math.max(t,e))}function ane(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var I0="ScrollArea",[v4,nve]=mr(I0),[one,yr]=v4(I0),S4=A.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...l}=e,[u,c]=A.useState(null),[f,p]=A.useState(null),[g,b]=A.useState(null),[m,S]=A.useState(null),[v,k]=A.useState(null),[R,x]=A.useState(0),[T,O]=A.useState(0),[N,_]=A.useState(!1),[C,z]=A.useState(!1),D=ft(t,H=>c(H)),M=kf(a);return w.jsx(one,{scope:n,type:r,dir:M,scrollHideDelay:i,scrollArea:u,viewport:f,onViewportChange:p,content:g,onContentChange:b,scrollbarX:m,onScrollbarXChange:S,scrollbarXEnabled:N,onScrollbarXEnabledChange:_,scrollbarY:v,onScrollbarYChange:k,scrollbarYEnabled:C,onScrollbarYEnabledChange:z,onCornerWidthChange:x,onCornerHeightChange:O,children:w.jsx(Ke.div,{dir:M,...l,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":R+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});S4.displayName=I0;var E4="ScrollAreaViewport",w4=A.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,l=yr(E4,n),u=A.useRef(null),c=ft(t,u,l.onViewportChange);return w.jsxs(w.Fragment,{children:[w.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),w.jsx(Ke.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:w.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});w4.displayName=E4;var ea="ScrollAreaScrollbar",D0=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(ea,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=a,u=e.orientation==="horizontal";return A.useEffect(()=>(u?i(!0):l(!0),()=>{u?i(!1):l(!1)}),[u,i,l]),a.type==="hover"?w.jsx(ine,{...r,ref:t,forceMount:n}):a.type==="scroll"?w.jsx(lne,{...r,ref:t,forceMount:n}):a.type==="auto"?w.jsx(x4,{...r,ref:t,forceMount:n}):a.type==="always"?w.jsx(L0,{...r,ref:t}):null});D0.displayName=ea;var ine=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(ea,e.__scopeScrollArea),[i,l]=A.useState(!1);return A.useEffect(()=>{const u=a.scrollArea;let c=0;if(u){const f=()=>{window.clearTimeout(c),l(!0)},p=()=>{c=window.setTimeout(()=>l(!1),a.scrollHideDelay)};return u.addEventListener("pointerenter",f),u.addEventListener("pointerleave",p),()=>{window.clearTimeout(c),u.removeEventListener("pointerenter",f),u.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),w.jsx(Jn,{present:n||i,children:w.jsx(x4,{"data-state":i?"visible":"hidden",...r,ref:t})})}),lne=A.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=yr(ea,e.__scopeScrollArea),i=e.orientation==="horizontal",l=Lf(()=>c("SCROLL_END"),100),[u,c]=ane("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return A.useEffect(()=>{if(u==="idle"){const f=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[u,a.scrollHideDelay,c]),A.useEffect(()=>{const f=a.viewport,p=i?"scrollLeft":"scrollTop";if(f){let g=f[p];const b=()=>{const m=f[p];g!==m&&(c("SCROLL"),l()),g=m};return f.addEventListener("scroll",b),()=>f.removeEventListener("scroll",b)}},[a.viewport,i,c,l]),w.jsx(Jn,{present:n||u!=="hidden",children:w.jsx(L0,{"data-state":u==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:We(e.onPointerEn
|
||
|
files (up to ${tk(l)} each)`:` a file with ${tk(l)}`,"Supported formats: TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS"]})]})]})]})}),m!=null&&m.length?w.jsx(I4,{className:"h-fit w-full px-3",children:w.jsx("div",{className:"flex max-h-48 flex-col gap-4",children:m==null?void 0:m.map((x,T)=>w.jsx(yne,{file:x,onRemove:()=>k(T),progress:a==null?void 0:a[x.name]},T))})}):null]})}function yne({file:e,progress:t,onRemove:n}){return w.jsxs("div",{className:"relative flex items-center gap-2.5",children:[w.jsxs("div",{className:"flex flex-1 gap-2.5",children:[L4(e)?w.jsx(vne,{file:e}):null,w.jsxs("div",{className:"flex w-full flex-col gap-2",children:[w.jsxs("div",{className:"flex flex-col gap-px",children:[w.jsx("p",{className:"text-foreground/80 line-clamp-1 text-sm font-medium",children:e.name}),w.jsx("p",{className:"text-muted-foreground text-xs",children:tk(e.size)})]}),t?w.jsx(y4,{value:t}):null]})]}),w.jsx("div",{className:"flex items-center gap-2",children:w.jsxs(Lt,{type:"button",variant:"outline",size:"icon",className:"size-7",onClick:n,children:[w.jsx(sP,{className:"size-4","aria-hidden":"true"}),w.jsx("span",{className:"sr-only",children:"Remove file"})]})})]})}function L4(e){return"preview"in e&&typeof e.preview=="string"}function vne({file:e}){return e.type.startsWith("image/")?w.jsx("div",{className:"aspect-square shrink-0 rounded-md object-cover"}):w.jsx(C$,{className:"text-muted-foreground size-10","aria-hidden":"true"})}function Sne(){const[e,t]=A.useState(!1),[n,r]=A.useState(!1),[a,i]=A.useState({}),l=A.useCallback(async u=>{r(!0);try{await Promise.all(u.map(async c=>{try{const f=await f$(c,p=>{console.debug(`Uploading ${c.name}: ${p}%`),i(g=>({...g,[c.name]:p}))});f.status==="success"?vn.success(`Upload Success:
|
||
|
${c.name} uploaded successfully`):vn.error(`Upload Failed:
|
||
|
${c.name}
|
||
|
${f.message}`)}catch(f){vn.error(`Upload Failed:
|
||
|
${c.name}
|
||
|
${Nr(f)}`)}}))}catch(c){vn.error(`Upload Failed
|
||
|
`+Nr(c))}finally{r(!1)}},[r,i]);return w.jsxs(L3,{open:e,onOpenChange:u=>{n&&!u||t(u)},children:[w.jsx(M3,{asChild:!0,children:w.jsxs(Lt,{variant:"default",side:"bottom",tooltip:"Upload documents",size:"sm",children:[w.jsx(yx,{})," Upload"]})}),w.jsxs(S0,{className:"sm:max-w-xl",onCloseAutoFocus:u=>u.preventDefault(),children:[w.jsxs(E0,{children:[w.jsx(w0,{children:"Upload documents"}),w.jsx(x0,{children:"Drag and drop your documents here or click to browse."})]}),w.jsx(bne,{maxFileCount:1/0,maxSize:200*1024*1024,description:"supported types: TXT, MD, DOCX, PDF, PPTX, RTF, ODT, EPUB, HTML, HTM, TEX, JSON, XML, YAML, YML, CSV, LOG, CONF, INI, PROPERTIES, SQL, BAT, SH, C, CPP, PY, JAVA, JS, TS, SWIFT, GO, RB, PHP, CSS, SCSS, LESS",onUpload:l,progresses:a,disabled:n})]})]})}function Ene(){const[e,t]=A.useState(!1),n=A.useCallback(async()=>{try{const r=await p$();r.status==="success"?(vn.success("Documents cleared successfully"),t(!1)):vn.error(`Clear Documents Failed:
|
||
|
${r.message}`)}catch(r){vn.error(`Clear Documents Failed:
|
||
|
`+Nr(r))}},[t]);return w.jsxs(L3,{open:e,onOpenChange:t,children:[w.jsx(M3,{asChild:!0,children:w.jsxs(Lt,{variant:"outline",side:"bottom",tooltip:"Clear documents",size:"sm",children:[w.jsx(iP,{})," Clear"]})}),w.jsxs(S0,{className:"sm:max-w-xl",onCloseAutoFocus:r=>r.preventDefault(),children:[w.jsxs(E0,{children:[w.jsx(w0,{children:"Clear documents"}),w.jsx(x0,{children:"Do you really want to clear all documents?"})]}),w.jsx(Lt,{variant:"destructive",onClick:n,children:"YES"})]})]})}function wne(){const e=Pn.use.health(),[t,n]=A.useState(null),r=A.useCallback(async()=>{try{const i=await s$();i&&i.statuses&&Object.values(i.statuses).reduce((u,c)=>u+c.length,0)>0?n(i):n(null)}catch(i){vn.error(`Failed to load documents
|
||
|
`+Nr(i))}},[n]);A.useEffect(()=>{r()},[]);const a=A.useCallback(async()=>{try{const{status:i}=await u$();vn.message(i)}catch(i){vn.error(`Failed to load documents
|
||
|
`+Nr(i))}},[]);return A.useEffect(()=>{const i=setInterval(async()=>{if(e)try{await r()}catch(l){vn.error(`Failed to get scan progress
|
||
|
`+Nr(l))}},5e3);return()=>clearInterval(i)},[e,r]),w.jsxs(ru,{className:"!size-full !rounded-none !border-none",children:[w.jsx(jd,{children:w.jsx(au,{className:"text-lg",children:"Document Management"})}),w.jsxs(Gd,{className:"space-y-4",children:[w.jsxs("div",{className:"flex gap-2",children:[w.jsxs(Lt,{variant:"outline",onClick:a,side:"bottom",tooltip:"Scan documents",size:"sm",children:[w.jsx(Q$,{})," Scan"]}),w.jsx("div",{className:"flex-1"}),w.jsx(Ene,{}),w.jsx(Sne,{})]}),w.jsxs(ru,{children:[w.jsxs(jd,{children:[w.jsx(au,{children:"Uploaded documents"}),w.jsx(Of,{children:"view the uploaded documents here"})]}),w.jsxs(Gd,{children:[!t&&w.jsx(Xee,{title:"No documents uploaded",description:"upload documents to see them here"}),t&&w.jsxs(e4,{children:[w.jsx(t4,{children:w.jsxs(Yx,{children:[w.jsx(Ta,{children:"ID"}),w.jsx(Ta,{children:"Summary"}),w.jsx(Ta,{children:"Status"}),w.jsx(Ta,{children:"Length"}),w.jsx(Ta,{children:"Chunks"}),w.jsx(Ta,{children:"Created"}),w.jsx(Ta,{children:"Updated"}),w.jsx(Ta,{children:"Metadata"})]})}),w.jsx(n4,{className:"text-sm",children:Object.entries(t.statuses).map(([i,l])=>l.map(u=>w.jsxs(Yx,{children:[w.jsx(_a,{className:"truncate font-mono",children:u.id}),w.jsx(_a,{className:"max-w-xs min-w-24 truncate",children:w.jsx(Mn,{text:u.content_summary,tooltip:u.content_summary,tooltipClassName:"max-w-none overflow-visible block"})}),w.jsxs(_a,{children:[i==="processed"&&w.jsx("span",{className:"text-green-600",children:"Completed"}),i==="processing"&&w.jsx("span",{className:"text-blue-600",children:"Processing"}),i==="pending"&&w.jsx("span",{className:"text-yellow-600",children:"Pending"}),i==="failed"&&w.jsx("span",{className:"text-red-600",children:"Failed"}),u.error&&w.jsx("span",{className:"ml-2 text-red-500",title:u.error,children:"⚠️"})]}),w.jsx(_a,{children:u.content_length??"-"}),w.jsx(_a,{children:u.chunks_count??"-"}),w.jsx(_a,{className:"truncate",children:new Date(u.created_at).toLocaleString()}),w.jsx(_a,{className:"truncate",children:new Date(u.updated_at).toLocaleString()}),w.jsx(_a,{className:"max-w-xs truncate",children:u.metadata?JSON.stringify(u.metadata):"-"})]},u.id)))})]})]})]})]})]})}function M4(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}var iu;(function(e){e.event="event",e.props="prop"})(iu||(iu={}));function fo(){}function xne(e){var t,n=void 0;return function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(i,l){return i===t[l]})||(t=r,n=e.apply(void 0,r)),n}}function lu(e){return!!(e||"").match(/\d/)}function dl(e){return e==null}function kne(e){return typeof e=="number"&&isNaN(e)}function F4(e){return dl(e)||kne(e)||typeof e=="number"&&!isFinite(e)}function z4(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Ane(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Tne(e,t,n){var r=Ane(n),a=e.search(/[1-9]/);return a=a===-1?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}function _ne(e){var t=A.useRef(e);t.current=e;var n=A.useRef(function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t.current.apply(t,r)});return n.current}function F0(e,t){t===void 0&&(t=!0);var n=e[0]==="-",r=n&&t;e=e.replace("-","");var a=e.split("."),i=a[0],l=a[1]||"";return{beforeDecimal:i,afterDecimal:l,hasNegation:n,addNegation:r}}function Rne(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}function P4(e,t,n){for(var r="",a=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||a;return r}function FN(e,t){return Array(t+1).join(e)}function B4(e){var t=e+"",n=t[0]==="-"?"-":"";n&&(t=t.substring(1
|
||
|
Decimal separator can't be same as thousand separator.
|
||
|
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
||
|
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
||
|
`);return a.startsWith("-")&&i&&(console.error(`
|
||
|
Prefix can't start with '-' when allowNegative is true.
|
||
|
prefix: `+a+`
|
||
|
allowNegative: `+i+`
|
||
|
`),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function $ne(e){e=qne(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown;a===void 0&&(a=fo);var i=e.onBlur;i===void 0&&(i=fo);var l=e.thousandSeparator,u=e.decimalScale,c=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var p=e.defaultValue,g=e.value,b=e.valueIsNumericString,m=e.onValueChange,S=M4(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),v=Mf(e),k=v.decimalSeparator,R=v.allowedDecimalSeparators,x=function(j){return BN(j,e)},T=function(j,G){return Gne(j,G,e)},O=dl(g)?p:g,N=b??jne(O,f,t);dl(g)?dl(p)||(N=N||typeof p=="number"):N=N||typeof g=="number";var _=function(j){return F4(j)?j:(typeof j=="number"&&(j=B4(j)),N&&typeof u=="number"?zN(j,u,!!c):j)},C=j4(_(g),_(p),!!N,x,T,m),z=C[0],D=z.numAsString,M=z.formattedValue,H=C[1],$=function(j){var G=j.target,P=j.key,X=G.selectionStart,I=G.selectionEnd,V=G.value;if(V===void 0&&(V=""),(P==="Backspace"||P==="Delete")&&I<f.length){j.preventDefault();return}if(X!==I){a(j);return}P==="Backspace"&&V[0]==="-"&&X===f.length+1&&n&&Jo(G,1),u&&c&&(P==="Backspace"&&V[X-1]===k?(Jo(G,X-1),j.preventDefault()):P==="Delete"&&V[X]===k&&j.preventDefault()),R!=null&&R.includes(P)&&V[X]===k&&Jo(G,X+1);var B=l===!0?",":l;P==="Backspace"&&V[X-1]===B&&Jo(G,X-1),P==="Delete"&&V[X]===B&&Jo(G,X+1),a(j)},U=function(j){var G=D;if(G.match(/\d/g)||(G=""),r||(G=Rne(G)),c&&u&&(G=zN(G,u,c)),G!==D){var P=BN(G,e);H({formattedValue:P,value:G,floatValue:parseFloat(G)},{event:j,source:iu.event})}i(j)},W=function(j){return j===k?!0:lu(j)},Z=function(j){var G=j.currentValue,P=j.lastValue,X=j.formattedValue,I=j.currentValueIndex,V=j.formattedValueIndex,B=G[I],L=X[V],Y=U4(P,G),Q=Y.to,se=function(re){return T(re).indexOf(".")+f.length};return g===0&&c&&u&&G[Q.start]===k&&se(G)<I&&se(X)>V?!1:I>=Q.start&&I<Q.end&&R&&R.includes(B)&&L===k?!0:B===L};return Object.assign(Object.assign({},S),{value:M,valueIsNumericString:!1,isValidInputCharacter:W,isCharacterSame:Z,onValueChange:H,format:x,removeFormatting:T,getCaretBoundary:function(j){return Hne(j,e)},onKeyDown:$,onBlur:U})}function Vne(e){var t=$ne(e);return ye.createElement(Pne,Object.assign({},t))}const al=A.forwardRef(({stepper:e,thousandSeparator:t,placeholder:n,defaultValue:r,min:a=-1/0,max:i=1/0,onValueChange:l,fixedDecimalScale:u=!1,decimalScale:c=0,className:f=void 0,suffix:p,prefix:g,value:b,...m},S)=>{const[v,k]=A.useState(b??r),R=A.useCallback(()=>{k(N=>N===void 0?e??1:Math.min(N+(e??1),i))},[e,i]),x=A.useCallback(()=>{k(N=>N===void 0?-(e??1):Math.max(N-(e??1),a))},[e,a]);A.useEffect(()=>{b!==void 0&&k(b)},[b]);const T=N=>{const _=N.floatValue===void 0?void 0:N.floatValue;k(_),l&&l(_)},O=()=>{v!==void 0&&(v<a?(k(a),S.current.value=String(a)):v>i&&(k(i),S.current.value=String(i)))};return w.jsxs("div",{className:"relative flex",children:[w.jsx(Vne,{value:v,onValueChange:T,thousandSeparator:t,decimalScale:c,fixedDecimalScale:u,allowNegative:a<0,valueIsNumericString:!0,onBlur:O,max:i,min:a,suffix:p,prefix:g,customInput:N=>w.jsx(oi,{...N,className:Fe("w-full",f)}),placeholder:n,className:"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",getInputRef:S,...m}),w.jsxs("div",{className:"absolute top-0 right-0 bottom-0 flex flex-col",children:[w.jsx(Lt,{"aria-label":"Increase value",className:"border-input h-1/2 rounded-l-none rounded-br-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:R,disabled:v===i,children:w.jsx(oP,{size:15})}),w.jsx(Lt,{"aria-label":"Decrease value",className:"border-input h-1/2 rounded-l-none rounded-tr-none border-b border-l px-2 focus-visible:relative",variant:"outline",onClick:x,disabled:v===a,children:w.jsx(_k,{size:15})})]})]})});al.displayName="NumberInput";var Wne=[" ","Enter"
|
||
|
`,f="/",p="*",g="",b="comment",m="declaration";bm=function(v,k){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];k=k||{};var R=1,x=1;function T(U){var W=U.match(t);W&&(R+=W.length);var Z=U.lastIndexOf(c);x=~Z?U.length-Z:x+U.length}function O(){var U={line:R,column:x};return function(W){return W.position=new N(U),z(),W}}function N(U){this.start=U,this.end={line:R,column:x},this.source=k.source}N.prototype.content=v;function _(U){var W=new Error(k.source+":"+R+":"+x+": "+U);if(W.reason=U,W.filename=k.source,W.line=R,W.column=x,W.source=v,!k.silent)throw W}function C(U){var W=U.exec(v);if(W){var Z=W[0];return T(Z),v=v.slice(Z.length),W}}function z(){C(n)}function D(U){var W;for(U=U||[];W=M();)W!==!1&&U.push(W);return U}function M(){var U=O();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var W=2;g!=v.charAt(W)&&(p!=v.charAt(W)||f!=v.charAt(W+1));)++W;if(W+=2,g===v.charAt(W-1))return _("End of comment missing");var Z=v.slice(2,W-2);return x+=2,T(Z),v=v.slice(W),x+=2,U({type:b,comment:Z})}}function H(){var U=O(),W=C(r);if(W){if(M(),!C(a))return _("property missing ':'");var Z=C(i),j=U({type:m,property:S(W[0].replace(e,g)),value:Z?S(Z[0].replace(e,g)):g});return C(l),j}}function $(){var U=[];D(U);for(var W;W=H();)W!==!1&&(U.push(W),D(U));return U}return z(),$()};function S(v){return v?v.replace(u,g):g}return bm}var YN;function jre(){if(YN)return el;YN=1;var e=el&&el.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(el,"__esModule",{value:!0}),el.default=n;var t=e(Ure());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var l=(0,t.default)(r),u=typeof a=="function";return l.forEach(function(c){if(c.type==="declaration"){var f=c.property,p=c.value;u?a(f,p,c):p&&(i=i||{},i[f]=p)}}),i}return el}var Gre=jre();const KN=an(Gre),Hre=KN.default||KN,Lj=Mj("end"),U0=Mj("start");function Mj(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qre(e){const t=U0(e),n=Lj(e);if(t&&n)return{start:t,end:n}}function Ys(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?XN(e.position):"start"in e||"end"in e?XN(e):"line"in e||"column"in e?dk(e):""}function dk(e){return ZN(e&&e.line)+":"+ZN(e&&e.column)}function XN(e){return dk(e&&e.start)+"-"+dk(e&&e.end)}function ZN(e){return e&&typeof e=="number"?e:1}class xn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},l=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(l=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const u=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=u?u.line:void 0,this.name=Ys(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}xn.prototype.file="";xn.prototype.name="";xn.prototype.reason="";xn.prototype.message="";xn.prototype.stack="";xn.prototype.column=void 0;xn.prototype.line=void 0;xn.prototype.ancestors=void 0;xn.prototype.cause=void 0;xn.prototype.fatal=void 0;xn.prototype.place=void 0;xn.prototype.ruleId=void 0;xn.prototype.source=void 0;const j0={}.hasOwnProperty,$re=new Map,Vre=/[A-Z]/g,Wre=/-([a-z])/g,Yre=new Set(["table","tbody","thead","tfoot","tr"]),Kre=new Set(["td","th"]),Fj="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zj(e,t){if(!t||t.Fragment===vo
|
||
|
`;break}case-3:{l=`\r
|
||
|
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(i)}a=i===-2,r.push(l)}return r.join("")}function aie(e){const r={constructs:Gj([eie,...(e||{}).extensions||[]]),content:a(vae),defined:[],document:a(Eae),flow:a(Boe),lazy:{},string:a(Goe),text:a(Hoe)};return r;function a(i){return l;function l(u){return tie(r,i,u)}}}function oie(e){for(;!Wj(e););return e}const lO=/[\0\t\n\r]/g;function iie(){let e=1,t="",n=!0,r;return a;function a(i,l,u){const c=[];let f,p,g,b,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),g=0,t="",n&&(i.charCodeAt(0)===65279&&g++,n=void 0);g<i.length;){if(lO.lastIndex=g,f=lO.exec(i),b=f&&f.index!==void 0?f.index:i.length,m=i.charCodeAt(b),!f){t=i.slice(g);break}if(m===10&&g===b&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),g<b&&(c.push(i.slice(g,b)),e+=b-g),m){case 0:{c.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,c.push(-2);e++<p;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}g=b+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const lie=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sie(e){return e.replace(lie,uie)}function uie(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return Hj(n.slice(i?2:1),i?16:10)}return $0(n)||e}const Jj={}.hasOwnProperty;function cie(e,t,n){return typeof t!="string"&&(n=t,t=void 0),die(n)(oie(aie(n).document().write(iie()(e,t,!0))))}function die(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(me),autolinkProtocol:D,autolinkEmail:D,atxHeading:i(Ee),blockQuote:i(ae),characterEscape:D,characterReference:D,codeFenced:i(we),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(we,l),codeText:i(xe,l),codeTextData:D,data:D,codeFlowValue:D,definition:i(De),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(Ce),hardBreakEscape:i(J),hardBreakTrailing:i(J),htmlFlow:i(fe,l),htmlFlowData:D,htmlText:i(fe,l),htmlTextData:D,image:i(ke),label:l,link:i(me),listItem:i(ie),listItemValue:b,listOrdered:i(ve,g),listUnordered:i(ve),paragraph:i(ze),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(Ee),strong:i(Pe),thematicBreak:i(Ne)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:Ae,autolinkProtocol:le,blockQuote:c(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Q,characterReferenceMarkerNumeric:Q,characterReferenceValue:se,characterReference:re,codeFenced:c(k),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:S,codeFlowValue:M,codeIndented:c(R),codeText:c(Z),codeTextData:M,data:M,definition:c(),definitionDestinationString:O,definitionLabelString:x,definitionTitleString:T,emphasis:c(),hardBreakEscape:c($),hardBreakTrailing:c($),htmlFlow:c(U),htmlFlowData:M,htmlText:c(W),htmlTextData:M,image:c(G),label:X,labelText:P,lineEnding:H,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Y,resourceDestinationString:I,resourceTitleString:V,resource:B,setextHeading:c(z),setextHeadingLineSequence:C,setextHeadingText:_,strong:c(),thematicBreak:c()}};e5(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let ce={type:"root",children:[]};const Re={stack:[ce],tokenStack:[],config:t,enter:u,exit:f,buffer:l,resume:p,data:n},Me=[];let $e=-1;for(;++$e<ee.length;)if(ee[$e][1].type==="listOrdered"||ee[$e][1].type==="listUnordered")if(ee[$e][0]==="enter")Me.push($e);else{const mt=Me.pop();$e=a(ee,mt,$e)}for($e=-1;++$e<ee.length;){const mt=t[ee[$e][0]];Jj.call(mt,ee[$e][1].type)&&mt[ee[$e][1].type].call(Object.assign({sliceSerialize:ee[$e][2].sliceSerialize},Re),ee[$e][1])}if(Re.tokenStack.length>0){const mt=Re.tokenStack[Re.tokenStack.length-1];(mt[1]||sO).call(Re,void 0,mt[0])}for(ce.position={start:uo(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:uo(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)ce=t.transforms
|
||
|
`}]}function mie(e,t){const n=t.value?t.value+`
|
||
|
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function bie(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yie(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vie(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Fl(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function Sie(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eie(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function t5(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function wie(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t5(e,t);const a={src:Fl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function xie(e,t){const n={src:Fl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function kie(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)}function Aie(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return t5(e,t);const a={href:Fl(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Tie(e,t){const n={href:Fl(t.url)};t.title!==null&&t.title!==void 0&&(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)}function _ie(e,t,n){const r=e.all(t),a=n?Rie(n):n5(t),i={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const p=r[u];(a||u!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
||
|
`}),p.type==="element"&&p.tagName==="p"&&!a?l.push(...p.children):l.push(p)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
|
||
|
`});const f={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,f),e.applyData(t,f)}function Rie(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=n5(n[r])}return t}function n5(e){const t=e.spread;return t??e.children.length>1}function Cie(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Nie(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oie(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Iie(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Die(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=U0(t.children[1]),c=Lj(t.children[t.children.length-1]);u&&c&&(l.position={start:u,end:c}),a.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Lie(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,u=l?l.length:t.children.length;let c=-1;const f=[];for(;++c<u;){const g=t.children[c],b={},m=l?l[c]:void 0;m&&(b.align=m);let S={type:"element",tagName:i,properties:b,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),f.push(S)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function Mie(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const uO=9,cO=32;function Fie(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(dO(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(dO(t.slice(a),a>0,!1)),i.join("")}function dO(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===uO||i===cO;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===uO||i===cO;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function zie(e,t){const n={type:"text",value:Fie(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pie(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Bie={blockquote:gie,break:hie,code:mie,delete:bie,emphasis:yie,footnoteReference:vie,heading:Sie,html:Eie,imageReference:wie,image:xie,inlineCode:kie,linkReference:Aie,link:Tie,listItem:_ie,list:Cie,paragraph:Nie,root:Oie,strong:Iie,table:Die,tableCell:Mie,tableRow:Lie,text:zie,thematicBreak:Pie,toml:ad,yaml:ad,definition:ad,footnoteDefinition:ad};function ad(){}const r5=-1,jf=0,Xs=1,Zd=2,W0=3,Y0=4,K0=5,X0=6,a5=7,o5=8,fO=typeof self=="object"?self:globalThis,Uie=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,l]=t[a];switch(i){case jf:case r5:return n(l,a);case Xs:{const u=n([],a);for(const c of l)u.push(r(c));return u}case Zd:{const u=n({},a);for(const[c,f]of l)u[r(c)]=r(f);return u}case W0:return n(new Date(l),a);case Y0:{const{source:u,flags:c}=l;return n(new RegExp(u,c),a)}case K0:{const u=n(new Map,a);for(const[c,f]of l)u.set(r(c),r(f));return u}case X0:{const u=n(new Set,a);for(const c of l)u.add(r(c));return u}case a5:{const{name:u,message:c}=l;return n(new fO[u](c),a)}case o5:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:u}=new Uint8Array(l);return n(new DataView(u),l)}}return
|
||
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
||
|
`}]}}const Gf=function(e){if(e==null)return Xie;if(typeof e=="function")return Hf(e);if(typeof e=="object")return Array.isArray(e)?Wie(e):Yie(e);if(typeof e=="string")return Kie(e);throw new Error("Expected function, string, or object as test")};function Wie(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gf(e[n]);return Hf(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function Yie(e){const t=e;return Hf(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function Kie(e){return Hf(t);function t(n){return n&&n.type===e}}function Hf(e){return t;function t(n,r,a){return!!(Zie(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Xie(){return!0}function Zie(e){return e!==null&&typeof e=="object"&&"type"in e}const i5=[],Qie=!0,gk=!1,Jie="skip";function l5(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Gf(a),l=r?-1:1;u(e,void 0,[])();function u(c,f,p){const g=c&&typeof c=="object"?c:{};if(typeof g.type=="string"){const m=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return b;function b(){let m=i5,S,v,k;if((!t||i(c,f,p[p.length-1]||void 0))&&(m=ele(n(c,p)),m[0]===gk))return m;if("children"in c&&c.children){const R=c;if(R.children&&m[0]!==Jie)for(v=(r?R.children.length:-1)+l,k=p.concat(R);v>-1&&v<R.children.length;){const x=R.children[v];if(S=u(x,v,k)(),S[0]===gk)return S;v=typeof S[1]=="number"?S[1]:v+l}}return m}}}function ele(e){return Array.isArray(e)?e:typeof e=="number"?[Qie,e]:e==null?i5:[e]}function Z0(e,t,n,r){let a,i,l;typeof t=="function"?(i=void 0,l=t,a=n):(i=t,l=n,a=r),l5(e,i,u,a);function u(c,f){const p=f[f.length-1],g=p?p.children.indexOf(c):void 0;return l(c,g,p)}}const hk={}.hasOwnProperty,tle={};function nle(e,t){const n=t||tle,r=new Map,a=new Map,i=new Map,l={...Bie,...n.handlers},u={all:f,applyData:ale,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:l,one:c,options:n,patch:rle,wrap:ile};return Z0(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?r:a,b=String(p.identifier).toUpperCase();g.has(b)||g.set(b,p)}}),u;function c(p,g){const b=p.type,m=u.handlers[b];if(hk.call(u.handlers,b)&&m)return m(u,p,g);if(u.options.passThrough&&u.options.passThrough.includes(b)){if("children"in p){const{children:v,...k}=p,R=Qd(k);return R.children=u.all(p),R}return Qd(p)}return(u.options.unknownHandler||ole)(u,p,g)}function f(p){const g=[];if("children"in p){const b=p.children;let m=-1;for(;++m<b.length;){const S=u.one(b[m],p);if(S){if(m&&b[m-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=hO(S.value)),!Array.isArray(S)&&S.type==="element")){const v=S.children[0];v&&v.type==="text"&&(v.value=hO(v.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function rle(e,t){e.position&&(t.position=qre(e))}function ale(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&i&&Object.assign(n.properties,Qd(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function ole(e,t){const n=t.data||{},r="value"in t&&!(hk.call(n,"hProperties")||hk.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ile(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
||
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
||
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
||
|
`}),n}function hO(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function mO(e,t){const n=nle(e,t),r=n.one(e,void 0),a=Vie(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
|
||
|
`},a),i}function lle(e,t){return e&&"run"in e?async function(n,r){const a=mO(n,{file:r,...t});await e.run(a,r)}:function(n,r){return mO(n,{file:r,...e||t})}}function bO(e){if(e)throw e}var Em,yO;function sle(){if(yO)return Em;yO=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},i=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!g)return!1;var b;for(b in f);return typeof b>"u"||e.call(f,b)},l=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},u=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Em=function c(){var f,p,g,b,m,S,v=arguments[0],k=1,R=arguments.length,x=!1;for(typeof v=="boolean"&&(x=v,v=arguments[1]||{},k=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});k<R;++k)if(f=arguments[k],f!=null)for(p in f)g=u(v,p),b=u(f,p),v!==b&&(x&&b&&(i(b)||(m=a(b)))?(m?(m=!1,S=g&&a(g)?g:[]):S=g&&i(g)?g:{},l(v,{name:p,newValue:c(x,S,b)})):typeof b<"u"&&l(v,{name:p,newValue:b}));return v},Em}var ule=sle();const wm=an(ule);function mk(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function cle(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);u(null,...a);function u(c,...f){const p=e[++i];let g=-1;if(c){l(c);return}for(;++g<a.length;)(f[g]===null||f[g]===void 0)&&(f[g]=a[g]);a=f,p?dle(p,u)(...f):l(null,...f)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function dle(e,t){let n;return r;function r(...l){const u=e.length>l.length;let c;u&&l.push(a);try{c=e.apply(this,l)}catch(f){const p=f;if(u&&n)throw p;return a(p)}u||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(l,...u){n||(n=!0,t(l,...u))}function i(l){a(null,l)}}const $r={basename:fle,dirname:ple,extname:gle,join:hle,sep:"/"};function fle(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Tu(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else l<0&&(i=!0,l=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function ple(e){if(Tu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gle(e){Tu(e);let t=e.length,n=-1,r=0,a=-1,i=0,l;for(;t--;){const u=e.codePointAt(t);if(u===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),u===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function hle(...e){let t=-1,n;for(;++t<e.length;)Tu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":mle(n)}function mle(e){Tu(e);const t=e.codePointAt(0)===47;let n=ble(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ble(e,t){let n="",r=0,a=-1,i=0,l=-1,u,c;for(;++l<=e.length;){if(l<e.length)u=e.codePointAt(l);else{if(u===47)break;u=47}if(u===47){if(!(a===l-1||i===1))if(a!==l-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?
|
||
|
`:" ")+i.indentLines(i.containerFlow(r,u.current()),t?d5:dse))),f(),c}}function dse(e,t,n){return t===0?e:d5(e,t,n)}function d5(e,t,n){return(n?"":" ")+e}const fse=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];f5.peek=bse;function pse(){return{canContainEols:["delete"],enter:{strikethrough:hse},exit:{strikethrough:mse}}}function gse(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:fse}],handlers:{delete:f5}}}function hse(e){this.enter({type:"delete",children:[]},e)}function mse(e){this.exit(e)}function f5(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),i(),l}function bse(){return"~"}function yse(e){return e.length}function vse(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||yse,i=[],l=[],u=[],c=[];let f=0,p=-1;for(;++p<e.length;){const v=[],k=[];let R=-1;for(e[p].length>f&&(f=e[p].length);++R<e[p].length;){const x=Sse(e[p][R]);if(n.alignDelimiters!==!1){const T=a(x);k[R]=T,(c[R]===void 0||T>c[R])&&(c[R]=T)}v.push(x)}l[p]=v,u[p]=k}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)i[g]=AO(r[g]);else{const v=AO(r);for(;++g<f;)i[g]=v}g=-1;const b=[],m=[];for(;++g<f;){const v=i[g];let k="",R="";v===99?(k=":",R=":"):v===108?k=":":v===114&&(R=":");let x=n.alignDelimiters===!1?1:Math.max(1,c[g]-k.length-R.length);const T=k+"-".repeat(x)+R;n.alignDelimiters!==!1&&(x=k.length+x+R.length,x>c[g]&&(c[g]=x),m[g]=x),b[g]=T}l.splice(1,0,b),u.splice(1,0,m),p=-1;const S=[];for(;++p<l.length;){const v=l[p],k=u[p];g=-1;const R=[];for(;++g<f;){const x=v[g]||"";let T="",O="";if(n.alignDelimiters!==!1){const N=c[g]-(k[g]||0),_=i[g];_===114?T=" ".repeat(N):_===99?N%2?(T=" ".repeat(N/2+.5),O=" ".repeat(N/2-.5)):(T=" ".repeat(N/2),O=T):O=" ".repeat(N)}n.delimiterStart!==!1&&!g&&R.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&x==="")&&(n.delimiterStart!==!1||g)&&R.push(" "),n.alignDelimiters!==!1&&R.push(T),R.push(x),n.alignDelimiters!==!1&&R.push(O),n.padding!==!1&&R.push(" "),(n.delimiterEnd!==!1||g!==f-1)&&R.push("|")}S.push(n.delimiterEnd===!1?R.join("").replace(/ +$/,""):R.join(""))}return S.join(`
|
||
|
`)}function Sse(e){return e==null?"":String(e)}function AO(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ese(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const l=n.indentLines(n.containerFlow(e,i.current()),wse);return a(),l}function wse(e,t,n){return">"+(n?"":" ")+e}function xse(e,t){return TO(e,t.inConstruct,!0)&&!TO(e,t.notInConstruct,!1)}function TO(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function _O(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
||
|
`&&xse(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
||
|
`}function p5(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>l&&(l=i):i=1,a=r+t.length,r=n.indexOf(t,a);return l}function kse(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Ase(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Tse(e,t,n,r){const a=Ase(n),i=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(kse(e,n)){const g=n.enter("codeIndented"),b=n.indentLines(i,_se);return g(),b}const u=n.createTracker(r),c=a.repeat(Math.max(p5(i,a)+1,3)),f=n.enter("codeFenced");let p=u.move(c);if(e.lang){const g=n.enter(`codeFencedLang${l}`);p+=u.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...u.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${l}`);p+=u.move(" "),p+=u.move(n.safe(e.meta,{before:p,after:`
|
||
|
`,encode:["`"],...u.current()})),g()}return p+=u.move(`
|
||
|
`),i&&(p+=u.move(i+`
|
||
|
`)),p+=u.move(c),f(),p}function _se(e,t,n){return(n?"":" ")+e}function J0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Rse(e,t,n,r){const a=J0(n),i=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
||
|
`,...c.current()}))),u(),e.title&&(u=n.enter(`title${i}`),f+=c.move(" "+a),f+=c.move(n.safe(e.title,{before:f,after:a,...c.current()})),f+=c.move(a),u()),l(),f}function Cse(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function uu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Jd(e,t,n){const r=Sl(e),a=Sl(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}g5.peek=Nse;function g5(e,t,n,r){const a=Cse(n),i=n.enter("emphasis"),l=n.createTracker(r),u=l.move(a);let c=l.move(n.containerPhrasing(e,{after:a,before:u,...l.current()}));const f=c.charCodeAt(0),p=Jd(r.before.charCodeAt(r.before.length-1),f,a);p.inside&&(c=uu(f)+c.slice(1));const g=c.charCodeAt(c.length-1),b=Jd(r.after.charCodeAt(0),g,a);b.inside&&(c=c.slice(0,-1)+uu(g));const m=l.move(a);return i(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},u+c+m}function Nse(e,t,n){return n.options.emphasis||"*"}function Ose(e,t){let n=!1;return Z0(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,gk}),!!((!e.depth||e.depth<3)&&q0(e)&&(t.options.setext||n))}function Ise(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(Ose(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),b=n.containerPhrasing(e,{...i.current(),before:`
|
||
|
`,after:`
|
||
|
`});return g(),p(),b+`
|
||
|
`+(a===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
||
|
`))+1))}const l="#".repeat(a),u=n.enter("headingAtx"),c=n.enter("phrasing");i.move(l+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
||
|
`,...i.current()});return/^[\t ]/.test(f)&&(f=uu(f.charCodeAt(0))+f.slice(1)),f=f?l+" "+f:l,n.options.closeAtx&&(f+=" "+l),c(),u(),f}h5.peek=Dse;function h5(e){return e.value||""}function Dse(){return"<"}m5.peek=Lse;function m5(e,t,n,r){const a=J0(n),i=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${i}`),f+=c.move(" "+a),f+=c.move(n.safe(e.title,{before:f,after:a,...c.current()})),f+=c.move(a),u()),f+=c.move(")"),l(),f}function Lse(){return"!"}b5.peek=Mse;function b5(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const f=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return l(),n.stack=p,i(),a==="full"||!f||f!==g?c+=u.move(g+"]"):a==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Mse(){return"!"}y5.peek=Fse;function y5(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const l=n.unsafe[i],u=n.compilePattern(l);let c;if(l.atBreak)for(;c=u.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return a+r+a}function Fse(){return"`"}function v5(e,t){const n=q0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}S5.peek=zse;function S5(e,t,n,r){const a=J0(n),i=a==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let u,c;if(v5(e,n)){const p=n.stack;n.stack=[],u=n.enter("autolink");let g=l.move("<");return g+=l.move(n.containerPhrasing(e,{before:g,after:">",...l.current()})),g+=l.move(">"),u(),n.stack=p,g}u=n.enter("link"),c=n.enter("label");let f=l.move("[");return f+=l.move(n.containerPhrasing(e,{before:f,after:"](",...l.current()})),f+=l.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=l.move("<"),f+=l.move(n.safe(e.url,{before:f,after:">",...l.current()})),f+=l.move(">")):(c=n.enter("destinationRaw"),f+=l.move(n.safe(e.url,{before:f,after:e.title?" ":")",...l.current()}))),c(),e.title&&(c=n.enter(`title${i}`),f+=l.move(" "+a),f+=l.move(n.safe(e.title,{before:f,after:a,...l.current()})),f+=l.move(a),c()),f+=l.move(")"),u(),f}function zse(e,t,n){return v5(e,n)?"<":"["}E5.peek=Pse;function E5(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let l=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return l(),n.stack=p,i(),a==="full"||!f||f!==g?c+=u.move(g+"]"):a==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Pse(){return"["}function eA(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Bse(e){const t=eA(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Use(e){const t=e.options.bulletOrdered||".";if(t!=="."
|
||
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:c,tableRow:u}};function l(m,S,v,k){return f(p(m,v,k),m.align)}function u(m,S,v,k){const R=g(m,v,k),x=f([R]);return x.slice(0,x.indexOf(`
|
||
|
`))}function c(m,S,v,k){const R=v.enter("tableCell"),x=v.enter("phrasing"),T=v.containerPhrasing(m,{...k,before:i,after:i});return x(),R(),T}function f(m,S){return vse(m,{align:S,alignDelimiters:r,padding:n,stringLength:a})}function p(m,S,v){const k=m.children;let R=-1;const x=[],T=S.enter("table");for(;++R<k.length;)x[R]=g(k[R],S,v);return T(),x}function g(m,S,v){const k=m.children;let R=-1;const x=[],T=S.enter("tableRow");for(;++R<k.length;)x[R]=c(k[R],m,S,v);return T(),x}function b(m,S,v){let k=k5.inlineCode(m,S,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function oue(){return{exit:{taskListCheckValueChecked:CO,taskListCheckValueUnchecked:CO,paragraph:lue}}}function iue(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:sue}}}function CO(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lue(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,l;for(;++i<a.length;){const u=a[i];if(u.type==="paragraph"){l=u;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function sue(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);i&&u.move(l);let c=k5.listItem(e,t,n,{...r,...u.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(p){return p+l}}function uue(){return[Gle(),use(),pse(),Qse(),oue()]}function cue(e){return{extensions:[Hle(),cse(e),gse(),aue(e),iue()]}}const due={tokenize:bue,partial:!0},A5={tokenize:yue,partial:!0},T5={tokenize:vue,partial:!0},_5={tokenize:Sue,partial:!0},fue={tokenize:Eue,partial:!0},R5={name:"wwwAutolink",tokenize:hue,previous:N5},C5={name:"protocolAutolink",tokenize:mue,previous:O5},Fa={name:"emailAutolink",tokenize:gue,previous:I5},ta={};function pue(){return{text:ta}}let Xo=48;for(;Xo<123;)ta[Xo]=Fa,Xo++,Xo===58?Xo=65:Xo===91&&(Xo=97);ta[43]=Fa;ta[45]=Fa;ta[46]=Fa;ta[95]=Fa;ta[72]=[Fa,C5];ta[104]=[Fa,C5];ta[87]=[Fa,R5];ta[119]=[Fa,R5];function gue(e,t,n){const r=this;let a,i;return l;function l(g){return!yk(g)||!I5.call(r,r.previous)||tA(r.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(g))}function u(g){return yk(g)?(e.consume(g),u):g===64?(e.consume(g),c):n(g)}function c(g){return g===46?e.check(fue,p,f)(g):g===45||g===95||Sn(g)?(i=!0,e.consume(g),c):p(g)}function f(g){return e.consume(g),a=!0,c}function p(g){return i&&a&&_n(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function hue(e,t,n){const r=this;return a;function a(l){return l!==87&&l!==119||!N5.call(r,r.previous)||tA(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(due,e.attempt(A5,e.attempt(T5,i),n),n)(l))}function i(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function mue(e,t,n){const r=this;let a="",i=!1;return l;function l(g){return(g===72||g===104)&&O5.call(r,r.previous)&&!tA(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(g),e.consume(g),u):n(g)}function u(g){if(_n(g)&&a.length<5)return a+=String.fromCodePoint(g),e.consume(g),u;if(g===58){const b=a.toLowerCase();if(b==="http"||b==="https")return e.consume(g),c}return n(g)}function c(g){return g===47?(e.consume(g),i?f:(i=!0,c)):n(g)}function f(g){return g===null||Xd(g)||Nt(g)||ui(g)||Bf(g)?n(g):e.attempt(A5,e.attempt(T5,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function bue(e,t,n){let r=0;return a;function a(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),a):l===46&&r===3?(e.consume(l),i):n(l)}function i(l){return l===null?n(l):t(l)}}function yue(e,t,n){let r,a,i;ret
|
||
|
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:r}};function n(i,l,u,c){const f=i.value||"",p=u.createTracker(c),g="$".repeat(Math.max(p5(f,"$")+1,2)),b=u.enter("mathFlow");let m=p.move(g);if(i.meta){const S=u.enter("mathFlowMeta");m+=p.move(u.safe(i.meta,{after:`
|
||
|
`,before:m,encode:["$"],...p.current()})),S()}return m+=p.move(`
|
||
|
`),f&&(m+=p.move(f+`
|
||
|
`)),m+=p.move(g),b(),m}function r(i,l,u){let c=i.value||"",f=1;for(t||f++;new RegExp("(^|[^$])"+"\\$".repeat(f)+"([^$]|$)").test(c);)f++;const p="$".repeat(f);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let g=-1;for(;++g<u.unsafe.length;){const b=u.unsafe[g];if(!b.atBreak)continue;const m=u.compilePattern(b);let S;for(;S=m.exec(c);){let v=S.index;c.codePointAt(v)===10&&c.codePointAt(v-1)===13&&v--,c=c.slice(0,v)+" "+c.slice(S.index+1)}}return p+c+p}function a(){return"$"}}const Yue={tokenize:Kue,concrete:!0,name:"mathFlow"},OO={tokenize:Xue,partial:!0};function Kue(e,t,n){const r=this,a=r.events[r.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return u;function u(x){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),c(x)}function c(x){return x===36?(e.consume(x),l++,c):l<2?n(x):(e.exit("mathFlowFenceSequence"),lt(e,f,"whitespace")(x))}function f(x){return x===null||qe(x)?g(x):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===null||qe(x)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),g(x)):x===36?n(x):(e.consume(x),p)}function g(x){return e.exit("mathFlowFence"),r.interrupt?t(x):e.attempt(OO,b,k)(x)}function b(x){return e.attempt({tokenize:R,partial:!0},k,m)(x)}function m(x){return(i?lt(e,S,"linePrefix",i+1):S)(x)}function S(x){return x===null?k(x):qe(x)?e.attempt(OO,b,k)(x):(e.enter("mathFlowValue"),v(x))}function v(x){return x===null||qe(x)?(e.exit("mathFlowValue"),S(x)):(e.consume(x),v)}function k(x){return e.exit("mathFlow"),t(x)}function R(x,T,O){let N=0;return lt(x,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function _(D){return x.enter("mathFlowFence"),x.enter("mathFlowFenceSequence"),C(D)}function C(D){return D===36?(N++,x.consume(D),C):N<l?O(D):(x.exit("mathFlowFenceSequence"),lt(x,z,"whitespace")(D))}function z(D){return D===null||qe(D)?(x.exit("mathFlowFence"),T(D)):O(D)}}}function Xue(e,t,n){const r=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function Zue(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:r,resolve:Que,previous:Jue,name:"mathText"};function r(a,i,l){let u=0,c,f;return p;function p(v){return a.enter("mathText"),a.enter("mathTextSequence"),g(v)}function g(v){return v===36?(a.consume(v),u++,g):u<2&&!n?l(v):(a.exit("mathTextSequence"),b(v))}function b(v){return v===null?l(v):v===36?(f=a.enter("mathTextSequence"),c=0,S(v)):v===32?(a.enter("space"),a.consume(v),a.exit("space"),b):qe(v)?(a.enter("lineEnding"),a.consume(v),a.exit("lineEnding"),b):(a.enter("mathTextData"),m(v))}function m(v){return v===null||v===32||v===36||qe(v)?(a.exit("mathTextData"),b(v)):(a.consume(v),m)}function S(v){return v===36?(a.consume(v),c++,S):c===u?(a.exit("mathTextSequence"),a.exit("mathText"),i(v)):(f.type="mathTextData",m(v))}}}function Que(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="mathTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function Jue(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function ece(e){return{flow:{36:Yue},text:{36:Zue(e)}}}const tce={};function nce(e){const t=this,n=e||tce,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(ece(n)),i.push(Vue()),l.push(Wue(n))}function IO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e
|
||
|
`))})}function fce(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,a=r===void 0?{float:"left",paddingRight:"10px"}:r,i=e.numberStyle,l=i===void 0?{}:i,u=e.startingLineNumber;return ye.createElement("code",{style:Object.assign({},n,a)},dce({lines:t.replace(/\n$/,"").split(`
|
||
|
`),style:l,startingLineNumber:u}))}function pce(e){return"".concat(e.toString().length,".25em")}function L5(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function M5(e,t,n){var r={display:"inline-block",minWidth:pce(n),paddingRight:"1em",textAlign:"right",userSelect:"none"},a=typeof e=="function"?e(t):e,i=go(go({},r),a);return i}function Td(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,a=e.largestLineNumber,i=e.showInlineLineNumbers,l=e.lineProps,u=l===void 0?{}:l,c=e.className,f=c===void 0?[]:c,p=e.showLineNumbers,g=e.wrapLongLines,b=e.wrapLines,m=b===void 0?!1:b,S=m?go({},typeof u=="function"?u(n):u):{};if(S.className=S.className?[].concat(Vx(S.className.trim().split(/\s+/)),Vx(f)):f,n&&i){var v=M5(r,n,a);t.unshift(L5(n,v))}return g&p&&(S.style=go({display:"flex"},S.style)),{type:"element",tagName:"span",properties:S,children:t}}function F5(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=0;r<e.length;r++){var a=e[r];if(a.type==="text")n.push(Td({children:[a],className:Vx(new Set(t))}));else if(a.children){var i=t.concat(a.properties.className);F5(a.children,i).forEach(function(l){return n.push(l)})}}return n}function gce(e,t,n,r,a,i,l,u,c){var f,p=F5(e.value),g=[],b=-1,m=0;function S(N,_){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return Td({children:N,lineNumber:_,lineNumberStyle:u,largestLineNumber:l,showInlineLineNumbers:a,lineProps:n,className:C,showLineNumbers:r,wrapLongLines:c,wrapLines:t})}function v(N,_){if(r&&_&&a){var C=M5(u,_,l);N.unshift(L5(_,C))}return N}function k(N,_){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||C.length>0?S(N,_,C):v(N,_)}for(var R=function(){var _=p[m],C=_.children[0].value,z=cce(C);if(z){var D=C.split(`
|
||
|
`);D.forEach(function(M,H){var $=r&&g.length+i,U={type:"text",value:"".concat(M,`
|
||
|
`)};if(H===0){var W=p.slice(b+1,m).concat(Td({children:[U],className:_.properties.className})),Z=k(W,$);g.push(Z)}else if(H===D.length-1){var j=p[m+1]&&p[m+1].children&&p[m+1].children[0],G={type:"text",value:"".concat(M)};if(j){var P=Td({children:[G],className:_.properties.className});p.splice(m+1,0,P)}else{var X=[G],I=k(X,$,_.properties.className);g.push(I)}}else{var V=[U],B=k(V,$,_.properties.className);g.push(B)}}),b=m}m++};m<p.length;)R();if(b!==p.length-1){var x=p.slice(b+1,p.length);if(x&&x.length){var T=r&&g.length+i,O=k(x,T);g.push(O)}}return t?g:(f=[]).concat.apply(f,g)}function hce(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(a,i){return D5({node:a,stylesheet:n,useInlineStyles:r,key:"code-segement".concat(i)})})}function z5(e){return e&&typeof e.highlightAuto<"u"}function mce(e){var t=e.astGenerator,n=e.language,r=e.code,a=e.defaultCodeValue;if(z5(t)){var i=lce(t,n);return n==="text"?{value:a,language:"text"}:i?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!=="text"?{value:t.highlight(r,n)}:{value:a}}catch{return{value:a}}}function bce(e,t){return function(r){var a=r.language,i=r.children,l=r.style,u=l===void 0?t:l,c=r.customStyle,f=c===void 0?{}:c,p=r.codeTagProps,g=p===void 0?{className:a?"language-".concat(a):void 0,style:go(go({},u['code[class*="language-"]']),u['code[class*="language-'.concat(a,'"]')])}:p,b=r.useInlineStyles,m=b===void 0?!0:b,S=r.showLineNumbers,v=S===void 0?!1:S,k=r.showInlineLineNumbers,R=k===void 0?!0:k,x=r.startingLineNumber,T=x===void 0?1:x,O=r.lineNumberContainerStyle,N=r.lineNumberStyle,_=N===void 0?{}:N,C=r.wrapLines,z=r.wrapLongLines,D=z===void 0?!1:z,M=r.lineProps,H=M===void 0?{}:M,$=r.renderer,U=r.PreTag,W=U===void 0?"pre":U,Z=r.CodeTag,j=Z===void 0?"code":Z,G=r.code,P=G===void 0?(Array.isArray(i)?i[0]:i)||"":G,X=r.astGenerator,I=_ee(r,sce);X=X||e;var V=v?ye.createElement(fce,{containerStyle:O,codeStyle:g.style||{},numberStyle:_,startingLineNumber:T,codeString:P}):null,B=u.hljs||u['pre[class*="language-"]']||{backgroundColor:"#fff"},L=z5(X)?"hljs":"prismjs",Y=m?Object.assign({},I,{style:Object.assign({},B,f)}):Object.assign({},I,{className:I.className?"".concat(L," ").concat(I.className):L,style:Object.assign({},f)});if(D?g.style=go({whiteSpace:"pre-wrap"},g.style):g.style=go({whiteSpace:"pre"},g.style),!X)return ye.createElement(W,Y,V,ye.createElement(j,g,P));(C===void 0&&$||D)&&(C=!0),$=$||hce;var Q=[{type:"text",value:P}],se=mce({astGenerator:X,language:a,code:P,defaultCodeValue:Q});se.language===null&&(se.value=Q);var re=se.value.length;re===1&&se.value[0].type==="text"&&(re=se.value[0].value.split(`
|
||
|
`).length);var le=re+T,Ae=gce(se,C,H,v,R,T,le,_,D);return ye.createElement(W,Y,ye.createElement(j,g,!R&&V,$({rows:Ae,stylesheet:u,useInlineStyles:m})))}}const yce=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];var Lm,MO;function vce(){if(MO)return Lm;MO=1,Lm=t;var e=Object.prototype.hasOwnProperty;function t(){for(var n={},r=0;r<arguments.length;r++){var a=arguments[r];for(var i in a)e.call(a,i)&&(n[i]=a[i])}return n}return Lm}var Mm,FO;function P5(){if(FO)return Mm;FO=1,Mm=t;var e=t.prototype;e.space=null,e.normal={},e.property={};function t(n,r,a){this.property=n,this.normal=r,a&&(this.space=a)}return Mm}var Fm,zO;function Sce(){if(zO)return Fm;zO=1;var e=vce(),t=P5();Fm=n;function n(r){for(var a=r.length,i=[],l=[],u=-1,c,f;++u<a;)c=r[u],i.push(c.property),l.push(c.normal),f=c.space;return new t(e.apply(null,i),e.apply(null,l),f)}return Fm}var zm,PO;function nA(){if(PO)return zm;PO=1,zm=e;function e(t){return t.toLowerCase()}return zm}var Pm,BO;function B5(){if(BO)return Pm;BO=1,Pm=t;var e=t.prototype;e.space=null,e.attribute=null,e.property=null,e.boolean=!1,e.booleanish=!1,e.overloadedBoolean=!1,e.number=!1,e.commaSeparated=!1,e.spaceSeparated=!1,e.commaOrSpaceSeparated=!1,e.mustUseProperty=!1,e.defined=!1;function t(n,r){this.property=n,this.attribute=r}return Pm}var ka={},UO;function rA(){if(UO)return ka;UO=1;var e=0;ka.boolean=t(),ka.booleanish=t(),ka.overloadedBoolean=t(),ka.number=t(),ka.spaceSeparated=t(),ka.commaSeparated=t(),ka.commaOrSpaceSeparated=t();function t(){return Math.pow(2,++e)}return ka}var Bm,jO;function U5(){if(jO)return Bm;jO=1;var e=B5(),t=rA();Bm=a,a.prototype=new e,a.prototype.defined=!0;var n=
|
||
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
||
|
*
|
||
|
* @license MIT <https://opensource.org/licenses/MIT>
|
||
|
* @author Lea Verou <https://lea.verou.me>
|
||
|
* @namespace
|
||
|
* @public
|
||
|
*/var n=function(r){var a=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,i=0,l={},u={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function x(T){return T instanceof c?new c(T.type,x(T.content),T.alias):Array.isArray(T)?T.map(x):T.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(x){return Object.prototype.toString.call(x).slice(8,-1)},objId:function(x){return x.__id||Object.defineProperty(x,"__id",{value:++i}),x.__id},clone:function x(T,O){O=O||{};var N,_;switch(u.util.type(T)){case"Object":if(_=u.util.objId(T),O[_])return O[_];N={},O[_]=N;for(var C in T)T.hasOwnProperty(C)&&(N[C]=x(T[C],O));return N;case"Array":return _=u.util.objId(T),O[_]?O[_]:(N=[],O[_]=N,T.forEach(function(z,D){N[D]=x(z,O)}),N);default:return T}},getLanguage:function(x){for(;x;){var T=a.exec(x.className);if(T)return T[1].toLowerCase();x=x.parentElement}return"none"},setLanguage:function(x,T){x.className=x.className.replace(RegExp(a,"gi"),""),x.classList.add("language-"+T)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(N){var x=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(N.stack)||[])[1];if(x){var T=document.getElementsByTagName("script");for(var O in T)if(T[O].src==x)return T[O]}return null}},isActive:function(x,T,O){for(var N="no-"+T;x;){var _=x.classList;if(_.contains(T))return!0;if(_.contains(N))return!1;x=x.parentElement}return!!O}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(x,T){var O=u.util.clone(u.languages[x]);for(var N in T)O[N]=T[N];return O},insertBefore:function(x,T,O,N){N=N||u.languages;var _=N[x],C={};for(var z in _)if(_.hasOwnProperty(z)){if(z==T)for(var D in O)O.hasOwnProperty(D)&&(C[D]=O[D]);O.hasOwnProperty(z)||(C[z]=_[z])}var M=N[x];return N[x]=C,u.languages.DFS(u.languages,function(H,$){$===M&&H!=x&&(this[H]=C)}),C},DFS:function x(T,O,N,_){_=_||{};var C=u.util.objId;for(var z in T)if(T.hasOwnProperty(z)){O.call(T,z,T[z],N||z);var D=T[z],M=u.util.type(D);M==="Object"&&!_[C(D)]?(_[C(D)]=!0,x(D,O,null,_)):M==="Array"&&!_[C(D)]&&(_[C(D)]=!0,x(D,O,z,_))}}},plugins:{},highlightAll:function(x,T){u.highlightAllUnder(document,x,T)},highlightAllUnder:function(x,T,O){var N={callback:O,container:x,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};u.hooks.run("before-highlightall",N),N.elements=Array.prototype.slice.apply(N.container.querySelectorAll(N.selector)),u.hooks.run("before-all-elements-highlight",N);for(var _=0,C;C=N.elements[_++];)u.highlightElement(C,T===!0,N.callback)},highlightElement:function(x,T,O){var N=u.util.getLanguage(x),_=u.languages[N];u.util.setLanguage(x,N);var C=x.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&u.util.setLanguage(C,N);var z=x.textContent,D={element:x,language:N,grammar:_,code:z};function M($){D.highlightedCode=$,u.hooks.run("before-insert",D),D.element.innerHTML=D.highlightedCode,u.hooks.run("after-highlight",D),u.hooks.run("complete",D),O&&O.call(D.element)}if(u.hooks.run("before-sanity-check",D),C=D.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!D.code){u.hooks.run("complete",D),O&&O.call(D.element);return}if(u.hooks.run("before-highlight",D),!D.grammar){M(u.util.encode(D.code));return}if(T&&r.Worker){var H=new Worker(u.filename);H.onmessage=function($){M($.data)},H.postMessage(JSON.stringify({language:D.language,code:D.code,immediateClose:!0}))}else M(u.highlight(D.code,D.grammar,D.language))},highlight:function(x,T,O){var N={code:x,grammar:T,language:O};if(u.hooks.run("before-tokenize",N),!N.grammar)throw new Error('The language "'+N.language+'" has no grammar.');return N.tokens=u.tokenize(N.code,N.grammar),u.hooks.run("after-tokenize",N),c.stringify(u.util.encode(N.tokens),N.language)},tokenize:function(x,T){var O=T.rest;if(O){for(var N in O)T[N]=O[N];delete T.rest}var _=new g;return b(_,_.head,x),p(x,_,T,_.head,0),S(_)},hooks:{all:{},add:function(x,T)
|
||
|
?|
|
||
|
|(?![\\s\\S])))+`,"m"),alias:l,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(a)[0]}}}}),Object.defineProperty(n.languages.diff,"PREFIXES",{value:r})})(t)}return by}var yy,wD;function Gn(){if(wD)return yy;wD=1,yy=e,e.displayName="markupTemplating",e.aliases=[];function e(t){(function(n){function r(a,i){return"___"+a.toUpperCase()+i+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(a,i,l,u){if(a.language===i){var c=a.tokenStack=[];a.code=a.code.replace(l,function(f){if(typeof u=="function"&&!u(f))return f;for(var p=c.length,g;a.code.indexOf(g=r(i,p))!==-1;)++p;return c[p]=f,g}),a.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(a,i){if(a.language!==i||!a.tokenStack)return;a.grammar=n.languages[i];var l=0,u=Object.keys(a.tokenStack);function c(f){for(var p=0;p<f.length&&!(l>=u.length);p++){var g=f[p];if(typeof g=="string"||g.content&&typeof g.content=="string"){var b=u[l],m=a.tokenStack[b],S=typeof g=="string"?g:g.content,v=r(i,b),k=S.indexOf(v);if(k>-1){++l;var R=S.substring(0,k),x=new n.Token(i,n.tokenize(m,a.grammar),"language-"+i,m),T=S.substring(k+v.length),O=[];R&&O.push.apply(O,c([R])),O.push(x),T&&O.push.apply(O,c([T])),typeof g=="string"?f.splice.apply(f,[p,1].concat(O)):g.content=O}}else g.content&&c(g.content)}return f}c(a.tokens)}}})})(t)}return yy}var vy,xD;function Vpe(){if(xD)return vy;xD=1;var e=Gn();vy=t,t.displayName="django",t.aliases=["jinja2"];function t(n){n.register(e),function(r){r.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var a=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,i=r.languages["markup-templating"];r.hooks.add("before-tokenize",function(l){i.buildPlaceholders(l,"django",a)}),r.hooks.add("after-tokenize",function(l){i.tokenizePlaceholders(l,"django")}),r.languages.jinja2=r.languages.django,r.hooks.add("before-tokenize",function(l){i.buildPlaceholders(l,"jinja2",a)}),r.hooks.add("after-tokenize",function(l){i.tokenizePlaceholders(l,"jinja2")})}(n)}return vy}var Sy,kD;function Wpe(){if(kD)return Sy;kD=1,Sy=e,e.displayName="dnsZoneFile",e.aliases=[];function e(t){t.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},t.languages["dns-zone"]=t.languages["dns-zone-file"]}return Sy}var Ey,AD;function Ype(){if(AD)return Ey;AD=1,Ey=e,e.displayName="docker",e.aliases=["dockerfile"];function e(t){(function(n){var r=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,a=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return r}),i=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,l=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return i}),u={pattern:RegExp(
|
||
|
]))(?:`+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|'+a+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source)+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:r,quoted:{pattern:RegExp(/(^|\s)/.source+a),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}})(t)}return IE}var DE,zM;function dA(){if(zM)return DE;zM=1,DE=e,e.displayName="t4Templating",e.aliases=[];function e(t){(function(n){function r(i,l,u){return{pattern:RegExp("<#"+i+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+i+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:l,alias:u}}}}function a(i){var l=n.languages[i],u="language-"+i;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:r("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:r("=",l,u),"class-feature":r("\\+",l,u),standard:r("",l,u)}}}}n.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:a})})(t)}return DE}var LE,PM;function Xme(){if(PM)return LE;PM=1;var e=dA(),t=qf();LE=n,n.displayName="t4Cs",n.aliases=[];function n(r){r.register(e),r.register(t),r.languages.t4=r.languages["t4-cs"]=r.languages["t4-templating"].createT4("csharp")}return LE}var ME,BM;function Y5(){if(BM)return ME;BM=1;var e=q5();ME=t,t.displayName="vbnet",t.aliases=[];function t(n){n.register(e),n.languages.vbnet=n.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}return ME}var FE,UM;function Zme(){if(UM)return FE;UM=1;var e=dA(),t=Y5();FE=n,n.displayName="t4Vb",n.aliases=[];function n(r){r.register(e),r.register(t),r.languages["t4-vb"]=r.languages["t4-templating"].createT4("vbnet")}return FE}var zE,jM;function K5(){if(jM)return zE;jM=1,zE=e,e.displayName="yaml",e.aliases=["yml"];function e(t){(function(n){var r=/[*&][^\s[\]{},]+/,a=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+a.source+"(?:[ ]+"+r.source+")?|"+r.source+"(?:[ ]+"+a.source+")?)",l=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(f,p){p=(p||"").replace(/m/g,"")+"m";var g=/
|
||
|
`),Tye=({className:e,children:t,node:n,...r})=>{const{theme:a}=r0(),i=e==null?void 0:e.match(/language-(\w+)/),l=i?i[1]:void 0;return(n?Aye(n):!1)?w.jsx("code",{className:e,...r,children:t}):w.jsx(X5,{style:a==="dark"?fz.oneDark:fz.oneLight,PreTag:"div",language:l,...r,children:String(t).replace(/\n$/,"")})};function _ye(){const[e,t]=A.useState(()=>Je.getState().retrievalHistory||[]),[n,r]=A.useState(""),[a,i]=A.useState(!1),l=A.useRef(null),u=A.useCallback(()=>{var g;(g=l.current)==null||g.scrollIntoView({behavior:"smooth"})},[]),c=A.useCallback(async g=>{if(g.preventDefault(),!n.trim()||a)return;const b={content:n,role:"user"},m={content:"",role:"assistant"},S=[...e];t([...S,b,m]),r(""),i(!0);const v=(x,T)=>{m.content+=x,t(O=>{const N=[...O],_=N[N.length-1];return _.role==="assistant"&&(_.content=m.content,_.isError=T),N})},k=Je.getState(),R={...k.querySettings,query:b.content,conversation_history:S.filter(x=>x.isError!==!0).map(x=>({role:x.role,content:x.content}))};try{if(k.querySettings.stream){let x="";await d$(R,v,T=>{x+=T}),x&&(m.content&&(x=m.content+`
|
||
|
`+x),v(x,!0))}else{const x=await c$(R);v(x.response)}}catch(x){v(`Error: Failed to get response
|
||
|
${Nr(x)}`,!0)}finally{i(!1),Je.getState().setRetrievalHistory([...S,b,m])}},[n,a,e,t]),f=C0(e,100);A.useEffect(()=>u(),[f,u]);const p=A.useCallback(()=>{t([]),Je.getState().setRetrievalHistory([])},[t]);return w.jsxs("div",{className:"flex size-full gap-2 px-2 pb-12",children:[w.jsxs("div",{className:"flex grow flex-col gap-4",children:[w.jsx("div",{className:"relative grow",children:w.jsx("div",{className:"bg-primary-foreground/60 absolute inset-0 flex flex-col overflow-auto rounded-lg border p-2",children:w.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-2",children:[e.length===0?w.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center text-lg",children:"Start a retrieval by typing your query below"}):e.map((g,b)=>w.jsx("div",{className:`flex ${g.role==="user"?"justify-end":"justify-start"}`,children:w.jsx(kye,{message:g})},b)),w.jsx("div",{ref:l,className:"pb-1"})]})})}),w.jsxs("form",{onSubmit:c,className:"flex shrink-0 items-center gap-2",children:[w.jsxs(Lt,{type:"button",variant:"outline",onClick:p,disabled:a,size:"sm",children:[w.jsx(iP,{}),"Clear"]}),w.jsx(oi,{className:"flex-1",value:n,onChange:g=>r(g.target.value),placeholder:"Type your query...",disabled:a}),w.jsxs(Lt,{type:"submit",variant:"default",disabled:a,size:"sm",children:[w.jsx(n8,{}),"Send"]})]})]}),w.jsx(Ere,{})]})}function Rye(){return w.jsx("iframe",{src:Az+"/docs",className:"size-full"})}function Cye(){const e=Pn.use.message(),t=Je.use.enableHealthCheck(),[n]=A.useState(()=>Je.getState().currentTab),[r,a]=A.useState(!1);A.useEffect(()=>{if(!t)return;Pn.getState().check();const l=setInterval(async()=>{await Pn.getState().check()},x9*1e3);return()=>clearInterval(l)},[t]);const i=A.useCallback(l=>Je.getState().setCurrentTab(l),[]);return A.useEffect(()=>{if(e&&(e.includes(nP)||e.includes(rP))){a(!0);return}a(!1)},[e,a]),w.jsx(_9,{children:w.jsxs("main",{className:"flex h-screen w-screen overflow-x-hidden",children:[w.jsxs(OY,{defaultValue:n,className:"!m-0 flex grow flex-col !p-0",onValueChange:i,children:[w.jsx(DY,{}),w.jsxs("div",{className:"relative grow",children:[w.jsx(Hs,{value:"documents",className:"absolute top-0 right-0 bottom-0 left-0",children:w.jsx(wne,{})}),w.jsx(Hs,{value:"knowledge-graph",className:"absolute top-0 right-0 bottom-0 left-0",children:w.jsx(Vee,{})}),w.jsx(Hs,{value:"retrieval",className:"absolute top-0 right-0 bottom-0 left-0",children:w.jsx(_ye,{})}),w.jsx(Hs,{value:"api",className:"absolute top-0 right-0 bottom-0 left-0",children:w.jsx(Rye,{})})]})]}),t&&w.jsx(pY,{}),e!==null&&!r&&w.jsx(h8,{}),r&&w.jsx(JW,{}),w.jsx(QW,{})]})})}SH.createRoot(document.getElementById("root")).render(w.jsx(A.StrictMode,{children:w.jsx(Cye,{})}));
|