This commit is contained in:
1 parent
b9655a5ab1
commit
e292824161
122 files changed
+90002
-69
No files matched your search
@@ -0,0 +1 @@
|
||||
import{a5 as c}from"./index-DiaaLdUu.js";import{l as a}from"./SelectionManager-Dl9uHsLK.js";let o=new Map;function u(r){let{locale:t}=c(),e=t+(r?Object.entries(r).sort((n,i)=>n[0]<i[0]?-1:1).join():"");if(o.has(e))return o.get(e);let l=new Intl.Collator(t,r);return o.set(e,l),l}class h{getItemRect(t){let e=this.ref.current;if(!e)return null;let l=t!=null?a(this.ref,t):null;if(!l)return null;let n=e.getBoundingClientRect(),i=l.getBoundingClientRect();return{x:i.left-n.left-e.clientLeft+e.scrollLeft,y:i.top-n.top-e.clientTop+e.scrollTop,width:i.width,height:i.height}}getContentSize(){let t=this.ref.current;var e,l;return{width:(e=t==null?void 0:t.scrollWidth)!==null&&e!==void 0?e:0,height:(l=t==null?void 0:t.scrollHeight)!==null&&l!==void 0?l:0}}getVisibleRect(){let t=this.ref.current;var e,l,n,i;return{x:(e=t==null?void 0:t.scrollLeft)!==null&&e!==void 0?e:0,y:(l=t==null?void 0:t.scrollTop)!==null&&l!==void 0?l:0,width:(n=t==null?void 0:t.clientWidth)!==null&&n!==void 0?n:0,height:(i=t==null?void 0:t.clientHeight)!==null&&i!==void 0?i:0}}constructor(t){this.ref=t}}export{h as $,u as a};
|
||||
@@ -0,0 +1 @@
|
||||
import{R as r}from"./react-vendor-jWT2yUdV.js";function c(t){return null}c.getCollectionNode=function*(e,i){let{childItems:d,title:u,children:h}=e,a=e.title||e.children,n=e.textValue||(typeof a=="string"?a:"")||e["aria-label"]||"";!n&&!(i!=null&&i.suppressTextValueWarning)&&console.warn("<Item> with non-plain text contents is unsupported by type to select for accessibility. Please add a `textValue` prop."),yield{type:"item",props:e,rendered:a,textValue:n,"aria-label":e["aria-label"],hasChildNodes:s(e),*childNodes(){if(d)for(let l of d)yield{type:"item",value:l};else if(u){let l=[];r.Children.forEach(h,f=>{l.push({type:"item",element:f})}),yield*l}}}};function s(t){return t.hasChildItems!=null?t.hasChildItems:!!(t.childItems||t.title&&r.Children.count(t.children)>0)}let m=c;export{m as $};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as h,d as Ae,R as Y}from"./react-vendor-jWT2yUdV.js";import{ao as oe,aO as Me,aN as Ce,a3 as ce,br as Re,ba as Be,ap as Se,bs as ue,a8 as X,bt as xe,a6 as Pe,bu as Le,a5 as Oe,ai as we,ab as ae,b1 as he,aa as Ue,a9 as ze,bv as We,ah as He}from"./index-DiaaLdUu.js";import{$ as Fe}from"./usePress-BrNwsdVw.js";function pe(i,e){const t=h.useRef(!0),l=h.useRef(null);oe(()=>(t.current=!0,()=>{t.current=!1}),[]),oe(()=>{t.current?t.current=!1:(!l.current||e.some((n,c)=>!Object.is(n,l[c])))&&i(),l.current=e},e)}function je(i,e){const t=[];for(;i&&i!==document.documentElement;)Me(i,e)&&t.push(i),i=i.parentElement;return t}function V(i){return Ce()?i.metaKey:i.ctrlKey}let Ge=0;const ie=new Map;function qe(i){let[e,t]=h.useState();return oe(()=>{if(!i)return;let l=ie.get(i);if(l)t(l.element.id);else{let n=`react-aria-description-${Ge++}`;t(n);let c=document.createElement("div");c.id=n,c.style.display="none",c.textContent=i,document.body.appendChild(c),l={refCount:0,element:c},ie.set(i,l)}return l.refCount++,()=>{l&&--l.refCount===0&&(l.element.remove(),ie.delete(i))}},[i]),{"aria-describedby":i?e:void 0}}function Z(i,e,t,l){let n=ce(t),c=t==null;h.useEffect(()=>{if(c||!i.current)return;let r=i.current;return r.addEventListener(e,n,l),()=>{r.removeEventListener(e,n,l)}},[i,e,l,c,n])}function Te(i,e){let t=ye(i,e,"left"),l=ye(i,e,"top"),n=e.offsetWidth,c=e.offsetHeight,r=i.scrollLeft,f=i.scrollTop,{borderTopWidth:a,borderLeftWidth:b,scrollPaddingTop:k,scrollPaddingRight:g,scrollPaddingBottom:p,scrollPaddingLeft:S}=getComputedStyle(i),{scrollMarginTop:$,scrollMarginRight:A,scrollMarginBottom:y,scrollMarginLeft:w}=getComputedStyle(e),v=r+parseInt(b,10),m=f+parseInt(a,10),x=v+i.clientWidth,M=m+i.clientHeight,D=parseInt(k,10)||0,I=parseInt(p,10)||0,F=parseInt(g,10)||0,L=parseInt(S,10)||0,U=parseInt($,10)||0,R=parseInt(y,10)||0,C=parseInt(A,10)||0,T=parseInt(w,10)||0,H=t-T,z=t+n+C,j=l-U,o=l+c+R,d=r+parseInt(b,10)+L,K=x-F,s=f+parseInt(a,10)+D,P=M-I;(H>d||z<K)&&(H<=r+L?r=H-parseInt(b,10)-L:z>x-F&&(r+=z-x+F)),(j>s||o<P)&&(j<=m+D?f=j-parseInt(a,10)-D:o>M-I&&(f+=o-M+I)),i.scrollTo({left:r,top:f})}function ye(i,e,t){const l=t==="left"?"offsetLeft":"offsetTop";let n=0;for(;e.offsetParent&&(n+=e[l],e.offsetParent!==i);){if(e.offsetParent.contains(i)){n-=i[l];break}e=e.offsetParent}return n}function ve(i,e){if(i&&document.contains(i)){let r=document.scrollingElement||document.documentElement;if(!(window.getComputedStyle(r).overflow==="hidden")&&!Re()){var t;let{left:a,top:b}=i.getBoundingClientRect();i==null||(t=i.scrollIntoView)===null||t===void 0||t.call(i,{block:"nearest"});let{left:k,top:g}=i.getBoundingClientRect();if(Math.abs(a-k)>1||Math.abs(b-g)>1){var l,n,c;e==null||(n=e.containingElement)===null||n===void 0||(l=n.scrollIntoView)===null||l===void 0||l.call(n,{block:"center",inline:"center"}),(c=i.scrollIntoView)===null||c===void 0||c.call(i,{block:"nearest"})}}else{let a=je(i);for(let b of a)Te(b,i)}}}const Ye="react-aria-clear-focus",Ve="react-aria-focus",Xe=500;function Ze(i){let{isDisabled:e,onLongPressStart:t,onLongPressEnd:l,onLongPress:n,threshold:c=Xe,accessibilityDescription:r}=i;const f=h.useRef(void 0);let{addGlobalListener:a,removeGlobalListener:b}=Be(),{pressProps:k}=Fe({isDisabled:e,onPressStart(p){if(p.continuePropagation(),(p.pointerType==="mouse"||p.pointerType==="touch")&&(t&&t({...p,type:"longpressstart"}),f.current=setTimeout(()=>{p.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),Se(p.target).activeElement!==p.target&&ue(p.target),n&&n({...p,type:"longpress"}),f.current=void 0},c),p.pointerType==="touch")){let S=$=>{$.preventDefault()};a(p.target,"contextmenu",S,{once:!0}),a(window,"pointerup",()=>{setTimeout(()=>{b(p.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(p){f.current&&clearTimeout(f.current),l&&(p.pointerType==="mouse"||p.pointerType==="touch")&&l({...p,type:"longpressend"})}}),g=qe(n&&!e?r:void 0);return{longPressProps:X(k,g)}}function De(i){let e=Qe(Se(i));e!==i&&(e&&Je(e,i),i&&ke(i,e))}function Je(i,e){i.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function ke(i,e){i.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),i.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Qe(i){let e=xe(i),t=e==null?void 0:e.getAttribute("aria-activedescendant");return t&&i.getElementById(t)||e}function fe(i){return Le()?i.altKey:i.ctrlKey}function ne(i,e){var t,l;let n=`[data-key="${CSS.escape(String(e))}"]`,c=(t=i.current)===null||t===void 0?void 0:t.dataset.collection;return c&&(n=`[data-collection="${CSS.escape(c)}"]${n}`),(l=i.current)===null||l===void 0?void 0:l.querySelector(n)}const Ie=new WeakMap;function Ne(i){let e=Pe();return Ie.set(i,e),e}function _e(i){return Ie.get(i)}const et=1e3;function tt(i){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=i,n=h.useRef({search:"",timeout:void 0}).current,c=r=>{let f=lt(r.key);if(!(!f||r.ctrlKey||r.mLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e}from"./react-vendor-jWT2yUdV.js";import{a as l,c as r}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c}from"./chunk-D5XJWRAV-DVN21qSw.js";import{c as o}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{d as x}from"./chunk-IHO36JMK-DJPUeGG0.js";import{i as p}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{l as h}from"./chunk-OPTZHMJX-CY9g90YL.js";import{s as f,W as j}from"./index-DiaaLdUu.js";import{t as u,a as m}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{u as g}from"./useRequest-B1BwPztr.js";import{a as N,b,c as w,d as y,e as v,f as S}from"./index-DPx4wqle.js";import{i as C,j as T,k as P}from"./index-FvTxWQTZ.js";import{a as L,b as k}from"./index-BBhZPeTB.js";import{l as Q}from"./logo-kBMoCJob.js";import"./qface-BZLvZXJ8.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./index-BsnVex0g.js";import"./react-hot-toast-cGcFZPSt.js";import"./react-router-dom-C6k78GT4.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./iconBase-B7bT1FlI.js";function _(){const{data:a,loading:n,error:i}=g(j.GetSnowCatVersion);return e.jsx("div",{className:"flex items-center gap-2",children:i?e.jsx(o,{color:"danger",variant:"flat",size:"sm",children:i.message}):n?e.jsx(f,{size:"sm",color:"default"}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{size:"sm",color:"default",variant:"flat",className:"text-default-500",children:"WebUI Next"}),e.jsxs(o,{size:"sm",color:"primary",variant:"flat",children:["Core ",a==null?void 0:a.version]})]})})}function ne(){const a=[{icon:e.jsx(L,{size:20}),title:"接入方式全",desc:"WS 正反连、HTTP 上报、HTTP SSE、MCP 四种接入方式,按需取用。",className:"bg-primary-50 text-primary"},{icon:e.jsx(k,{size:20}),title:"社区自持主干",desc:"上游 Ending 后由社区接力维护,Fork 是遗愿,我们续写。",className:"bg-success-50 text-success"},{icon:e.jsx(N,{size:20}),title:"OneBot 11 全量",desc:"181 上游动作 + SnowLuma 采石场 29+ 动作,持续扩充。",className:"bg-warning-50 text-warning"},{icon:e.jsx(T,{size:20}),title:"稳定线内建",desc:"掉线指数退避重连、真人节奏抖动、小时预算、连发熔断。",className:"bg-secondary-50 text-secondary"},{icon:e.jsx(b,{size:20}),title:"全平台零硬改",desc:"自动发现已装 QQ、自动读实况版本、一键注入;亦有便携制作器。",className:"bg-default-50 text-default-600"},{icon:e.jsx(w,{size:20}),title:"本地运行时",desc:"一切动作都在本地执行,代码全开源白盒可查,无任何外发。",className:"bg-danger-50 text-danger"}],n=[{icon:e.jsx(y,{}),name:"GitHub · DandanLLab/SnowCatQQ",href:"https://github.com/DandanLLab/SnowCatQQ"},{icon:e.jsx(P,{}),name:"文档 · README 与接入指南",href:"https://github.com/DandanLLab/SnowCatQQ#readme"},{icon:e.jsx(v,{}),name:"API 文档 · OneBot v11 动作全表",href:"https://github.com/DandanLLab/SnowCatQQ/tree/main/docs/api"},{icon:e.jsx(S,{}),name:"MCP 接入 · Network 配置 mcpServers",href:"https://github.com/DandanLLab/SnowCatQQ#mcp"}],i=[{name:"NapCat(NapNeko/NapCatQQ)",role:"底座 · 上游已官宣 Ending,Fork 接力"},{name:"SnowLuma(继任 TomyJan/SnowLuma)",role:"能力采石场 · qzone 全家桶/群相册/闪照等"}],t="bg-white/55 dark:bg-white/[0.04] backdrop-blur-xl border border-white/60 dark:border-white/10 shadow-sm rounded-2xl";return e.jsxs("div",{className:"sc-page flex flex-col gap-5",children:[e.jsx("title",{children:"关于 - SnowCat WebUI · 雪猫控制台"}),e.jsxs("div",{className:"rounded-2xl px-5 py-6 bg-gradient-to-r from-primary-100/70 via-primary-50/40 to-transparent dark:from-primary-900/30 dark:via-primary-900/10 dark:to-transparent border border-primary-100/60 dark:border-primary-900/30 relative overflow-hidden",children:[e.jsx("div",{className:"absolute -right-10 -top-10 w-40 h-40 rounded-full bg-primary-300/30 blur-3xl pointer-events-none"}),e.jsxs("div",{className:"flex items-center gap-4 flex-wrap relative",children:[e.jsx(p,{src:Q,alt:"SnowCat Logo(雪猫)",width:44,height:44,className:"rounded-xl"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-default-900 dark:text-white tracking-tight",children:"SnowCat · 雪猫"}),e.jsx("p",{className:"text-small text-default-500 mt-0.5",children:"社区自持的 QQ 融合客户端 · 本地运行时 · 白盒可查"})]}),e.jsx("div",{className:"ml-auto flex items-center gap-3",children:e.jsx(_,{})})]})]}),e.jsx(x,{className:"opacity-50"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5 flex-grow",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-5",children:[e.jsxs(l,{shadow:"sm",className:t,children:[e.jsx(c,{className:"pb-0 pt-4 px-4 flex-col items-start",childreLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{t as na,f as sa,_ as oa,a3 as U,ao as Ie,as as we,a8 as Se,a_ as da,ah as ua,a7 as ca,an as pa,v as fa,x as ba,y as Z,b4 as va,aR as ma,X as I,aJ as ha,z as Me,av as Ce,l as ga,B as xa,D as f,n as ee,al as ya,Y as $a,E as Wa}from"./index-DiaaLdUu.js";import{r as o,j as $}from"./react-vendor-jWT2yUdV.js";import{$ as Pa,u as wa,b as Ma}from"./chunk-SLABUSGS-Cmz8sGrU.js";import{$ as Ca}from"./useFocusable-DA5Croun.js";import{C as _a}from"./chunk-M3MASYO7-B4fjH-eW.js";var _e=na({slots:{base:"group flex flex-col data-[hidden=true]:hidden",label:["absolute","z-10","pointer-events-none","origin-top-left","flex-shrink-0","rtl:origin-top-right","subpixel-antialiased","block","text-small","text-foreground-500"],mainWrapper:"h-full",inputWrapper:"relative w-full inline-flex tap-highlight-transparent flex-row items-center shadow-sm px-3 gap-3",innerWrapper:"inline-flex w-full items-center h-full box-border",input:["w-full font-normal bg-transparent !outline-none placeholder:text-foreground-500 focus-visible:outline-none","data-[has-start-content=true]:ps-1.5","data-[has-end-content=true]:pe-1.5","file:cursor-pointer file:bg-transparent file:border-0","autofill:bg-transparent bg-clip-text"],clearButton:["p-2","-m-2","z-10","absolute","end-3","start-auto","pointer-events-none","appearance-none","outline-none","select-none","opacity-0","hover:!opacity-100","cursor-pointer","active:!opacity-70","rounded-full",...sa],helperWrapper:"hidden group-data-[has-helper=true]:flex p-1 relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{inputWrapper:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"]},faded:{inputWrapper:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 focus-within:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{inputWrapper:["border-medium","border-default-200","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground"]},underlined:{inputWrapper:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","group-data-[focus=true]:after:w-full"],innerWrapper:"pb-1",label:"group-data-[filled-within=true]:text-foreground"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{label:"text-tiny",inputWrapper:"h-8 min-h-8 px-2 rounded-small",input:"text-small",clearButton:"text-medium"},md:{inputWrapper:"h-10 min-h-10 rounded-medium",input:"text-small",clearButton:"text-large"},lg:{label:"text-medium",inputWrapper:"h-12 min-h-12 rounded-large",input:"text-medium",clearButton:"text-large"}},radius:{none:{inputWrapper:"rounded-none"},sm:{inputWrapper:"rounded-small"},md:{inputWrapper:"rounded-medium"},lg:{inputWrapper:"rounded-large"},full:{inputWrapper:"rounded-full"}},labelPlacement:{outside:{mainWrapper:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap data-[has-helper=true]:items-start",inputWrapper:"flex-1",mainWrapper:"flex flex-col",label:"relative text-foreground pe-2 ps-2 pointer-events-auto"},inside:{label:"cursor-text",inputWrapper:"flex-col items-start justify-center gap-0",innerWrapper:"group-data-[has-label=true]:items-end"}},fullWidth:{true:{base:"w-full"},false:{}},isClearable:{true:{input:"peer pe-6 input-search-cancel-button-none",clearButton:["peer-data-[filled=true]:pointer-events-auto","peer-data-[filled=true]:opacity-70 peer-data-[filled=true]:block","peer-data-[filled=true]:scale-100"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",inputWrapper:"pointer-events-none",label:"pointer-events-none"}},isInvalid:{true:{label:"!text-danger",input:"!placeholder:text-danger !text-danger"}},isRequired:{true:{label:"after:content-['*'] after:text-danger after:ms-0.5"}},isMultiline:{true:{label:"relative",inputWrapper:"!h-auto",innerWrapper:"items-start group-data-[has-label=true]:items-start",input:"resize-none data-[hide-scroll=true]:scrollbar-hide",clearButton:"absolute top-2 right-2 rtl:right-auto rtl:left-2 z-10"}},disableAnimation:{true:{input:"transition-none",inputWrapper:"transition-none",label:"transition-none"},false:{inputWrapper:"transition-background motion-reduce:transition-none !duration-150",label:["will-change-auto","!duration-200","!ease-out","motion-reduce:transition-none","transition-[transform,color,left,opacity]"],clearButton:["scale-90","ease-out","duration-150","transition-[opacity,transform]","motion-reduce:transition-none","motion-reduce:scale-100"]}}},defaultVariants:{variant:"flat",color:"default",size:"md",fullWidth:!0,labelPlacement:"inside",isDisabled:!1,isMultiline:!1},compouLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Crbd1Tvi.js","assets/features-animation-BkV7kg8P.js","assets/gestures-BHfQC-M8.js","assets/react-vendor-jWT2yUdV.js","assets/qface-BZLvZXJ8.js","assets/index-DiaaLdUu.js","assets/react-hot-toast-cGcFZPSt.js","assets/react-router-dom-C6k78GT4.js","assets/index-CBRelCj8.css"])))=>i.map(i=>d[i]);
|
||||
import{ar as B,aA as S,aB as h,aC as j,aD as U,aE as C,aF as b,n as _,aG as w,b as F,E as L,A as V,aH as z}from"./index-DiaaLdUu.js";import{r as n,j as e}from"./react-vendor-jWT2yUdV.js";import{g as G}from"./chunk-WQVQ7P2I-BJd1EiqP.js";import{p as q}from"./chunk-FGM523TA-CgSvUh2a.js";import{j as J}from"./chunk-KVDW62ZT-CGYYmJoP.js";var[K,A]=B({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),y=()=>U(()=>import("./index-Crbd1Tvi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(s=>s.default),$=s=>{const{as:i,children:a,className:p,...o}=s,{Component:l,placement:r,backdrop:t,motionProps:m,disableAnimation:c,getPopoverProps:f,getDialogProps:d,getBackdropProps:v,getContentProps:u,isNonModal:N,onClose:x}=A(),g=n.useRef(null),{dialogProps:T,titleProps:D}=S({},g),E=d({ref:g,...T,...o}),M=i||l||"div",P=e.jsxs(e.Fragment,{children:[!N&&e.jsx(h,{onDismiss:x}),e.jsx(M,{...E,children:e.jsx("div",{...u({className:p}),children:typeof a=="function"?a(D):a})}),e.jsx(h,{onDismiss:x})]}),O=n.useMemo(()=>t==="transparent"?null:c?e.jsx("div",{...v()}):e.jsx(j,{features:y,children:e.jsx(C.div,{animate:"enter",exit:"exit",initial:"exit",variants:b.fade,...v()})}),[t,c,v]),H=r?G(r==="center"?"top":r):void 0,k=e.jsx(e.Fragment,{children:c?P:e.jsx(j,{features:y,children:e.jsx(C.div,{animate:"enter",exit:"exit",initial:"initial",style:H,variants:b.scaleSpringOpacity,...m,children:P})})});return e.jsxs("div",{...f(),children:[O,k]})};$.displayName="HeroUI.PopoverContent";var ee=$,R=s=>{var i;const{triggerRef:a,getTriggerProps:p}=A(),{children:o,...l}=s,r=n.useMemo(()=>typeof o=="string"?e.jsx("p",{children:o}):n.Children.only(o),[o]),t=(i=r.props.ref)!=null?i:r.ref,{onPress:m,isDisabled:c,...f}=n.useMemo(()=>p(_(l,r.props),t),[p,r.props,l,t]),[,d]=q(o,F),{buttonProps:v}=w({onPress:m,isDisabled:c},a),u=n.useMemo(()=>(d==null?void 0:d[0])!==void 0,[d]);return n.cloneElement(r,_(f,u?{onPress:m,isDisabled:c}:v))};R.displayName="HeroUI.PopoverTrigger";var oe=R,I=L((s,i)=>{const{children:a,...p}=s,o=J({...p,ref:i}),[l,r]=n.Children.toArray(a),t=e.jsx(z,{portalContainer:o.portalContainer,children:r});return e.jsxs(K,{value:o,children:[l,o.disableAnimation&&o.isOpen?t:e.jsx(V,{children:o.isOpen?t:null})]})});I.displayName="HeroUI.Popover";var re=I;export{oe as a,ee as b,re as p};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as J,f as L,ar as Q,E as W,y as O,X as S,v as Z,x as ee,b7 as se,aG as ae,al as te,av as re,z as oe,B as le,n as de,D as f,Y as M,b8 as ne}from"./index-DiaaLdUu.js";import{j as x,r as p}from"./react-vendor-jWT2yUdV.js";var V=J({slots:{base:["flex","flex-col","relative","overflow-hidden","h-auto","outline-none","text-foreground","box-border","bg-content1",...L],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-3","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,isFooterBlurred:!1}}),[ie,ue]=Q({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),E=W((e,o)=>{var a;const{as:l,className:d,children:s,...u}=e,n=l||"div",b=O(o),{slots:t,classNames:m}=ue(),C=S(m==null?void 0:m.body,d);return x.jsx(n,{ref:b,className:(a=t.body)==null?void 0:a.call(t,{class:C}),...u,children:s})});E.displayName="HeroUI.CardBody";var pe=E;function be(e){var o,a,l,d;const s=Z(),[u,n]=ee(e,V.variantKeys),{ref:b,as:t,children:m,onClick:C,onPress:T,autoFocus:z,className:U,classNames:c,allowTextSelectionOnPress:G=!0,...h}=u,i=O(b),P=t||(e.isPressable?"button":"div"),$=typeof P=="string",r=(a=(o=e.disableAnimation)!=null?o:s==null?void 0:s.disableAnimation)!=null?a:!1,w=(d=(l=e.disableRipple)!=null?l:s==null?void 0:s.disableRipple)!=null?d:!1,H=S(c==null?void 0:c.base,U),{onClear:B,onPress:F,ripples:g}=se(),_=p.useCallback(R=>{w||r||i.current&&F(R)},[w,r,i,F]),{buttonProps:j,isPressed:y}=ae({onPress:te(T,_),elementType:t,isDisabled:!e.isPressable,onClick:C,allowTextSelectionOnPress:G,...h},i),{hoverProps:N,isHovered:k}=re({isDisabled:!e.isHoverable,...h}),{isFocusVisible:D,isFocused:K,focusProps:A}=oe({autoFocus:z}),v=p.useMemo(()=>V({...n,disableAnimation:r}),[le(n),r]),X=p.useMemo(()=>({slots:v,classNames:c,disableAnimation:r,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[v,c,e.isDisabled,e.isFooterBlurred,r,e.fullWidth]),Y=p.useCallback((R={})=>({ref:i,className:v.base({class:H}),tabIndex:e.isPressable?0:-1,"data-hover":f(k),"data-pressed":f(y),"data-focus":f(K),"data-focus-visible":f(D),"data-disabled":f(e.isDisabled),...de(e.isPressable?{...j,...A,role:"button"}:{},e.isHoverable?N:{},M(h,{enabled:$}),M(R))}),[i,v,H,$,e.isPressable,e.isHoverable,e.isDisabled,k,y,D,j,A,N,h]),q=p.useCallback(()=>({ripples:g,onClear:B}),[g,B]);return{context:X,domRef:i,Component:P,classNames:c,children:m,isHovered:k,isPressed:y,disableAnimation:r,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:w,handlePress:_,isFocusVisible:D,getCardProps:Y,getRippleProps:q}}var I=W((e,o)=>{const{children:a,context:l,Component:d,isPressable:s,disableAnimation:u,disableRipple:n,getCardProps:b,getRippleProps:t}=be({...e,ref:o});return x.jsxs(d,{...b(),children:[x.jsx(ie,{value:l,children:a}),s&&!u&&!n&&x.jsx(ne,{...t()})]})});I.displayName="HeroUI.Card";var me=I;export{me as a,pe as c,ue as u};
|
||||
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Crbd1Tvi.js","assets/features-animation-BkV7kg8P.js","assets/gestures-BHfQC-M8.js","assets/react-vendor-jWT2yUdV.js","assets/qface-BZLvZXJ8.js","assets/index-DiaaLdUu.js","assets/react-hot-toast-cGcFZPSt.js","assets/react-router-dom-C6k78GT4.js","assets/index-CBRelCj8.css"])))=>i.map(i=>d[i]);
|
||||
import{a7 as $e,a8 as Z,a6 as ve,b1 as he,ac as Te,v as xe,x as ge,b2 as Pe,n as _,aJ as ye,aT as Oe,B as Ce,D,X as we,E as De,w as Ee,aC as Re,aD as Ae,aE as _e,aF as je,A as Ie,b3 as Y}from"./index-DiaaLdUu.js";import{r as l,j as d}from"./react-vendor-jWT2yUdV.js";import{d as Ne,p as q,a as He,c as G,t as Le,g as Se}from"./chunk-WQVQ7P2I-BJd1EiqP.js";import{$ as ee}from"./useHover-DC1o5-bm.js";import{$ as ke}from"./useFocusable-DA5Croun.js";import{m as Fe}from"./chunk-UX7UMZL5-CMHjUaC_.js";const Ve=1500,Q=500;let P={},Me=0,A=!1,x=null,y=null;function ze(e={}){let{delay:o=Ve,closeDelay:n=Q}=e,{isOpen:a,open:u,close:f}=Ne(e),r=l.useMemo(()=>`${++Me}`,[]),t=l.useRef(null),b=l.useRef(f),m=()=>{P[r]=p},h=()=>{for(let i in P)i!==r&&(P[i](!0),delete P[i])},T=()=>{t.current&&clearTimeout(t.current),t.current=null,h(),m(),A=!0,u(),x&&(clearTimeout(x),x=null),y&&(clearTimeout(y),y=null)},p=i=>{i||n<=0?(t.current&&clearTimeout(t.current),t.current=null,b.current()):t.current||(t.current=setTimeout(()=>{t.current=null,b.current()},n)),x&&(clearTimeout(x),x=null),A&&(y&&clearTimeout(y),y=setTimeout(()=>{delete P[r],y=null,A=!1},Math.max(Q,n)))},s=()=>{h(),m(),!a&&!x&&!A?x=setTimeout(()=>{x=null,A=!0,T()},o):a||T()};return l.useEffect(()=>{b.current=f},[f]),l.useEffect(()=>()=>{t.current&&clearTimeout(t.current),P[r]&&delete P[r]},[r]),{isOpen:a,open:i=>{!i&&o>0&&!t.current?s():T()},close:p}}function Be(e,o){let n=$e(e,{labelable:!0}),{hoverProps:a}=ee({onHoverStart:()=>o==null?void 0:o.open(!0),onHoverEnd:()=>o==null?void 0:o.close()});return{tooltipProps:Z(n,a,{role:"tooltip"})}}function Ke(e,o,n){let{isDisabled:a,trigger:u}=e,f=ve(),r=l.useRef(!1),t=l.useRef(!1),b=()=>{(r.current||t.current)&&o.open(t.current)},m=c=>{!r.current&&!t.current&&o.close(c)};l.useEffect(()=>{let c=w=>{n&&n.current&&w.key==="Escape"&&(w.stopPropagation(),o.close(!0))};if(o.isOpen)return document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0)}},[n,o]);let h=()=>{u!=="focus"&&(he()==="pointer"?r.current=!0:r.current=!1,b())},T=()=>{u!=="focus"&&(t.current=!1,r.current=!1,m())},p=()=>{t.current=!1,r.current=!1,m(!0)},s=()=>{Te()&&(t.current=!0,b())},i=()=>{t.current=!1,r.current=!1,m(!0)},{hoverProps:O}=ee({isDisabled:a,onHoverStart:h,onHoverEnd:T}),{focusableProps:C}=ke({isDisabled:a,onFocus:s,onBlur:i},n);return{triggerProps:{"aria-describedby":o.isOpen?f:void 0,...Z(C,O,{onPointerDown:p,onKeyDown:p})},tooltipProps:{id:f}}}function Ue(e){var o,n;const a=xe(),[u,f]=ge(e,q.variantKeys),{ref:r,as:t,isOpen:b,content:m,children:h,defaultOpen:T,onOpenChange:p,isDisabled:s,trigger:i,shouldFlip:O=!0,containerPadding:C=12,placement:c="top",delay:w=0,closeDelay:k=500,showArrow:$=!1,offset:M=7,crossOffset:oe=0,isDismissable:re,shouldCloseOnBlur:le=!0,portalContainer:se,isKeyboardDismissDisabled:ne=!1,updatePositionDeps:z=[],shouldCloseOnInteractOutside:ae,className:ie,onClose:B,motionProps:ce,classNames:E,...F}=u,de=t||"div",V=(n=(o=e==null?void 0:e.disableAnimation)!=null?o:a==null?void 0:a.disableAnimation)!=null?n:!1,R=ze({delay:w,closeDelay:k,isDisabled:s,defaultOpen:T,isOpen:b,onOpenChange:g=>{p==null||p(g),g||B==null||B()}}),j=l.useRef(null),I=l.useRef(null),N=l.useId(),v=R.isOpen&&!s;l.useImperativeHandle(r,()=>Pe(I));const{triggerProps:K,tooltipProps:ue}=Ke({isDisabled:s,trigger:i},R,j),{tooltipProps:U}=Be({isOpen:v,..._(u,ue)},R),{overlayProps:W,placement:H,updatePosition:fe}=He({isOpen:v,targetRef:j,placement:Le(c),overlayRef:I,offset:$?M+3:M,crossOffset:oe,shouldFlip:O,containerPadding:C});ye(()=>{z.length&&fe()},z);const{overlayProps:J}=Oe({isOpen:v,onClose:R.close,isDismissable:re,shouldCloseOnBlur:le,isKeyboardDismissDisabled:ne,shouldCloseOnInteractOutside:ae},I),L=l.useMemo(()=>{var g,S,X;return q({...f,disableAnimation:V,radius:(g=e==null?void 0:e.radius)!=null?g:"md",size:(S=e==null?void 0:e.size)!=null?S:"md",shadow:(X=e==null?void 0:e.shadow)!=null?X:"sm"})},[Ce(f),V,e==null?void 0:e.radius,e==null?void 0:e.size,e==null?void 0:e.shadow]),pe=l.useCallback((g={},S=null)=>({..._(K,g),ref:Fe(S,j),"aria-describedby":v?N:void 0}),[K,v,N,R]),be=l.useCallback(()=>({ref:I,"data-slot":"base","data-open":D(v),"data-arrow":D($),"data-disabled":D(s),"data-placement":G(H||"top",c),..._(U,J,F),style:_(W.style,F.style,u.style),className:L.base({class:E==null?void 0:E.base}),id:N}),[L,v,$,s,H,c,U,J,F,W,u,N]),me=l.useCallback(()=>({"data-slot":"content","data-open":D(v),"data-arrow":D($),"data-disabled":D(s),"data-placement":G(H||"top",c),className:L.content({class:we(E==null?void 0:E.content,ie)})}),[L,v,$,s,H,c,E]);return{Component:de,content:m,children:h,isOpen:v,triggerRef:j,showArrow:$,portalContainer:se,placement:c,disableAnimation:V,isDisabled:s,motionProps:ce,getTooltipContentProps:me,getTriggerProps:pe,getTooltipProps:be}}var We=()=>Ae(()=>import("./index-Crbd1Tvi.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>e.default),te=De((e,o)=>{const{Component:n,children:a,content:u,isOpen:f,portalContainer:r,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{t as ye,V as k,f as Pe,ac as Ce,a$ as Ie,au as Ne,aP as Ae,E as q,ai as Re,ak as $e,a5 as ce,v as Se,x as ke}from"./index-DiaaLdUu.js";import{r as l,j as p}from"./react-vendor-jWT2yUdV.js";import{f as je}from"./chunk-RJKRL3AU-CjtrMR1U.js";import{$ as Ee}from"./useHover-DC1o5-bm.js";import{$ as Te}from"./usePress-BrNwsdVw.js";import{t as Fe}from"./index-BV9-YCKp.js";var te=ye({slots:{base:["p-2.5","-m-2.5","overflow-x-scroll","scrollbar-hide"],wrapper:["flex","flex-nowrap","h-fit","max-w-fit","relative","gap-1","items-center","overflow-visible"],item:["tap-highlight-transparent","select-none","touch-none"],prev:"",next:"",cursor:["absolute","flex","overflow-visible","items-center","justify-center","origin-center","left-0","select-none","touch-none","pointer-events-none","z-20"],forwardIcon:["hidden","group-hover:block","group-data-[focus-visible=true]:block","data-[before=true]:rotate-180"],ellipsis:"group-hover:hidden group-data-[focus-visible=true]:hidden",chevronNext:"rotate-180"},variants:{variant:{bordered:{item:["border-medium","border-default","bg-transparent","data-[hover=true]:bg-default-100"]},light:{item:"bg-transparent"},flat:{},faded:{item:["border-medium","border-default"]}},color:{default:{cursor:k.solid.default},primary:{cursor:k.solid.primary},secondary:{cursor:k.solid.secondary},success:{cursor:k.solid.success},warning:{cursor:k.solid.warning},danger:{cursor:k.solid.danger}},size:{sm:{},md:{},lg:{}},radius:{none:{},sm:{},md:{},lg:{},full:{}},isCompact:{true:{wrapper:"gap-0 shadow-sm",item:["shadow-none","first-of-type:rounded-e-none","last-of-type:rounded-s-none","[&:not(:first-of-type):not(:last-of-type)]:rounded-none"],prev:"!rounded-e-none",next:"!rounded-s-none"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},showShadow:{true:{}},disableCursorAnimation:{true:{cursor:"hidden"}},disableAnimation:{true:{item:"transition-none",cursor:"transition-none"},false:{item:["data-[pressed=true]:scale-[0.97]","transition-transform-background"],cursor:["data-[moving=true]:transition-transform","!data-[moving=true]:duration-300","opacity-0","data-[moving]:opacity-100"]}}},defaultVariants:{variant:"flat",color:"primary",size:"md",radius:"md",isCompact:!1,isDisabled:!1,showShadow:!1,disableCursorAnimation:!1},compoundVariants:[{showShadow:!0,color:"default",class:{cursor:[k.shadow.default,"shadow-md"]}},{showShadow:!0,color:"primary",class:{cursor:[k.shadow.primary,"shadow-md"]}},{showShadow:!0,color:"secondary",class:{cursor:[k.shadow.secondary,"shadow-md"]}},{showShadow:!0,color:"success",class:{cursor:[k.shadow.success,"shadow-md"]}},{showShadow:!0,color:"warning",class:{cursor:[k.shadow.warning,"shadow-md"]}},{showShadow:!0,color:"danger",class:{cursor:[k.shadow.danger,"shadow-md"]}},{isCompact:!0,variant:"bordered",class:{item:"[&:not(:first-of-type)]:ms-[calc(theme(borderWidth.2)*-1)]"}},{disableCursorAnimation:!0,color:"default",class:{item:["data-[active=true]:bg-default-400","data-[active=true]:border-default-400","data-[active=true]:text-default-foreground"]}},{disableCursorAnimation:!0,color:"primary",class:{item:["data-[active=true]:bg-primary","data-[active=true]:border-primary","data-[active=true]:text-primary-foreground"]}},{disableCursorAnimation:!0,color:"secondary",class:{item:["data-[active=true]:bg-secondary","data-[active=true]:border-secondary","data-[active=true]:text-secondary-foreground"]}},{disableCursorAnimation:!0,color:"success",class:{item:["data-[active=true]:bg-success","data-[active=true]:border-success","data-[active=true]:text-success-foreground"]}},{disableCursorAnimation:!0,color:"warning",class:{item:["data-[active=true]:bg-warning","data-[active=true]:border-warning","data-[active=true]:text-warning-foreground"]}},{disableCursorAnimation:!0,color:"danger",class:{item:["data-[active=true]:bg-danger","data-[active=true]:border-danger","data-[active=true]:text-danger-foreground"]}},{disableCursorAnimation:!0,showShadow:!0,color:"default",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-default/50"]}},{disableCursorAnimation:!0,showShadow:!0,color:"primary",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-primary/40"]}},{disableCursorAnimation:!0,showShadow:!0,color:"secondary",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-secondary/40"]}},{disableCursorAnimation:!0,showShadow:!0,color:"success",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-success/40"]}},{disableCursorAnimation:!0,showShadow:!0,color:"warning",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-warning/40"]}},{disableCursorAnimation:!0,showShadow:!0,color:"danger",class:{item:["data-[active=true]:shadow-md","data-[active=true]:shadow-danger/40"]}}],compoundSlots:[{slots:["item","prev","next"],class:["flex","flex-wrap","truncate","box-border","outline-none","items-center","justify-center","text-default-foreground",...Pe,"data-[disabled=true]:text-default-300","data-[Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{t as i}from"./index-DiaaLdUu.js";var a=i({base:"shrink-0 bg-divider border-none",variants:{orientation:{horizontal:"w-full h-divider",vertical:"h-full w-divider"}},defaultVariants:{orientation:"horizontal"}});export{a as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as A,V as N,f as Le,a7 as H,a8 as M,ai as ze,aj as Fe,ak as Re,a2 as Me,x as L,y as K,z as Te,B as z,X as O,D as S,n as U,Y as W,E as F,v as Ve,al as _e,w as He}from"./index-DiaaLdUu.js";import{$ as Ke}from"./usePress-BrNwsdVw.js";import{$ as Oe}from"./useFocusable-DA5Croun.js";import{j as p,r as D}from"./react-vendor-jWT2yUdV.js";import{p as Ue}from"./chunk-FGM523TA-CgSvUh2a.js";var T=A({base:["px-2","py-1","h-fit","font-mono","font-normal","inline-block","whitespace-nowrap"],variants:{color:{default:N.flat.default,primary:N.flat.primary,secondary:N.flat.secondary,success:N.flat.success,warning:N.flat.warning,danger:N.flat.danger},size:{sm:"text-small",md:"text-medium",lg:"text-large"},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"}},defaultVariants:{color:"default",size:"sm",radius:"sm"}}),V=A({slots:{base:"flex items-center",item:["flex gap-1 items-center","cursor-pointer","whitespace-nowrap","line-clamp-1","outline-none","tap-highlight-transparent",...Le],separator:"text-default-400 px-1 rtl:rotate-180"},variants:{color:{foreground:{item:"text-foreground/50",separator:"text-foreground/50"},primary:{item:"text-primary/80",separator:"text-primary/80"},secondary:{item:"text-secondary/80",separator:"text-secondary/80"},success:{item:"text-success/80",separator:"text-success/80"},warning:{item:"text-warning/80",separator:"text-warning/80"},danger:{item:"text-danger/80",separator:"text-danger/80"}},size:{sm:{item:"text-tiny"},md:{item:"text-small"},lg:{item:"text-medium"}},underline:{none:{item:"no-underline"},hover:{item:"hover:underline"},always:{item:"underline"},active:{item:"active:underline"},focus:{item:"focus:underline"}},isCurrent:{true:{item:"cursor-default"},false:{item:["hover:opacity-80","active:opacity-disabled"]}},isDisabled:{true:{item:"opacity-disabled pointer-events-none",separator:"opacity-disabled"}},disableAnimation:{false:{item:"transition-opacity"},true:{item:"transition-none"}}},defaultVariants:{size:"md",color:"foreground",underline:"hover",isDisabled:!1},compoundVariants:[{isCurrent:!0,color:"foreground",class:{item:"text-foreground"}},{isCurrent:!0,color:"primary",class:{item:"text-primary"}},{isCurrent:!0,color:"secondary",class:{item:"text-secondary"}},{isCurrent:!0,color:"success",class:{item:"text-success"}},{isCurrent:!0,color:"warning",class:{item:"text-warning"}},{isCurrent:!0,color:"danger",class:{item:"text-danger"}},{isCurrent:!1,underline:"none",class:{item:"no-underline"}},{underline:["hover","always","active","focus"],class:"underline-offset-4"}]}),_=A({slots:{base:"",list:"flex flex-wrap list-none",ellipsis:"text-medium",separator:"text-default-400 px-1"},variants:{size:{sm:{},md:{},lg:{}},radius:{none:{list:"rounded-none"},sm:{list:"rounded-small"},md:{list:"rounded-medium"},lg:{list:"rounded-large"},full:{list:"rounded-full"}},variant:{solid:{list:"bg-default-100"},bordered:{list:"border-medium border-default-200 shadow-sm"},light:{}}},defaultVariants:{size:"md",radius:"sm",variant:"light"},compoundVariants:[{variant:["solid","bordered"],class:{list:"max-w-fit"}},{variant:["solid","bordered"],size:"sm",class:{list:"px-2 py-1"}},{variant:["solid","bordered"],size:"md",class:{list:"px-2.5 py-1.5"}},{variant:["solid","bordered"],size:"lg",class:{list:"px-3 py-2"}}]}),We=e=>p.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"1em",shapeRendering:"geometricPrecision",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:[p.jsx("circle",{cx:"12",cy:"12",fill:"currentColor",r:"1"}),p.jsx("circle",{cx:"19",cy:"12",fill:"currentColor",r:"1"}),p.jsx("circle",{cx:"5",cy:"12",fill:"currentColor",r:"1"})]}),Ge=e=>p.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...e,children:p.jsx("path",{d:"m9 18 6-6-6-6"})});function Ye(e,t){let{elementType:r="a",onPress:s,onPressStart:o,onPressEnd:n,onClick:u,isDisabled:c,...i}=e,a={};r!=="a"&&(a={role:"link",tabIndex:c?void 0:0});let{focusableProps:x}=Oe(e,t),{pressProps:l,isPressed:C}=Ke({onPress:s,onPressStart:o,onPressEnd:n,onClick:u,isDisabled:c,ref:t}),P=H(i,{labelable:!0}),y=M(x,l),b=ze(),h=Fe(e);return{isPressed:C,linkProps:M(P,h,{...y,...a,"aria-disabled":c||void 0,"aria-current":e["aria-current"],onClick:$=>{var d;(d=l.onClick)===null||d===void 0||d.call(l,$),Re($,b,e.href,e.routerOptions)}})}}function Je(e,t){let{isCurrent:r,isDisabled:s,"aria-current":o,elementType:n="a",...u}=e,{linkProps:c}=Ye({isDisabled:s||r,elementType:n,...u},t),i=/^h[1-6]$/.test(n),a={};return i||(a=c),r&&(a["aria-current"]=o||"page",a.tabIndex=e.autoFocus?-1:void 0),{itemProps:{"aria-disabled":s,...a}}}var G={};G={breadcrumbs:"عناصر الواجهة"};var Y={};Y={breadcrumbs:"Трохи хляб"};var J={};J={breadcrumbs:"Popis cesty"};var X={};X={breadcrumbs:"BrødkruLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{u as p}from"./chunk-5PILOUBS-KHYNqMZE.js";import{E as u,y as h,X as v}from"./index-DiaaLdUu.js";import{j as x}from"./react-vendor-jWT2yUdV.js";var r=u((o,t)=>{var a;const{as:d,className:l,children:c,...m}=o,n=d||"div",f=h(t),{slots:e,classNames:s}=p(),i=v(s==null?void 0:s.header,l);return x.jsx(n,{ref:f,className:(a=e.header)==null?void 0:a.call(e,{class:i}),...m,children:c})});r.displayName="HeroUI.CardHeader";var j=r;export{j as c};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as l}from"./react-vendor-jWT2yUdV.js";import{t as se,Z as le,_ as ne,ah as re,v as oe,x as de,aJ as ie,z as ue,av as ce,B as pe,X as n,n as P,al as be,D as p}from"./index-DiaaLdUu.js";import{m as me}from"./chunk-UX7UMZL5-CMHjUaC_.js";import{$ as fe}from"./useToggle-B3ZYBe5S.js";var L=se({slots:{base:"group relative max-w-fit inline-flex items-center justify-start cursor-pointer touch-none tap-highlight-transparent select-none",wrapper:["px-1","relative","inline-flex","items-center","justify-start","flex-shrink-0","overflow-hidden","bg-default-200","rounded-full",...ne],thumb:["z-10","flex","items-center","justify-center","bg-white","shadow-small","rounded-full","origin-right","pointer-events-none"],hiddenInput:le,startContent:"z-0 absolute start-1.5 text-current",endContent:"z-0 absolute end-1.5 text-default-600",thumbIcon:"text-black",label:"relative text-foreground select-none ms-2"},variants:{color:{default:{wrapper:["group-data-[selected=true]:bg-default-400","group-data-[selected=true]:text-default-foreground"]},primary:{wrapper:["group-data-[selected=true]:bg-primary","group-data-[selected=true]:text-primary-foreground"]},secondary:{wrapper:["group-data-[selected=true]:bg-secondary","group-data-[selected=true]:text-secondary-foreground"]},success:{wrapper:["group-data-[selected=true]:bg-success","group-data-[selected=true]:text-success-foreground"]},warning:{wrapper:["group-data-[selected=true]:bg-warning","group-data-[selected=true]:text-warning-foreground"]},danger:{wrapper:["group-data-[selected=true]:bg-danger","data-[selected=true]:text-danger-foreground"]}},size:{sm:{wrapper:"w-10 h-6",thumb:["w-4 h-4 text-tiny","group-data-[selected=true]:ms-4"],endContent:"text-tiny",startContent:"text-tiny",label:"text-small"},md:{wrapper:"w-12 h-7",thumb:["w-5 h-5 text-small","group-data-[selected=true]:ms-5"],endContent:"text-small",startContent:"text-small",label:"text-medium"},lg:{wrapper:"w-14 h-8",thumb:["w-6 h-6 text-medium","group-data-[selected=true]:ms-6"],endContent:"text-medium",startContent:"text-medium",label:"text-large"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{wrapper:"transition-none",thumb:"transition-none"},false:{wrapper:"transition-background",thumb:"transition-all",startContent:["opacity-0","scale-50","transition-transform-opacity","group-data-[selected=true]:scale-100","group-data-[selected=true]:opacity-100"],endContent:["opacity-100","transition-transform-opacity","group-data-[selected=true]:translate-x-3","group-data-[selected=true]:opacity-0"]}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!1,size:"sm",class:{thumb:["group-data-[pressed=true]:w-5","group-data-[selected]:group-data-[pressed]:ml-3"]}},{disableAnimation:!1,size:"md",class:{thumb:["group-data-[pressed=true]:w-6","group-data-[selected]:group-data-[pressed]:ml-4"]}},{disableAnimation:!1,size:"lg",class:{thumb:["group-data-[pressed=true]:w-7","group-data-[selected]:group-data-[pressed]:ml-5"]}}]});function ge(s,r,o){let{labelProps:d,inputProps:b,isSelected:i,isPressed:m,isDisabled:v,isReadOnly:x}=fe(s,r,o);return{labelProps:d,inputProps:{...b,role:"switch",checked:i},isSelected:i,isPressed:m,isDisabled:v,isReadOnly:x}}function he(s={}){let{isReadOnly:r}=s,[o,d]=re(s.isSelected,s.defaultSelected||!1,s.onChange);function b(m){r||d(m)}function i(){r||d(!o)}return{isSelected:o,setSelected:b,toggle:i}}function Pe(s={}){var r,o;const d=oe(),[b,i]=de(s,L.variantKeys),{ref:m,as:v,name:x,value:$="",isReadOnly:S=!1,autoFocus:D=!1,startContent:T,endContent:_,defaultSelected:I,isSelected:N,children:f,thumbIcon:B,className:M,classNames:t,onChange:H,onValueChange:R,...g}=b,J=v||"label",k=l.useRef(null),h=l.useRef(null),z=(o=(r=s.disableAnimation)!=null?r:d==null?void 0:d.disableAnimation)!=null?o:!1,C=l.useId(),w=l.useMemo(()=>{const e=g["aria-label"]||typeof f=="string"?f:void 0;return{name:x,value:$,children:f,autoFocus:D,defaultSelected:I,isSelected:N,isDisabled:!!s.isDisabled,isReadOnly:S,"aria-label":e,"aria-labelledby":g["aria-labelledby"]||C,onChange:R}},[$,x,C,f,D,S,N,I,s.isDisabled,g["aria-label"],g["aria-labelledby"],R]),O=he(w);ie(()=>{if(!h.current)return;const e=!!h.current.checked;O.setSelected(e)},[h.current]);const{inputProps:u,isPressed:K,isReadOnly:A}=ge(w,O,h),{focusProps:W,isFocused:F,isFocusVisible:V}=ue({autoFocus:u.autoFocus}),{hoverProps:X,isHovered:j}=ce({isDisabled:u.disabled}),E=w.isDisabled||A?!1:K,c=u.checked,y=u.disabled,a=l.useMemo(()=>L({...i,disableAnimation:z}),[pe(i),z]),Z=n(t==null?void 0:t.base,M),q=e=>({...P(X,g,e),ref:k,className:a.base({class:n(Z,e==null?void 0:e.className)}),"data-disabled":p(y),"data-selected":p(c),"data-readonly":p(A),"data-focus":p(F),"data-focus-visible":p(V),"data-hover":p(j),"data-pressed":p(E)}),G=l.useCallback((e={})=>({...e,"aria-hidden":!0,className:n(a.wrapper({class:n(t==null?void 0:t.wrapper,e==null?void 0:e.className)}))}),[a,t==null?void 0:t.wrapper]),Q=(e={Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as n}from"./react-vendor-jWT2yUdV.js";var u=(l,a)=>{var e;let t=[];const o=(e=n.Children.map(l,r=>n.isValidElement(r)&&r.type===a?(t.push(r),null):r))==null?void 0:e.filter(Boolean),i=t.length>=0?t:void 0;return[o,i]};export{u as p};
|
||||
@@ -0,0 +1 @@
|
||||
import{f as m}from"./chunk-RJKRL3AU-CjtrMR1U.js";import{d as c}from"./chunk-AXSF7SRE-Cr4elNVq.js";import{r as i,j as u}from"./react-vendor-jWT2yUdV.js";function v(r){let o=m(r,{enabled:typeof r.elementType=="string"}),t;return r.orientation==="vertical"&&(t="vertical"),r.elementType!=="hr"?{separatorProps:{...o,role:"separator","aria-orientation":t}}:{separatorProps:o}}function P(r){const{as:o,className:t,orientation:e,...s}=r;let a=o||"hr";a==="hr"&&e==="vertical"&&(a="div");const{separatorProps:n}=v({elementType:typeof a=="string"?a:"hr",orientation:e}),p=i.useMemo(()=>c({orientation:e,className:t}),[e,t]),d=i.useCallback((f={})=>({className:p,role:"separator","data-orientation":e,...n,...s,...f}),[p,e,n,s]);return{Component:a,getDividerProps:d}}function y(r){return i.forwardRef(r)}var l=y((r,o)=>{const{Component:t,getDividerProps:e}=P({...r});return u.jsx(t,{ref:o,...e()})});l.displayName="HeroUI.Divider";var g=l;export{g as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{u as C}from"./chunk-EN4B57RQ-Ief8qCCd.js";import{r,j as e}from"./react-vendor-jWT2yUdV.js";import{E as S}from"./index-DiaaLdUu.js";var c=S((a,l)=>{const{Component:i,children:s,startContent:n,endContent:o,thumbIcon:t,getBaseProps:m,getInputProps:d,getWrapperProps:u,getThumbProps:h,getThumbIconProps:p,getLabelProps:x,getStartContentProps:P,getEndContentProps:f}=C({...a,ref:l}),g=typeof t=="function"?t(p({includeStateProps:!0})):t&&r.cloneElement(t,p()),E=n&&r.cloneElement(n,P()),j=o&&r.cloneElement(o,f());return e.jsxs(i,{...m(),children:[e.jsx("input",{...d()}),e.jsxs("span",{...u(),children:[n&&E,e.jsx("span",{...h(),children:t&&g}),o&&j]}),s&&e.jsx("span",{...x(),children:s})]})});c.displayName="HeroUI.Switch";var T=c;export{T as s};
|
||||
@@ -0,0 +1 @@
|
||||
import{$ as Ze}from"./Item-D8Sud-UP.js";import{b as et,a as tt,p as rt}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{t as ce,f as ot,X as te,an as at,ao as U,ap as O,aq as nt,ar as st,a7 as _e,a8 as De,ai as lt,as as ye,ac as it,at as dt,au as ct,aj as ut,a6 as ft,v as Ee,x as pt,z as vt,w as bt,av as ht,B as gt,aw as mt,D as W,n as J,Y as Ie,E as Pe,ah as yt,y as $t}from"./index-DiaaLdUu.js";import{r as m,R as oe,j as g}from"./react-vendor-jWT2yUdV.js";import{$ as xt,b as wt,m as Te,u as Et,c as Pt,d as Nt,e as St,f as Ct,g as Tt,h as Mt,i as kt}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{$ as Kt}from"./useHover-DC1o5-bm.js";import{$ as _t}from"./usePress-BrNwsdVw.js";import{f as Dt,h as It,j as Ft,i as At}from"./SelectionManager-Dl9uHsLK.js";import{m as Rt}from"./chunk-UX7UMZL5-CMHjUaC_.js";var Lt=ce({base:["w-full","p-1","min-w-[200px]"]});ce({slots:{base:["flex","group","gap-2","items-center","justify-between","relative","px-2","py-1.5","w-full","h-full","box-border","rounded-small","outline-none","cursor-pointer","tap-highlight-transparent","data-[pressed=true]:opacity-70",...ot,"data-[focus-visible=true]:dark:ring-offset-background-content1"],wrapper:"w-full flex flex-col items-start justify-center",title:"flex-1 text-small font-normal truncate",description:["w-full","text-tiny","text-foreground-500","group-hover:text-current"],selectedIcon:["text-inherit","w-3","h-3","flex-shrink-0"],shortcut:["px-1","py-0.5","rounded","font-sans","text-foreground-500","text-tiny","border-small","border-default-300","group-hover:border-current"]},variants:{variant:{solid:{base:""},bordered:{base:"border-medium border-transparent bg-transparent"},light:{base:"bg-transparent"},faded:{base:"border-small border-transparent hover:border-default data-[hover=true]:bg-default-100"},flat:{base:""},shadow:{base:"data-[hover=true]:shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{},false:{}}},defaultVariants:{variant:"solid",color:"default"},compoundVariants:[{variant:"solid",color:"default",class:{base:"data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"}},{variant:"solid",color:"primary",class:{base:"data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"}},{variant:"solid",color:"secondary",class:{base:"data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"}},{variant:"solid",color:"success",class:{base:"data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"}},{variant:"solid",color:"warning",class:{base:"data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"}},{variant:"solid",color:"danger",class:{base:"data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"}},{variant:"shadow",color:"default",class:{base:"data-[hover=true]:shadow-default/50 data-[hover=true]:bg-default data-[hover=true]:text-default-foreground"}},{variant:"shadow",color:"primary",class:{base:"data-[hover=true]:shadow-primary/30 data-[hover=true]:bg-primary data-[hover=true]:text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{base:"data-[hover=true]:shadow-secondary/30 data-[hover=true]:bg-secondary data-[hover=true]:text-secondary-foreground"}},{variant:"shadow",color:"success",class:{base:"data-[hover=true]:shadow-success/30 data-[hover=true]:bg-success data-[hover=true]:text-success-foreground"}},{variant:"shadow",color:"warning",class:{base:"data-[hover=true]:shadow-warning/30 data-[hover=true]:bg-warning data-[hover=true]:text-warning-foreground"}},{variant:"shadow",color:"danger",class:{base:"data-[hover=true]:shadow-danger/30 data-[hover=true]:bg-danger data-[hover=true]:text-danger-foreground"}},{variant:"bordered",color:"default",class:{base:"data-[hover=true]:border-default"}},{variant:"bordered",color:"primary",class:{base:"data-[hover=true]:border-primary data-[hover=true]:text-primary"}},{variant:"bordered",color:"secondary",class:{base:"data-[hover=true]:border-secondary data-[hover=true]:text-secondary"}},{variant:"bordered",color:"success",class:{base:"data-[hover=true]:border-success data-[hover=true]:text-success"}},{variant:"bordered",color:"warning",class:{base:"data-[hover=true]:border-warning data-[hover=true]:text-warning"}},{variant:"bordered",color:"danger",class:{base:"data-[hover=true]:border-danger data-[hover=true]:text-danger"}},{variant:"flat",color:"default",class:{base:"data-[hover=true]:bg-default/40 data-[hover=true]:text-default-foreground"}},{variant:"flat",color:"primary",class:{base:"data-[hover=true]:bg-primary/20 data-[hover=true]:text-primary"}},{variant:"flat",color:"secondary",class:{base:"data-[hover=true]:bg-secondary/20 data-[hover=true]:text-secondary"}},{variant:"flat",color:"success",class:{base:"data-[hover=true]:bg-success/20 data-[hover=true]:text-success "}},{variant:"flat",color:"warning",class:{base:"data-[hover=true]:bg-warning/20 data-[hover=true]:text-warningLine truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Crbd1Tvi.js","assets/features-animation-BkV7kg8P.js","assets/gestures-BHfQC-M8.js","assets/react-vendor-jWT2yUdV.js","assets/qface-BZLvZXJ8.js","assets/index-DiaaLdUu.js","assets/react-hot-toast-cGcFZPSt.js","assets/react-router-dom-C6k78GT4.js","assets/index-CBRelCj8.css"])))=>i.map(i=>d[i]);
|
||||
import{$ as la}from"./Item-D8Sud-UP.js";import{t as Ee,f as It,aK as oa,aL as na,a6 as ge,ap as et,an as Ze,aM as ia,aN as kt,aO as Re,a7 as zt,aP as At,a8 as Me,as as _e,aQ as ua,a9 as da,ac as bt,aj as ca,v as Le,y as $e,X as F,Y as we,x as Ke,w as fa,l as ha,av as Bt,z as tt,B as Ie,aw as ga,D as z,n as _,E as be,aR as pa,aS as Ot,aT as ba,aJ as Rt,aU as va,aV as ma,aW as ya,aX as xa,aA as $a,aC as _t,aD as wa,aE as Nt,aF as Ft,aH as Sa,aB as vt,a2 as Pa,aY as Ca,m as Da,aZ as Ma,al as Ea,aG as Ka,ao as Ia,a3 as Xe,a_ as ka,s as za,A as Aa}from"./index-DiaaLdUu.js";import{r as f,j as y,R as de,d as Ba}from"./react-vendor-jWT2yUdV.js";import{e as Oa,$ as Ra,f as _a,h as Na,j as Fa,i as La,k as Ta}from"./SelectionManager-Dl9uHsLK.js";import{$ as ja,a as Va,t as Wa,p as mt,b as Ha,c as yt,g as Ua,d as qa}from"./chunk-WQVQ7P2I-BJd1EiqP.js";import{$ as Xa,a as Ya,u as Ga,b as Ja}from"./chunk-SLABUSGS-Cmz8sGrU.js";import{$ as xt,a as Za}from"./DOMLayoutDelegate-DOgfSALU.js";import{$ as Qa}from"./useHover-DC1o5-bm.js";import{d as er}from"./chunk-AXSF7SRE-Cr4elNVq.js";var tr=["data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],sr=["data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]","data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"],Ne=Ee({base:[],variants:{orientation:{vertical:["overflow-y-auto",...tr],horizontal:["overflow-x-auto",...sr]},hideScrollBar:{true:"scrollbar-hide",false:""}},defaultVariants:{orientation:"vertical",hideScrollBar:!1}}),$t=Ee({slots:{base:["group inline-flex flex-col relative"],label:["block","absolute","z-10","origin-top-left","rtl:origin-top-right","subpixel-antialiased","text-small","text-foreground-500","pointer-events-none"],mainWrapper:"w-full flex flex-col",trigger:"relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-sm outline-none tap-highlight-transparent",innerWrapper:"inline-flex h-full w-[calc(100%_-_theme(spacing.6))] min-h-4 items-center gap-1.5 box-border",selectorIcon:"absolute end-3 w-4 h-4",spinner:"absolute end-3",value:["text-foreground-500","font-normal","w-full","text-start"],listboxWrapper:"scroll-py-6 w-full",listbox:"",popoverContent:"w-full p-1 overflow-hidden",helperWrapper:"p-1 flex relative flex-col gap-1.5",description:"text-tiny text-foreground-400",errorMessage:"text-tiny text-danger"},variants:{variant:{flat:{trigger:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-200"]},faded:{trigger:["bg-default-100","border-medium","border-default-200","data-[hover=true]:border-default-400 data-[focus=true]:border-default-400 data-[open=true]:border-default-400"],value:"group-data-[has-value=true]:text-default-foreground"},bordered:{trigger:["border-medium","border-default-200","data-[hover=true]:border-default-400","data-[open=true]:border-default-foreground","data-[focus=true]:border-default-foreground"],value:"group-data-[has-value=true]:text-default-foreground"},underlined:{trigger:["!px-1","!pb-0","!gap-0","relative","box-border","border-b-medium","shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","border-default-200","!rounded-none","hover:border-default-300","after:content-['']","after:w-0","after:origin-center","after:bg-default-foreground","after:absolute","after:left-1/2","after:-translate-x-1/2","after:-bottom-[2px]","after:h-[2px]","data-[open=true]:after:w-full","data-[focus=true]:after:w-full"],value:"group-data-[has-value=true]:text-default-foreground"}},color:{default:{},primary:{selectorIcon:"text-primary"},secondary:{selectorIcon:"text-secondary"},success:{selectorIcon:"text-success"},warning:{selectorIcon:"text-warning"},danger:{selectorIcon:"text-danger"}},size:{sm:{label:"text-tiny",trigger:"h-8 min-h-8 px-2 rounded-small",value:"text-small"},md:{trigger:"h-10 min-h-10 rounded-medium",value:"text-small"},lg:{trigger:"h-12 min-h-12 rounded-large",value:"text-medium"}},radius:{none:{trigger:"rounded-none"},sm:{trigger:"rounded-small"},md:{trigger:"rounded-medium"},lg:{trigger:"rounded-large"},full:{trigger:"rounded-full"}},labelPlacement:{outside:{base:"flex flex-col"},"outside-left":{base:"flex-row items-center flex-nowrap items-start",label:"relative pe-2 text-foreground"},inside:{label:"text-tiny cursor-pointer",trigger:"flex-col items-start justify-center gap-0"}},fullWidth:{true:{base:"w-full"},false:{base:"min-w-40"}},isDisabled:{Line truncated
|
||||
font-size: .6rem;
|
||||
font-weight: bold;
|
||||
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(u=e==null?void 0:e.onChange)==null||u.call(e,r),r}}function Je(a,t){if(a===void 0)throw new Error("Unexpected undefined");return a}const jr=(a,t)=>Math.abs(a-t)<1,Vr=(a,t,e)=>{let s;return function(...r){a.clearTimeout(s),s=a.setTimeout(()=>t.apply(this,r),e)}},Wr=a=>a,Hr=a=>{const t=Math.max(a.startIndex-a.overscan,0),e=Math.min(a.endIndex+a.overscan,a.count-1),s=[];for(let r=t;r<=e;r++)s.push(r);return s},Ur=(a,t)=>{const e=a.scrollElement;if(!e)return;const s=a.targetWindow;if(!s)return;const r=o=>{const{width:n,height:u}=o;t({width:Math.round(n),height:Math.round(u)})};if(r(e.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const l=new s.ResizeObserver(o=>{const n=o[0];if(n!=null&&n.borderBoxSize){const u=n.borderBoxSize[0];if(u){r({width:u.inlineSize,height:u.blockSize});return}}r(e.getBoundingClientRect())});return l.observe(e,{box:"border-box"}),()=>{l.unobserve(e)}},Dt={passive:!0},qr=typeof window>"u"?!0:"onscrollend"in window,Xr=(a,t)=>{const e=a.scrollElement;if(!e)return;const s=a.targetWindow;if(!s)return;let r=0;const l=a.options.useScrollendEvent&&qr?()=>{}:Vr(s,()=>{t(r,!1)},a.options.isScrollingResetDelay),o=i=>()=>{const{horizontal:d,isRtl:c}=a.options;r=d?e.scrollLeft*(c&&-1||1):e.scrollTop,l(),t(r,i)},n=o(!0),u=o(!1);return u(),e.addEventListener("scroll",n,Dt),e.addEventListener("scrollend",u,Dt),()=>{e.removeEventListener("scroll",n),e.removeEventListener("scrollend",u)}},Yr=(a,t,e)=>{if(t!=null&&t.borderBoxSize){const s=t.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(a.getBoundingClientRect()[e.options.horizontal?"width":"height"])},Gr=(a,{adjustments:t=0,behavior:e},s)=>{var r,l;const o=a+t;(l=(r=s.scrollElement)==null?void 0:r.scrollTo)==null||l.call(r,{[s.options.horizontal?"left":"top"]:o,behavior:e})};class Jr{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(r=>{r.forEach(l=>{this._measureElement(l.target,l)})}));return{disconnect:()=>{var r;(r=s())==null||r.disconnect(),e=null},observe:r=>{var l;return(l=s())==null?void 0:l.observe(r,{box:"border-box"})},unobserve:r=>{var l;return(l=s())==null?void 0:l.unobserve(r)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,r])=>{typeof r>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Wr,rangeExtractor:Hr,onChange:()=>{},measureElement:Yr,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...e}},this.notify=e=>{var s,r;(r=(s=this.options).onChange)==null||r.call(s,this,e)},this.maybeNotify=xe(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,l)=>{this.scrollAdjustments=0,this.scrollDirection=l?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=l,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(thi
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e}from"./react-vendor-jWT2yUdV.js";var r=l=>e.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...l,children:e.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})});export{r as C};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as le,f as U,V as I,bc as re,bd as W,a7 as ne,aj as oe,a8 as V,aY as _,a5 as ie,a6 as de,E,y as O,z as X,X as k,n as R,be as ue,av as ce,D as S,aC as be,aE as fe,Y as q,al as pe,ah as ye,v as ve,x as me,B as ge}from"./index-DiaaLdUu.js";import{$ as he,t as xe}from"./index-BV9-YCKp.js";import{r as c,j as h}from"./react-vendor-jWT2yUdV.js";import{m as $e}from"./chunk-UX7UMZL5-CMHjUaC_.js";import{f as Ke,e as we,h as Pe,j as Ce,i as De}from"./SelectionManager-Dl9uHsLK.js";import{l as Se,d as Me}from"./layout-Buao20KT.js";import{d as Le}from"./features-animation-BkV7kg8P.js";import{f as ke}from"./gestures-BHfQC-M8.js";import{$ as Ae}from"./Item-D8Sud-UP.js";var B=le({slots:{base:"inline-flex",tabList:["flex","p-1","h-fit","gap-2","items-center","flex-nowrap","overflow-x-scroll","scrollbar-hide","bg-default-100"],tab:["z-0","w-full","px-3","py-1","flex","group","relative","justify-center","items-center","outline-none","cursor-pointer","transition-opacity","tap-highlight-transparent","data-[disabled=true]:cursor-not-allowed","data-[disabled=true]:opacity-30","data-[hover-unselected=true]:opacity-disabled",...U],tabContent:["relative","z-10","text-inherit","whitespace-nowrap","transition-colors","text-default-500","group-data-[selected=true]:text-foreground"],cursor:["absolute","z-0","bg-white"],panel:["py-3","px-1","outline-none","data-[inert=true]:hidden",...U],wrapper:[]},variants:{variant:{solid:{cursor:"inset-0"},light:{tabList:"bg-transparent dark:bg-transparent",cursor:"inset-0"},underlined:{tabList:"bg-transparent dark:bg-transparent",cursor:"h-[2px] w-[80%] bottom-0 shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]"},bordered:{tabList:"bg-transparent dark:bg-transparent border-medium border-default-200 shadow-sm",cursor:"inset-0"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{tabList:"rounded-medium",tab:"h-7 text-tiny rounded-small",cursor:"rounded-small"},md:{tabList:"rounded-medium",tab:"h-8 text-small rounded-small",cursor:"rounded-small"},lg:{tabList:"rounded-large",tab:"h-9 text-medium rounded-medium",cursor:"rounded-medium"}},radius:{none:{tabList:"rounded-none",tab:"rounded-none",cursor:"rounded-none"},sm:{tabList:"rounded-medium",tab:"rounded-small",cursor:"rounded-small"},md:{tabList:"rounded-medium",tab:"rounded-small",cursor:"rounded-small"},lg:{tabList:"rounded-large",tab:"rounded-medium",cursor:"rounded-medium"},full:{tabList:"rounded-full",tab:"rounded-full",cursor:"rounded-full"}},fullWidth:{true:{base:"w-full",tabList:"w-full"}},isDisabled:{true:{tabList:"opacity-disabled pointer-events-none"}},disableAnimation:{true:{tab:"transition-none",tabContent:"transition-none"}},placement:{top:{},start:{tabList:"flex-col",panel:"py-0 px-3",wrapper:"flex"},end:{tabList:"flex-col",panel:"py-0 px-3",wrapper:"flex flex-row-reverse"},bottom:{wrapper:"flex flex-col-reverse"}}},defaultVariants:{color:"default",variant:"solid",size:"md",fullWidth:!1,isDisabled:!1},compoundVariants:[{variant:["solid","bordered","light"],color:"default",class:{cursor:["bg-background","dark:bg-default","shadow-small"],tabContent:"group-data-[selected=true]:text-default-foreground"}},{variant:["solid","bordered","light"],color:"primary",class:{cursor:I.solid.primary,tabContent:"group-data-[selected=true]:text-primary-foreground"}},{variant:["solid","bordered","light"],color:"secondary",class:{cursor:I.solid.secondary,tabContent:"group-data-[selected=true]:text-secondary-foreground"}},{variant:["solid","bordered","light"],color:"success",class:{cursor:I.solid.success,tabContent:"group-data-[selected=true]:text-success-foreground"}},{variant:["solid","bordered","light"],color:"warning",class:{cursor:I.solid.warning,tabContent:"group-data-[selected=true]:text-warning-foreground"}},{variant:["solid","bordered","light"],color:"danger",class:{cursor:I.solid.danger,tabContent:"group-data-[selected=true]:text-danger-foreground"}},{variant:"underlined",color:"default",class:{cursor:"bg-foreground",tabContent:"group-data-[selected=true]:text-foreground"}},{variant:"underlined",color:"primary",class:{cursor:"bg-primary",tabContent:"group-data-[selected=true]:text-primary"}},{variant:"underlined",color:"secondary",class:{cursor:"bg-secondary",tabContent:"group-data-[selected=true]:text-secondary"}},{variant:"underlined",color:"success",class:{cursor:"bg-success",tabContent:"group-data-[selected=true]:text-success"}},{variant:"underlined",color:"warning",class:{cursor:"bg-warning",tabContent:"group-data-[selected=true]:text-warning"}},{variant:"underlined",color:"danger",class:{cursor:"bg-danger",tabContent:"group-data-[selected=true]:text-danger"}},{disableAnimation:!0,variant:"underlined",class:{tab:["after:content-['']","after:absolute","after:bottom-0","after:h-[2px]","after:w-[80%]","after:opacity-0","after:shadow-[0_1px_0px_0_rgba(0,0,0,0.05)]","data-[selected=true]:after:opacity-100"]}},{disableAnimation:!0,color:"default",variant:["solid","bordered","light"],class:{tab:"data-[selected=true]:bgLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as u,j as w}from"./react-vendor-jWT2yUdV.js";import{t as U,v as X,x as q,y as G,B as J,X as C,D as E,E as Q}from"./index-DiaaLdUu.js";import{u as Y}from"./index-BsnVex0g.js";var L=U({slots:{wrapper:"relative shadow-black/5",zoomedWrapper:"relative overflow-hidden rounded-inherit",img:"relative z-10 opacity-0 shadow-black/5 data-[loaded=true]:opacity-100",blurredImg:["absolute","z-0","inset-0","w-full","h-full","object-cover","filter","blur-lg","scale-105","saturate-150","opacity-30","translate-y-1"]},variants:{radius:{none:{},sm:{},md:{},lg:{},full:{}},shadow:{none:{wrapper:"shadow-none",img:"shadow-none"},sm:{wrapper:"shadow-small",img:"shadow-small"},md:{wrapper:"shadow-medium",img:"shadow-medium"},lg:{wrapper:"shadow-large",img:"shadow-large"}},isZoomed:{true:{img:["object-cover","transform","hover:scale-125"]}},showSkeleton:{true:{wrapper:["group","relative","overflow-hidden","bg-content3 dark:bg-content2"],img:"opacity-0"}},disableAnimation:{true:{img:"transition-none"},false:{img:"transition-transform-opacity motion-reduce:transition-none !duration-300"}}},defaultVariants:{radius:"lg",shadow:"none",isZoomed:!1,isBlurred:!1,showSkeleton:!1},compoundVariants:[{showSkeleton:!0,disableAnimation:!1,class:{wrapper:["before:opacity-100","before:absolute","before:inset-0","before:-translate-x-full","before:animate-[shimmer_2s_infinite]","before:border-t","before:border-content4/30","before:bg-gradient-to-r","before:from-transparent","before:via-content4","dark:before:via-default-700/10","before:to-transparent","after:opacity-100","after:absolute","after:inset-0","after:-z-10","after:bg-content3","dark:after:bg-content2"]}}],compoundSlots:[{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"none",class:"rounded-none"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"full",class:"rounded-full"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"sm",class:"rounded-small"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"md",class:"rounded-md"},{slots:["wrapper","img","blurredImg","zoomedWrapper"],radius:"lg",class:"rounded-large"}]});function ee(l){var c,p;const g=X(),[e,n]=q(l,L.variantKeys),{ref:v,as:i,src:o,className:y,classNames:r,loading:f,isBlurred:b,fallbackSrc:s,isLoading:a,disableSkeleton:d=!!s,removeWrapper:Z=!1,onError:_,onLoad:$,srcSet:I,sizes:k,crossOrigin:x,...h}=e,S=Y({src:o,loading:f,onError:_,onLoad:$,ignoreFallback:!1,srcSet:I,sizes:k,crossOrigin:x}),z=(p=(c=l.disableAnimation)!=null?c:g==null?void 0:g.disableAnimation)!=null?p:!1,W=S==="loaded"&&!a,j=S==="loading"||a,D=l.isZoomed,M=i||"img",N=G(v),{w:P,h:V}=u.useMemo(()=>({w:e.width?typeof e.width=="number"?`${e.width}px`:e.width:"fit-content",h:e.height?typeof e.height=="number"?`${e.height}px`:e.height:"auto"}),[e==null?void 0:e.width,e==null?void 0:e.height]),A=(!o||!W)&&!!s,B=j&&!d,t=u.useMemo(()=>L({...n,disableAnimation:z,showSkeleton:B}),[J(n),z,B]),F=C(y,r==null?void 0:r.img),O=(m={})=>{const T=C(F,m==null?void 0:m.className);return{src:o,ref:N,"data-loaded":E(W),className:t.img({class:T}),loading:f,srcSet:I,sizes:k,crossOrigin:x,...h,style:{...(h==null?void 0:h.height)&&{height:V},...m.style,...h.style}}},H=u.useCallback(()=>{const m=A?{backgroundImage:`url(${s})`}:{};return{className:t.wrapper({class:r==null?void 0:r.wrapper}),style:{...m,maxWidth:P}}},[t,A,s,r==null?void 0:r.wrapper,P]),K=u.useCallback(()=>({src:o,"aria-hidden":E(!0),className:t.blurredImg({class:r==null?void 0:r.blurredImg})}),[t,o,r==null?void 0:r.blurredImg]);return{Component:M,domRef:N,slots:t,classNames:r,isBlurred:b,disableSkeleton:d,fallbackSrc:s,removeWrapper:Z,isZoomed:D,isLoading:j,getImgProps:O,getWrapperProps:H,getBlurredImgProps:K}}var R=Q((l,c)=>{const{Component:p,domRef:g,slots:e,classNames:n,isBlurred:v,isZoomed:i,fallbackSrc:o,removeWrapper:y,disableSkeleton:r,getImgProps:f,getWrapperProps:b,getBlurredImgProps:s}=ee({...l,ref:c}),a=w.jsx(p,{ref:g,...f()});if(y)return a;const d=w.jsx("div",{className:e.zoomedWrapper({class:n==null?void 0:n.zoomedWrapper}),children:a});return v?w.jsxs("div",{...b(),children:[i?d:a,u.cloneElement(a,s())]}):i||!r||o?w.jsxs("div",{...b(),children:[" ",i?d:a]}):a});R.displayName="HeroUI.Image";var se=R;export{se as i};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as R,b9 as I,V as a,x as k,y as A,X as z,z as H,B as K,l as T,n as U,E as X}from"./index-DiaaLdUu.js";import{r as t,j as b}from"./react-vendor-jWT2yUdV.js";import{C as _}from"./chunk-M3MASYO7-B4fjH-eW.js";var N=R({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"flex-shrink-0",closeButton:["z-10","appearance-none","outline-none","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[...I,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:a.solid.default}},{variant:"solid",color:"primary",class:{base:a.solid.primary}},{variant:"solid",color:"secondary",class:{base:a.solid.secondary}},{variant:"solid",color:"success",class:{base:a.solid.success}},{variant:"solid",color:"warning",class:{base:a.solid.warning}},{variant:"solid",color:"danger",class:{base:a.solid.danger}},{variant:"shadow",color:"default",class:{base:a.shadow.default}},{variant:"shadow",color:"primary",class:{base:a.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:a.shadow.secondary}},{variant:"shadow",color:"success",class:{base:a.shadow.success}},{variant:"shadow",color:"warning",class:{base:a.shadow.warning}},{variant:"shadow",color:"danger",class:{base:a.shadow.danger}},{variant:"bordered",color:"default",class:{base:a.bordered.default}},{variant:"bordered",color:"primary",class:{base:a.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:a.bordered.secondary}},{variant:"bordered",color:"success",class:{base:a.bordered.success}},{variant:"bordered",color:"warning",class:{base:a.bordered.warning}},{variant:"bordered",color:"danger",class:{base:a.bordered.danger}},{variant:"flat",color:"default",class:{base:a.flat.default}},{variant:"flat",color:"primary",class:{base:a.flat.primary}},{variant:"flat",color:"secondary",class:{base:a.flat.secondary}},{variant:"flat",color:"success",class:{base:a.flat.success}},{variant:"flat",color:"warning",class:{base:a.flat.warning}},{variant:"flat",color:"danger",class:{base:a.flat.danger}},{variant:"faded",color:"default",class:{base:a.faded.default}},{variant:"faded",color:"primary",class:{base:a.faded.primary}},{variant:"faded",color:"secondary",class:{base:a.faded.secondary}},{variant:"faded",color:"success",class:{base:a.faded.success}},{variant:"faded",color:"warning",class:{base:a.faded.warning}},{variant:"faded",color:"danger",class:{base:a.faded.danger}},{variant:"light",color:"default",class:{base:a.light.default}},{variant:"light",color:"primary",class:{base:a.light.primary}},{variant:"light",color:"secondary",class:{base:a.light.secondary}},{variant:"light",color:"success",class:{base:a.light.success}},{variant:"light",color:"warning",class:{base:a.light.warning}},{variant:"light",color:"danger",class:{base:a.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]});function q(o){const[m,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{t as N,f as V,h as F,i as R,w as H,j as z,l as O,m as S,n as w,o as q,p as K,q as U,v as W,x as G,y as J,z as Q,B as X,D as P,E as Y}from"./index-DiaaLdUu.js";import{j as s,r as E}from"./react-vendor-jWT2yUdV.js";var I=N({base:["relative inline-flex items-center outline-none tap-highlight-transparent",...V],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"},underline:{none:"no-underline",hover:"hover:underline",always:"underline",active:"active:underline",focus:"focus:underline"},isBlock:{true:["px-2","py-1","hover:after:opacity-100","after:content-['']","after:inset-0","after:opacity-0","after:w-full","after:h-full","after:rounded-xl","after:transition-background","after:absolute"],false:"hover:opacity-80 active:opacity-disabled transition-opacity"},isDisabled:{true:"opacity-disabled cursor-default pointer-events-none"},disableAnimation:{true:"after:transition-none transition-none"}},compoundVariants:[{isBlock:!0,color:"foreground",class:"hover:after:bg-foreground/10"},{isBlock:!0,color:"primary",class:"hover:after:bg-primary/20"},{isBlock:!0,color:"secondary",class:"hover:after:bg-secondary/20"},{isBlock:!0,color:"success",class:"hover:after:bg-success/20"},{isBlock:!0,color:"warning",class:"hover:after:bg-warning/20"},{isBlock:!0,color:"danger",class:"hover:after:bg-danger/20"},{underline:["hover","always","active","focus"],class:"underline-offset-4"}],defaultVariants:{color:"primary",size:"md",isBlock:!1,underline:"none",isDisabled:!1}}),Z="flex mx-1 text-current self-center",ee=r=>s.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",shapeRendering:"geometricPrecision",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 24 24",width:"1em",...r,children:[s.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),s.jsx("path",{d:"M15 3h6v6"}),s.jsx("path",{d:"M10 14L21 3"})]});function re(r,t){let{elementType:n="a",onPress:o,onPressStart:i,onPressEnd:l,onClick:a,role:u,isDisabled:c,...f}=r,b={};n!=="a"&&(b={role:"link",tabIndex:c?void 0:0});let p=F()||R();a&&typeof a=="function"&&u!=="button"&&H("onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292","useLink");const x=e=>{p&&(a==null||a(e)),o==null||o(e)};let{focusableProps:k}=z(r,t),{pressProps:d,isPressed:h}=O({onPress:x,onPressStart:i,onPressEnd:l,isDisabled:c,ref:t}),g=S(f,{labelable:!0,isLink:n==="a"}),$=w(k,d),v=q(),y=K(r);return{isPressed:h,linkProps:w(g,y,{...$,...b,"aria-disabled":c||void 0,"aria-current":r["aria-current"],onClick:e=>{var m;(m=d.onClick)==null||m.call(d,e),!p&&a&&a(e),!v.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&U(e.currentTarget,e)&&r.href&&(e.preventDefault(),v.open(e.currentTarget,e,r.href,r.routerOptions))}})}}function ae(r){var t,n,o,i;const l=W(),[a,u]=G(r,I.variantKeys),{ref:c,as:f,children:b,anchorIcon:p,isExternal:x=!1,showAnchorIcon:k=!1,autoFocus:d=!1,className:h,onPress:g,onPressStart:$,onPressEnd:v,onClick:y,...e}=a,m=f||"a",C=J(c),L=(n=(t=r==null?void 0:r.disableAnimation)!=null?t:l==null?void 0:l.disableAnimation)!=null?n:!1,{linkProps:j}=re({...e,onPress:g,onPressStart:$,onPressEnd:v,onClick:y,isDisabled:r.isDisabled,elementType:`${f}`},C),{isFocused:D,isFocusVisible:A,focusProps:B}=Q({autoFocus:d});x&&(e.rel=(o=e.rel)!=null?o:"noopener noreferrer",e.target=(i=e.target)!=null?i:"_blank");const T=E.useMemo(()=>I({...u,disableAnimation:L,className:h}),[X(u),L,h]),_=E.useCallback(()=>({ref:C,className:T,"data-focus":P(D),"data-disabled":P(r.isDisabled),"data-focus-visible":P(A),...w(B,j,e)}),[T,D,A,B,j,e]);return{Component:m,children:b,anchorIcon:p,showAnchorIcon:k,getLinkProps:_}}var M=Y((r,t)=>{const{Component:n,children:o,showAnchorIcon:i,anchorIcon:l=s.jsx(ee,{className:Z}),getLinkProps:a}=ae({ref:t,...r});return s.jsx(n,{...a(),children:s.jsxs(s.Fragment,{children:[o,i&&l]})})});M.displayName="HeroUI.Link";var ne=M;export{ne as l};
|
||||
@@ -0,0 +1 @@
|
||||
var m=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),h=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),s=/^(data-.*)$/,f=/^(aria-.*)$/,n=/^(on[A-Z].*)$/;function g(o,l={}){let{labelable:c=!0,enabled:p=!0,propNames:t,omitPropNames:a,omitEventNames:r,omitDataProps:d,omitEventProps:u}=l,i={};if(!p)return o;for(const e in o)a!=null&&a.has(e)||r!=null&&r.has(e)&&n.test(e)||n.test(e)&&!h.has(e)||d&&s.test(e)||u&&n.test(e)||(Object.prototype.hasOwnProperty.call(o,e)&&(m.has(e)||c&&f.test(e)||t!=null&&t.has(e)||s.test(e))||n.test(e))&&(i[e]=o[e]);return i}export{g as f};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as _,a6 as M,aY as B,aW as U,n as q}from"./index-DiaaLdUu.js";import{r,j as p}from"./react-vendor-jWT2yUdV.js";var N=_({base:"flex flex-col gap-2 items-start"});function Q(e){const t=r.useRef(null);return r.useMemo(()=>({get current(){return t.current},set current(a){t.current=a,typeof e=="function"?e(a):e&&(e.current=a)}}),[e])}function X(e){let{id:t,label:a,"aria-labelledby":l,"aria-label":n,labelElementType:i="label"}=e;t=M(t);let d=M(),s={};a&&(l=l?`${d} ${l}`:d,s={id:d,htmlFor:i==="label"?t:void 0});let u=B({id:t,"aria-label":n,"aria-labelledby":l});return{labelProps:s,fieldProps:u}}var C=Symbol("default");function Y(e,t){let a=r.useContext(e);if(t===null)return null;if(a&&typeof a=="object"&&"slots"in a&&a.slots){let l=new Intl.ListFormat().format(Object.keys(a.slots).map(i=>`"${i}"`));if(!t&&!a.slots[C])throw new Error(`A slot prop is required. Valid slot names are ${l}.`);let n=t||C;if(!a.slots[n])throw new Error(`Invalid slot "${t}". Valid slot names are ${l}.`);return a.slots[n]}return a}function k(e,t,a){let l=Y(a,e.slot)||{},{ref:n,...i}=l,d=Q(r.useMemo(()=>U(t,n),[t,n])),s=q(i,e);return"style"in i&&i.style&&"style"in e&&e.style&&(typeof i.style=="function"||typeof e.style=="function"?s.style=u=>{let f=typeof i.style=="function"?i.style(u):i.style,c={...u.defaultStyle,...f},m=typeof e.style=="function"?e.style({...u,defaultStyle:c}):e.style;return{...c,...m}}:s.style={...i.style,...e.style}),[s,d]}const F={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},L={...F,customError:!0,valid:!1},v={isInvalid:!1,validationDetails:F,validationErrors:[]},T=r.createContext({}),j="__formValidationState"+Date.now();function Z(e){if(e[j]){let{realtimeValidation:t,displayValidation:a,updateValidation:l,resetValidation:n,commitValidation:i}=e[j];return{realtimeValidation:t,displayValidation:a,updateValidation:l,resetValidation:n,commitValidation:i}}return K(e)}function K(e){let{isInvalid:t,validationState:a,name:l,value:n,builtinValidation:i,validate:d,validationBehavior:s="aria"}=e;a&&(t||(t=a==="invalid"));let u=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:L}:null,f=r.useMemo(()=>{if(!d||n==null)return null;let o=W(d,n);return A(o)},[d,n]);i!=null&&i.validationDetails.valid&&(i=void 0);let c=r.useContext(T),m=r.useMemo(()=>l?Array.isArray(l)?l.flatMap(o=>h(c[o])):h(c[l]):[],[c,l]),[P,w]=r.useState(c),[I,$]=r.useState(!1);c!==P&&(w(c),$(!1));let y=r.useMemo(()=>A(I?[]:m),[I,m]),g=r.useRef(v),[V,x]=r.useState(v),b=r.useRef(v),O=()=>{if(!R)return;E(!1);let o=f||i||g.current;S(o,b.current)||(b.current=o,x(o))},[R,E]=r.useState(!1);return r.useEffect(O),{realtimeValidation:u||y||f||i||v,displayValidation:s==="native"?u||y||V:u||y||f||i||V,updateValidation(o){s==="aria"&&!S(V,o)?x(o):g.current=o},resetValidation(){let o=v;S(o,b.current)||(b.current=o,x(o)),s==="native"&&E(!1),$(!0)},commitValidation(){s==="native"&&E(!0),$(!0)}}}function h(e){return e?Array.isArray(e)?e:[e]:[]}function W(e,t){if(typeof e=="function"){let a=e(t);if(a&&typeof a!="boolean")return h(a)}return[]}function A(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:L}:null}function S(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((a,l)=>a===t.validationErrors[l])&&Object.entries(e.validationDetails).every(([a,l])=>t.validationDetails[a]===l)}var D=r.createContext(null),ee=r.forwardRef(function(t,a){[t,a]=k(t,a,D);let{validationErrors:l,validationBehavior:n="native",children:i,className:d,...s}=t;const u=r.useMemo(()=>N({className:d}),[d]);return p.jsx("form",{noValidate:n!=="native",...s,ref:a,className:u,children:p.jsx(D.Provider,{value:{...t,validationBehavior:n},children:p.jsx(T.Provider,{value:l??{},children:i})})})});export{X as $,ee as F,Z as a,D as b,N as f,Y as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{j as s,r as m}from"./react-vendor-jWT2yUdV.js";import{t as L,b0 as P,f as ia,V as c,ar as da,v as ca,y as S,z as ua,av as fa,X as H,n as Z,D as y,Y as ma,E as ba}from"./index-DiaaLdUu.js";import{s as ga}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{u as va}from"./index-BsnVex0g.js";var pa=L({slots:{base:["flex","relative","justify-center","items-center","box-border","overflow-hidden","align-middle","text-white","z-0",...ia],img:["flex","object-cover","w-full","h-full","transition-opacity","!duration-500","opacity-0","data-[loaded=true]:opacity-100"],fallback:[...P,"flex","items-center","justify-center"],name:[...P,"font-normal","text-center","text-inherit"],icon:[...P,"flex","items-center","justify-center","text-inherit","w-full","h-full"]},variants:{size:{sm:{base:"w-8 h-8 text-tiny"},md:{base:"w-10 h-10 text-tiny"},lg:{base:"w-14 h-14 text-small"}},color:{default:{base:c.solid.default},primary:{base:c.solid.primary},secondary:{base:c.solid.secondary},success:{base:c.solid.success},warning:{base:c.solid.warning},danger:{base:c.solid.danger}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isBordered:{true:{base:"ring-2 ring-offset-2 ring-offset-background dark:ring-offset-background-dark"}},isDisabled:{true:{base:"opacity-disabled"}},isInGroup:{true:{base:["-ms-2 data-[hover=true]:-translate-x-3 rtl:data-[hover=true]:translate-x-3 transition-transform","data-[focus-visible=true]:-translate-x-3 rtl:data-[focus-visible=true]:translate-x-3"]}},isInGridGroup:{true:{base:"m-0 data-[hover=true]:translate-x-0"}},disableAnimation:{true:{base:"transition-none",img:"transition-none"},false:{}}},defaultVariants:{size:"md",color:"default",radius:"full"},compoundVariants:[{color:"default",isBordered:!0,class:{base:"ring-default"}},{color:"primary",isBordered:!0,class:{base:"ring-primary"}},{color:"secondary",isBordered:!0,class:{base:"ring-secondary"}},{color:"success",isBordered:!0,class:{base:"ring-success"}},{color:"warning",isBordered:!0,class:{base:"ring-warning"}},{color:"danger",isBordered:!0,class:{base:"ring-danger"}}]});L({slots:{base:"flex items-center justify-center h-auto w-max",count:"hover:-translate-x-0"},variants:{isGrid:{true:"inline-grid grid-cols-4 gap-3"}}});var xa=()=>s.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[s.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),s.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[Ia,ha]=da({name:"AvatarGroupContext",strict:!1});function Ca(w={}){var b,g,v,n,p,r;const e=ca(),a=ha(),i=!!a,{as:d,ref:u,src:t,name:x,icon:k,classNames:l,fallback:U,alt:X=x||"avatar",imgRef:Y,color:G=(b=a==null?void 0:a.color)!=null?b:"default",radius:B=(g=a==null?void 0:a.radius)!=null?g:"full",size:F=(v=a==null?void 0:a.size)!=null?v:"md",isBordered:N=(n=a==null?void 0:a.isBordered)!=null?n:!1,isDisabled:j=(p=a==null?void 0:a.isDisabled)!=null?p:!1,isFocusable:$=!1,getInitials:q=ga,ignoreFallback:M=!1,showFallback:J=!1,ImgComponent:_="img",imgProps:D,className:K,onError:Q,disableAnimation:R,...z}=w,W=d||"span",aa=S(u),A=S(Y),{isFocusVisible:ea,isFocused:sa,focusProps:V}=ua(),{isHovered:ra,hoverProps:ta}=fa({isDisabled:j}),h=(r=R??(e==null?void 0:e.disableAnimation))!=null?r:!1,C=va({src:t,onError:Q,ignoreFallback:M})==="loaded",E=typeof _=="string",la=(!t||!C)&&J,f=m.useMemo(()=>{var o;return pa({color:G,radius:B,size:F,isBordered:N,isDisabled:j,isInGroup:i,disableAnimation:h,isInGridGroup:(o=a==null?void 0:a.isGrid)!=null?o:!1})},[G,B,F,N,j,h,i,a==null?void 0:a.isGrid]),O=H(l==null?void 0:l.base,K),I=m.useMemo(()=>$||d==="button",[$,d]),oa=m.useCallback((o={})=>({ref:aa,tabIndex:I?0:-1,"data-hover":y(ra),"data-focus":y(sa),"data-focus-visible":y(ea),className:f.base({class:H(O,o==null?void 0:o.className)}),...Z(z,ta,I?V:{})}),[I,f,O,V,z]),na=m.useCallback((o={})=>({ref:A,src:t,"data-loaded":y(C),className:f.img({class:l==null?void 0:l.img}),...Z(D,o,ma({disableAnimation:h},{enabled:E}))}),[f,C,D,h,t,A,E]);return{Component:W,ImgComponent:_,src:t,alt:X,icon:k,name:x,imgRef:A,slots:f,classNames:l,fallback:U,isImgLoaded:C,showFallback:la,ignoreFallback:M,getInitials:q,getAvatarProps:oa,getImageProps:na}}var T=ba((w,b)=>{const{Component:g,ImgComponent:v,src:n,icon:p=s.jsx(xa,{}),alt:r,classNames:e,slots:a,name:i,showFallback:d,fallback:u,getInitials:t,getAvatarPropLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{u as p}from"./chunk-5PILOUBS-KHYNqMZE.js";import{E as u,y as v,X as x}from"./index-DiaaLdUu.js";import{j as C}from"./react-vendor-jWT2yUdV.js";var a=u((e,t)=>{var o;const{as:l,className:c,children:f,...m}=e,n=l||"div",d=v(t),{slots:s,classNames:r}=p(),i=x(r==null?void 0:r.footer,c);return C.jsx(n,{ref:d,className:(o=s.footer)==null?void 0:o.call(s,{class:i}),...m,children:f})});a.displayName="HeroUI.CardFooter";var y=a;export{y as c};
|
||||
@@ -0,0 +1 @@
|
||||
import{bq as o}from"./index-DiaaLdUu.js";function i(r,n){if(r!=null){if(o(r)){r(n);return}try{r.current=n}catch{throw new Error(`Cannot assign value '${n}' to ref '${r}'`)}}}function c(...r){return n=>{r.forEach(t=>i(t,n))}}export{c as m};
|
||||
@@ -0,0 +1 @@
|
||||
import{t as se,f as ce,V as F,aQ as de,a5 as pe,ao as V,ah as fe}from"./index-DiaaLdUu.js";import{r as S}from"./react-vendor-jWT2yUdV.js";var Te=se({slots:{base:["z-0","relative","bg-transparent","before:content-['']","before:hidden","before:z-[-1]","before:absolute","before:rotate-45","before:w-2.5","before:h-2.5","before:rounded-sm","data-[arrow=true]:before:block","data-[placement=top]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top]:before:left-1/2","data-[placement=top]:before:-translate-x-1/2","data-[placement=top-start]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-start]:before:left-3","data-[placement=top-end]:before:-bottom-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=top-end]:before:right-3","data-[placement=bottom]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom]:before:left-1/2","data-[placement=bottom]:before:-translate-x-1/2","data-[placement=bottom-start]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-start]:before:left-3","data-[placement=bottom-end]:before:-top-[calc(theme(spacing.5)/4_-_1.5px)]","data-[placement=bottom-end]:before:right-3","data-[placement=left]:before:-right-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=left]:before:top-1/2","data-[placement=left]:before:-translate-y-1/2","data-[placement=left-start]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-start]:before:top-1/4","data-[placement=left-end]:before:-right-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=left-end]:before:bottom-1/4","data-[placement=right]:before:-left-[calc(theme(spacing.5)/4_-_2px)]","data-[placement=right]:before:top-1/2","data-[placement=right]:before:-translate-y-1/2","data-[placement=right-start]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-start]:before:top-1/4","data-[placement=right-end]:before:-left-[calc(theme(spacing.5)/4_-_3px)]","data-[placement=right-end]:before:bottom-1/4",...ce],content:["z-10","px-2.5","py-1","w-full","inline-flex","flex-col","items-center","justify-center","box-border","subpixel-antialiased","outline-none","box-border"],trigger:["z-10"],backdrop:["hidden"],arrow:[]},variants:{size:{sm:{content:"text-tiny"},md:{content:"text-small"},lg:{content:"text-medium"}},color:{default:{base:"before:bg-content1 before:shadow-small",content:"bg-content1"},foreground:{base:"before:bg-foreground",content:F.solid.foreground},primary:{base:"before:bg-primary",content:F.solid.primary},secondary:{base:"before:bg-secondary",content:F.solid.secondary},success:{base:"before:bg-success",content:F.solid.success},warning:{base:"before:bg-warning",content:F.solid.warning},danger:{base:"before:bg-danger",content:F.solid.danger}},radius:{none:{content:"rounded-none"},sm:{content:"rounded-small"},md:{content:"rounded-medium"},lg:{content:"rounded-large"},full:{content:"rounded-full"}},shadow:{none:{content:"shadow-none"},sm:{content:"shadow-small"},md:{content:"shadow-medium"},lg:{content:"shadow-large"}},backdrop:{transparent:{},opaque:{backdrop:"bg-overlay/50 backdrop-opacity-disabled"},blur:{backdrop:"backdrop-blur-sm backdrop-saturate-150 bg-overlay/30"}},triggerScaleOnOpen:{true:{trigger:["aria-expanded:scale-[0.97]","aria-expanded:opacity-70","subpixel-antialiased"]},false:{}},disableAnimation:{true:{base:"animate-none"}},isTriggerDisabled:{true:{trigger:"opacity-disabled pointer-events-none"},false:{}}},defaultVariants:{color:"default",radius:"lg",size:"md",shadow:"md",backdrop:"transparent",triggerScaleOnOpen:!0},compoundVariants:[{backdrop:["opaque","blur"],class:{backdrop:"block w-full h-full fixed inset-0 -z-30"}}]});function ue(){return typeof window.ResizeObserver<"u"}function J(t){const{ref:e,box:o,onResize:n}=t;S.useEffect(()=>{let l=e==null?void 0:e.current;if(l)if(ue()){const a=new window.ResizeObserver(s=>{s.length&&n()});return a.observe(l,{box:o}),()=>{l&&a.unobserve(l)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,e,o])}function G(t,e=-1/0,o=1/0){return Math.min(Math.max(t,e),o)}const M={top:"top",bottom:"top",left:"left",right:"left"},U={top:"bottom",bottom:"top",left:"right",right:"left"},me={top:"left",left:"top"},Q={top:"height",left:"width"},le={width:"totalWidth",height:"totalHeight"},B={};let E=typeof document<"u"?window.visualViewport:null;function K(t){let e=0,o=0,n=0,l=0,a=0,s=0,r={};var v;let d=((v=E==null?void 0:E.scale)!==null&&v!==void 0?v:1)>1;if(t.tagName==="BODY"){let p=document.documentElement;n=p.clientWidth,l=p.clientHeight;var f;e=(f=E==null?void 0:E.width)!==null&&f!==void 0?f:n;var b;o=(b=E==null?void 0:E.height)!==null&&b!==void 0?b:l,r.top=p.scrollTop||t.scrollTop,r.left=p.scrollLeft||t.scrollLeft,E&&(a=E.offsetTop,s=E.offsetLeft)}else({width:e,height:o,top:a,left:s}=N(t)),r.top=t.scrollTop,r.left=t.scrollLeft,n=e,l=o;if(de()&&(t.tagName==="BODY"||t.tagName==="HTML")&&d){r.top=0,r.left=0;var u;a=(u=E==null?void 0:E.pageTop)!==null&&Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as o}from"./iconBase-B7bT1FlI.js";import{R as k,r as n,j as b}from"./react-vendor-jWT2yUdV.js";import{E as l,R as w,o as L}from"./codemirror-core-782AVq39.js";import{j}from"./codemirror-lang-DFaD5e7G.js";import{a as T,c as R}from"./index-DiaaLdUu.js";function N(t){return o({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M12 2c-.218 0 -.432 .002 -.642 .005l-.616 .017l-.299 .013l-.579 .034l-.553 .046c-4.785 .464 -6.732 2.411 -7.196 7.196l-.046 .553l-.034 .579c-.005 .098 -.01 .198 -.013 .299l-.017 .616l-.004 .318l-.001 .324c0 .218 .002 .432 .005 .642l.017 .616l.013 .299l.034 .579l.046 .553c.464 4.785 2.411 6.732 7.196 7.196l.553 .046l.579 .034c.098 .005 .198 .01 .299 .013l.616 .017l.642 .005l.642 -.005l.616 -.017l.299 -.013l.579 -.034l.553 -.046c4.785 -.464 6.732 -2.411 7.196 -7.196l.046 -.553l.034 -.579c.005 -.098 .01 -.198 .013 -.299l.017 -.616l.005 -.642l-.005 -.642l-.017 -.616l-.013 -.299l-.034 -.579l-.046 -.553c-.464 -4.785 -2.411 -6.732 -7.196 -7.196l-.553 -.046l-.579 -.034a28.058 28.058 0 0 0 -.299 -.013l-.616 -.017l-.318 -.004l-.324 -.001zm-1.707 6.293a1 1 0 0 1 1.32 -.083l.094 .083l3 3a1 1 0 0 1 .083 1.32l-.083 .094l-3 3a1 1 0 0 1 -1.497 -1.32l.083 -.094l2.292 -2.293l-2.292 -2.293a1 1 0 0 1 -.083 -1.32l.083 -.094z",fill:"currentColor",strokeWidth:"0"},child:[]}]})(t)}function D(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M7 8l-4 4l4 4"},child:[]},{tag:"path",attr:{d:"M17 8l4 4l-4 4"},child:[]},{tag:"path",attr:{d:"M14 4l-4 16"},child:[]}]})(t)}function F(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M18 6v6a3 3 0 0 1 -3 3h-10l4 -4m0 8l-4 -4"},child:[]}]})(t)}function G(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2"},child:[]}]})(t)}function O(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M11.012 19.193l-3.012 1.807v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M20 21l2 -2l-2 -2"},child:[]},{tag:"path",attr:{d:"M17 17l-2 2l2 2"},child:[]}]})(t)}function H(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M3 17a3 3 0 1 0 6 0a3 3 0 0 0 -6 0"},child:[]},{tag:"path",attr:{d:"M9 17v-13h10v8"},child:[]},{tag:"path",attr:{d:"M9 8h10"},child:[]},{tag:"path",attr:{d:"M16 19h6"},child:[]},{tag:"path",attr:{d:"M19 16v6"},child:[]}]})(t)}function I(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},child:[]},{tag:"path",attr:{d:"M21 21l-6 -6"},child:[]}]})(t)}function P(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 7l16 0"},child:[]},{tag:"path",attr:{d:"M10 11l0 6"},child:[]},{tag:"path",attr:{d:"M14 11l0 6"},child:[]},{tag:"path",attr:{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"},child:[]},{tag:"path",attr:{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"},child:[]}]})(t)}function _(t){return o({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4z"},child:[]},{tag:"path",attr:{d:"M3 6m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M7 12l4 0"},child:[]},{tag:"path",attr:{d:"M9 10l0 4"},child:[]}]})(t)}const W=t=>{switch(t){case"json":return j();default:return[]}},q=k.forwardRef((t,M)=>{var h,s,u,g,f,m,v,p;const{isDark:r}=T(),i=!!((h=t.options)!=null&&h.chromeless),[C,d]=n.useState(t.value||t.defaultValue||""),c=k.useRef(null);n.useEffect(()=>{t.value!==void 0&&d(t.value)},[t.value]),n.useImperativeHandle(M,()=>({getValue:()=>{var e,a;return((a=(e=c.current)==null?void 0:e.view)==null?void 0:a.state.doc.toString())||C}}));const x=[l.theme({"&":{fontSize:"14px",height:"100% !important",backgroundColor:"transparent !important"},"&.cm-editor":{backgroundColor:"transparent !important"},".cm-scroller":{fontFamily:"var(--font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation MonLine truncated
|
||||
@@ -0,0 +1,12 @@
|
||||
import{r as be,j as nf}from"./react-vendor-jWT2yUdV.js";function Us(){return Us=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Us.apply(null,arguments)}function sf(n,e){if(n==null)return{};var t={};for(var i in n)if({}.hasOwnProperty.call(n,i)){if(e.indexOf(i)!==-1)continue;t[i]=n[i]}return t}let js=[],fa=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?fa:js).push(t=t+n[e])})();function rf(n){if(n<768)return!1;for(let e=0,t=js.length;;){let i=e+t>>1;if(n<js[i])t=i;else if(n>=fa[i])e=i+1;else return!0;if(e==t)return!1}}function ko(n){return n>=127462&&n<=127487}const So=8205;function of(n,e,t=!0,i=!0){return(t?ua:lf)(n,e,i)}function ua(n,e,t){if(e==n.length)return e;e&&da(n.charCodeAt(e))&&pa(n.charCodeAt(e-1))&&e--;let i=ms(n,e);for(e+=Co(i);e<n.length;){let s=ms(n,e);if(i==So||s==So||t&&rf(s))e+=Co(s),i=s;else if(ko(s)){let r=0,o=e-2;for(;o>=0&&ko(ms(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function lf(n,e,t){for(;e>0;){let i=ua(n,e-2,t);if(i<e)return i;e--}return 0}function ms(n,e){let t=n.charCodeAt(e);if(!pa(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return da(i)?(t-55296<<10)+(i-56320)+65536:t}function da(n){return n>=56320&&n<57344}function pa(n){return n>=55296&&n<56320}function Co(n){return n<65536?1:2}class q{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){[e,t]=Jt(this,e,t);let s=[];return this.decompose(0,e,s,2),i.length&&i.decompose(0,i.length,s,3),this.decompose(t,this.length,s,1),Ye.from(s,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Jt(this,e,t);let i=[];return this.decompose(e,t,i,0),Ye.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),s=new gi(this),r=new gi(e);for(let o=t,l=t;;){if(s.next(o),r.next(o),o=0,s.lineBreak!=r.lineBreak||s.done!=r.done||s.value!=r.value)return!1;if(l+=s.value.length,s.done||l>=i)return!0}}iter(e=1){return new gi(this,e)}iterRange(e,t=this.length){return new ma(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let s=this.line(e).from;i=this.iterRange(s,Math.max(s,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new ga(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?q.empty:e.length<=32?new J(e):Ye.from(J.split(e,[]))}}class J extends q{constructor(e,t=af(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.text[r],l=s+o.length;if((t?i:l)>=e)return new hf(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(Ao(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=kn(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let a=l.length>>1;i.push(new J(l.slice(0,a)),new J(l.slice(a)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);[e,t]=Jt(this,e,t);let s=kn(this.text,kn(i.text,Ao(this.text,0,e)),t),r=this.length+i.length-(t-e);rLine truncated
|
||||
`){[e,t]=Jt(this,e,t);let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],a=r+l.length;r>e&&o&&(s+=i),e<a&&t>r&&(s+=l.slice(Math.max(0,e-r),t-r)),r=a+1}return s}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],s=-1;for(let r of e)i.push(r),s+=r.length+1,i.length==32&&(t.push(new J(i,s)),i=[],s=-1);return s>-1&&t.push(new J(i,s)),t}}class Ye extends q{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,s){for(let r=0;;r++){let o=this.children[r],l=s+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,s);s=l+1,i=a+1}}decompose(e,t,i,s){for(let r=0,o=0;o<=t&&r<this.children.length;r++){let l=this.children[r],a=o+l.length;if(e<=a&&t>=o){let h=s&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if([e,t]=Jt(this,e,t),i.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let a=o.replace(e-r,t-r,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let c=this.children.slice();return c[s]=a,new Ye(c,this.length-(t-e)+i.length)}return super.replace(r,l,a)}r=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
||||
`){[e,t]=Jt(this,e,t);let s="";for(let r=0,o=0;r<this.children.length&&o<=t;r++){let l=this.children[r],a=o+l.length;o>e&&r&&(s+=i),e<a&&t>o&&(s+=l.sliceString(e-o,t-o,i)),o=a+1}return s}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Ye))return 0;let i=0,[s,r,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;s+=t,r+=t){if(s==o||r==l)return i;let a=this.children[s],h=e.children[r];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,s)=>i+s.length+1,-1)){let i=0;for(let d of e)i+=d.lines;if(i<32){let d=[];for(let p of e)p.flatten(d);return new J(d,t)}let s=Math.max(32,i>>5),r=s<<1,o=s>>1,l=[],a=0,h=-1,c=[];function f(d){let p;if(d.lines>r&&d instanceof Ye)for(let m of d.children)f(m);else d.lines>o&&(a>o||!a)?(u(),l.push(d)):d instanceof J&&a&&(p=c[c.length-1])instanceof J&&d.lines+p.lines<=32?(a+=d.lines,h+=d.length+1,c[c.length-1]=new J(p.text.concat(d.text),p.length+1+d.length)):(a+d.lines>s&&u(),a+=d.lines,h+=d.length+1,c.push(d))}function u(){a!=0&&(l.push(c.length==1?c[0]:Ye.from(c,h)),h=-1,a=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new Ye(l,t)}}q.empty=new J([""],0);function af(n){let e=-1;for(let t of n)e+=t.length+1;return e}function kn(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],a=s+l.length;a>=t&&(a>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=a+1}return e}function Ao(n,e,t){return kn(n,[""],e,t)}class gi{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof J?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],o=r>>1,l=s instanceof J?s.text.length:s.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((r&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
||||
`,this;e--}else if(s instanceof J){let a=s.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=s.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof J?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ma{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new gi(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:s}=this.cursor.next(e);return this.pos+=(s.length+e)*t,this.value=s.length<=i?s:t<0?s.slice(s.length-i):s.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class ga{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:s}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=s,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(q.prototype[Symbol.iterator]=function(){return this.iter()},gi.prototype[Symbol.iterator]=ma.prototype[Symbol.iterator]=ga.prototype[Symbol.iterator]=function(){return this});class hf{constructor(e,t,i,s){this.from=e,this.to=t,this.number=i,this.text=s}get length(){return this.to-this.from}}function Jt(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function ie(n,e,t=!0,i=!0){return of(n,e,t,i)}function cf(n){return n>=56320&&n<57344}function ff(n){return n>=55296&&n<56320}function ke(n,e){let t=n.charCodeAt(e);if(!ff(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return cf(i)?(t-55296<<10)+(i-56320)+65536:t}function zr(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function Je(n){return n<65536?1:2}const Gs=/\r\n?|\n/;var we=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(we||(we={}));class et{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){_s(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s,i)}return new et(e)}composeDesc(e){return this.empty?e:e.empty?this:ya(this,e)}mapDesc(e,t=!1){return e.empty?this:Ys(this,e,t)}mapPos(e,t=-1,i=we.Simple){let s=0,r=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=s+l;if(a<0){if(h>e)return r+(e-s);r+=l}else{if(i!=we.Simple&&h>=e&&(i==we.TrackDel&&s<e&&h>e||i==we.TrackBefore&&s<e||i==we.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==s||t<0?r:r+a;r+=a}s=h}if(e>s)throw new RangeError(`Position ${e} is out of range for changeset of length ${s}`);return r}touchesRange(e,t=e){for(let i=0,s=0;i<this.sections.length&&s<=t;){let r=this.sections[i++],o=this.sections[i++],l=s+r;if(o>=0&&s<=t&&l>=e)return s<e&&l>t?"cover":!0;s=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];e+=(e?" ":"")+i+(s>=0?":"+s:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new et(e)}static create(e){return new et(e)}}class te extends et{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return _s(this,(t,i,s,r,o)=>e=e.replace(s,s+(i-t),o),!1),e}mapDesc(e,t=!1){return Ys(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let s=0,r=0;s<t.length;s+=2){let o=t[s],l=t[s+1];if(l>=0){t[s]=l,t[s+1]=o;let a=s>>1;for(;i.length<a;)i.push(q.empty);i.push(o?e.slice(r,r+o):q.empty)}r+=o}return new te(t,i)}compose(e){return this.empty?e:e.empty?this:ya(this,e,!0)}map(e,t=!1){return e.empty?this:Ys(this,e,t,!0)}iterChanges(e,t=!1){_s(this,e,t)}get desc(){return et.crea
Line truncated
|
||||
`}get readOnly(){return this.facet(Aa)}phrase(e,...t){for(let i of this.facet(V.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,s)=>{if(s=="$")return"$";let r=+(s||1);return!r||r>t.length?i:t[r-1]})),e}languageDataAt(e,t,i=-1){let s=[];for(let r of this.facet(wa))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return kf(t.length?t[0]:"")}wordAt(e){let{text:t,from:i,length:s}=this.doc.lineAt(e),r=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=ie(t,o,!1);if(r(t.slice(a,o))!=Y.Word)break;o=a}for(;l<s;){let a=ie(t,l);if(r(t.slice(l,a))!=Y.Word)break;l=a}return o==l?null:x.range(o+i,l+i)}}V.allowMultipleSelections=Qs;V.tabSize=O.define({combine:n=>n.length?n[0]:4});V.lineSeparator=va;V.readOnly=Aa;V.phrases=O.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(s=>n[s]==e[s])}});V.languageData=wa;V.changeFilter=ka;V.transactionFilter=Sa;V.transactionExtender=Ca;es.reconfigure=N.define();function it(n,e,t={}){let i={};for(let s of n)for(let r of Object.keys(s)){let o=s[r],l=i[r];if(l===void 0)i[r]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,r))i[r]=t[r](l,o);else throw new Error("Config merge conflict for field "+r)}for(let s in e)i[s]===void 0&&(i[s]=e[s]);return i}class gt{eq(e){return this==e}range(e,t=e){return tr.create(e,t,this)}}gt.prototype.startSide=gt.prototype.endSide=0;gt.prototype.point=!1;gt.prototype.mapMode=we.TrackDel;function Kr(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let tr=class Da{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new Da(e,t,i)}};function ir(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Ur{constructor(e,t,i,s){this.from=e,this.to=t,this.value=i,this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,s=0){let r=i?this.to:this.from;for(let o=s,l=r.length;;){if(o==l)return o;let a=o+l>>1,h=r[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,s){for(let r=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,r);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let h=this.value[a],c=this.from[a]+e,f=this.to[a]+e,u,d;if(c==f){let p=t.mapPos(c,h.startSide,h.mapMode);if(p==null||(u=d=p,h.startSide!=h.endSide&&(d=t.mapPos(c,h.endSide),d<u)))continue}else if(u=t.mapPos(c,h.startSide),d=t.mapPos(f,h.endSide),u>d||u==d&&h.startSide>0&&h.endSide<=0)continue;(d-u||h.endSide-h.startSide)<0||(o<0&&(o=u),h.point&&(l=Math.max(l,d-u)),i.push(h),s.push(u-o),r.push(d-o))}return{mapped:i.length?new Ur(s,r,i,l):null,pos:o}}}class F{constructor(e,t,i,s){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=s}static create(e,t,i,s){return new F(e,t,i,s)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:s=0,filterTo:r=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(ir)),this.isEmpty)return t.length?F.of(t):this;let l=new Oa(this,null,-1).goto(0),a=0,h=[],c=new ot;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let f=t[a++];c.addInner(f.from,f.to,f.value)||h.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||h.push(tr.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!h.length?F.empty:this.nextLayer.update({add:h,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],h=e.touchesRange(l,l+a.length);if(h===!1)s=Math.max(s,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(h===!0){let{mapped:c,pos:f}=a.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new F(i,t,r||F.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=r&&e<=r+o.length&&o.between(r,e-r,t-r,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return Ai.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ai.from(e).goto(t)}static compare(e,t,i,s,r=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=r),l=t.f
Line truncated
|
||||
`)}static newName(){let e=Lo[Bo]||1;return Lo[Bo]=e+1,rr+e.toString(36)}static mount(e,t,i){let s=e[or],r=i&&i.nonce;s?r&&s.setNonce(r):s=new Cf(e,r),s.mount(Array.isArray(t)?t:[t],e)}}let Eo=new Map;class Cf{constructor(e,t){let i=e.ownerDocument||e,s=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&s.CSSStyleSheet){let r=Eo.get(i);if(r)return e[or]=r;this.sheet=new s.CSSStyleSheet,Eo.set(i,this)}else this.styleTag=i.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[or]=this}mount(e,t){let i=this.sheet,s=0,r=0;for(let o=0;o<e.length;o++){let l=e[o],a=this.modules.indexOf(l);if(a<r&&a>-1&&(this.modules.splice(a,1),r--,a=-1),a==-1){if(this.modules.splice(r++,0,l),i)for(let h=0;h<l.rules.length;h++)i.insertRule(l.rules[h],s++)}else{for(;r<a;)s+=this.modules[r++].rules.length;s+=l.rules.length,r++}}if(i)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let a=0;a<this.modules.length;a++)o+=this.modules[a].getRules()+`
|
||||
`;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var bt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Mi={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Af=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mf=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var he=0;he<10;he++)bt[48+he]=bt[96+he]=String(he);for(var he=1;he<=24;he++)bt[he+111]="F"+he;for(var he=65;he<=90;he++)bt[he]=String.fromCharCode(he+32),Mi[he]=String.fromCharCode(he);for(var ys in bt)Mi.hasOwnProperty(ys)||(Mi[ys]=bt[ys]);function Tf(n){var e=Af&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Mf&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Mi:bt)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function U(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=t[i];typeof s=="string"?n.setAttribute(i,s):s!=null&&(n[i]=s)}e++}for(;e<arguments.length;e++)Ba(n,arguments[e]);return n}function Ba(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Ba(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let xe=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},lr=typeof document<"u"?document:{documentElement:{style:{}}};const ar=/Edge\/(\d+)/.exec(xe.userAgent),La=/MSIE \d/.test(xe.userAgent),hr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xe.userAgent),ts=!!(La||hr||ar),Ro=!ts&&/gecko\/(\d+)/i.test(xe.userAgent),bs=!ts&&/Chrome\/(\d+)/.exec(xe.userAgent),Df="webkitFontSmoothing"in lr.documentElement.style,cr=!ts&&/Apple Computer/.test(xe.vendor),Po=cr&&(/Mobile\/\w+/.test(xe.userAgent)||xe.maxTouchPoints>2);var D={mac:Po||/Mac/.test(xe.platform),windows:/Win/.test(xe.platform),linux:/Linux|X11/.test(xe.platform),ie:ts,ie_version:La?lr.documentMode||6:hr?+hr[1]:ar?+ar[1]:0,gecko:Ro,gecko_version:Ro?+(/Firefox\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,chrome:!!bs,chrome_version:bs?+bs[1]:0,ios:Po,android:/Android\b/.test(xe.userAgent),webkit_version:Df?+(/\bAppleWebKit\/(\d+)/.exec(xe.userAgent)||[0,0])[1]:0,safari:cr,safari_version:cr?+(/\bVersion\/(\d+(\.\d+)?)/.exec(xe.userAgent)||[0,0])[1]:0,tabSize:lr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function jr(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Rn=Object.create(null);function Gr(n,e,t){if(n==e)return!0;n||(n=Rn),e||(e=Rn);let i=Object.keys(n),s=Object.keys(e);if(i.length-0!=s.length-0)return!1;for(let r of i)if(r!=t&&(s.indexOf(r)==-1||n[r]!==e[r]))return!1;return!0}function Of(n,e){for(let t=n.attributes.length-1;t>=0;t--){let i=n.attributes[t].name;e[i]==null&&n.removeAttribute(i)}for(let t in e){let i=e[t];t=="style"?n.style.cssText=i:n.getAttribute(t)!=i&&n.setAttribute(t,i)}}function Io(n,e,t){let i=!1;if(e)for(let s in e)t&&s in t||(i=!0,s=="style"?n.style.cssText="":n.removeAttribute(s));if(t)for(let s in t)e&&e[s]==t[s]||(i=!0,s=="style"?n.style.cssText=t[s]:n.setAttribute(s,t[s]));return i}function Bf(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let i=n.attributes[t];e[i.name]=i.value}return e}class nt{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var fe=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(fe||(fe={}));class E extends gt{constructor(e,t,i,s){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=s}get heightRelevant(){return!1}static mark(e){return new $i(e)}staLine truncated
|
||||
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),h=n.visualLineSide(s,!t)}if(a){if(!a(c))return l}else{if(!i)return h;a=i(c)}l=h}}function bu(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==Y.Space&&(s=o),s==o}}function xu(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return x.cursor(s,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(s,e.assoc||-1),c=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=r<0?h.top:h.bottom;else{let d=n.viewState.lineBlockAt(s);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(s-d.from))),l=(r<0?d.top:d.bottom)+c}let f=a.left+o,u=i??n.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,m=br(n,{x:f,y:p},!1,r);return x.cursor(m.pos,m.assoc,void 0,o)}}function wi(n,e,t){for(;;){let i=0;for(let s of n)s.between(e-1,e+1,(r,o,l)=>{if(e>r&&e<o){let a=i||t||(e-r<o-e?-1:1);e=a<0?r:o,i=a}});if(!i)return e}}function oh(n,e){let t=null;for(let i=0;i<e.ranges.length;i++){let s=e.ranges[i],r=null;if(s.empty){let o=wi(n,s.from,0);o!=s.from&&(r=x.cursor(o,-1))}else{let o=wi(n,s.from,-1),l=wi(n,s.to,1);(o!=s.from||l!=s.to)&&(r=x.range(s.from==s.anchor?o:l,s.from==s.head?o:l))}r&&(t||(t=e.ranges.slice()),t[i]=r)}return t?x.create(t,e.mainIndex):e}function Ss(n,e,t){let i=wi(n.state.facet(Ui).map(s=>s(n)),t.from,e.head>t.from?-1:1);return i==t.from?t:x.cursor(i,i<t.from?1:-1)}class Xe{constructor(e,t){this.pos=e,this.assoc=t}}function br(n,e,t,i){let s=n.contentDOM.getBoundingClientRect(),r=s.top+n.viewState.paddingTop,{x:o,y:l}=e,a=l-r,h;for(;;){if(a<0)return new Xe(0,1);if(a>n.viewState.docHeight)return new Xe(n.state.doc.length,-1);if(h=n.elementAtHeight(a),i==null)break;if(h.type==fe.Text){let u=n.docView.coordsAt(i<0?h.from:h.to,i);if(u&&(i<0?u.top<=a+r:u.bottom>=a+r))break}let f=n.viewState.heightOracle.textHeight/2;a=i>0?h.bottom+f:h.top-f}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==fe.Text){let f=gu(n,s,h,o,l);return new Xe(f,f==h.from?1:-1)}}if(h.type!=fe.Text)return a<(h.top+h.bottom)/2?new Xe(h.from,1):new Xe(h.to,-1);let c=n.docView.lineAt(h.from,2);return(!c||c.length!=h.length)&&(c=n.docView.lineAt(h.from,-2)),lh(n,c,h.from,o,l)}function lh(n,e,t,i,s){let r=-1,o=null,l=1e9,a=1e9,h=s,c=s,f=(u,d)=>{for(let p=0;p<u.length;p++){let m=u[p];if(m.top==m.bottom)continue;let g=m.left>i?m.left-i:m.right<i?i-m.right:0,y=m.top>s?m.top-s:m.bottom<s?s-m.bottom:0;m.top<=c&&m.bottom>=h&&(h=Math.min(m.top,h),c=Math.max(m.bottom,c),y=0),(r<0||(y-a||g-l)<0)&&(r>=0&&a&&l<g&&o.top<=c-2&&o.bottom>=h+2?a=0:(r=d,l=g,a=y,o=m))}};if(e.isText()){for(let d=0;d<e.length;){let p=ie(e.text,d);if(f(Bi(e.dom,d,p).getClientRects(),d),!l&&!a)break;d=p}return i>(o.left+o.right)/2==($o(n,r+t)==G.LTR)?new Xe(t+ie(e.text,r),-1):new Xe(t+r,1)}else{if(!e.length)return new Xe(t,1);for(let m=0;m<e.children.length;m++){let g=e.children[m];if(g.flags&48)continue;let y=(g.dom.nodeType==1?g.dom:Bi(g.dom,0,g.length)).getClientRects();if(f(y,m),!l&&!a)break}let u=e.children[r],d=e.posBefore(u,t);return u.isComposite()||u.isText()?lh(n,u,d,Math.max(o.left,Math.min(o.right,i)),s):i>(o.left+o.right)/2==($o(n,r+t)==G.LTR)?new Xe(d+u.length,-1):new Xe(d,1)}}function $o(n,e){let t=n.state.doc.lineAt(e);return n.bidiSpans(t)[rt.find(n.bidiSpans(t),e-t.from,-1,1)].dir}const di="";class wu{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(V.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=di}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let s=e;;){this.findPointBefore(i,s);let r=this.text.length;this.readNode(s);let o=se.get(s),l=s.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&i!=this.view.contentDOM&&this.lineBreak();break}let a=se.get(l);(o&&a?o.breakAfter:(o?o.breakAfter:Pn(s))||Pn(l)&&(s.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>r)&&!ku(l,t)&&this.lineBreak(),s=l}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let r=-1,o=1,l;if(this.lineSeparator?(r=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=s.exec(t))&&(r=l.index,o=l[0].length),this.append(t.slice(i,r<0?t.length:r)),r<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=r+o}}readNode(e){let t=se.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let s=i.iter();!s.next().done;)s.lineBreak?this.lineBreak():this.append(s.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(vu(e,i.no
Line truncated
|
||||
`&&n.lineWrapping&&(i&&(i=x.single(i.main.anchor-1,i.main.head-1)),t={from:s.from,to:s.to,insert:q.of([" "])}),t)return Zr(n,t,i,r);if(i&&!i.main.eq(s)){let o=!1,l="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(o=!0),l=n.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=oh(n.state.facet(Ui).map(a=>a(n)),i))),n.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function Zr(n,e,t,i=-1){if(D.ios&&n.inputState.flushIOSKey(e))return!0;let s=n.state.selection.main;if(D.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&n.state.sliceDoc(e.from,s.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&jt(n.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>s.head)&&jt(n.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&e.insert.length==0&&jt(n.contentDOM,"Delete",46)))return!0;let r=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=Cu(n,e,t));return n.state.facet(Ga).some(a=>a(n,e.from,e.to,r,l))||n.dispatch(l()),!0}function Cu(n,e,t){let i,s=n.state,r=s.selection.main,o=-1;if(e.from==e.to&&e.from<r.from||e.from>r.to){let a=e.from<r.from?-1:1,h=a<0?r.from:r.to,c=wi(s.facet(Ui).map(f=>f(n)),h,a);e.from==c&&(o=c)}if(o>-1)i={changes:e,selection:x.cursor(e.from+e.insert.length,-1)};else if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let a=r.from<e.from?s.sliceDoc(r.from,e.from):"",h=r.to>e.to?s.sliceDoc(e.to,r.to):"";i=s.replaceSelection(n.state.toText(a+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let a=s.changes(e),h=t&&t.main.to<=a.newLength?t.main:void 0;if(s.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=r.to+10&&e.to>=r.to-10){let c=n.state.sliceDoc(e.from,e.to),f,u=t&&rh(n,t.main.head);if(u){let p=e.insert.length-(e.to-e.from);f={from:u.from,to:u.to-p}}else f=n.state.doc.lineAt(r.head);let d=r.to-e.to;i=s.changeByRange(p=>{if(p.from==r.from&&p.to==r.to)return{changes:a,range:h||p.map(a)};let m=p.to-d,g=m-c.length;if(n.state.sliceDoc(g,m)!=c||m>=f.from&&g<=f.to)return{range:p};let y=s.changes({from:g,to:m,insert:e.insert}),k=p.to-r.to;return{changes:y,range:h?x.range(Math.max(0,h.anchor+k),Math.max(0,h.head+k)):p.map(y)}})}else i={changes:a,selection:h&&s.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:l,scrollIntoView:!0})}function ch(n,e,t,i){let s=Math.min(n.length,e.length),r=0;for(;r<s&&n.charCodeAt(r)==e.charCodeAt(r);)r++;if(r==s&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,r-Math.min(o,l));t-=o+a-r}if(o<r&&n.length<e.length){let a=t<=r&&t>=o?r-t:0;r-=a,l=r+(l-o),o=r}else if(l<r){let a=t<=r&&t>=l?r-t:0;r-=a,o=r+(o-l),l=r}return{from:r,toA:o,toB:l}}function Au(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:s,focusOffset:r}=n.observer.selectionRange;return t&&(e.push(new Ko(t,i)),(s!=t||r!=i)&&e.push(new Ko(s,r))),e}function Mu(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?x.single(t+e,i+e):null}class Tu{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,D.safari&&e.contentDOM.addEventListener("input",()=>null),D.gecko&&qu(e.contentDOM.ownerDocument)}handleEvent(e){!Iu(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let i=this.handlers[e];if(i){for(let s of i.observers)s(this.view,t);for(let s of i.handlers){if(t.defaultPrevented)break;if(s(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Du(e),i=this.handlers,s=this.view.contentDOM;for(let r in t)if(r!="scroll"){let o=!t[r].handlers.length,l=i[r];l&&o!=!l.handlers.length&&(s.removeEventListener(r
Line truncated
|
||||
`))};if((D.mac||D.android)&&f.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(f={from:l,to:a,insert:q.of([i.text.replace("."," ")])}),this.pendingContextChange=f,!e.state.readOnly){let u=this.to-this.from+(f.to-f.from+f.insert.length);Zr(e,f,x.single(this.toEditorPos(i.selectionStart,u),this.toEditorPos(i.selectionEnd,u)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),f.from<f.to&&!f.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(t.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let s=[],r=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let a=e.coordsForChar(o);r=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||r||new DOMRect,s.push(r)}t.updateCharacterBounds(i.rangeStart,s)},this.handlers.textformatupdate=i=>{let s=[];for(let r of i.getTextFormats()){let o=r.underlineStyle,l=r.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let a=this.toEditorPos(r.rangeStart),h=this.toEditorPos(r.rangeEnd);if(a<h){let c=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;s.push(E.mark({attributes:{style:c}}).range(a,h))}}}e.dispatch({effects:Qa.of(E.set(s))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)t.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let s=Di(i.root);s&&s.rangeCount&&this.editContext.updateSelectionBounds(s.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,i=!1,s=this.pendingContextChange;return e.changes.iterChanges((r,o,l,a,h)=>{if(i)return;let c=h.length-(o-r);if(s&&o>=s.to)if(s.from==r&&s.to==o&&s.insert.eq(h)){s=this.pendingContextChange=null,t+=c,this.to+=c;return}else s=null,this.revertPending(e.state);if(r+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(r<this.to){if(r<this.from||o>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(r),this.toContextPos(o),h.toString()),this.to+=c}t+=c}),s&&!i&&this.revertPending(e.state),!i}update(e){let t=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(s=>!s.isUserEvent("input.type")&&s.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),s=this.toContextPos(t.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=s)&&this.editContext.updateSelection(i,s)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class M{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureReque
Line truncated
|
||||
--\u2028\u2029\uFEFF-]`,Cr),Md={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ms=null;function Td(){var n;if(Ms==null&&typeof document<"u"&&document.body){let e=document.body.style;Ms=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Ms||!1}const Tn=O.define({combine(n){let e=it(n,{render:null,specialChars:Ad,addSpecialChars:null});return(e.replaceTabs=!Td())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,Cr)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Cr)),e}});function Dd(n={}){return[Tn.of(n),Od()]}let fl=null;function Od(){return fl||(fl=Q.fromClass(class{constructor(n){this.view=n,this.decorations=E.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(Tn)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Cd({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ke(e[0],0);if(r==9){let o=s.lineAt(i),l=t.state.tabSize,a=si(o.text,l,i-o.from);return E.replace({widget:new Rd((l-a%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=E.replace({widget:new Ed(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(Tn);n.startState.facet(Tn)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const Bd="•";function Ld(n){return n>=32?Bd:n==10?"":String.fromCharCode(9216+n)}class Ed extends nt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Ld(this.code),i=e.state.phrase("Control character")+" "+(Md[this.code]||"0x"+this.code.toString(16)),s=this.options.render&&this.options.render(this.code,i,t);if(s)return s;let r=document.createElement("span");return r.textContent=t,r.title=i,r.setAttribute("aria-label",i),r.className="cm-specialChar",r}ignoreEvent(){return!1}}class Rd extends nt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function Pd(){return Nd}const Id=E.line({class:"cm-activeLine"}),Nd=Q.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){let s=n.lineBlockAt(i.head);s.from>e&&(t.push(Id.range(s.from)),e=s.from)}return E.set(t)}},{decorations:n=>n.decorations});class Wd extends nt{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement("span");return t.className="cm-placeholder",t.style.pointerEvents="none",t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),t.setAttribute("aria-hidden","true"),t}coordsAt(e){let t=e.firstChild?bi(e.firstChild):[];if(!t.length)return null;let i=window.getComputedStyle(e.parentNode),s=Oi(t[0],i.direction!="rtl"),r=parseInt(i.lineHeight);return s.bottom-s.top>r*1.5?{left:s.left,right:s.right,top:s.top,bottom:s.top+r}:s}ignoreEvent(){return!1}}function Hd(n){let e=Q.fromClass(class{constructor(t){this.view=t,this.placeholder=n?E.set([E.widget({widget:new Wd(n),side:1}).range(0)]):E.none}get decorations(){return this.view.state.doc.length?E.none:this.placeholder}},{decorations:t=>t.decorations});return typeof n=="string"?[e,M.contentAttributes.of({"aria-placeholder":n})]:e}const Ar=2e3;function Fd(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ar||t.off>Ar||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=s;a++){let h=n.doc.line(a);h.length<=l&&r.push(x.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=s;a++){let h=n.doc.line(a),c=sr(h.text,o,n.tabSize,!0);if(c<0)r.push(x.cursor(h.to));else{let f=sr(h.text,l,n.tabSize);r.push(x.range(h.from+c,h.from+f))}}}return r}function Vd(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function ul(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),s=t-i.from,r=s>Ar?-1:s==i.length?Vd(n,e.clientX):si(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function zd(n,e){let t=ul(n,e),i=n.stat
Line truncated
|
||||
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new e0(this):new Qg(this)}getCursor(e,t=0,i){let s=e.doc?e:V.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Ft(this,s,t,i):Ht(this,s,t,i)}}class Wc{constructor(e){this.spec=e}}function Ht(n,e,t,i){return new ii(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?Xg(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function Xg(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),(e(_n(s,t-r))!=Y.Word||e(Yn(s,t-r))!=Y.Word)&&(e(Yn(s,i-r))!=Y.Word||e(_n(s,i-r))!=Y.Word))}class Qg extends Wc{constructor(e){super(e)}nextMatch(e,t,i){let s=Ht(this.spec,e,i,e.doc.length).nextOverlapping();if(s.done){let r=Math.min(e.doc.length,t+this.spec.unquoted.length);s=Ht(this.spec,e,0,r).nextOverlapping()}return s.done||s.value.from==t&&s.value.to==i?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Ht(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){let s=this.prevMatchInRange(e,0,t);return s||(s=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),s&&(s.from!=t||s.to!=i)?s:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let i=Ht(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ht(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}function Ft(n,e,t,i){return new Pc(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?Zg(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function _n(n,e){return n.slice(ie(n,e,!1),e)}function Yn(n,e){return n.slice(e,ie(n,e))}function Zg(n){return(e,t,i)=>!i[0].length||(n(_n(i.input,i.index))!=Y.Word||n(Yn(i.input,i.index))!=Y.Word)&&(n(Yn(i.input,i.index+i[0].length))!=Y.Word||n(_n(i.input,i.index+i[0].length))!=Y.Word)}class e0 extends Wc{nextMatch(e,t,i){let s=Ft(this.spec,e,i,e.doc.length).next();return s.done&&(s=Ft(this.spec,e,0,t).next()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=1;;s++){let r=Math.max(t,i-s*1e4),o=Ft(this.spec,e,r,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(r==t||l.from>r+10))return l;if(r==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let s=i.length;s>0;s--){let r=+i.slice(0,s);if(r>0&&r<e.match.length)return e.match[r]+i.slice(s)}return t})}matchAll(e,t){let i=Ft(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(s.length>=t)return null;s.push(i.value)}return s}highlight(e,t,i,s){let r=Ft(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const Hi=N.define(),po=N.define(),mt=ue.define({create(n){return new Fs(Fr(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Hi)?n=new Fs(t.value.create(),n.panel):t.is(po)&&(n=new Fs(n.query,t.value?mo:null));return n},provide:n=>Pi.from(n,e=>e.panel)});class Fs{constructor(e,t){this.query=e,this.panel=t}}const t0=E.mark({class:"cm-searchMatch"}),i0=E.mark({class:"cm-searchMatch cm-searchMatch-selected"}),n0=Q.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(mt))}update(n){let e=n.state.field(mt);(e!=n.startState.field(mt)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return E.none;let{view:t}=this,i=new ot;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:a}=r[s];for(;s<o-1&&a>r[s+1].from-500;)a=r[++s].to;n.highlight(t.state,l,a,(h,c)=>{let f=t.state.selection.ranges.some(u=>u.from==h&&u.to==c);i.add(h,c,f?i0:t0)})}return i.finish()}},{decorations:n=>n.decorations});function Ji(n){return e=>{let t=e.state.field(mt,!1);return t&&t.query.spec.valid?n(e,t):Vc(e)}}const Jn=Ji((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state,t,t);if(!i)return!1;let s=x.single(i.from,i.to),r=n.state.facet(oi);return n.dispatch({selection:s,effects:[go(n,i),r.scrollToMatch(s.main,n)],userEvent:"select.search"}),Fc(n),!0}),Xn=Ji((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,s=e.prevMatch(t,i,i);if(!s)return!1;let r=x.single(s.from,s.to),o=n.state.facet(oi);return n.dispatch({selection:r,effects:[go(n,s),o.scrollToMatch(r.main,n)],userEvent:"select.search"}),Fc(n),!0}),s0=Ji((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:x.create(t.map(i=>x.range(i.from,i.to))),use
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{P as F,N as j,a as L,D as M,b as w,T as P,I as W,s as G,t as m,L as Z,c as E,i as V,f as X,d as R,e as Y}from"./codemirror-core-782AVq39.js";var y={};class T{constructor(t,e,s,i,h,r,n,o,a,f=0,l){this.p=t,this.stack=e,this.state=s,this.reducePos=i,this.pos=h,this.score=r,this.buffer=n,this.bufferBase=o,this.curContext=a,this.lookAhead=f,this.parent=l}toString(){return`[${this.stack.filter((t,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,s=0){let i=t.parser.context;return new T(t,[],e,s,s,0,[],0,i?new N(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let s=t>>19,i=t&65535,{parser:h}=this.p,r=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),n=h.dynamicPrecedence(i);if(n&&(this.score+=n),s==0){this.pushState(h.getGoto(this.state,i,!0),this.reducePos),i<h.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,r?8:4,!0),this.reduceContext(i,this.reducePos);return}let o=this.stack.length-(s-1)*3-(t&262144?6:0),a=o?this.stack[o-2]:this.p.ranges[0].from,f=this.reducePos-a;f>=2e3&&!(!((e=this.p.parser.nodeSet.types[i])===null||e===void 0)&&e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=f));let l=o?this.stack[o-1]:0,p=this.bufferBase+this.buffer.length-l;if(i<h.minRepeatTerm||t&131072){let c=h.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,a,c,p+4,!0)}if(t&262144)this.state=this.stack[o];else{let c=this.stack[o-3];this.state=h.getGoto(c,i,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(i,a)}storeNode(t,e,s,i=4,h=!1){if(t==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let r=this,n=this.buffer.length;if(n==0&&r.parent&&(n=r.bufferBase-r.parent.bufferBase,r=r.parent),n>0&&r.buffer[n-4]==0&&r.buffer[n-1]>-1){if(e==s)return;if(r.buffer[n-2]>=e){r.buffer[n-2]=s;return}}}if(!h||this.pos==s)this.buffer.push(t,e,s,i);else{let r=this.buffer.length;if(r>0&&(this.buffer[r-4]!=0||this.buffer[r-1]<0)){let n=!1;for(let o=r;o>0&&this.buffer[o-2]>s;o-=4)if(this.buffer[o-1]>=0){n=!0;break}if(n)for(;r>0&&this.buffer[r-2]>s;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4)}this.buffer[r]=t,this.buffer[r+1]=e,this.buffer[r+2]=s,this.buffer[r+3]=i}}shift(t,e,s,i){if(t&131072)this.pushState(t&65535,this.pos);else if((t&262144)==0){let h=t,{parser:r}=this.p;(i>this.pos||e<=r.maxNode)&&(this.pos=i,r.stateFlag(h,1)||(this.reducePos=i)),this.pushState(h,s),this.shiftContext(e,s),e<=r.maxNode&&this.buffer.push(e,s,i,4)}else this.pos=i,this.shiftContext(e,s),e<=this.p.parser.maxNode&&this.buffer.push(e,s,i,4)}apply(t,e,s,i){t&65536?this.reduce(t):this.shift(t,e,s,i)}useNode(t,e){let s=this.p.reused.length-1;(s<0||this.p.reused[s]!=t)&&(this.p.reused.push(t),s++);let i=this.pos;this.reducePos=this.pos=i+t.length,this.pushState(e,i),this.buffer.push(s,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let s=t.buffer.slice(e),i=t.bufferBase+e;for(;t&&i==t.bufferBase;)t=t.parent;return new T(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,s,i,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let s=t<=this.p.parser.maxNode;s&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,s?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new U(this);;){let s=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(s==0)return!1;if((s&65536)==0)return!0;e.reduce(s)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let h=0,r;h<e.length;h+=2)(r=e[h+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[h],r);if(this.stack.length<120)for(let h=0;i.length<8&&h<e.length;h+=2){let r=e[h+1];i.some((n,o)=>o&1&&n==r)||i.push(e[h],r)}e=i}let s=[];for(let i=0;i<e.length&&s.length<4;i+=2){let h=e[i+1];if(h==this.state)continue;let r=this.split();r.pushState(h,this.pos),r.storeNode(0,r.pos,r.pos,4,!0),r.shiftContext(e[i],this.pos),r.reducePos=this.pos,r.score-=200,s.push(r)}return s}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if((e&65536)==0)return!1;if(!t.validAction(this.state,e)){let s=e>>19,i=e&65535,h=this.stack.length-s*3;if(h<0||t.getGoto(this.stack[h],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;e=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}fLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e}from"./react-vendor-jWT2yUdV.js";import{c as r}from"./index-DiaaLdUu.js";const n=({icon:d,title:l,description:a,action:s,compact:t=!1,className:x})=>e.jsxs("div",{className:r("w-full flex flex-col items-center justify-center text-center","rounded-2xl border border-dashed border-default-200/80 dark:border-white/10","bg-white/40 dark:bg-white/[0.02]",t?"py-8 px-4 gap-1.5":"py-14 px-6 gap-2",x),children:[e.jsx("div",{className:r("rounded-2xl flex items-center justify-center text-primary-500","bg-gradient-to-br from-primary-100/80 to-secondary-100/60","dark:from-primary-900/30 dark:to-secondary-900/20",t?"w-11 h-11 text-lg mb-1":"w-14 h-14 text-2xl mb-2"),children:d}),e.jsx("p",{className:r("font-semibold text-default-700 dark:text-default-200",t?"text-small":"text-base"),children:l}),a&&e.jsx("p",{className:"text-tiny text-default-400 max-w-sm leading-relaxed",children:a}),s&&e.jsx("div",{className:"mt-2",children:s})]});export{n as E};
|
||||
@@ -0,0 +1,2 @@
|
||||
import{r,j as t}from"./react-vendor-jWT2yUdV.js";import{t as L,a as S}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{P as $,b as C,s as M}from"./index-DiaaLdUu.js";import{z}from"./react-hot-toast-cGcFZPSt.js";import{a as R}from"./index-DvErMbt6.js";import{w}from"./index-DE7yoXMZ.js";import{E as _}from"./empty_state-BmDJmEaB.js";import{P as U}from"./page_header-Dr2OAQrb.js";import{P as W}from"./plugin_manager-OIjldREQ.js";import"./qface-BZLvZXJ8.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./react-router-dom-C6k78GT4.js";import"./iconBase-B7bT1FlI.js";function ne(){const[u,d]=r.useState(!0),[o,p]=r.useState([]),[a,m]=r.useState(""),[P,f]=r.useState(!1),g=async()=>{var e;d(!0);try{const s=await W.getPluginList();s.pluginManagerNotFound?p([]):(p(s.extensionPages||[]),((e=s.extensionPages)==null?void 0:e.length)>0&&!a&&m(`${s.extensionPages[0].pluginId}:${s.extensionPages[0].path}`))}catch(s){const i=s.message;z.error(`获取扩展页面失败: ${i}`)}finally{d(!1)}},j=async()=>{await g()},N=r.useMemo(()=>o.map(e=>({key:`${e.pluginId}:${e.path}`,title:e.title,pluginId:e.pluginId,pluginName:e.pluginName,path:e.path,icon:e.icon,description:e.description})),[o]),c=r.useMemo(()=>{if(!a)return"";const[e,...s]=a.split(":"),i=s.join(":").replace(/^\//,"");return`/plugin/${e}/page/${i}`},[a]);r.useEffect(()=>{g()},[]),r.useEffect(()=>{c&&f(!0)},[c]);const k=()=>{f(!1)},y=(e,s)=>{const i=s.replace(/^\//,""),E=`/plugin/${e}/page/${i}`;window.open(E,"_blank")},n=r.useRef(null),l=r.useRef(!1),x=r.useRef(0),h=r.useRef(0),v=r.useCallback(e=>{const s=n.current;s&&(l.current=!0,x.current=e.clientX,h.current=s.scrollLeft,s.setPointerCapture(e.pointerId),s.style.cursor="grabbing",s.style.userSelect="none")},[]),I=r.useCallback(e=>{if(!l.current||!n.current)return;const s=e.clientX-x.current;n.current.scrollLeft=h.current-s},[]),b=r.useCallback(e=>{!l.current||!n.current||(l.current=!1,n.current.releasePointerCapture(e.pointerId),n.current.style.cursor="grab",n.current.style.userSelect="")},[]);return t.jsxs(t.Fragment,{children:[t.jsx("title",{children:"扩展页面 - SnowCat WebUI"}),t.jsxs("div",{className:"sc-page h-[calc(100vh-3.5rem)] flex flex-col",children:[t.jsx($,{loading:u}),t.jsx(U,{icon:t.jsx(w,{size:20}),title:"扩展页面",description:"插件注册的扩展界面,可直接在控制台内打开",accent:"secondary",actions:t.jsx(C,{isIconOnly:!0,className:"bg-white/60 dark:bg-white/10 text-default-600 dark:text-default-300 backdrop-blur-md hover:bg-white/80 dark:hover:bg-white/20",radius:"full",onPress:j,children:t.jsx(R,{size:22})})}),o.length>0&&t.jsx("div",{ref:n,className:"overflow-x-auto min-w-0 w-full mb-3 scrollbar-thin scrollbar-thumb-default-300 scrollbar-track-transparent cursor-grab touch-pan-x",style:{WebkitOverflowScrolling:"touch"},onPointerDown:v,onPointerMove:I,onPointerUp:b,onPointerCancel:b,children:t.jsx(L,{"aria-label":"Extension Pages",className:"w-max min-w-full",selectedKey:a,onSelectionChange:e=>m(e),classNames:{tabList:"sc-tablist flex-nowrap",cursor:"sc-tab-cursor",panel:"hidden"},children:N.map(e=>t.jsx(S,{title:t.jsxs("div",{className:"flex items-center gap-2 whitespace-nowrap",children:[e.icon&&t.jsx("span",{children:e.icon}),t.jsx("span",{className:"cursor-pointer hover:underline truncate max-w-[6rem] md:max-w-none",title:`插件:${e.pluginName}
|
||||
点击在新窗口打开`,onClick:s=>{s.stopPropagation(),y(e.pluginId,e.path)},children:e.title}),t.jsxs("span",{className:"text-xs text-default-400 hidden md:inline",children:["(",e.pluginName,")"]})]})},e.key))})}),o.length===0&&!u?t.jsx(_,{icon:t.jsx(w,{size:22}),title:"暂无插件扩展页面",description:"插件可以通过注册页面来扩展 WebUI 功能,注册后会在这里出现。",className:"flex-1"}):t.jsxs("div",{className:"flex-1 min-h-0 sc-panel overflow-hidden relative",children:[P&&t.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/40 dark:bg-black/30 backdrop-blur-sm z-10",children:t.jsx(M,{size:"lg"})}),t.jsx("iframe",{src:c,className:"w-full h-full border-0",onLoad:k,title:"extension-page",allow:"clipboard-read; clipboard-write; fullscreen"})]})]})]})}export{ne as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{g as a,a as e,c as n}from"./gestures-BHfQC-M8.js";const s={renderer:n,...e,...a};export{s as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{z as r}from"./react-hot-toast-cGcFZPSt.js";import{L as o}from"./index-DiaaLdUu.js";class p{static async listFiles(t="/"){const{data:a}=await o.get(`/File/list?path=${encodeURIComponent(t)}`);return a.data}static async listDirectories(t="/"){const{data:a}=await o.get(`/File/list?path=${encodeURIComponent(t)}&onlyDirectory=true`);return a.data}static async createDirectory(t){const{data:a}=await o.post("/File/mkdir",{path:t});return a.data}static async delete(t){const{data:a}=await o.post("/File/delete",{path:t});return a.data}static async readFile(t){const{data:a}=await o.get(`/File/read?path=${encodeURIComponent(t)}`);return a.data}static async writeFile(t,a){const{data:e}=await o.post("/File/write",{path:t,content:a});return e.data}static async createFile(t){const{data:a}=await o.post("/File/create",{path:t});return a.data}static async batchDelete(t){const{data:a}=await o.post("/File/batchDelete",{paths:t});return a.data}static async rename(t,a){const{data:e}=await o.post("/File/rename",{oldPath:t,newPath:a});return e.data}static async move(t,a){const{data:e}=await o.post("/File/move",{sourcePath:t,targetPath:a});return e.data}static async batchMove(t){const{data:a}=await o.post("/File/batchMove",{items:t});return a.data}static download(t){const a=`/File/download?path=${encodeURIComponent(t)}`;r.promise(o.post(a,void 0,{responseType:"blob"}).catch(e=>{throw console.error(e),new Error("下载失败")}),{loading:"正在下载文件...",success:"下载成功",error:"下载失败"}).then(e=>{const s=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=s;let c=t.split("/").pop()||"";t.split(".").length===1&&(c+=".zip"),n.setAttribute("download",c),document.body.appendChild(n),n.click(),document.body.removeChild(n)}).catch(e=>{console.error(e)})}static async batchDownload(t){r.promise(o.post("/File/batchDownload",{paths:t},{responseType:"blob"}).catch(e=>{throw console.error(e),new Error("下载失败")}),{loading:"正在下载文件...",success:"下载成功",error:"下载失败"}).then(e=>{const s=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=s,n.setAttribute("download","files.zip"),document.body.appendChild(n),n.click(),document.body.removeChild(n)}).catch(e=>{console.error(e)})}static async downloadToURL(t){const a=`/File/download?path=${encodeURIComponent(t)}`,e=await o.post(a,void 0,{responseType:"blob"});return window.URL.createObjectURL(new Blob([e.data]))}static async upload(t,a){const e=new FormData;a.forEach(n=>{e.append("files",n)});const{data:s}=await o.post(`/File/upload?path=${encodeURIComponent(t)}`,e,{headers:{"Content-Type":"multipart/form-data"}});return s.data}static async uploadWebUIFont(t){const a=new FormData;a.append("file",t);const{data:e}=await o.post("/File/font/upload/webui",a,{headers:{"Content-Type":"multipart/form-data"}});return e.data}static async deleteWebUIFont(){const{data:t}=await o.post("/File/font/delete/webui");return t.data}static async checkWebUIFontExists(){const{data:t}=await o.get("/File/font/exists/webui");return t.data}}export{p as F};
|
||||
@@ -0,0 +1,8 @@
|
||||
import{r as v,j as p,R as T,d as Vi}from"./react-vendor-jWT2yUdV.js";import{c as kl,b as Cl,a as $l}from"./chunk-B75B6XQK-aFCr8AK6.js";import{t as hn,f as yn,Z as Dl,_ as El,v as Un,x as Wi,a0 as si,y as Sl,B as jl,E as Le,a1 as Al,O as Qt,Q as en,R as tn,S as nn,b as te,T as an,s as Zt,a2 as Lt,a3 as zl,a4 as Bl,a5 as xn,a6 as Yn,a7 as Fl,a8 as Ht,a9 as Nl,aa as ui,ab as kt,ac as Pl,ad as Tt,ae as pn,af as ci,ag as Il,ah as Ml,$ as Xn,c as Fn,u as Rl,k as Tl}from"./index-DiaaLdUu.js";import{i as Gn,$ as Li,a as Ol,b as Hi,c as Kl,d as _l}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{g as Zn}from"./qface-BZLvZXJ8.js";import{_ as Ft,u as qi}from"./useRequest-B1BwPztr.js";import{z as pe}from"./react-hot-toast-cGcFZPSt.js";import{F as Ui,a as Vl,b as Yi,c as Wl,d as Ll,e as di}from"./index-CVa9XolR.js";import{i as Hl}from"./index-DE7yoXMZ.js";import{C as ql,g as Ul,h as Yl}from"./code_editor-TFSnOENo.js";import{G as Xl}from"./iconBase-B7bT1FlI.js";import{F as De}from"./file_manager-BG19iFYW.js";import{i as Gl,m as Zl,a as Be,c as pi,s as Jl,$ as qt,b as $e,d as X,u as Ye,o as Xi,p as Ql}from"./chunk-APIAPHLK-nGgOe_Nr.js";import{f as at}from"./chunk-RJKRL3AU-CjtrMR1U.js";import{$ as Ee,a as Dt,b as $t,c as ln,d as Jn,e as er,f as Gi,g as Ot,h as tr,i as nr,j as ir}from"./SelectionManager-Dl9uHsLK.js";import{$ as Zi}from"./usePress-BrNwsdVw.js";import{$ as ar}from"./useFocusable-DA5Croun.js";import{$ as Qn}from"./useHover-DC1o5-bm.js";import{$ as or}from"./useToggle-B3ZYBe5S.js";import{f as lr}from"./chunk-SLABUSGS-Cmz8sGrU.js";import{$ as rr,a as Ji}from"./DOMLayoutDelegate-DOgfSALU.js";import{$ as sr}from"./index-BV9-YCKp.js";import{a as ur}from"./index-Bz8pD9tN.js";import{E as cr}from"./empty_state-BmDJmEaB.js";import{f as dr,g as mi,h as pr,i as mr,j as fr,k as vr,l as hr,m as xr,n as gr,o as br,p as yr,q as wr,r as kr}from"./index-_HIxriDC.js";import{i as Cr}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{w as $r,x as Dr}from"./index-FvTxWQTZ.js";import{u as Er}from"./use-dialog-CRIMuzeE.js";import{b as Sr,u as jr}from"./react-router-dom-C6k78GT4.js";import{m as Ar}from"./proxy-BsRmjYPH.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./codemirror-core-782AVq39.js";import"./codemirror-lang-DFaD5e7G.js";import"./index-BsnVex0g.js";import"./gestures-BHfQC-M8.js";import"./layout-Buao20KT.js";var fi=hn({base:"w-px h-px inline-block",variants:{isInline:{true:"inline-block",false:"block"}},defaultVariants:{isInline:!1}}),vi=hn({slots:{base:"flex flex-col relative gap-4",wrapper:["p-4","z-0","flex","flex-col","relative","justify-between","gap-4","shadow-small","bg-content1","overflow-auto"],table:"min-w-full h-auto",thead:"[&>tr]:first:rounded-lg",tbody:"",tr:["group/tr","outline-none",...yn],th:["group/th","px-3","h-10","text-start","align-middle","bg-default-100","whitespace-nowrap","text-foreground-500","text-tiny","font-semibold","first:rounded-s-lg","last:rounded-e-lg","outline-none","data-[sortable=true]:cursor-pointer","data-[hover=true]:text-foreground-400",...yn],td:["py-2","px-3","relative","align-middle","whitespace-normal","text-small","font-normal","outline-none","[&>*]:z-1","[&>*]:relative",...yn,"before:content-['']","before:absolute","before:z-0","before:inset-0","before:opacity-0","data-[selected=true]:before:opacity-100","group-data-[disabled=true]/tr:text-foreground-300","group-data-[disabled=true]/tr:cursor-not-allowed"],tfoot:"",sortIcon:["ms-2","mb-px","opacity-0","text-inherit","inline-block","transition-transform-opacity","data-[visible=true]:opacity-100","group-data-[hover=true]/th:opacity-100","data-[direction=ascending]:rotate-180"],emptyWrapper:"text-foreground-400 align-middle text-center h-40",loadingWrapper:"absolute inset-0 flex items-center justify-center"},variants:{color:{default:{td:"before:bg-default/60 data-[selected=true]:text-default-foreground"},primary:{td:"before:bg-primary/20 data-[selected=true]:text-primary"},secondary:{td:"before:bg-secondary/20 data-[selected=true]:text-secondary"},success:{td:"before:bg-success/20 data-[selected=true]:text-success-600 dark:data-[selected=true]:text-success"},warning:{td:"before:bg-warning/20 data-[selected=true]:text-warning-600 dark:data-[selected=true]:text-warning"},danger:{td:"before:bg-danger/20 data-[selected=true]:text-danger dark:data-[selected=true]:text-danger-500"}},layout:{auto:{table:"table-auto"},fixed:{table:"table-fixed"}},radius:{none:{wrapper:"rounded-none"},sm:{wrapper:"rounded-small"},md:{wrapper:"rounded-medium"},lg:{wrapper:"rounded-large"}},shadow:{none:{wrapper:"shadow-none"},sm:{wrapper:"shadow-small"},md:{wrapper:"shadow-medium"},lg:{wrapper:"shadow-large"}},hideHeader:{true:{thead:"hidden"}},isStriped:{true:{td:["group-data-[odd=true]/tr:before:bg-default-100","group-data-[odd=true]/tr:before:opacity-100","group-data-[odd=true]/tr:before:-z-10"]}},isCompact:{true:{td:"py-1"},false:{}},isHeaderSticky:{true:{thead:"sticky top-0 z-20 [&>tr]:first:shadow-small"}},isSelectable:{true:{Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function is(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function as(e){if(Array.isArray(e))return Pn(e)}function Di(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function Ei(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Di(Object(n),!0).forEach(function(i){aa(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Di(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e,t){return rs(e)||ls(e,t)||oa(e,t)||os()}function os(){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 oa(e,t){if(e){if(typeof e=="string")return Pn(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 Pn(e,t)}}function Pn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function ls(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],o=!0,a=!1,l,r;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(i.push(l.value),!(t&&i.length===t));o=!0);}catch(s){a=!0,r=s}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw r}}return i}}function rs(e){if(Array.isArray(e))return e}var ss=typeof Dn=="function"?Dn:Dn.default,us="file-invalid-type",cs="file-too-large",ds="file-too-small",ps="too-many-files",ms=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),i=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:us,message:"File type must be ".concat(i)}},Si=function(t){return{code:cs,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ji=function(t){return{code:ds,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},fs={code:ps,message:"Too many files"};function la(e,t){var n=e.type==="application/x-moz-file"||ss(e,t);return[n,n?null:ms(t)]}function ra(e,t,n){if(zt(e.size))if(zt(t)&&zt(n)){if(e.size>n)return[!1,Si(n)];if(e.size<t)return[!1,ji(t)]}else{if(zt(t)&&e.size<t)return[!1,ji(t)];if(zt(n)&&e.size>n)return[!1,Si(n)]}return[!0,null]}function zt(e){return e!=null}function vs(e){var t=e.files,n=e.accept,i=e.minSize,o=e.maxSize,a=e.multiple,l=e.maxFiles,r=e.validator;return!a&&t.length>1||a&&l>=1&&t.length>l?!1:t.every(function(s){var c=la(s,n),u=Jt(c,1),d=u[0],f=ra(s,i,o),m=Jt(f,1),h=m[0],x=r?r(s):null;return d&&h&&!x})}function fn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function sn(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 Ai(e){e.preventDefault()}function hs(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function xs(e){return e.indexOf("Edge/")!==-1}function gs(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hs(e)||xs(e)}function nt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];return t.some(function(r){return!fn(i)&&r&&r.apply(void 0,[i].concat(a)),fn(i)})}}function bs(){return"showOpenFilePicker"in window}function ys(e){if(zt(e)){var t=Object.entries(e).filter(function(n){var i=Jt(n,2),o=i[0],a=i[1],l=!0;return sa(o)||(console.warn('Skipped "'.concat(o,'" 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(a)||!a.every(ua))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),l=!1),l}).reduce(function(n,i){var o=Jt(i,2),a=o[0],l=o[1];return Ei(Ei({},n),{},aa({},a,l))},{});return[{description:"Files",accept:t}]}return e}function ws(e){if(zt(e))return Object.entries(e).reduce(function(t,n){var i=Jt(n,2),o=i[0],a=i[1];return[].concat($i(t),[o],$i(a))},[]).filter(function(t){return sa(t)||ua(t)}).join(",")}function ks(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Cs(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function sa(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function ua(e){return/^.*\.[\w]+$/.test(e)}var $s=["children"],Ds=["open"],Es=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Ss=["refKey","onChange","onClick"];function js(e){return Bs(e)||zs(e)||ca(e)||As()}function As(){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 zs(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bs(e){if(Array.isArray(e))return In(e)}function En(e,t){return Ps(e)||Ns(e,t)||ca(e,t)||Fs()}function Fs(){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 ca(e,t){if(e){if(typeof e=="string")return In(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 In(e,t)}}function In(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ns(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],o=!0,a=!1,l,r;try{for(n=n.call(e);!(o=(l=n.next()).done)&&(i.push(l.value),!(t&&i.length===t));o=!0);}catch(s){a=!0,r=s}finally{try{!o&&n.return!=null&&n.return()}finally{if(a)throw r}}return i}}function Ps(e){if(Array.isArray(e))return e}function zi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zi(Object(n),!0).forEach(function(i){Mn(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zi(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e,t){if(e==null)return{};var n=Is(e,t),i,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)i=a[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Is(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,a;for(a=0;a<i.length;a++)o=i[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var ei=v.forwardRef(function(e,t){var n=e.children,i=vn(e,$s),o=pa(i),a=o.open,l=vn(o,Ds);return v.useImperativeHandle(t,function(){return{open:a}},[a]),T.createElement(v.Fragment,null,n(le(le({},l),{},{open:a})))});ei.displayName="Dropzone";var da={disabled:!1,getFilesFromEvent:Hr,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};ei.defaultProps=da;ei.propTypes={children:ee.func,accept:ee.objectOf(ee.arrayOf(ee.string)),multiple:ee.bool,preventDropOnDocument:ee.bool,noClick:ee.bool,noKeyboard:ee.bool,noDrag:ee.bool,noDragEventsBubbling:ee.bool,minSize:ee.number,maxSize:ee.number,maxFiles:ee.number,disabled:ee.bool,getFilesFromEvent:ee.func,onFileDialogCancel:ee.func,onFileDialogOpen:ee.func,useFsAccessApi:ee.bool,autoFocus:ee.bool,onDragEnter:ee.func,onDragLeave:ee.func,onDragOver:ee.func,onDrop:ee.func,onDropAccepted:ee.func,onDropRejected:ee.func,onError:ee.func,validator:ee.func};var Rn={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function pa(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=le(le({},da),e),n=t.accept,i=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,l=t.minSize,r=t.multiple,s=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,h=t.onDropRejected,x=t.onFileDialogCancel,b=t.onFileDialogOpen,k=t.useFsAccessApi,C=t.autoFocus,j=t.preventDropOnDocument,D=t.noClick,g=t.noKeyboard,z=t.noDrag,B=t.noDragEventsBubbling,R=t.onError,S=t.validator,$=v.useMemo(function(){return ws(n)},[n]),K=v.useMemo(function(){return ys(n)},[n]),q=v.useMemo(function(){return typeof b=="function"?b:Bi},[b]),F=v.useMemo(function(){return typeof x=="function"?x:Bi},[x]),N=v.useRef(null),I=v.useRef(null),W=v.useReducer(Ms,Rn),he=En(W,2),_=he[0],U=he[1],ke=_.isFocused,Ce=_.isFileDialogActive,re=v.useRef(typeof window<"u"&&window.isSecureContext&&k&&bs()),ae=function(){!re.current&&Ce&&setTimeout(function(){if(I.current){var A=I.current.files;A.length||(U({type:"closeDialog"}),F())}},300)};v.useEffect(function(){return window.addEventListener("focus",ae,!1),function(){window.removeEventListener("focus",ae,!1)}},[I,Ce,F,re]);var ne=v.useRef([]),oe=function(A){N.current&&N.current.contains(A.target)||(A.preventDefault(),ne.current=[])};v.useEffect(function(){return j&&(document.addEventListener("dragover",Ai,!1),document.addEventListener("drop",oe,!1)),function(){j&&(document.removeEventListener("dragover",Ai),document.removeEventListener("drop",oe))}},[N,j]),v.useEffect(function(){return!i&&C&&N.current&&N.current.focus(),function(){}},[N,C,i]);var Z=v.useCallback(function(y){R?R(y):console.error(y)},[R]),Fe=v.useCallback(function(y){y.preventDefault(),y.persist(),de(y),ne.current=[].concat(js(ne.current),[y.target]),sn(y)&&Promise.resolve(o(y)).then(function(A){if(!(fn(y)&&!B)){var V=A.length,H=V>0&&vs({files:A,accept:$,minSize:l,maxSize:a,multiple:r,maxFiles:s,validator:S}),Q=V>0&&!H;U({isDr
Line truncated
|
||||
font-size: .6rem;
|
||||
font-weight: bold;
|
||||
color: hsl(${Math.max(0,Math.min(120-120*x,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(s=n==null?void 0:n.onChange)==null||s.call(n,o),o}}function jn(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Pu=(e,t)=>Math.abs(e-t)<1,Iu=(e,t,n)=>{let i;return function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)}},Mu=e=>e,Ru=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let o=t;o<=n;o++)i.push(o);return i},Tu=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=l=>{const{width:r,height:s}=l;t({width:Math.round(r),height:Math.round(s)})};if(o(n.getBoundingClientRect()),!i.ResizeObserver)return()=>{};const a=new i.ResizeObserver(l=>{const r=l[0];if(r!=null&&r.borderBoxSize){const s=r.borderBoxSize[0];if(s){o({width:s.inlineSize,height:s.blockSize});return}}o(n.getBoundingClientRect())});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},Mi={passive:!0},Ou=typeof window>"u"?!0:"onscrollend"in window,Ku=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;let o=0;const a=e.options.useScrollendEvent&&Ou?()=>{}:Iu(i,()=>{t(o,!1)},e.options.isScrollingResetDelay),l=c=>()=>{const{horizontal:u,isRtl:d}=e.options;o=u?n.scrollLeft*(d&&-1||1):n.scrollTop,a(),t(o,c)},r=l(!0),s=l(!1);return s(),n.addEventListener("scroll",r,Mi),n.addEventListener("scrollend",s,Mi),()=>{n.removeEventListener("scroll",r),n.removeEventListener("scrollend",s)}},_u=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Vu=(e,{adjustments:t=0,behavior:n},i)=>{var o,a;const l=e+t;(a=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[i.options.horizontal?"left":"top"]:l,behavior:n})};class Wu{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{this._measureElement(a.target,a)})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var a;return(a=i())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=i())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([i,o])=>{typeof o>"u"&&delete n[i]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Mu,rangeExtractor:Ru,onChange:()=>{},measureElement:_u,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!0,...n}},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=Kt(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=a,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(thi
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as Xn}from"./react-vendor-jWT2yUdV.js";import{bH as N,bI as _e,bJ as Bt,bg as z,bi as ve,bK as Ge,bj as Lt,bL as _t,bM as Yn,bN as qn,bO as Zn,bP as Jn,bQ as Qn,bR as es,bn as K,bS as ts,bT as ns,bU as he,bV as it,bW as Gt,bX as ss,bY as is,bZ as rs,b_ as Ut,b$ as as,c0 as os,c1 as us,c2 as ls,c3 as cs,c4 as jt,c5 as Wt,c6 as Ht,c7 as $t}from"./index-DiaaLdUu.js";function hs(t,e){t.indexOf(e)===-1&&t.push(e)}function fs(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}let Ue=()=>{};const zt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Xt=t=>/^0[^.\s]+$/u.test(t);function je(t){let e;return()=>(e===void 0&&(e=t()),e)}const X=t=>t,ds=(t,e)=>n=>e(t(n)),fe=(...t)=>t.reduce(ds),Yt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class qt{constructor(){this.subscriptions=[]}add(e){return hs(this.subscriptions,e),()=>fs(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const a=this.subscriptions[r];a&&a(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const R=t=>t*1e3,I=t=>t/1e3;function Zt(t,e){return e?t*(1e3/e):0}const Jt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ps=1e-7,ms=12;function gs(t,e,n,s,i){let r,a,o=0;do a=e+(n-e)/2,r=Jt(a,s,i)-t,r>0?n=a:e=a;while(Math.abs(r)>ps&&++o<ms);return a}function te(t,e,n,s){if(t===e&&n===s)return X;const i=r=>gs(r,0,1,t,n);return r=>r===0||r===1?r:Jt(i(r),e,s)}const Qt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,en=t=>e=>1-t(1-e),tn=te(.33,1.53,.69,.99),We=en(tn),nn=Qt(We),sn=t=>(t*=2)<1?.5*We(t):.5*(2-Math.pow(2,-10*(t-1))),He=t=>1-Math.sin(Math.acos(t)),ys=en(He),rn=Qt(He),bs=te(.42,0,1,1),Ts=te(0,0,.58,1),an=te(.42,0,.58,1),vs=t=>Array.isArray(t)&&typeof t[0]!="number",on=t=>Array.isArray(t)&&typeof t[0]=="number",Vs={linear:X,easeIn:bs,easeInOut:an,easeOut:Ts,circIn:He,circInOut:rn,circOut:ys,backIn:We,backInOut:nn,backOut:tn,anticipate:sn},As=t=>typeof t=="string",rt=t=>{if(on(t)){Ue(t.length===4);const[e,n,s,i]=t;return te(e,n,s,i)}else if(As(t))return Vs[t];return t},se=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function xs(t,e){let n=new Set,s=new Set,i=!1,r=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function u(l){a.has(l)&&(c.schedule(l),t()),l(o)}const c={schedule:(l,f=!1,h=!1)=>{const v=h&&i?n:s;return f&&a.add(l),v.has(l)||v.add(l),l},cancel:l=>{s.delete(l),a.delete(l)},process:l=>{if(o=l,i){r=!0;return}i=!0,[n,s]=[s,n],n.forEach(u),n.clear(),i=!1,r&&(r=!1,c.process(l))}};return c}const ws=40;function un(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,a=se.reduce((g,x)=>(g[x]=xs(r),g),{}),{setup:o,read:u,resolveKeyframes:c,preUpdate:l,update:f,preRender:h,render:d,postRender:v}=a,b=()=>{const g=N.useManualTiming?i.timestamp:performance.now();n=!1,N.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(g-i.timestamp,ws),1)),i.timestamp=g,i.isProcessing=!0,o.process(i),u.process(i),c.process(i),l.process(i),f.process(i),h.process(i),d.process(i),v.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(b))},T=()=>{n=!0,s=!0,i.isProcessing||t(b)};return{schedule:se.reduce((g,x)=>{const m=a[x];return g[x]=(A,M=!1,y=!1)=>(n||T(),m.schedule(A,M,y)),g},{}),cancel:g=>{for(let x=0;x<se.length;x++)a[se[x]].cancel(g)},state:i,steps:a}}const{schedule:O,cancel:Ve,state:ae,steps:ia}=un(typeof requestAnimationFrame<"u"?requestAnimationFrame:X,!0);let ie;function Ss(){ie=void 0}const E={now:()=>(ie===void 0&&E.set(ae.isProcessing||N.useManualTiming?ae.timestamp:performance.now()),ie),set:t=>{ie=t,queueMicrotask(Ss)}},J=t=>Math.round(t*1e5)/1e5,$e=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ms(t){return t==null}const Cs=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ze=(t,e)=>n=>!!(typeof n=="string"&&Cs.test(n)&&n.startsWith(t)||e&&!Ms(n)&&Object.prototype.hasOwnProperty.call(n,e)),ln=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,a,o]=s.match($e);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},Ps=t=>z(0,255,t),de={..._e,transform:t=>Math.round(Ps(t))},L={test:ze("rgb","red"),parse:ln("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(n)+", "+J(Bt.transform(s))+")"};function Fs(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const Ae={test:ze("#"),parse:Fs,transform:L.transform},H={test:ze("hsl","hue"),parse:ln("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ve.transform(J(e))+", "+ve.transform(J(n))+", "+J(Bt.transform(s))+")"},S={test:t=>L.test(t)Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{R as a}from"./react-vendor-jWT2yUdV.js";var p={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},f=a.createContext&&a.createContext(p),O=["attr","size","title"];function g(e,t){if(e==null)return{};var r=y(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function y(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(n){d(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d(e,t,r){return t=j(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){var t=P(e,"string");return typeof t=="symbol"?t:t+""}function P(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b(e){return e&&e.map((t,r)=>a.createElement(t.tag,u({key:r},t.attr),b(t.child)))}function E(e){return t=>a.createElement(h,c({attr:u({},e.attr)},t),b(e.child))}function h(e){var t=r=>{var{attr:n,size:i,title:o}=e,v=g(e,O),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),a.createElement("svg",c({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,v,{className:l,style:u(u({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&a.createElement("title",null,o),e.children)};return f!==void 0?a.createElement(f.Consumer,null,r=>t(r)):t(p)}export{E as G};
|
||||
@@ -0,0 +1 @@
|
||||
import{j as c}from"./react-vendor-jWT2yUdV.js";const a=({size:s=24,width:h,height:e,...t})=>c.jsx("svg",{height:s||e,viewBox:"0 0 24 24",width:s||h,...t,children:c.jsx("path",{clipRule:"evenodd",d:"M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z",fill:"currentColor",fillRule:"evenodd"})}),r=({size:s=24,width:h,height:e,...t})=>c.jsx("svg",{"aria-hidden":"true",focusable:"false",height:s||e,role:"presentation",viewBox:"0 0 24 24",width:s||h,...t,children:c.jsx("path",{d:"M21.53 15.93c-.16-.27-.61-.69-1.73-.49a8.46 8.46 0 01-1.88.13 8.409 8.409 0 01-5.91-2.82 8.068 8.068 0 01-1.44-8.66c.44-1.01.13-1.54-.09-1.76s-.77-.55-1.83-.11a10.318 10.318 0 00-6.32 10.21 10.475 10.475 0 007.04 8.99 10 10 0 002.89.55c.16.01.32.02.48.02a10.5 10.5 0 008.47-4.27c.67-.93.49-1.519.32-1.79z",fill:"currentColor"})}),i=({size:s=24,width:h,height:e,...t})=>c.jsx("svg",{"aria-hidden":"true",focusable:"false",height:s||e,role:"presentation",viewBox:"0 0 24 24",width:s||h,...t,children:c.jsxs("g",{fill:"currentColor",children:[c.jsx("path",{d:"M19 12a7 7 0 11-7-7 7 7 0 017 7z"}),c.jsx("path",{d:"M12 22.96a.969.969 0 01-1-.96v-.08a1 1 0 012 0 1.038 1.038 0 01-1 1.04zm7.14-2.82a1.024 1.024 0 01-.71-.29l-.13-.13a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.984.984 0 01-.7.29zm-14.28 0a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a1 1 0 01-.7.29zM22 13h-.08a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zM2.08 13H2a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zm16.93-7.01a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a.984.984 0 01-.7.29zm-14.02 0a1.024 1.024 0 01-.71-.29l-.13-.14a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.97.97 0 01-.7.3zM12 3.04a.969.969 0 01-1-.96V2a1 1 0 012 0 1.038 1.038 0 01-1 1.04z"})]})}),d=s=>c.jsxs("svg",{width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",...s,children:[c.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),c.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsxs("g",{id:"SVGRepo_iconCarrier",children:[c.jsx("rect",{fill:"#d7effa33",height:"42",rx:"10",ry:"10",width:"42",x:"3",y:"3"}),c.jsx("path",{d:"M24,34.25a2,2,0,0,1-2-2V15.75a2,2,0,0,1,4,0v16.5A2,2,0,0,1,24,34.25Z",fill:"#38b1e7"}),c.jsx("path",{d:"M32,26H16a2,2,0,0,1,0-4H32A2,2,0,0,1,32,26Z",fill:"#38b1e7"})]})]}),o=s=>c.jsxs("svg",{fill:"#000000",id:"Layer_1",version:"1.1",viewBox:"0 0 512 512",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...s,children:[c.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),c.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),c.jsx("g",{id:"SVGRepo_iconCarrier",children:c.jsxs("g",{transform:"translate(1 1)",children:[c.jsx("path",{d:"M213.187,400.067c1.707,5.12,6.827,8.533,11.947,8.533H293.4c5.12,0,10.24-3.413,11.947-8.533H485.4 V101.4c0-14.507-11.093-25.6-25.6-25.6H50.2c-14.507,0-25.6,11.093-25.6,25.6v298.667H213.187z",style:{fill:"#54C9FD"}}),c.jsx("path",{d:"M50.2,75.8h17.067c-14.507,0-25.6,11.093-25.6,25.6v298.667H24.6V101.4 C24.6,86.893,35.693,75.8,50.2,75.8",style:{fill:"#FFFFFF"}}),c.jsx("path",{d:"M459.8,75.8h-17.067c14.507,0,25.6,11.093,25.6,25.6v298.667H485.4V101.4 C485.4,86.893,474.307,75.8,459.8,75.8",style:{fill:"#33A9F8"}}),c.jsx("path",{d:"M305.347,400.067c-1.707,5.12-6.827,8.533-11.947,8.533h-68.267c-5.12,0-10.24-3.413-11.947-8.533 H12.653c-2.56,0-5.12,2.56-5.12,5.12v23.893c0,2.56,2.56,5.12,5.12,5.12h484.693c2.56,0,5.12-2.56,5.12-5.12v-23.893 c0-2.56-2.56-5.12-5.12-5.12L305.347,400.067L305.347,400.067z",style:{fill:"#54C9FD"}}),c.jsx("path",{d:"M33.133,429.08v-23.893c0-2.56,2.56-5.12,5.12-5.12h-25.6c-2.56,0-5.12,2.56-5.12,5.12v23.893 c0,2.56,2.56,5.12,5.12,5.12h25.6C35.693,434.2,33.133,431.64,33.133,429.08",style:{fill:"#FFFFFF"}}),c.jsx("path",{d:"M476.867,429.08v-23.893c0-2.56-2.56-5.12-5.12-5.12h25.6c2.56,0,5.12,2.56,5.12,5.12v23.893 c0,2.56-2.56,5.12-5.12,5.12h-25.6C474.307,434.2,476.867,431.64,476.867,429.08",style:{fill:"#33A9F8"}}),c.jsx("polygon",{points:"58.733,365.933 451.267,365.933 451.267,109.933 58.733,109.933 ",style:{fill:"#FFDD09"}}),c.jsx("polygon",{points:"425.667,365.933 451.267,365.933 451.267,109.933 425.667,109.933 ",style:{fill:"#FD9808"}}),c.jsx("path",{d:"M497.347,442.733H12.653C4.973,44Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as o,r as I}from"./react-vendor-jWT2yUdV.js";import{u as De,k as Ir,c as q,b as $n,P as To,r as ut,O as Po,Q as Ao,R as So,S as Eo,T as Co}from"./index-DiaaLdUu.js";import{n as ko,o as Uo,b as Mo,e as Lo,p as Ko}from"./index-FvTxWQTZ.js";import{T as Bo,a as Do,b as zo,C as at,c as wr,d as _o}from"./code_editor-TFSnOENo.js";import{i as gr}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{p as qo,a as Vo,b as Ho}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{t as _e}from"./chunk-6LIX6LVT-B246pOuK.js";import{t as Wo,a as ft}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{c as Fe}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{z as en}from"./react-hot-toast-cGcFZPSt.js";import{C as Jo}from"./modal-CW_tV9ed.js";import{m as dt}from"./proxy-BsRmjYPH.js";import"./qface-BZLvZXJ8.js";import"./react-router-dom-C6k78GT4.js";import"./iconBase-B7bT1FlI.js";import"./codemirror-core-782AVq39.js";import"./codemirror-lang-DFaD5e7G.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-KVDW62ZT-CGYYmJoP.js";import"./Item-D8Sud-UP.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./useHover-DC1o5-bm.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./index-BV9-YCKp.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./use-dialog-CRIMuzeE.js";import"./index-_HIxriDC.js";import"./index-DE7yoXMZ.js";import"./index-DPx4wqle.js";import"./chunk-MLPFQTYO-DSnBqIsb.js";import"./index-BsnVex0g.js";import"./index-BBhZPeTB.js";import"./react-hook-form-DTbqnRcd.js";let lt={};async function Go(){try{const e=await(await fetch("/api/Debug/schemas",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).json();if(e.code===0)return lt=e.data,lt}catch(n){console.error("Failed to fetch OneBot HTTP API schemas:",n)}return{}}function Yo(n){return M(n)&&!nn(n)&&!Re(n)&&Symbol.asyncIterator in n}function nn(n){return Array.isArray(n)}function Rt(n){return typeof n=="bigint"}function je(n){return typeof n=="boolean"}function Nr(n){return n instanceof globalThis.Date}function Qo(n){return typeof n=="function"}function Xo(n){return M(n)&&!nn(n)&&!Re(n)&&Symbol.iterator in n}function Zo(n){return n===null}function gn(n){return typeof n=="number"}function M(n){return typeof n=="object"&&n!==null}function Nt(n){return n instanceof globalThis.RegExp}function C(n){return typeof n=="string"}function vo(n){return typeof n=="symbol"}function Re(n){return n instanceof globalThis.Uint8Array}function k(n){return n===void 0}function ni(n){return n.map(e=>qe(e))}function ei(n){return new Date(n.getTime())}function ri(n){return new Uint8Array(n)}function ti(n){return new RegExp(n.source,n.flags)}function oi(n){const e={};for(const r of Object.getOwnPropertyNames(n))e[r]=qe(n[r]);for(const r of Object.getOwnPropertySymbols(n))e[r]=qe(n[r]);return e}function qe(n){return nn(n)?ni(n):Nr(n)?ei(n):Re(n)?ri(n):Nt(n)?ti(n):M(n)?oi(n):n}function rn(n){return qe(n)}function Tr(n,e){return rn(e===void 0?n:{...e,...n})}function ii(n){return n!==null&&typeof n=="object"}function si(n){return globalThis.Array.isArray(n)&&!globalThis.ArrayBuffer.isView(n)}function ci(n){return n===void 0}function ui(n){return typeof n=="number"}var hr;(function(n){n.InstanceMode="default",n.ExactOptionalPropertyTypes=!1,n.AllowArrayObject=!1,n.AllowNaN=!1,n.AllowNullVoid=!1;function e(u,d){return n.ExactOptionalPropertyTypes?d in u:u[d]!==void 0}n.IsExactOptionalProperty=e;function r(u){const d=ii(u);return n.AllowArrayObject?d:d&&!si(u)}n.IsObjectLike=r;function t(u){return r(u)&&!(u instanceof Date)&&!(u instanceof Uint8Array)}n.IsRecordLike=t;function s(u){return n.AllowNaN?ui(u):Number.isFinite(u)}n.IsNumberLike=s;function a(u){const d=ci(u);return n.AllowNullVoid?d||u===null:d}n.IsVoidLike=a})(hr||(hr={}));function ai(n){return globalThis.Object.freeze(n).map(e=>Ve(e))}function fi(n){const e={};for(const r of Object.getOwnPropertyNames(n))e[r]=Ve(n[r]);for(const r of Object.getOwnPropertySymbols(n))e[r]=Ve(n[r]);return globalThis.Object.freeze(e)}function Ve(n){return nn(n)?ai(n):Nr(n)?n:Re(n)?n:Nt(n)?n:M(n)?fi(n):n}function c(n,e){const r=e!==void 0?{...e,...n}:n;switch(hr.InstanceMode){case"freeze":return Ve(r);case"clone":return rn(r);default:return r}}class Dn extends Error{constructor(e){super(e)}}const fn=Symbol.for("TypeBox.Transform"),Ne=Symbol.for("TypeBox.Readonly"),Rn=Symbol.for("TypeBox.Optional"),Ge=Symbol.for("TypeBox.Hint"),f=Symbol.for("TypeBox.Kind");function Pr(n){return M(n)&&n[Ne]==="Readonly"}function An(n){return M(n)&&n[Rn]==="Optional"}function Tt(n){return x(n,"Any")}function Pt(n){return x(n,"Argument")}function re(n){return x(n,"Array")}function Ye(n){return x(n,"AsyncIterator")}function Qe(n){return x(n,"BigInt")}function Te(n){return x(n,"Boolean")}function
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as r}from"./iconBase-B7bT1FlI.js";function i(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"},child:[]}]})(t)}function o(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",x2:"12",y1:"15",y2:"3"},child:[]}]})(t)}function e(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M3 15h6"},child:[]},{tag:"path",attr:{d:"M6 12v6"},child:[]}]})(t)}function n(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"M10 9H8"},child:[]},{tag:"path",attr:{d:"M16 13H8"},child:[]},{tag:"path",attr:{d:"M16 17H8"},child:[]}]})(t)}function l(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"},child:[]}]})(t)}function d(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"path",attr:{d:"M12 16v-4"},child:[]},{tag:"path",attr:{d:"M12 8h.01"},child:[]}]})(t)}function h(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"7",height:"9",x:"3",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"14",y:"3",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"9",x:"14",y:"12",rx:"1"},child:[]},{tag:"rect",attr:{width:"7",height:"5",x:"3",y:"16",rx:"1"},child:[]}]})(t)}function c(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"},child:[]},{tag:"path",attr:{d:"M12 22V12"},child:[]},{tag:"path",attr:{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7"},child:[]},{tag:"path",attr:{d:"m7.5 4.27 9 5.15"},child:[]}]})(t)}function u(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"},child:[]},{tag:"path",attr:{d:"m2 22 3-3"},child:[]},{tag:"path",attr:{d:"M7.5 13.5 10 11"},child:[]},{tag:"path",attr:{d:"M10.5 16.5 13 14"},child:[]},{tag:"path",attr:{d:"m18 3-4 4h6l-4 4"},child:[]}]})(t)}function s(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"},child:[]}]})(t)}function k(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"},child:[]},{tag:"rect",attr:{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"6",x2:"6.01",y1:"6",y2:"6"},child:[]},{tag:"line",attr:{x1:"6",x2:"6.01",y1:"18",y2:"18"},child:[]}]})(t)}function p(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{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.7Line truncated
|
||||
@@ -0,0 +1,19 @@
|
||||
import{r as h,R as Ne,j as e}from"./react-vendor-jWT2yUdV.js";import{a as ce,c as ue}from"./chunk-5PILOUBS-KHYNqMZE.js";import{t as _e,a as H}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{E as tr,n as Fe,D as ze,c as D,b as z,P as q,W as E,F as pe,G as fe,H as be,I as Be,J as sr,u as de,k as te,K as Qe}from"./index-DiaaLdUu.js";import{u as ar,i as T}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{d as or}from"./chunk-IHO36JMK-DJPUeGG0.js";import{a as ir}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{u as he}from"./useRequest-B1BwPztr.js";import{u as Q,C,a as nr}from"./react-hook-form-DTbqnRcd.js";import{z as x}from"./react-hot-toast-cGcFZPSt.js";import{a as Oe,f as Te}from"./index-DvErMbt6.js";import{G as lr,Q as dr}from"./index-D6HfLP9Q.js";import{Q as K}from"./qq_manager-BfRTEAby.js";import{P as cr,w as ur,s as hr}from"./process_utils-Bjmp-2dU.js";import{S as A}from"./switch_card-5j4Yjx-K.js";import{u as mr}from"./use-config-Cu0QvgCe.js";import{s as Ve,l as G}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{_ as xr,g as gr}from"./codemirror-core-782AVq39.js";import{C as pr}from"./chunk-M3MASYO7-B4fjH-eW.js";import{c as Ke}from"./chunk-D5XJWRAV-DVN21qSw.js";import{c as qe}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{G as Se}from"./iconBase-B7bT1FlI.js";import{b as fr}from"./index-_HIxriDC.js";import{b as br,a as wr}from"./index-DE7yoXMZ.js";import{p as vr,a as yr,b as jr}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{F as le}from"./file_manager-BG19iFYW.js";import{l as kr,m as Nr}from"./index-FvTxWQTZ.js";import{i as Sr}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{u as Xe,c as Cr}from"./react-router-dom-C6k78GT4.js";import{c as Lr,d as Ir}from"./index-BBhZPeTB.js";import"./qface-BZLvZXJ8.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./index-BsnVex0g.js";import"./use-dialog-CRIMuzeE.js";import"./chunk-J6JGI6RM-Djlxjgjl.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./useToggle-B3ZYBe5S.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./useHover-DC1o5-bm.js";import"./chunk-FGM523TA-CgSvUh2a.js";var Mr=h.useLayoutEffect,Fr=function(s){var t=Ne.useRef(s);return Mr(function(){t.current=s}),t},Pe=function(s,t){if(typeof s=="function"){s(t);return}s.current=t},zr=function(s,t){var a=Ne.useRef();return Ne.useCallback(function(d){s.current=d,a.current&&Pe(a.current,null),a.current=t,t&&Pe(t,d)},[t])},Re={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Tr=function(s){Object.keys(Re).forEach(function(t){s.style.setProperty(t,Re[t],"important")})},Ee=Tr,W=null,We=function(s,t){var a=s.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?a+t.borderSize:a-t.paddingSize};function Pr(r,s,t,a){t===void 0&&(t=1),a===void 0&&(a=1/0),W||(W=document.createElement("textarea"),W.setAttribute("tabindex","-1"),W.setAttribute("aria-hidden","true"),Ee(W)),W.parentNode===null&&document.body.appendChild(W);var d=r.paddingSize,o=r.borderSize,i=r.sizingStyle,m=i.boxSizing;Object.keys(i).forEach(function(n){var j=n;W.style[j]=i[j]}),Ee(W),W.value=s;var l=We(W,r);W.value=s,l=We(W,r),W.value="x";var u=W.scrollHeight-d,c=u*t;m==="border-box"&&(c=c+d+o),l=Math.max(c,l);var g=u*a;return m==="border-box"&&(g=g+d+o),l=Math.min(g,l),[l,u]}var Ue=function(){},Rr=function(s,t){return s.reduce(function(a,d){return a[d]=t[d],a},{})},Er=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Wr=!!document.documentElement.currentStyle,Ur=function(s){var t=window.getComputedStyle(s);if(t===null)return null;var a=Rr(Er,t),d=a.boxSizing;if(d==="")return null;Wr&&d==="border-box"&&(a.width=parseFloat(a.width)+parseFloat(a.borderRightWidth)+parseFloat(a.borderLeftWidth)+parseFloat(a.paddingRight)+parseFloat(a.paddingLeft)+"px");var o=parseFloat(a.paddingBottom)+parseFloat(a.paddingTop),i=parseFloat(a.borderBottomWidth)+parseFloat(a.borderTopWidth);return{sizingStyle:a,paddingSize:o,borderSize:i}},Ar=Ur;function Ce(r,s,t){var a=Fr(t);h.useLayoutEffect(function(){var d=function(i){return a.current(i)};if(r)return r.addEventListener(s,d),function(){return r.removeEventListener(s,d)}},[])}var Hr=function(s,t){Ce(document.body,"reset",function(a){s.current.form===a.target&&t(a)})},Dr=function(s){Ce(window,"resize",s)},$r=function(s){Ce(document.fonts,"loadingdone",s)},_r=["cacheMeasurements","maxRows",Line truncated
|
||||
${f===y.uin?"border-primary bg-primary/10 dark:bg-primary/20 shadow-sm":"border-default-200 dark:border-default-100/10 bg-default-100/50 dark:bg-white/5 hover:bg-default-200/50 dark:hover:bg-white/10"}`,children:[e.jsx(ir,{src:y.faceUrl,name:((I=y.nickName)==null?void 0:I.charAt(0))||y.uin.charAt(0),size:"sm",className:"flex-shrink-0"}),e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-default-700 truncate",children:y.nickName||"未知昵称"}),e.jsx("span",{className:"text-xs text-default-400 truncate",children:y.uin})]}),f===y.uin&&e.jsx("span",{className:"ml-auto text-xs text-primary font-medium flex-shrink-0",children:"已选择"})]},y.uin)}),t.filter(y=>!y.isQuickLogin).length>0&&e.jsxs("div",{className:"col-span-full text-xs text-default-400 mt-1",children:["以下账号不支持快速登录:",t.filter(y=>!y.isQuickLogin).map(y=>y.uin).join("、")]})]})]}),e.jsx(Y,{onSubmit:N,reset:w,isSubmitting:n||m,refresh:L}),e.jsxs("div",{className:"flex-shrink-0 w-full mt-6 pt-6 border-t border-divider",children:[e.jsx("div",{className:"mb-3 text-sm text-default-600",children:"进程管理"}),e.jsx(z,{color:"warning",variant:"flat",onPress:F,isLoading:r,isDisabled:r,fullWidth:!0,children:r?"正在重启进程...":"重启进程"}),e.jsx("div",{className:"mt-2 text-xs text-default-500",children:"重启进程将关闭当前 Worker 进程,等待 3 秒后启动新进程"})]}),e.jsx(or,{className:"mt-6"}),e.jsxs("div",{className:"flex-shrink-0 w-full mt-4",children:[e.jsx("div",{className:"mb-3 text-sm text-default-600",children:"设备 GUID 管理"}),e.jsx("div",{className:"text-xs text-default-400 mb-3",children:"GUID 是设备登录唯一识别码,存储在 Registry20 文件中。修改后需重启生效。"}),e.jsx(lr,{showRestart:!1})]})]})},Vr=()=>{const{config:r,saveConfigWithoutNetwork:s,refreshConfig:t}=mr(),[a,d]=h.useState(!1),{control:o,handleSubmit:i,formState:{isSubmitting:m},setValue:l}=Q({defaultValues:{musicSignUrl:"",enableLocalFile2Url:!1,parseMultMsg:!1,imageDownloadProxy:"",timeout:{baseTimeout:1e4,uploadSpeedKBps:256,downloadSpeedKBps:256,maxTimeout:18e5}}}),u=()=>{l("musicSignUrl",r.musicSignUrl),l("enableLocalFile2Url",r.enableLocalFile2Url),l("parseMultMsg",r.parseMultMsg),l("imageDownloadProxy",r.imageDownloadProxy),l("timeout",r.timeout??{baseTimeout:1e4,uploadSpeedKBps:256,downloadSpeedKBps:1e3,maxTimeout:18e5})},c=i(async n=>{try{await s(n),x.success("保存成功")}catch(j){const k=j.message;x.error(`保存失败: ${k}`)}}),g=async(n=!0)=>{try{d(!0),await t(),n&&x.success("刷新成功")}catch(j){const k=j.message;x.error(`刷新失败: ${k}`)}finally{d(!1)}};return h.useEffect(()=>{u()},[r]),h.useEffect(()=>{g(!1)},[]),a?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"OneBot配置 - SnowCat WebUI"}),e.jsx(C,{control:o,name:"musicSignUrl",render:({field:n})=>e.jsx(T,{...n,label:"音乐签名地址",placeholder:"请输入音乐签名地址",classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:o,name:"enableLocalFile2Url",render:({field:n})=>e.jsx(A,{...n,description:"启用本地文件到URL",label:"启用本地文件到URL"})}),e.jsx(C,{control:o,name:"parseMultMsg",render:({field:n})=>e.jsx(A,{...n,description:"启用上报解析合并消息",label:"启用上报解析合并消息"})}),e.jsx(C,{control:o,name:"imageDownloadProxy",render:({field:n})=>e.jsx(T,{...n,label:"图片下载代理",placeholder:"请输入代理地址,如 http://127.0.0.1:7890",classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:o,name:"timeout.baseTimeout",render:({field:n})=>{var j;return e.jsx(T,{...n,type:"number",label:"基础超时时间(毫秒)",placeholder:"10000",value:((j=n.value)==null?void 0:j.toString())??"",onChange:k=>n.onChange(parseInt(k.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}}),e.jsx(C,{control:o,name:"timeout.uploadSpeedKBps",render:({field:n})=>{var j;return e.jsx(T,{...n,type:"number",label:"预估上传速度(KB/s)",placeholder:"256",value:((j=n.value)==null?void 0:j.toString())??"",onChange:k=>n.onChange(parseInt
Line truncated
|
||||
`)):r.accessControlMode==="blacklist"&&o((r.ipBlacklist||[]).join(`
|
||||
`)))},j=m(async f=>{try{const w=d.split(`
|
||||
`).map(N=>N.trim()).filter(N=>N.length>0),b={...f,ipWhitelist:f.accessControlMode==="whitelist"?w:[],ipBlacklist:f.accessControlMode==="blacklist"?w:[]};await E.updateWebUIConfig(b),x.success("保存成功")}catch(w){const b=w.message;x.error(`保存失败: ${b}`)}}),k=async()=>{try{await a(),x.success("刷新成功")}catch(f){const w=f.message;x.error(`刷新失败: ${w}`)}};return h.useEffect(()=>{n()},[r]),h.useEffect(()=>{(async()=>{if(r)if(g==="whitelist"){const w=r.ipWhitelist||[];if(w.length===0)try{const b=await E.getClientIP();b!=null&&b.ip?o(b.ip):o("")}catch(b){console.error("获取客户端IP失败:",b),o("")}else o(w.join(`
|
||||
`))}else o(g==="blacklist"?(r.ipBlacklist||[]).join(`
|
||||
`):"")})()},[g,r]),s?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"服务器配置 - SnowCat WebUI"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"服务器配置"}),e.jsx(C,{control:i,name:"host",render:({field:f})=>e.jsx(T,{...f,label:"监听地址",placeholder:"请输入监听地址",description:"服务器监听的IP地址,0.0.0.0表示监听所有网卡",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:i,name:"port",render:({field:f})=>{var w;return e.jsx(T,{...f,type:"number",value:((w=f.value)==null?void 0:w.toString())||"",label:"监听端口",placeholder:"请输入监听端口",description:"服务器监听的端口号,范围1-65535",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,onChange:b=>f.onChange(parseInt(b.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-gray-800 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500"}})}}),e.jsx(C,{control:i,name:"loginRate",render:({field:f})=>{var w;return e.jsx(T,{...f,type:"number",value:((w=f.value)==null?void 0:w.toString())||"",label:"登录速率限制",placeholder:"请输入登录速率限制",description:"每小时允许的登录尝试次数",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,onChange:b=>f.onChange(parseInt(b.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-gray-800 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500"}})}})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"安全配置"}),e.jsx(C,{control:i,name:"disableWebUI",render:({field:f})=>e.jsx(A,{value:f.value,onValueChange:w=>f.onChange(w),disabled:!!t,label:"禁用WebUI",description:"启用后将完全禁用WebUI服务,需要重启生效"})}),e.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[e.jsx("div",{className:"text-sm font-medium text-default-700 dark:text-default-300 px-1",children:"网络访问控制"}),e.jsx(C,{control:i,name:"accessControlMode",render:({field:f})=>e.jsxs(Ve,{...f,label:"访问控制模式",placeholder:"选择访问控制模式",description:"选择如何控制网络访问",selectedKeys:[f.value],onSelectionChange:w=>{const b=Array.from(w)[0];f.onChange(b)},isDisabled:!!t,classNames:{trigger:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35"},children:[e.jsx(G,{value:"none",children:"不限制"},"none"),e.jsx(G,{value:"whitelist",children:"白名单模式"},"whitelist"),e.jsx(G,{value:"blacklist",children:"黑名单模式"},"blacklist")]})}),g!=="none"&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-sm font-medium text-default-700 dark:text-default-300",children:g==="whitelist"?"IP白名单":"IP黑名单"}),e.jsx("textarea",{value:d,onChange:f=>o(f.target.value),placeholder:`每行一个IP地址或规则
|
||||
支持格式:
|
||||
IPv4:
|
||||
- 精确IP: 192.168.1.100
|
||||
- 通配符: 192.168.1.*
|
||||
- CIDR: 192.168.1.0/24
|
||||
IPv6:
|
||||
- 精确IP: 2001:db8::1
|
||||
- CIDR: 2001:db8::/32`,disabled:!!t,rows:10,className:"w-full px-3 py-2 bg-default-100/50 dark:bg-white/5 backdrop-blur-md border border-transparent hover:bg-default-200/50 dark:hover:bg-white/10 transition-all shadow-sm hover:border-default-300 rounded-lg text-default-700 dark:text-default-300 placeholder:text-default-400 font-mono text-sm resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed"}),e.jsx("p",{className:"text-xs text-default-500",children:g==="whitelist"?"只有列表中的IP可以访问":"列表中的IP将被拒绝访问"})]}),e.jsxs("div",{className:"text-xs text-default-500 px-1",children:[e.jsx("div",{className:"font-medium mb-1",children:"示例规则:"}),e.jsxs("div",{className:"space-y-0.5 font-mono",children:[e.jsx("div",{children:"• 127.0.0.1 (IPv4 本地回环)"}),e.jsx("div",{children:"• 192.168.1.* (IPv4 通配符)"}),e.jsx("div",{children:"• 10.0.0.0/8 (IPv4 CIDR)"}),e.jsx("div",{children:"• ::1 (IPv6 本地回环)"}),e.jsx("div",{children:"• 2001:db8::/32 (IPv6 CIDR)"})]})]})]}),e.jsx(C,{control:i,name:"enableXForwardedFor",render:({field:f})=>e.jsx(A,{value:f.value,onValueChange:w=>f.onChange(w),disabled:!!t,label:"启用 X-Forwarded-For",description:"启用后将从 X-Forwarded-For 头部获取真实IP地址(适用于反向代理场景)"})})]})]})]}),e.jsx(Y,{onSubmit:j,reset:n,isSubmitting:l||s,refresh:k})]})},qr=()=>{const{data:r,loading:s,refreshAsync:t}=he(E.getSSLStatus),[a,d]=h.useState(""),[o,i]=h.useState(""),[m,l]=h.useState(!1);h.useEffect(()=>{r&&(d(r.certContent||""),i(r.keyContent||""))},[r]);const u=async()=>{if(!a.trim()||!o.trim()){x.error("证书和私钥内容不能为空");return}l(!0);try{const n=await E.saveSSLCert(a,o);x.success(n.message||"SSL证书保存成功"),await t()}catch(n){const j=n.message;x.error(`保存SSL证书失败: ${j}`)}finally{l(!1)}},c=async()=>{l(!0);try{const n=await E.deleteSSLCert();x.success(n.message||"SSL证书已删除"),d(""),i(""),await t()}catch(n){const j=n.message;x.error(`删除SSL证书失败: ${j}`)}finally{l(!1)}},g=async()=>{try{await t(),x.success("刷新成功")}catch(n){const j=n.message;x.error(`刷新失败: ${j}`)}};return s?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"SSL配置 - SnowCat WebUI"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"SSL/HTTPS 配置"}),(r==null?void 0:r.enabled)&&e.jsx("span",{className:"px-2 py-0.5 text-xs bg-success-100 text-success-700 dark:bg-success-900/30 dark:text-success-400 rounded-full whitespace-nowrap",children:"已启用"})]}),e.jsx("p",{className:"text-sm text-default-500 px-1",children:"配置SSL证书后重启即可启用HTTPS。将证书(cert.pem)和私钥(key.pem)的内容粘贴到下方文本框中。"}),e.jsx("div",{className:"p-3 bg-warning-50/70 dark:bg-warning-900/20 rounded-xl border border-warning-200/70 dark:border-warning-800/40",children:e.jsxs("p",{className:"text-xs leading-relaxed text-warning-700 dark:text-warning-400",children:[e.jsx("strong",{children:"注意:"}),"保存证书后需要重启服务才能生效。删除证书后同样需要重启才能切换回HTTP模式。"]})})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ae,{label:"证书内容 (cert.pem)",placeholder:`-----BEGIN CERTIFICATE-----
|
||||
...
|
||||
-----END CERTIFICATE-----`,value:a,onValueChange:d,minRows:6,maxRows:12,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400 font-mono text-sm"}}),e.jsx(Ae,{label:"私钥内容 (key.pem)",placeholder:`-----BEGIN PRIVATE KEY-----
|
||||
...
|
||||
-----END PRIVATE KEY-----`,value:o,onValueChange:i,minRows:6,maxRows:12,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400 font-mono text-sm"}})]}),e.jsxs("div",{className:"flex gap-2 justify-end pt-4 border-t border-white/50 dark:border-white/[0.06]",children:[e.jsx(z,{variant:"flat",radius:"full",className:"bg-white/60 dark:bg-white/[0.06] text-default-600 border border-white/50 dark:border-white/10",isLoading:m||s,onPress:g,size:"sm",children:"刷新"}),(r==null?void 0:r.enabled)&&e.jsx(z,{color:"danger",variant:"flat",radius:"full",isLoading:m||s,onPress:c,size:"sm",children:"删除SSL证书"}),e.jsx(z,{color:"primary",radius:"full",className:"font-semibold bg-gradient-to-r from-primary-400 to-primary-600 shadow-md shadow-primary-500/25 px-5",isLoading:m||s,onPress:u,size:"sm",children:"保存SSL证书"})]})]})]})};function Ye(r){return Se({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(r)}function He(r){return Se({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"},child:[]}]})(r)}function Xr(r){return Se({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M64 224h13.5c24.7 56.5 80.9 96 146.5 96s121.8-39.5 146.5-96H384c8.8 0 16-7.2 16-16v-96c0-8.8-7.2-16-16-16h-13.5C345.8 39.5 289.6 0 224 0S102.2 39.5 77.5 96H64c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16zm40-88c0-22.1 21.5-40 48-40h144c26.5 0 48 17.9 48 40v24c0 53-43 96-96 96h-48c-53 0-96-43-96-96v-24zm72 72l12-36 36-12-36-12-12-36-12 36-36 12 36 12 12 36zm151.6 113.4C297.7 340.7 262.2 352 224 352s-73.7-11.3-103.6-30.6C52.9 328.5 0 385 0 454.4v9.6c0 26.5 21.5 48 48 48h80v-64c0-17.7 14.3-32 32-32h128c17.7 0 32 14.3 32 32v64h80c26.5 0 48-21.5 48-48v-9.6c0-69.4-52.9-125.9-120.4-133zM272 448c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-96 0c-8.8 0-16 7.2-16 16v48h32v-48c0-8.8-7.2-16-16-16z"},child:[]}]})(r)}const Gr={dark:{"--heroui-background":"0 0% 0%","--heroui-foreground-50":"240 5.88% 10%","--heroui-foreground-100":"240 3.7% 15.88%","--heroui-foreground-200":"240 5.26% 26.08%","--heroui-foreground-300":"240 5.2% 33.92%","--heroui-foreground-400":"240 3.83% 46.08%","--heroui-foreground-500":"240 5.03% 64.9%","--heroui-foreground-600":"240 4.88% 83.92%","--heroui-foreground-700":"240 5.88% 90%","--heroui-foreground-800":"240 4.76% 95.88%","--heroui-foreground-900":"0 0% 98.04%","--heroui-foreground":"210 5.56% 92.94%","--heroui-focus":"212.01999999999998 100% 46.67%","--heroui-overlay":"0 0% 0%","--heroui-divider":"0 0% 100%","--heroui-divider-opacity":"0.15","--heroui-content1":"240 5.88% 10%","--heroui-content1-foreground":"0 0% 98.04%","--heroui-content2":"240 3.7% 15.88%","--heroui-content2-foreground":"240 4.76% 95.88%","--heroui-content3":"240 5.26% 26.08%","--heroui-content3-foreground":"240 5.88% 90%","--heroui-content4":"240 5.2% 33.92%","--heroui-content4-foreground":"240 4.88% 83.92%","--heroui-default-50":"240 5.88% 10%","--heroui-default-100":"240 3.7% 15.88%","--heroui-default-200":"240 5.26% 26.08%","--heroui-default-300":"240 5.2% 33.92%","--heroui-default-400":"240 3.83% 46.08%","--heroui-default-500":"240 5.03% 64.9%","--heroui-default-600":"240 4.88% 83.92%","--heroui-default-700":"240 5.88% 90%","--heroui-default-800":"240 4.76% 95.88%","--heroui-default-900":"0 0% 98.04%","--heroui-default-foreground":"0 0% 100%","--heroui-default":"240 5.26% 26.08%","--heroui-danger-50":"340 84.91% 10.39%","--heroui-danger-100":"339.33 86.54% 20.39%","--heroui-danger-200":"339.11 85.99% 30.78%","--heroui-danger-300":"339 86.54% 40.78%","--heroui-danger-400":"339.2 90.36% 51.18%","--heroui-danger-500":"339 90% 60.78%","--heroui-danger-600":"339.11 90.6% 70.78%","--heroui-danger-700":"339.33 90% 80.39%","--heroui-danger-800":"340 91.84% 90.39%","--heroui-danger-900":"339.13 92% 95.1%","--heroui-danger-foreground":"0 0% 100%","--heroui-danger":"339.2 90.36% 51.18%","--heroui-primary-50":"205.5 85% 9.61%","--heroui-primary-100":"205.5 85% 19.22%","--heroui-primary-200":"206 85% 28.82%","--heroui-primary-300":"205.5 85% 38.43%","--heroui-primary-400":"206 85% 46.67%","--heroui-primary-500":"206 78% 58.43%","--heroui-primary-600":"206 78% 68.82%","--heroui-primary-7
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{ao as re,aa as le}from"./index-DiaaLdUu.js";import{r as ie}from"./react-vendor-jWT2yUdV.js";function ue(e,t){let a=t==null?void 0:t.isDisabled,[r,n]=ie.useState(!1);return re(()=>{if(e!=null&&e.current&&!a){let l=()=>{if(e.current){let i=le(e.current,{tabbable:!0});n(!!i.nextNode())}};l();let d=new MutationObserver(l);return d.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{d.disconnect()}}}),a?!1:r}const _=e=>typeof e=="object"&&e!=null&&e.nodeType===1,ee=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",S=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const a=getComputedStyle(e,null);return ee(a.overflowY,t)||ee(a.overflowX,t)||(r=>{const n=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(r);return!!n&&(n.clientHeight<r.scrollHeight||n.clientWidth<r.scrollWidth)})(e)}return!1},V=(e,t,a,r,n,l,d,i)=>l<e&&d>t||l>e&&d<t?0:l<=e&&i<=a||d>=t&&i>=a?l-e-r:d>t&&i<a||l<e&&i>a?d-t+n:0,ae=e=>{const t=e.parentElement;return t??(e.getRootNode().host||null)},te=(e,t)=>{var a,r,n,l;if(typeof document>"u")return[];const{scrollMode:d,block:i,inline:f,boundary:L,skipOverflowHiddenElements:oe}=t,ne=typeof L=="function"?L:b=>b!==L;if(!_(e))throw new TypeError("Invalid target");const j=document.scrollingElement||document.documentElement,H=[];let s=e;for(;_(s)&&ne(s);){if(s=ae(s),s===j){H.push(s);break}s!=null&&s===document.body&&S(s)&&!S(document.documentElement)||s!=null&&S(s,oe)&&H.push(s)}const g=(r=(a=window.visualViewport)==null?void 0:a.width)!=null?r:innerWidth,m=(l=(n=window.visualViewport)==null?void 0:n.height)!=null?l:innerHeight,{scrollX:w,scrollY:v}=window,{height:W,width:y,top:M,right:O,bottom:X,left:$}=e.getBoundingClientRect(),{top:J,right:K,bottom:P,left:Q}=(b=>{const o=window.getComputedStyle(b);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(e);let c=i==="start"||i==="nearest"?M-J:i==="end"?X+P:M+W/2-J+P,u=f==="center"?$+y/2-Q+K:f==="end"?O+K:$-Q;const Y=[];for(let b=0;b<H.length;b++){const o=H[b],{height:x,width:C,top:E,right:q,bottom:z,left:T}=o.getBoundingClientRect();if(d==="if-needed"&&M>=0&&$>=0&&X<=m&&O<=g&&(o===j&&!S(o)||M>=E&&X<=z&&$>=T&&O<=q))return Y;const k=getComputedStyle(o),F=parseInt(k.borderLeftWidth,10),I=parseInt(k.borderTopWidth,10),N=parseInt(k.borderRightWidth,10),R=parseInt(k.borderBottomWidth,10);let h=0,p=0;const B="offsetWidth"in o?o.offsetWidth-o.clientWidth-F-N:0,D="offsetHeight"in o?o.offsetHeight-o.clientHeight-I-R:0,A="offsetWidth"in o?o.offsetWidth===0?0:C/o.offsetWidth:0,G="offsetHeight"in o?o.offsetHeight===0?0:x/o.offsetHeight:0;if(j===o)h=i==="start"?c:i==="end"?c-m:i==="nearest"?V(v,v+m,m,I,R,v+c,v+c+W,W):c-m/2,p=f==="start"?u:f==="center"?u-g/2:f==="end"?u-g:V(w,w+g,g,F,N,w+u,w+u+y,y),h=Math.max(0,h+v),p=Math.max(0,p+w);else{h=i==="start"?c-E-I:i==="end"?c-z+R+D:i==="nearest"?V(E,z,x,I,R+D,c,c+W,W):c-(E+x/2)+D/2,p=f==="start"?u-T-F:f==="center"?u-(T+C/2)+B/2:f==="end"?u-q+N+B:V(T,q,C,F,N+B,u,u+y,y);const{scrollLeft:U,scrollTop:Z}=o;h=G===0?0:Math.max(0,Math.min(Z+h/G,o.scrollHeight-x/G+D)),p=A===0?0:Math.max(0,Math.min(U+p/A,o.scrollWidth-C/A+B)),c+=Z-h,u+=U-p}Y.push({el:o,top:h,left:p})}return Y},se=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function fe(e,t){if(!e.isConnected||!(r=>{let n=r;for(;n&&n.parentNode;){if(n.parentNode===document)return!0;n=n.parentNode instanceof ShadowRoot?n.parentNode.host:n.parentNode}return!1})(e))return;if((r=>typeof r=="object"&&typeof r.behavior=="function")(t))return t.behavior(te(e,t));const a=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:r,top:n,left:l}of te(e,se(t)))r.scroll({top:n,left:l,behavior:a})}export{ue as $,fe as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as c}from"./react-vendor-jWT2yUdV.js";import{aJ as d}from"./index-DiaaLdUu.js";function f(){const n=()=>()=>{};return c.useSyncExternalStore(n,()=>!0,()=>!1)}function I(n={}){const{onLoad:u,onError:o,ignoreFallback:a}=n,t=f(),e=c.useRef(t?new Image:null),[i,s]=c.useState("pending");c.useEffect(()=>{e.current&&(e.current.onload=l=>{r(),s("loaded"),u==null||u(l)},e.current.onerror=l=>{r(),s("failed"),o==null||o(l)})},[e.current]);const r=()=>{e.current&&(e.current.onload=null,e.current.onerror=null,e.current=null)};return d(()=>{t&&s(g(n,e))},[t]),a?"loaded":i}function g(n,u){const{loading:o,src:a,srcSet:t,crossOrigin:e,sizes:i,ignoreFallback:s}=n;if(!a)return"pending";if(s)return"loaded";const r=new Image;return r.src=a,e&&(r.crossOrigin=e),t&&(r.srcset=t),i&&(r.sizes=i),o&&(r.loading=o),u.current=r,r.complete&&r.naturalWidth?"loaded":"loading"}export{I as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{G as t}from"./iconBase-B7bT1FlI.js";function a(h){return t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20.005 5.995h-1v2h1v8h-1v2h1c1.103 0 2-.897 2-2v-8c0-1.102-.898-2-2-2zm-14 4H15v4H6.005z"},child:[]},{tag:"path",attr:{d:"M17.005 17.995V4H20V2h-8v2h3.005v1.995h-11c-1.103 0-2 .897-2 2v8c0 1.103.897 2 2 2h11V20H12v2h8v-2h-2.995v-2.005zm-13-2v-8h11v8h-11z"},child:[]}]})(h)}function c(h){return t({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M15 2H6c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V7l-5-5zm-6 8H7V6h2v4zm3 0h-2V6h2v4zm3 0h-2V6h2v4z"},child:[]}]})(h)}export{c as B,a};
|
||||
@@ -0,0 +1 @@
|
||||
.PhotoView-Portal{direction:ltr;height:100%;left:0;overflow:hidden;position:fixed;top:0;touch-action:none;width:100%;z-index:2000}@keyframes PhotoView__rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes PhotoView__delayIn{0%,50%{opacity:0}to{opacity:1}}.PhotoView__Spinner{animation:PhotoView__delayIn .4s linear both}.PhotoView__Spinner svg{animation:PhotoView__rotate .6s linear infinite}.PhotoView__Photo{cursor:grab;max-width:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.PhotoView__Photo:active{cursor:grabbing}.PhotoView__icon{display:inline-block;left:0;position:absolute;top:0;transform:translate(-50%,-50%)}.PhotoView__PhotoBox,.PhotoView__PhotoWrap{bottom:0;direction:ltr;left:0;position:absolute;right:0;top:0;touch-action:none;width:100%}.PhotoView__PhotoWrap{overflow:hidden;z-index:10}.PhotoView__PhotoBox{transform-origin:left top}@keyframes PhotoView__fade{0%{opacity:0}to{opacity:1}}.PhotoView-Slider__clean .PhotoView-Slider__ArrowLeft,.PhotoView-Slider__clean .PhotoView-Slider__ArrowRight,.PhotoView-Slider__clean .PhotoView-Slider__BannerWrap,.PhotoView-Slider__clean .PhotoView-Slider__Overlay,.PhotoView-Slider__willClose .PhotoView-Slider__BannerWrap:hover{opacity:0}.PhotoView-Slider__Backdrop{background:#000;height:100%;left:0;position:absolute;top:0;transition-property:background-color;width:100%;z-index:-1}.PhotoView-Slider__fadeIn{animation:PhotoView__fade linear both;opacity:0}.PhotoView-Slider__fadeOut{animation:PhotoView__fade linear reverse both;opacity:0}.PhotoView-Slider__BannerWrap{align-items:center;background-color:#00000080;color:#fff;display:flex;height:44px;justify-content:space-between;left:0;position:absolute;top:0;transition:opacity .2s ease-out;width:100%;z-index:20}.PhotoView-Slider__BannerWrap:hover{opacity:1}.PhotoView-Slider__Counter{font-size:14px;opacity:.75;padding:0 10px}.PhotoView-Slider__BannerRight{align-items:center;display:flex;height:100%}.PhotoView-Slider__toolbarIcon{fill:#fff;box-sizing:border-box;cursor:pointer;opacity:.75;padding:10px;transition:opacity .2s linear}.PhotoView-Slider__toolbarIcon:hover{opacity:1}.PhotoView-Slider__ArrowLeft,.PhotoView-Slider__ArrowRight{align-items:center;bottom:0;cursor:pointer;display:flex;height:100px;justify-content:center;margin:auto;opacity:.75;position:absolute;top:0;transition:opacity .2s linear;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:70px;z-index:20}.PhotoView-Slider__ArrowLeft:hover,.PhotoView-Slider__ArrowRight:hover{opacity:1}.PhotoView-Slider__ArrowLeft svg,.PhotoView-Slider__ArrowRight svg{fill:#fff;background:#0000004d;box-sizing:content-box;height:24px;padding:10px;width:24px}.PhotoView-Slider__ArrowLeft{left:0}.PhotoView-Slider__ArrowRight{right:0}@font-face{font-family:JetBrains Mono;src:url(/webui/fonts/JetBrainsMono.ttf) format("truetype")}@font-face{font-family:JetBrains Mono;src:url(/webui/fonts/JetBrainsMono-Italic.ttf) format("truetype");font-style:italic}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdroLine truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
import{r as w,j as r,a as je,c as pr}from"./react-vendor-jWT2yUdV.js";import{c as Q,b as H,U as gr,O as Sr,Q as br,R as _r,S as yr,T as xr,u as De,k as Re}from"./index-DiaaLdUu.js";import{a as lr,c as ur}from"./chunk-5PILOUBS-KHYNqMZE.js";import{i as Pe}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{z as $}from"./react-hot-toast-cGcFZPSt.js";import{q as jr,d as Or,r as wr,s as Er}from"./index-FvTxWQTZ.js";import{g as Ir}from"./codemirror-core-782AVq39.js";import{c as Nr}from"./chunk-D5XJWRAV-DVN21qSw.js";import{p as Oe,a as we,b as Ee}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{g as kr,a as Tr,i as Ae,O as M,b as Cr,c as Mr,d as Dr,s as dr,e as Rr,f as de,C as Pr,h as Ar}from"./modal-CW_tV9ed.js";import{c as U}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{a as ye}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{i as Le}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{q as Lr,g as Wr}from"./qface-BZLvZXJ8.js";import{c as Ur}from"./index-_HIxriDC.js";import{m as zr}from"./proxy-BsRmjYPH.js";import{C as Fr}from"./code_editor-TFSnOENo.js";import{s as qr,l as Gr}from"./chunk-KVDW62ZT-CGYYmJoP.js";import"./react-router-dom-C6k78GT4.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./iconBase-B7bT1FlI.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-6LIX6LVT-B246pOuK.js";import"./useHover-DC1o5-bm.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./use-dialog-CRIMuzeE.js";import"./index-DE7yoXMZ.js";import"./index-DPx4wqle.js";import"./index-BBhZPeTB.js";import"./chunk-ML27DD5T-ZFWrMOn-.js";import"./index-BV9-YCKp.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./react-hook-form-DTbqnRcd.js";import"./index-BsnVex0g.js";import"./codemirror-lang-DFaD5e7G.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";function We(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,n){return a.__proto__=n,a},xe(e,t)}function Hr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xe(e,t)}var Ue=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Br(e,t){return!!(e===t||Ue(e)&&Ue(t))}function Jr(e,t){if(e.length!==t.length)return!1;for(var a=0;a<e.length;a++)if(!Br(e[a],t[a]))return!1;return!0}function ve(e,t){t===void 0&&(t=Jr);var a,n=[],l,f=!1;function p(){for(var S=[],v=0;v<arguments.length;v++)S[v]=arguments[v];return f&&a===this&&t(S,n)||(l=e.apply(this,S),f=!0,a=this,n=S),l}return p}var Vr=typeof performance=="object"&&typeof performance.now=="function",ze=Vr?function(){return performance.now()}:function(){return Date.now()};function Fe(e){cancelAnimationFrame(e.id)}function Kr(e,t){var a=ze();function n(){ze()-a>=t?e.call(null):l.id=requestAnimationFrame(n)}var l={id:requestAnimationFrame(n)};return l}var me=-1;function qe(e){if(e===void 0&&(e=!1),me===-1||e){var t=document.createElement("div"),a=t.style;a.width="50px",a.height="50px",a.overflow="scroll",document.body.appendChild(t),me=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return me}var Y=null;function Ge(e){if(e===void 0&&(e=!1),Y===null||e){var t=document.createElement("div"),a=t.style;a.width="50px",a.height="50px",a.overflow="scroll",a.direction="rtl";var n=document.createElement("div"),l=n.style;return l.width="100px",l.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?Y="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Y="negative":Y="positive-ascending"),document.body.removeChild(t),Y}return Y}var Qr=150,Yr=function(t,a){return t};function Xr(e){var t,a=e.getItemOffset,n=e.getEstimatedTotalSize,l=e.getItemSize,f=e.getOffsetForIndexAndAlignment,p=e.getStartIndexForOffset,S=e.getStopIndexForStartIndex,v=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,h=e.validateProps;return t=(function(u){Hr(m,u);function m(o){var s;return s=u.call(this,o)||this,s._instanceProps=v(s.props,We(s)),s._outerRef=void 0,s._resetIsScrollingTimeoutId=null,s.state={instance:We(s),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof s.props.initialScrollOffset=="number"?s.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},s._callOnItemsRendered=void 0,s._callOnItemsRendered=ve(function(d,c,b,y){return s.props.onItemsRendered({overscanStartIndex:d,overscanStopIndex:c,visibleStartIndex:b,visibleStopIndex:y})}),s._callOnScroll=void 0,s._callOnScroll=ve(function(d,c,b){return s.props.onScroll({scrollDirection:d,scrollOffset:c,scrollUpdateWasRequested:b})}),s._getItemStyle=void 0,s._getItemStyle=function(d){var c=s.props,b=c.direction,y=c.itemSize,j=c.layout,_=s._getItemStyleCache(g&&y,g&&j,g&&b),x;if(_.hasOwnProperty(d))x=_[d];else{var O=a(s.props,d,s._instanceProps),ILine truncated
|
||||
`).map((t,a)=>r.jsx("span",{className:"whitespace-pre-wrap break-all",children:t},a))})})]}),e.message&&r.jsxs(U,{className:"pl-0.5",variant:"flat",children:[r.jsx(U,{color:"warning",size:"sm",className:"-ml-2 mr-1",variant:"flat",children:"返回消息"}),e.message]})]}),wt={hidden:{opacity:0,scale:.8,y:50},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:20}}};function Et({data:e}){return r.jsx("div",{children:"Request消息,暂未适配"})}const It=e=>e==="meta_event"?100:e==="message"?180:e==="request"||e==="notice"?100:e==="message_sent"?250:100,Nt=e=>{if(de(e))switch(e.post_type){case"meta_event":return r.jsx(st,{data:e});case"message":return r.jsx(Je,{data:e});case"request":return r.jsx(Et,{data:e});case"notice":return r.jsx(jt,{data:e});case"message_sent":return r.jsx(Je,{data:e});default:return r.jsx("div",{children:"未知类型的消息"})}return r.jsx(Ot,{data:e})},kt=({data:e,index:t,style:a})=>{const n=e[t],l=de(n);return r.jsx("div",{style:a,className:"p-1 overflow-visible w-full h-full",children:r.jsx(zr.div,{variants:wt,initial:"hidden",animate:"visible",className:"h-full px-2",children:r.jsxs(lr,{className:"w-full h-full py-2 bg-white/60 dark:bg-white/[0.04] backdrop-blur-xl border border-white/60 dark:border-white/10 shadow-sm rounded-2xl",children:[r.jsxs(Nr,{className:"py-0 text-default-500 flex-row gap-2",children:[r.jsx("div",{className:"font-bold",children:l?Rr(n.post_type):"请求响应"}),r.jsx("div",{className:"text-sm",children:l&&it(n.time)}),r.jsx("div",{className:"ml-auto",children:r.jsxs(Oe,{placement:"left",showArrow:!0,classNames:{content:"max-h-96 max-w-96 overflow-hidden p-0"},children:[r.jsx(we,{children:r.jsx(H,{size:"sm",color:"primary",variant:"flat",radius:"full",isIconOnly:!0,className:"text-medium",children:r.jsx(jr,{})})}),r.jsx(Ee,{children:r.jsx(dr,{hideSymbol:!0,codeString:JSON.stringify(n,null,2),tooltipProps:{content:"点击复制"},classNames:{copyButton:"self-start sticky top-0 right-0"},className:"bg-content1 h-full overflow-y-scroll items-start",children:JSON.stringify(n,null,2).split(`
|
||||
`).map((f,p)=>r.jsx("span",{className:"whitespace-pre-wrap break-all",children:f},p))})})]})})]}),r.jsx(ur,{className:"py-0",children:Nt(n)})]})})})},Tt=e=>{const{messages:t}=e,a=w.useRef(null),n=w.useRef(null),[l,f]=w.useState(400);return w.useEffect(()=>{const p=new ResizeObserver(()=>{a.current&&f(a.current.offsetHeight)});return a.current&&p.observe(a.current),()=>{p.disconnect()}},[]),w.useEffect(()=>{n.current&&n.current.resetAfterIndex(0,!0)},[t]),r.jsx("div",{className:"w-full h-full overflow-hidden",ref:a,children:r.jsx(tt,{ref:n,itemCount:t.length,width:"100%",style:{overflowX:"hidden"},itemSize:p=>{const S=t[p];return de(S)?It(S.post_type):100},height:l,itemData:t,itemKey:p=>t.length-p-1,children:kt})})},Ct=e=>{const{sendMessage:t}=e,{isOpen:a,onOpen:n,onOpenChange:l}=gr(),f=w.useRef(null),p=w.useCallback(S=>{var g;const v=(g=f.current)==null?void 0:g.getValue();if(!v){$.error("消息不能为空");return}try{t(v),$.success("消息发送成功"),S()}catch{$.error("消息发送失败")}},[t]);return r.jsxs(r.Fragment,{children:[r.jsx(H,{onPress:n,color:"primary",radius:"full",variant:"flat",size:"sm",className:"font-medium",children:"构造请求"}),r.jsx(Sr,{isOpen:a,onOpenChange:l,placement:"top-center",size:"5xl",scrollBehavior:"outside",isDismissable:!1,children:r.jsx(br,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:S=>r.jsxs(r.Fragment,{children:[r.jsx(_r,{className:"flex flex-col gap-1",children:"构造请求"}),r.jsx(yr,{children:r.jsx("div",{className:"h-96",children:r.jsx(Fr,{height:"100%",defaultLanguage:"json",defaultValue:`{
|
||||
"action": "get_group_list"
|
||||
}`,ref:f})})}),r.jsxs(xr,{children:[r.jsx(Pr,{}),r.jsx(H,{color:"primary",variant:"flat",onPress:S,children:"取消"}),r.jsx(H,{color:"primary",onPress:()=>p(S),children:"发送"})]})]})})})]})};var pe={},T={},ge={},Ve;function R(){return Ve||(Ve=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isEventSourceSupported=e.isReactNative=e.ReadyState=e.DEFAULT_HEARTBEAT=e.UNPARSABLE_JSON_OBJECT=e.DEFAULT_RECONNECT_INTERVAL_MS=e.DEFAULT_RECONNECT_LIMIT=e.SOCKET_IO_PING_CODE=e.SOCKET_IO_PATH=e.SOCKET_IO_PING_INTERVAL=e.DEFAULT_EVENT_SOURCE_OPTIONS=e.EMPTY_EVENT_HANDLERS=e.DEFAULT_OPTIONS=void 0;var t=1,a=1e3*t;e.DEFAULT_OPTIONS={},e.EMPTY_EVENT_HANDLERS={},e.DEFAULT_EVENT_SOURCE_OPTIONS={withCredentials:!1,events:e.EMPTY_EVENT_HANDLERS},e.SOCKET_IO_PING_INTERVAL=25*a,e.SOCKET_IO_PATH="/socket.io/?EIO=3&transport=websocket",e.SOCKET_IO_PING_CODE="2",e.DEFAULT_RECONNECT_LIMIT=20,e.DEFAULT_RECONNECT_INTERVAL_MS=5e3,e.UNPARSABLE_JSON_OBJECT={},e.DEFAULT_HEARTBEAT={message:"ping",timeout:6e4,interval:25e3};var n;(function(f){f[f.UNINSTANTIATED=-1]="UNINSTANTIATED",f[f.CONNECTING=0]="CONNECTING",f[f.OPEN=1]="OPEN",f[f.CLOSING=2]="CLOSING",f[f.CLOSED=3]="CLOSED"})(n||(e.ReadyState=n={}));var l=function(){try{return"EventSource"in globalThis}catch{return!1}};e.isReactNative=typeof navigator<"u"&&navigator.product==="ReactNative",e.isEventSourceSupported=!e.isReactNative&&l()})(ge)),ge}var se={},Se={},Ke;function Ie(){return Ke||(Ke=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetWebSockets=e.sharedWebSockets=void 0,e.sharedWebSockets={};var t=function(a){if(a&&e.sharedWebSockets.hasOwnProperty(a))delete e.sharedWebSockets[a];else for(var n in e.sharedWebSockets)e.sharedWebSockets.hasOwnProperty(n)&&delete e.sharedWebSockets[n]};e.resetWebSockets=t})(Se)),Se}var J={},A={},Qe;function Ne(){if(Qe)return A;Qe=1,Object.defineProperty(A,"__esModule",{value:!0}),A.setUpSocketIOPing=A.appendQueryParams=A.parseSocketIOUrl=void 0;var e=R(),t=function(l){if(l){var f=/^https|wss/.test(l),p=l.replace(/^(https?|wss?)(:\/\/)?/,""),S=p.replace(/\/$/,""),v=f?"wss":"ws";return"".concat(v,"://").concat(S).concat(e.SOCKET_IO_PATH)}else if(l===""){var f=/^https/.test(window.location.protocol),v=f?"wss":"ws",g=window.location.port?":".concat(window.location.port):"";return"".concat(v,"://").concat(window.location.hostname).concat(g).concat(e.SOCKET_IO_PATH)}return l};A.parseSocketIOUrl=t;var a=function(l,f){f===void 0&&(f={});var p=/\?([\w]+=[\w]+)/,S=p.test(l),v="".concat(Object.entries(f).reduce(function(g,h){var u=h[0],m=h[1];return g+"".concat(u,"=").concat(m,"&")},"").slice(0,-1));return"".concat(l).concat(S?"&":"?").concat(v)};A.appendQueryParams=a;var n=function(l,f){f===void 0&&(f=e.SOCKET_IO_PING_INTERVAL);var p=function(){return l(e.SOCKET_IO_PING_CODE)};return window.setInterval(p,f)};return A.setUpSocketIOPing=n,A}var le={},Ye;function vr(){if(Ye)return le;Ye=1,Object.defineProperty(le,"__esModule",{value:!0}),le.heartbeat=a;var e=R();function t(n){return Array.isArray(n)?n.reduce(function(l,f){return l.current>f.current?l:f}).current:n.current}function a(n,l,f){var p=f||{},S=p.interval,v=S===void 0?e.DEFAULT_HEARTBEAT.interval:S,g=p.timeout,h=g===void 0?e.DEFAULT_HEARTBEAT.timeout:g,u=p.message,m=u===void 0?e.DEFAULT_HEARTBEAT.message:u,i=Math.max(100,v/10),o=Date.now(),s=setInterval(function(){var d=Date.now(),c=t(l);if(c+h<=d)console.warn("Heartbeat timed out, closing connection, last message received ".concat(d-c,"ms ago, last ping sent ").concat(d-o,"ms ago")),n.close();else if(c+v<=d&&o+v<=d)try{typeof m=="function"?n.send(m()):n.send(m),o=d}catch(b){console.error("Heartbeat failed, closing connection",b instanceof Error?b.message:b),n.close()}},i);return n.addEventListener("close",function(){clearInterval(s)}),function(){}}return le}var ie={},be={},Xe;function ke(){return Xe||(Xe=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.resetSubscribers=e.removeSubscriber=e.addSubscriber=e.hasSubscribers=e.getSubscribers=void 0;var t={},a=[],n=function(v){return(0,e.hasSubscribers)(v)?Array.from(t[v]):a};e.getSubscribers=n;var l=function(v){var g;return((g=t[v])===null||g===void 0?void 0:g.size)>0};e.hasSubscribers=l;var f=function(v,g){t[v]=t[v]||new Set,t[v].add(g)};e.addSubscriber=f;var p=function(v,g){t[v].delete(g)};e.removeSubscriber=p;var S=function(v){if(v&&t.hasOwnProperty(v))delete t[v];else for(var g in t)t.hasOwnProperty(g)&&delete t[g]};e.resetSubscribers=S})(be)),be}var Ze;function Te(){if(Ze)return ie;Ze=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.assertIsWebSocket=a,ie.resetGlobalState=n;var e=Ie(),t=ke();function a(l,f){if(!f&&!(l instanceof WebSocket))throw new Error("")}function n(l){(0,t.resetSubscribers)(l),(0,e.resetWebSockets)(l)}return ie}var $e;function Mt(){if($e)return J;$e=1;var e=J&&J.__assign||function(){return e=Object.assign||function(h){for(var u,m=1,i=arguments.length;m<i;m++){u=arguments[m];for(var o in u)Object.prototype.hasOwnPro
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as r}from"./iconBase-B7bT1FlI.js";function o(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},child:[]}]})(t)}function n(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(t)}function e(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 20h9"},child:[]},{tag:"path",attr:{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"},child:[]}]})(t)}function a(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"5 9 2 12 5 15"},child:[]},{tag:"polyline",attr:{points:"9 5 12 2 15 5"},child:[]},{tag:"polyline",attr:{points:"15 19 12 22 9 19"},child:[]},{tag:"polyline",attr:{points:"19 9 22 12 19 15"},child:[]},{tag:"line",attr:{x1:"2",y1:"12",x2:"22",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"2",x2:"12",y2:"22"},child:[]}]})(t)}function l(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]}]})(t)}function d(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(t)}function c(t){return r({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"17 8 12 3 7 8"},child:[]},{tag:"line",attr:{x1:"12",y1:"3",x2:"12",y2:"15"},child:[]}]})(t)}export{a as F,o as a,n as b,d as c,l as d,c as e,e as f};
|
||||
@@ -0,0 +1 @@
|
||||
import{d as o}from"./features-animation-BkV7kg8P.js";import"./gestures-BHfQC-M8.js";import"./react-vendor-jWT2yUdV.js";import"./qface-BZLvZXJ8.js";import"./index-DiaaLdUu.js";import"./react-hot-toast-cGcFZPSt.js";import"./react-router-dom-C6k78GT4.js";var e=o;export{e as default};
|
||||
@@ -0,0 +1,9 @@
|
||||
import{r as A,j as r,R}from"./react-vendor-jWT2yUdV.js";import{N as Ue,s as Oe,b as L}from"./index-DiaaLdUu.js";import{i as le}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{d as k}from"./chunk-IHO36JMK-DJPUeGG0.js";import{c as _}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{a as ce,l as ue}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{z as E}from"./react-hot-toast-cGcFZPSt.js";import{h as re,i as ee,j as de,k as fe,l as he,m as me}from"./index-DE7yoXMZ.js";import{g as Be}from"./qface-BZLvZXJ8.js";import{Q as D}from"./qq_manager-BfRTEAby.js";import{u as Fe}from"./use-dialog-CRIMuzeE.js";var Te=Ue();const xe=Be(Te),ot=({showRestart:h=!0,compact:l=!1})=>{const i=Fe(),[u,C]=A.useState(""),x=u==="win32",j=u==="darwin",w=u!==""&&u!=="win32"&&u!=="darwin",e=u!=="",[s,t]=A.useState(""),[n,a]=A.useState(""),[d,o]=A.useState([]),[f,m]=A.useState(""),[v,N]=A.useState(""),[g,y]=A.useState(""),[P,Y]=A.useState([]),[Z,U]=A.useState(!1),[X,B]=A.useState(!1),[S,J]=A.useState(!1),Q=c=>/^[0-9a-fA-F]{32}$/.test(c),b=c=>/^[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}$/.test(c.trim().toLowerCase()),z=A.useMemo(()=>{if(!w)return"";const c=v.trim().toLowerCase();return!g&&!c?"":xe(g+c).toString()},[w,g,v]),F=A.useMemo(()=>!w||!f?"":xe(g+f).toString(),[w,g,f]),T=A.useCallback(async()=>{try{const c=await D.getPlatformInfo();C(c.platform)}catch{C("win32")}},[]),$=A.useCallback(async()=>{U(!0);try{const c=await D.getDeviceGUID();t(c.guid),a(c.guid)}catch(c){const M=c.message;t(""),a(""),M.includes("not found")||E.error(`获取 GUID 失败: ${M}`)}finally{U(!1)}},[]),O=A.useCallback(async()=>{try{const c=await D.getGUIDBackups();o(c)}catch{}},[]),H=A.useCallback(async()=>{U(!0);try{const[c,M]=await Promise.all([D.getLinuxMAC().catch(()=>({mac:""})),D.getLinuxMachineId().catch(()=>({machineId:""}))]);m(c.mac),N(c.mac),y(M.machineId)}catch(c){const M=c.message;E.error(`获取设备信息失败: ${M}`)}finally{U(!1)}},[]),G=A.useCallback(async()=>{try{const c=await D.getLinuxMachineInfoBackups();Y(c)}catch{}},[]);A.useEffect(()=>{T()},[T]),A.useEffect(()=>{e&&(x?($(),O()):(H(),G()))},[e,x,$,O,H,G]);const q=()=>{const c=w?F:s;c&&(navigator.clipboard.writeText(c),E.success("已复制到剪贴板"))},se=async()=>{if(!Q(n)){E.error("GUID 格式无效,需要 32 位十六进制字符");return}B(!0);try{await D.setDeviceGUID(n),t(n),E.success("GUID 已设置,重启后生效"),await O()}catch(c){const M=c.message;E.error(`设置 GUID 失败: ${M}`)}finally{B(!1)}},ne=()=>{i.confirm({title:"确认删除",content:"删除 Registry20 后,QQ 将在下次启动时生成新的设备标识。确定要删除吗?",confirmText:"删除",cancelText:"取消",onConfirm:async()=>{try{await D.resetDeviceID(),t(""),a(""),E.success("已删除,重启后生效"),await O()}catch(c){const M=c.message;E.error(`删除失败: ${M}`)}}})},Re=async()=>{try{await D.createGUIDBackup(),E.success("备份已创建"),await O()}catch(c){const M=c.message;E.error(`备份失败: ${M}`)}},De=c=>{i.confirm({title:"确认恢复",content:`确定要从备份 "${c}" 恢复吗?当前的 Registry20 将被覆盖。`,confirmText:"恢复",cancelText:"取消",onConfirm:async()=>{try{await D.restoreGUIDBackup(c),E.success("已恢复,重启后生效"),await $(),await O()}catch(M){const K=M.message;E.error(`恢复失败: ${K}`)}}})},Pe=async()=>{const c=v.trim().toLowerCase();if(!b(c)){E.error("MAC 格式无效,需要 xx-xx-xx-xx-xx-xx 格式");return}B(!0);try{await D.setLinuxMAC(c),m(c),E.success("MAC 已设置,重启后生效"),await G()}catch(M){const K=M.message;E.error(`设置 MAC 失败: ${K}`)}finally{B(!1)}},Se=()=>{f&&(navigator.clipboard.writeText(f),E.success("MAC 已复制到剪贴板"))},be=()=>{i.confirm({title:"确认删除",content:"删除 machine-info 后,QQ 将在下次启动时生成新的设备标识。确定要删除吗?",confirmText:"删除",cancelText:"取消",onConfirm:async()=>{try{await D.resetLinuxDeviceID(),m(""),N(""),E.success("已删除,重启后生效"),await G()}catch(c){const M=c.message;E.error(`删除失败: ${M}`)}}})},Le=async()=>{try{await D.createLinuxMachineInfoBackup(),E.success("备份已创建"),await G()}catch(c){const M=c.message;E.error(`备份失败: ${M}`)}},ze=c=>{i.confirm({title:"确认恢复",content:`确定要从备份 "${c}" 恢复吗?当前的 machine-info 将被覆盖。`,confirmText:"恢复",cancelText:"取消",onConfirm:async()=>{try{await D.restoreLinuxMachineInfoBackup(c),E.success("已恢复,重启后生效"),await H(),await G()}catch(M){const K=M.message;E.error(`恢复失败: ${K}`)}}})},oe=()=>{i.confirm({title:"确认重启",content:"确定要重启 SnowCat 吗?这将导致当前连接断开。",confirmText:"重启",cancelText:"取消",onConfirm:async()=>{J(!0);try{await D.restartSnowCat(),E.success("重启指令已发送")}catch(c){const M=c.message;E.error(`重启失败: ${M}`)}finally{J(!1)}}})};return Z||!e?r.jsx("div",{className:"flex items-center justify-center py-8",children:r.jsx(Oe,{label:"加载中..."})}):j?r.jsLine truncated
|
||||
* @license QR Code generator library (TypeScript)
|
||||
* Copyright (c) Project Nayuki.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/var V;(h=>{const l=class p{constructor(e,s,t,n){if(this.version=e,this.errorCorrectionLevel=s,this.modules=[],this.isFunction=[],e<p.MIN_VERSION||e>p.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let a=[];for(let o=0;o<this.size;o++)a.push(!1);for(let o=0;o<this.size;o++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const d=this.addEccAndInterleave(t);if(this.drawCodewords(d),n==-1){let o=1e9;for(let f=0;f<8;f++){this.applyMask(f),this.drawFormatBits(f);const m=this.getPenaltyScore();m<o&&(n=f,o=m),this.applyMask(f)}}C(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}static encodeText(e,s){const t=h.QrSegment.makeSegments(e);return p.encodeSegments(t,s)}static encodeBinary(e,s){const t=h.QrSegment.makeBytes(e);return p.encodeSegments([t],s)}static encodeSegments(e,s,t=1,n=40,a=-1,d=!0){if(!(p.MIN_VERSION<=t&&t<=n&&n<=p.MAX_VERSION)||a<-1||a>7)throw new RangeError("Invalid value");let o,f;for(o=t;;o++){const g=p.getNumDataCodewords(o,s)*8,y=j.getTotalBits(e,o);if(y<=g){f=y;break}if(o>=n)throw new RangeError("Data too long")}for(const g of[p.Ecc.MEDIUM,p.Ecc.QUARTILE,p.Ecc.HIGH])d&&f<=p.getNumDataCodewords(o,g)*8&&(s=g);let m=[];for(const g of e){i(g.mode.modeBits,4,m),i(g.numChars,g.mode.numCharCountBits(o),m);for(const y of g.getData())m.push(y)}C(m.length==f);const v=p.getNumDataCodewords(o,s)*8;C(m.length<=v),i(0,Math.min(4,v-m.length),m),i(0,(8-m.length%8)%8,m),C(m.length%8==0);for(let g=236;m.length<v;g^=253)i(g,8,m);let N=[];for(;N.length*8<m.length;)N.push(0);return m.forEach((g,y)=>N[y>>>3]|=g<<7-(y&7)),new p(o,s,N,a)}getModule(e,s){return 0<=e&&e<this.size&&0<=s&&s<this.size&&this.modules[s][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let t=0;t<this.size;t++)this.setFunctionModule(6,t,t%2==0),this.setFunctionModule(t,6,t%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),s=e.length;for(let t=0;t<s;t++)for(let n=0;n<s;n++)t==0&&n==0||t==0&&n==s-1||t==s-1&&n==0||this.drawAlignmentPattern(e[t],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const s=this.errorCorrectionLevel.formatBits<<3|e;let t=s;for(let a=0;a<10;a++)t=t<<1^(t>>>9)*1335;const n=(s<<10|t)^21522;C(n>>>15==0);for(let a=0;a<=5;a++)this.setFunctionModule(8,a,u(n,a));this.setFunctionModule(8,7,u(n,6)),this.setFunctionModule(8,8,u(n,7)),this.setFunctionModule(7,8,u(n,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,u(n,a));for(let a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,u(n,a));for(let a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,u(n,a));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;const s=this.version<<12|e;C(s>>>18==0);for(let t=0;t<18;t++){const n=u(s,t),a=this.size-11+t%3,d=Math.floor(t/3);this.setFunctionModule(a,d,n),this.setFunctionModule(d,a,n)}}drawFinderPattern(e,s){for(let t=-4;t<=4;t++)for(let n=-4;n<=4;n++){const a=Math.max(Math.abs(n),Math.abs(t)),d=e+n,o=s+t;0<=d&&d<this.size&&0<=o&&o<this.size&&this.setFunctionModule(d,o,a!=2&&a!=4)}}drawAlignmentPattern(e,s){for(let t=-2;t<=2;t++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,s+t,Math.max(Math.abs(n),Math.abs(t))!=1)}setFunctionModule(e,s,t){this.modules[s][e]=t,this.isFunction[s][e]=!0}addEccAndInterleave(e){const s=this.version,t=this.errorCorrectionLevel;if(e.length!=p.getNumDataCodewords(s,t))throw new RangeError("Invalid argument");const n=p.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][s],a=p.ECC_CODEWORDS_PER_BLOCK[t.ordinal][s],d=Math.floor(p.getNumRawDataModules(s)/8),o=n-d%n,f=Math.floor(d/n);let m=[];const v=p.reedSolomonComputeDivisor(a);for(let g=0,y=0;g<n;g++){let P=e.slice(y,y+f-a+(g<o?0:1));y+=P.length;const Y=p.reedSolomonComputeRemainder(P,v);g<o&&P.push(0),m.push(P.concat(Y))}let N=[];for(let g=0;g<m[0].length;g++)m.forEach((y,P)=>{(g!=f-a||P>=o)&&N.push(y[g])});return C(N.length==d),N}drawCodewords(e){if(e.length!=Math.floor(p.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let s=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let n=0;n<this.size;n++)for(let a=0;a<2;a++){const d=t-a,f=(t+1&2)==0?this.size-1-n:n;!this.isFunction[f][d]&&s<e.length*8&&(this.modules[f][d]=u(e[s>>>3],7-(s&7)),s++)}}C(s==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let s=0;s<this.size;s++)for(let t=0;t<this.size;t++){let n;switch(e){case 0:n=(t+s)%2==0;break;case 1:n=s%2==0;break;case 2:n=t%3==0;break;case 3:n=(t+s)%3==0;break;case 4:n=(Math.floor(t/3)+Math.floor(s/2))%2==0;break;case 5:n=t*s%2+t*s%3==0;break;case 6:n=(t*s%2+t*s%3)%2==0;break;case 7:n=((t+s)%2+t*s%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[s][t]&&n&&(this.modules[s][t]=!this.modules[Line truncated
|
||||
* @license qrcode.react
|
||||
* Copyright (c) Paul O'Shannessy
|
||||
* SPDX-License-Identifier: ISC
|
||||
*/var ke={L:W.QrCode.Ecc.LOW,M:W.QrCode.Ecc.MEDIUM,Q:W.QrCode.Ecc.QUARTILE,H:W.QrCode.Ecc.HIGH},we=128,ve="L",Me="#FFFFFF",Ee="#000000",Ne=!1,Ie=1,_e=4,Qe=0,$e=.1;function ye(h,l=0){const i=[];return h.forEach(function(u,C){let x=null;u.forEach(function(j,w){if(!j&&x!==null){i.push(`M${x+l} ${C+l}h${w-x}v1H${x+l}z`),x=null;return}if(w===u.length-1){if(!j)return;x===null?i.push(`M${w+l},${C+l} h1v1H${w+l}z`):i.push(`M${x+l},${C+l} h${w+1-x}v1H${x+l}z`);return}j&&x===null&&(x=w)})}),i.join("")}function Ae(h,l){return h.slice().map((i,u)=>u<l.y||u>=l.y+l.h?i:i.map((C,x)=>x<l.x||x>=l.x+l.w?C:!1))}function He(h,l,i,u){if(u==null)return null;const C=h.length+i*2,x=Math.floor(l*$e),j=C/l,w=(u.width||x)*j,e=(u.height||x)*j,s=u.x==null?h.length/2-w/2:u.x*j,t=u.y==null?h.length/2-e/2:u.y*j,n=u.opacity==null?1:u.opacity;let a=null;if(u.excavate){let o=Math.floor(s),f=Math.floor(t),m=Math.ceil(w+s-o),v=Math.ceil(e+t-f);a={x:o,y:f,w:m,h:v}}const d=u.crossOrigin;return{x:s,y:t,h:e,w,excavation:a,opacity:n,crossOrigin:d}}function Ve(h,l){return l!=null?Math.max(Math.floor(l),0):h?_e:Qe}function je({value:h,level:l,minVersion:i,includeMargin:u,marginSize:C,imageSettings:x,size:j,boostLevel:w}){let e=R.useMemo(()=>{const o=(Array.isArray(h)?h:[h]).reduce((f,m)=>(f.push(...W.QrSegment.makeSegments(m)),f),[]);return W.QrCode.encodeSegments(o,ke[l],i,void 0,void 0,w)},[h,l,i,w]);const{cells:s,margin:t,numCells:n,calculatedImageSettings:a}=R.useMemo(()=>{let d=e.getModules();const o=Ve(u,C),f=d.length+o*2,m=He(d,j,o,x);return{cells:d,margin:o,numCells:f,calculatedImageSettings:m}},[e,j,x,u,C]);return{qrcode:e,margin:t,cells:s,numCells:n,calculatedImageSettings:a}}var Ye=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Xe=R.forwardRef(function(l,i){const u=l,{value:C,size:x=we,level:j=ve,bgColor:w=Me,fgColor:e=Ee,includeMargin:s=Ne,minVersion:t=Ie,boostLevel:n,marginSize:a,imageSettings:d}=u,f=ie(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:m}=f,v=ie(f,["style"]),N=d==null?void 0:d.src,g=R.useRef(null),y=R.useRef(null),P=R.useCallback(b=>{g.current=b,typeof i=="function"?i(b):i&&(i.current=b)},[i]),[Y,Z]=R.useState(!1),{margin:U,cells:X,numCells:B,calculatedImageSettings:S}=je({value:C,level:j,minVersion:t,boostLevel:n,includeMargin:s,marginSize:a,imageSettings:d,size:x});R.useEffect(()=>{if(g.current!=null){const b=g.current,z=b.getContext("2d");if(!z)return;let F=X;const T=y.current,$=S!=null&&T!==null&&T.complete&&T.naturalHeight!==0&&T.naturalWidth!==0;$&&S.excavation!=null&&(F=Ae(X,S.excavation));const O=window.devicePixelRatio||1;b.height=b.width=x*O;const H=x/B*O;z.scale(H,H),z.fillStyle=w,z.fillRect(0,0,B,B),z.fillStyle=e,Ye?z.fill(new Path2D(ye(F,U))):X.forEach(function(G,q){G.forEach(function(se,ne){se&&z.fillRect(ne+U,q+U,1,1)})}),S&&(z.globalAlpha=S.opacity),$&&z.drawImage(T,S.x+U,S.y+U,S.w,S.h)}}),R.useEffect(()=>{Z(!1)},[N]);const J=ae({height:x,width:x},m);let Q=null;return N!=null&&(Q=R.createElement("img",{src:N,key:N,style:{display:"none"},onLoad:()=>{Z(!0)},ref:y,crossOrigin:S==null?void 0:S.crossOrigin})),R.createElement(R.Fragment,null,R.createElement("canvas",ae({style:J,height:x,width:x,ref:P,role:"img"},v)),Q)});Xe.displayName="QRCodeCanvas";var We=R.forwardRef(function(l,i){const u=l,{value:C,size:x=we,level:j=ve,bgColor:w=Me,fgColor:e=Ee,includeMargin:s=Ne,minVersion:t=Ie,boostLevel:n,title:a,marginSize:d,imageSettings:o}=u,f=ie(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:m,cells:v,numCells:N,calculatedImageSettings:g}=je({value:C,level:j,minVersion:t,boostLevel:n,includeMargin:s,marginSize:d,imageSettings:o,size:x});let y=v,P=null;o!=null&&g!=null&&(g.excavation!=null&&(y=Ae(v,g.excavation)),P=R.createElement("image",{href:o.src,height:g.h,width:g.w,x:g.x+m,y:g.y+m,preserveAspectRatio:"none",opacity:g.opacity,crossOrigin:g.crossOrigin}));const Y=ye(y,m);return R.createElement("svg",ae({height:x,width:x,viewBox:`0 0 ${N} ${N}`,ref:i,role:"img"},f),!!a&&R.createElement("title",null,a),R.createElement("path",{fill:w,d:`M0,0 h${N}v${N}H0z`,shapeRendering:"crispEdges"}),R.createElement("path",{fill:e,d:Y,shapeRendering:"crispEdges"}),P)});We.displayName="QRCodeSVG";export{ot as G,We as Q};
|
||||
@@ -0,0 +1 @@
|
||||
import{G as h}from"./iconBase-B7bT1FlI.js";function l(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"},child:[]}]})(t)}function c(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(t)}function d(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"},child:[]}]})(t)}function i(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5a2.5 2.5 0 0 0-5 0V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5a2.5 2.5 0 0 0 0-5z"},child:[]}]})(t)}function n(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.5-1.57 3.5-3.5S13.93 9.5 12 9.5a3.5 3.5 0 0 0-3.1 1.9l1.6 1.6h-4V9l1.3 1.3C8.69 8.92 10.23 8 12 8c2.76 0 5 2.24 5 5s-2.24 5-5 5z"},child:[]}]})(t)}function r(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"},child:[]}]})(t)}function v(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"},child:[]}]})(t)}function e(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(t)}function M(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(t)}function o(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(t)}function z(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(t)}function H(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function p(t){return h({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0sLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as t}from"./iconBase-B7bT1FlI.js";function l(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M16 8c0 3.866-3.582 7-8 7a9 9 0 0 1-2.347-.306c-.584.296-1.925.864-4.181 1.234-.2.032-.352-.176-.273-.362.354-.836.674-1.95.77-2.966C.744 11.37 0 9.76 0 8c0-3.866 3.582-7 8-7s8 3.134 8 7M7.194 6.766a1.7 1.7 0 0 0-.227-.272 1.5 1.5 0 0 0-.469-.324l-.008-.004A1.8 1.8 0 0 0 5.734 6C4.776 6 4 6.746 4 7.667c0 .92.776 1.666 1.734 1.666.343 0 .662-.095.931-.26-.137.389-.39.804-.81 1.22a.405.405 0 0 0 .011.59c.173.16.447.155.614-.01 1.334-1.329 1.37-2.758.941-3.706a2.5 2.5 0 0 0-.227-.4zM11 9.073c-.136.389-.39.804-.81 1.22a.405.405 0 0 0 .012.59c.172.16.446.155.613-.01 1.334-1.329 1.37-2.758.942-3.706a2.5 2.5 0 0 0-.228-.4 1.7 1.7 0 0 0-.227-.273 1.5 1.5 0 0 0-.469-.324l-.008-.004A1.8 1.8 0 0 0 10.07 6c-.957 0-1.734.746-1.734 1.667 0 .92.777 1.666 1.734 1.666.343 0 .662-.095.931-.26z"},child:[]}]})(a)}function r(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M10.478 1.647a.5.5 0 1 0-.956-.294l-4 13a.5.5 0 0 0 .956.294zM4.854 4.146a.5.5 0 0 1 0 .708L1.707 8l3.147 3.146a.5.5 0 0 1-.708.708l-3.5-3.5a.5.5 0 0 1 0-.708l3.5-3.5a.5.5 0 0 1 .708 0m6.292 0a.5.5 0 0 0 0 .708L14.293 8l-3.147 3.146a.5.5 0 0 0 .708.708l3.5-3.5a.5.5 0 0 0 0-.708l-3.5-3.5a.5.5 0 0 0-.708 0"},child:[]}]})(a)}function h(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M5 0a.5.5 0 0 1 .5.5V2h1V.5a.5.5 0 0 1 1 0V2h1V.5a.5.5 0 0 1 1 0V2h1V.5a.5.5 0 0 1 1 0V2A2.5 2.5 0 0 1 14 4.5h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14v1h1.5a.5.5 0 0 1 0 1H14a2.5 2.5 0 0 1-2.5 2.5v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14h-1v1.5a.5.5 0 0 1-1 0V14A2.5 2.5 0 0 1 2 11.5H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2v-1H.5a.5.5 0 0 1 0-1H2A2.5 2.5 0 0 1 4.5 2V.5A.5.5 0 0 1 5 0m-.5 3A1.5 1.5 0 0 0 3 4.5v7A1.5 1.5 0 0 0 4.5 13h7a1.5 1.5 0 0 0 1.5-1.5v-7A1.5 1.5 0 0 0 11.5 3zM5 6.5A1.5 1.5 0 0 1 6.5 5h3A1.5 1.5 0 0 1 11 6.5v3A1.5 1.5 0 0 1 9.5 11h-3A1.5 1.5 0 0 1 5 9.5zM6.5 6a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"},child:[]}]})(a)}function i(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 0a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V3a3 3 0 0 0-3-3zm2.5 4a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m8 8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M8 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(a)}function o(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"},child:[]}]})(a)}function n(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m7.5-6.923c-.67.204-1.335.82-1.887 1.855A8 8 0 0 0 5.145 4H7.5zM4.09 4a9.3 9.3 0 0 1 .64-1.539 7 7 0 0 1 .597-.933A7.03 7.03 0 0 0 2.255 4zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a7 7 0 0 0-.656 2.5zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5zM8.5 5v2.5h2.99a12.5 12.5 0 0 0-.337-2.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5zM5.145 12q.208.58.468 1.068c.552 1.035 1.218 1.65 1.887 1.855V12zm.182 2.472a7 7 0 0 1-.597-.933A9.3 9.3 0 0 1 4.09 12H2.255a7 7 0 0 0 3.072 2.472M3.82 11a13.7 13.7 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5zm6.853 3.472A7 7 0 0 0 13.745 12H11.91a9.3 9.3 0 0 1-.64 1.539 7 7 0 0 1-.597.933M8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855q.26-.487.468-1.068zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.7 13.7 0 0 1-.312 2.5m2.802-3.5a7 7 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7 7 0 0 0-3.072-2.472c.218.284.418.598.597.933M10.855 4a8 8 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4z"},child:[]}]})(a)}function e(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M1 8a7 7 0 1 1 2.898 5.673c-.167-.121-.216-.406-.002-.62l1.8-1.8a3.5 3.5 0 0 0 4.572-.328l1.414-1.415a.5.5 0 0 0 0-.707l-.707-.707 1.559-1.563a.5.5 0 1 0-.708-.706l-1.559 1.562-1.414-1.414 1.56-1.562a.5.5 0 1 0-.707-.706l-1.56 1.56-.707-.706a.5.5 0 0 0-.707 0L5.318 5.975a3.5 3.5 0 0 0-.328 4.571l-1.8 1.8c-.58.58-.62 1.6.121 2.137A8 8 0 1 0 0 8a.5.5 0 0 0 1 0"},child:[]}]})(a)}function d(a){return t({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M6.048 3.32Line truncated
|
||||
@@ -0,0 +1,69 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Crbd1Tvi.js","assets/features-animation-BkV7kg8P.js","assets/gestures-BHfQC-M8.js","assets/react-vendor-jWT2yUdV.js","assets/qface-BZLvZXJ8.js","assets/react-hot-toast-cGcFZPSt.js","assets/react-router-dom-C6k78GT4.js","assets/web_login-CMycqFcX.js","assets/chunk-5PILOUBS-KHYNqMZE.js","assets/chunk-D5XJWRAV-DVN21qSw.js","assets/chunk-MLPFQTYO-DSnBqIsb.js","assets/index-BsnVex0g.js","assets/chunk-2QAN2V2R-B2qCPZrG.js","assets/chunk-SLABUSGS-Cmz8sGrU.js","assets/useFocusable-DA5Croun.js","assets/chunk-M3MASYO7-B4fjH-eW.js","assets/index-FvTxWQTZ.js","assets/iconBase-B7bT1FlI.js","assets/logo-kBMoCJob.js","assets/pure-XNiwTrk_.js","assets/chunk-EN4B57RQ-Ief8qCCd.js","assets/chunk-UX7UMZL5-CMHjUaC_.js","assets/useToggle-B3ZYBe5S.js","assets/usePress-BrNwsdVw.js","assets/icons-C0t6aNgu.js","assets/chunk-OPTZHMJX-CY9g90YL.js","assets/chunk-6LIX6LVT-B246pOuK.js","assets/chunk-WQVQ7P2I-BJd1EiqP.js","assets/useHover-DC1o5-bm.js","assets/proxy-BsRmjYPH.js","assets/layout-Buao20KT.js","assets/index-Dx1G_OVB.js","assets/chunk-B75B6XQK-aFCr8AK6.js","assets/chunk-FGM523TA-CgSvUh2a.js","assets/chunk-NAV3ZXLI-ChbUTMf0.js","assets/index-DE7yoXMZ.js","assets/chunk-IHO36JMK-DJPUeGG0.js","assets/chunk-RJKRL3AU-CjtrMR1U.js","assets/chunk-AXSF7SRE-Cr4elNVq.js","assets/index-DvErMbt6.js","assets/use-dialog-CRIMuzeE.js","assets/process_utils-Bjmp-2dU.js","assets/index-BBhZPeTB.js","assets/qq_manager-BfRTEAby.js","assets/qq_login-CEQa75PR.js","assets/chunk-ML27DD5T-ZFWrMOn-.js","assets/index-BV9-YCKp.js","assets/SelectionManager-Dl9uHsLK.js","assets/Item-D8Sud-UP.js","assets/index-D6HfLP9Q.js","assets/chunk-KVDW62ZT-CGYYmJoP.js","assets/DOMLayoutDelegate-DOgfSALU.js","assets/chunk-SXMLSBOY-NckgDZ9w.js","assets/chunk-KQ5CH2X7-DgF-_fDD.js","assets/chunk-2QQAR2RD-YG5LNmAk.js","assets/index-j_lE0ff_.js","assets/useRequest-B1BwPztr.js","assets/index-DPx4wqle.js","assets/chunk-J6JGI6RM-Djlxjgjl.js","assets/chunk-APIAPHLK-nGgOe_Nr.js","assets/index-_HIxriDC.js","assets/mirror_selector_modal-CyjkhfUx.js","assets/index-Bz8pD9tN.js","assets/use-config-Cu0QvgCe.js","assets/about-hJDPu37V.js","assets/index-BMgeCmqo.js","assets/react-hook-form-DTbqnRcd.js","assets/switch_card-5j4Yjx-K.js","assets/codemirror-core-782AVq39.js","assets/file_manager-BG19iFYW.js","assets/index-Mx73Ba53.js","assets/index-B7sEHDC8.js","assets/code_editor-TFSnOENo.js","assets/codemirror-lang-DFaD5e7G.js","assets/modal-CW_tV9ed.js","assets/modal-DqW0R8N9.css","assets/index-CNcy_3u9.js","assets/file_manager-DG9T_SkS.js","assets/index-CVa9XolR.js","assets/empty_state-BmDJmEaB.js","assets/logs-FVKktap5.js","assets/xterm-m1lN6Krd.js","assets/xterm-CFbL2ovg.css","assets/network-CV3GIG8e.js","assets/chunk-TE6SZS6W-DGowl7ka.js","assets/page_header-Dr2OAQrb.js","assets/terminal-RrXWbdeN.js","assets/plugin-y4YoZhit.js","assets/plugin_manager-OIjldREQ.js","assets/plugin_store-DB9s3Pf8.js","assets/extension-BuyZL8L1.js"])))=>i.map(i=>d[i]);
|
||||
var Pu=Object.defineProperty;var ku=(e,t,r)=>t in e?Pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fi=(e,t,r)=>ku(e,typeof t!="symbol"?t+"":t,r);import{a as Ru,r as C,j as I,R as ae,$ as y0,b as Ou}from"./react-vendor-jWT2yUdV.js";import{F as Nu}from"./react-hot-toast-cGcFZPSt.js";import{u as E0,R as Lu,a as Me,B as Mu}from"./react-router-dom-C6k78GT4.js";import{a as Iu,c as To,g as Hu}from"./qface-BZLvZXJ8.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();const ju="modulepreload",zu=function(e){return"/webui/"+e},di={},Pe=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let i=function(c){return Promise.all(c.map(l=>Promise.resolve(l).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),u=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=i(r.map(c=>{if(c=zu(c),c in di)return;di[c]=!0;const l=c.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=l?"stylesheet":ju,l||(f.as="script"),f.crossOrigin="",f.href=c,u&&f.setAttribute("nonce",u),document.head.appendChild(f),l)return new Promise((p,x)=>{f.addEventListener("load",p),f.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};var Po={exports:{}},ko={};/**
|
||||
* @license React
|
||||
* use-sync-external-store-with-selector.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 xi;function Uu(){if(xi)return ko;xi=1;var e=Ru();function t(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,o=e.useRef,a=e.useEffect,i=e.useMemo,s=e.useDebugValue;return ko.useSyncExternalStoreWithSelector=function(u,c,l,d,f){var p=o(null);if(p.current===null){var x={hasValue:!1,value:null};p.current=x}else x=p.current;p=i(function(){function h(A){if(!w){if(w=!0,m=A,A=d(A),f!==void 0&&x.hasValue){var _=x.value;if(f(_,A))return g=_}return g=A}if(_=g,r(m,A))return _;var D=d(A);return f!==void 0&&f(_,D)?(m=A,_):(m=A,g=D)}var w=!1,m,g,y=l===void 0?null:l;return[function(){return h(c())},y===null?void 0:function(){return h(y())}]},[c,l,d,f]);var v=n(u,p[0],p[1]);return a(function(){x.hasValue=!0,x.value=v},[v]),s(v),v},ko}var pi;function Wu(){return pi||(pi=1,Po.exports=Uu()),Po.exports}var qu=Wu();function Vu(e){e()}function Ku(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Vu(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!n||e===null||(n=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var hi={notify(){},get:()=>[]};function Gu(e,t){let r,n=hi,o=0,a=!1;function i(v){l();const h=n.subscribe(v);let w=!1;return()=>{w||(w=!0,h(),d())}}function s(){n.notify()}function u(){x.onStateChange&&x.onStateChange()}function c(){return a}function l(){o++,r||(r=e.subscribe(u),n=Ku())}function d(){o--,r&&o===0&&(r(),r=void 0,n.clear(),n=hi)}function f(){a||(a=!0,l())}function p(){a&&(a=!1,d())}const x={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>n};return x}var Xu=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yu=Xu(),Zu=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Ju=Zu(),Qu=()=>Yu||Ju?C.useLayoutEffect:C.useEffect,ef=Qu(),Ro=Symbol.for("react-redux-context"),Oo=typeof globalThis<"u"?globalThis:{};function tf(){if(!C.createContext)return{};const e=Oo[Ro]??(Oo[Ro]=new Map);let t=e.get(C.createContext);return t||(t=C.createContext(null),e.set(C.createContext,t)),t}var _t=tf();function rf(e){const{children:t,context:r,serverState:n,store:o}=e,a=C.useMemo(()=>{const u=Gu(o);return{store:o,subscription:u,getServerState:n?()=>n:void 0}},[o,n]),i=C.useMemo(()=>o.getState(),[o]);ef(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),i!==o.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,i]);const s=r||_t;return C.createElement(s.Provider,{value:a},t)}var nf=rf;function La(e=_t){return function(){return C.useContext(e)}}var w0=La();function C0(e=_t){const t=e===_t?w0:La(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var of=C0();function af(e=_t){const t=e===_t?of:C0(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Lm=af(),sf=(e,t)=>e===t;function cf(e=_t){const t=e===_t?w0:La(e),r=(n,o={})=>{const{equalityFn:a=sf}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:s,subscription:u,getServerState:c}=i;C.useRef(!0);const l=C.useCallback({[n.name](f){return n(f)}}[n.name],[n]),d=qu.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,c||s.getState,l,a);return C.useDebugValue(d),d};return Object.assign(r,{withTypes:()=>r}),r}var Mm=cf();const lf=()=>I.jsxs("div",{className:"fixed inset-0 w-full h-full -z-10 overflow-hidden bg-gradient-to-br from-[#fffafc] via-white to-[#f3f9fd] dark:from-[#0b0b12] dark:via-[#101019] dark:to-[#0a1015]",children:[I.jsx("div",{className:"sc-float-slow absolute -top-[14%] -left-[8%] w-[520px] h-[520px] rounded-full bg-primary-200/25 blur-[110px]"}),I.jsx("div",{className:"sc-float-slower absolute top-[16%] -right-[10%] w-[440px] h-[440px] rounded-full bg-secondary-200/25 blur-[100px]"}),I.jsx("div",{className:"sc-float-slow absolute -bottom-[16%] left-[22%] w-[600px] h-[600px] rounded-full bg-pink-200/20 blur-[120px] dark:bg-primary-900/20"}),I.jsx("div",{className:"absolute inset-0 opacity-[0.35] dark:opacity-[0.18]",style:{backgroundImage:"linear-gradient(to right, rgba(148,163,184,0.10) 1px, transparent 1px), linear-gradient(to bottom, rgba(148,163,184,0.10) 1px, transparent 1px)",backgroundSize:"44px 44px",maskImage:"radial-gradient(circle at 50% 30%, black 0%, transparent 78%)",WebkitMaskImage:"radial-gradient(circle at 50% 30%, black 0%, transparent 78%)"}}),I.jsx("div",{className:"absolute inset-x-0 top-0 h-40 bg-gradient-to-b from-white/70 to-transparent dark:from-white/[0.04]"})]});function sr(e){return C.forwardRef(e)}var $0=(e,t,r=!0)=>{if(!t)return[e,{}];const n=t.reduce((o,a)=>a in e?{...o,[a]:e[a]}:o,{});return r?[Object.keys(e).filter(a=>!t.includes(a)).reduce((a,i)=>({...a,[i]:e[i]}),{}),n]:[e,n]},Wr=["small","medium","large"],vi={theme:{opacLine truncated
|
||||
* @license React
|
||||
* react.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*//**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/function fd(e,t,r){return Math.min(Math.max(e,t),r)}function dd(e){const[t,r]=$0(e,Ci.variantKeys),{children:n,className:o,classNames:a,label:i,...s}=t,u=C.useMemo(()=>Ci({...r}),[z0(r)]),c=nr(a==null?void 0:a.base,o),l=i||n,d=C.useMemo(()=>l&&typeof l=="string"?l:s["aria-label"]?"":"Loading",[n,l,s["aria-label"]]),f=C.useCallback(()=>({"aria-label":d,className:u.base({class:c}),...s}),[d,u,c,s]);return{label:l,slots:u,classNames:a,getSpinnerProps:f}}var U0=sr((e,t)=>{const{slots:r,classNames:n,label:o,getSpinnerProps:a}=dd({...e});return I.jsxs("div",{ref:t,...a(),children:[I.jsxs("div",{className:r.wrapper({class:n==null?void 0:n.wrapper}),children:[I.jsx("i",{className:r.circle1({class:n==null?void 0:n.circle1})}),I.jsx("i",{className:r.circle2({class:n==null?void 0:n.circle2})})]}),o&&I.jsx("span",{className:r.label({class:n==null?void 0:n.label}),children:o})]})});U0.displayName="HeroUI.Spinner";var W0=U0;function q0(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=q0(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ha(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=q0(e))&&(n&&(n+=" "),n+=t);return n}const xd=({loading:e})=>I.jsx("div",{className:Ha("absolute inset-0 z-30 flex justify-center items-center rounded-2xl","bg-white/40 dark:bg-black/30 backdrop-blur-md",{hidden:!e}),children:I.jsxs("div",{className:"px-6 py-5 rounded-2xl bg-white/80 dark:bg-white/[0.06] border border-white/70 dark:border-white/10 shadow-lg flex flex-col items-center gap-3",children:[I.jsx(W0,{size:"lg",color:"primary"}),I.jsx("span",{className:"text-[10px] text-default-500 tracking-[0.25em] uppercase",children:"Loading"})]})});function V0(e,t){window.dispatchEvent(new StorageEvent("storage",{key:e,newValue:t}))}function Xm(e,t){const[r,n]=C.useState(e);return C.useEffect(()=>{const o=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(o)}},[e,t]),r}const Si=(e,t)=>{const r=JSON.stringify(t);window.localStorage.setItem(e,r),V0(e,r)},pd=e=>{window.localStorage.removeItem(e),V0(e,null)},Bi=e=>window.localStorage.getItem(e),hd=e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),vd=()=>{throw Error("useLocalStorage is a client-only hook")};function K0(e,t){const r=()=>Bi(e),n=C.useSyncExternalStore(hd,r,vd),o=C.useCallback(a=>{try{const i=typeof a=="function"?a(JSON.parse(n)):a;i==null?pd(e):Si(e,i)}catch(i){console.warn(i)}},[e,n]);return C.useEffect(()=>{Bi(e)===null&&typeof t<"u"&&Si(e,t)},[e,t]),[n?JSON.parse(n):t,o]}const Et={key:"theme",light:"light",dark:"dark"},bd=e=>{const[t,r]=K0(Et.key,e),n=C.useMemo(()=>t===Et.dark,[t]),o=C.useMemo(()=>t===Et.light,[t]),a=c=>{r(c),document.documentElement.classList.remove(Et.light,Et.dark),document.documentElement.classList.add(c)},i=()=>a(Et.light),s=()=>a(Et.dark),u=()=>t===Et.dark?i():s();return C.useEffect(()=>{a(t)}),{theme:t,isDark:n,isLight:o,setLightTheme:i,setDarkTheme:s,toggleTheme:u}},gd=()=>{const{isDark:e}=bd();return I.jsx(Nu,{toastOptions:{style:{borderRadius:"20px",background:e?"#333":"#fff",color:e?"#fff":"#333",maxWidth:"400px",wordBreak:"break-word"}}})};function ja(e={}){const{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:n}=e,o=C.createContext(void 0);o.displayName=n;function a(){var i;const s=C.useContext(o);if(!s&&t){const u=new Error(r);throw u.name="ContextError",(i=Error.captureStackTrace)==null||i.call(Error,u,a),u}return s}return[o.Provider,a,o]}function Ym(e){return{UNSAFE_getDOMNode(){return e.current}}}function Or(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current),t}var md=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","steLine truncated
|
||||
[data-motion-pop-id="${o}"] {
|
||||
position: absolute !important;
|
||||
width: ${c}px !important;
|
||||
height: ${l}px !important;
|
||||
${x}px !important;
|
||||
top: ${d}px !important;
|
||||
}
|
||||
`),()=>{h.contains(v)&&h.removeChild(v)}},[t]),I.jsx(Yp,{isPresent:t,childRef:a,sizeRef:i,children:C.cloneElement(e,{ref:u})})}const Jp=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,root:u})=>{const c=ho(Qp),l=C.useId();let d=!0,f=C.useMemo(()=>(d=!1,{id:l,initial:t,isPresent:r,custom:o,onExitComplete:p=>{c.set(p,!0);for(const x of c.values())if(!x)return;n&&n()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[r,c,n]);return a&&d&&(f={...f}),C.useMemo(()=>{c.forEach((p,x)=>c.set(x,!1))},[r]),C.useEffect(()=>{!r&&!c.size&&n&&n()},[r]),i==="popLayout"&&(e=I.jsx(Zp,{isPresent:r,anchorX:s,root:u,children:e})),I.jsx(vo.Provider,{value:f,children:e})};function Qp(){return new Map}function eh(e=!0){const t=C.useContext(vo);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:o}=t,a=C.useId();C.useEffect(()=>{if(e)return o(a)},[e]);const i=C.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}const Zr=e=>e.key||"";function Ji(e){const t=[];return C.Children.forEach(e,r=>{C.isValidElement(r)&&t.push(r)}),t}const gl=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:u})=>{const[c,l]=eh(i),d=C.useMemo(()=>Ji(e),[e]),f=i&&!c?[]:d.map(Zr),p=C.useRef(!0),x=C.useRef(d),v=ho(()=>new Map),[h,w]=C.useState(d),[m,g]=C.useState(d);dl(()=>{p.current=!1,x.current=d;for(let _=0;_<m.length;_++){const D=Zr(m[_]);f.includes(D)?v.delete(D):v.get(D)!==!0&&v.set(D,!1)}},[m,f.length,f.join("-")]);const y=[];if(d!==h){let _=[...d];for(let D=0;D<m.length;D++){const b=m[D],k=Zr(b);f.includes(k)||(_.splice(D,0,b),y.push(b))}return a==="wait"&&y.length&&(_=y),g(Ji(_)),w(d),null}const{forceRender:A}=C.useContext(ul);return I.jsx(I.Fragment,{children:m.map(_=>{const D=Zr(_),b=i&&!c?!1:d===m||f.includes(D),k=()=>{if(v.has(D))v.set(D,!0);else return;let F=!0;v.forEach(S=>{S||(F=!1)}),F&&(A==null||A(),g(x.current),i&&(l==null||l()),n&&n())};return I.jsx(Jp,{isPresent:b,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:b?void 0:k,anchorX:s,children:_},D)})})},Ja=C.createContext({strict:!1}),Qi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Zn={};for(const e in Qi)Zn[e]={isEnabled:t=>Qi[e].some(r=>!!t[r])};function ma(e){for(const t in e)Zn[t]={...Zn[t],...e[t]}}function ya({children:e,features:t,strict:r=!1}){const[,n]=C.useState(!zo(t)),o=C.useRef(void 0);if(!zo(t)){const{renderer:a,...i}=t;o.current=a,ma(i)}return C.useEffect(()=>{zo(t)&&t().then(({renderer:a,...i})=>{ma(i),o.current=a,n(!0)})},[]),I.jsx(Ja.Provider,{value:{renderer:o.current,strict:r},children:e})}function zo(e){return typeof e=="function"}const th=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||th.has(e)}let ml=e=>!Jn(e);function yl(e){typeof e=="function"&&(ml=t=>t.startsWith("on")?!Jn(t):e(t))}try{yl(require("@emotion/is-prop-valid").default)}catch{}function rh(e,t,r){const n={};for(const o in e)o==="values"&&typeof e.values=="object"||(ml(o)||r===!0&&Jn(o)||!t&&!Jn(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function nh({children:e,isValidProp:t,...r}){t&&yl(t),r={...C.useContext(Tr),...r},r.isStatic=ho(()=>r.isStatic);const n=C.useMemo(()=>r,[JSON.stringify(r.transition),r.transformPagePoint,r.reducedMotion]);return I.jsx(Tr.Provider,{value:n,children:e})}const go=C.createContext({});function El(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ea(e){return typeof e=="string"||Array.isArray(e)}const oh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ah=["initial",...oh];function Qa(e){return El(e.animate)||ah.some(t=>Ea(e[t]))}function ih(e){return!!(Qa(e)||e.variants)}function sh(e,t){if(Qa(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Ea(r)?r:void 0,animate:Ea(n)?n:void 0}}return e.inherit!==!1?t:{}}function ch(e){const{initial:t,animate:r}=sh(e,C.useContext(go));return C.useMemo(()=>({initial:t,animate:r}),[es(t),es(r)])}function es(e){return Array.isArray(e)
Line truncated
|
||||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/return(function(n){var o=r,a=o.lib,i=a.WordArray,s=a.Hasher,u=o.algo,c=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),p=i.create([0,1518500249,1859775393,2400959708,2840853838]),x=i.create([1352829926,1548603684,1836072691,2053994217,0]),v=u.RIPEMD160=s.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(_,D){for(var b=0;b<16;b++){var k=D+b,F=_[k];_[k]=(F<<8|F>>>24)&16711935|(F<<24|F>>>8)&4278255360}var S=this._hash.words,B=p.words,$=x.words,O=c.words,P=l.words,H=d.words,W=f.words,j,q,Z,E,T,R,L,V,Y,ie;R=j=S[0],L=q=S[1],V=Z=S[2],Y=E=S[3],ie=T=S[4];for(var K,b=0;b<80;b+=1)K=j+_[D+O[b]]|0,b<16?K+=h(q,Z,E)+B[0]:b<32?K+=w(q,Z,E)+B[1]:b<48?K+=m(q,Z,E)+B[2]:b<64?K+=g(q,Z,E)+B[3]:K+=y(q,Z,E)+B[4],K=K|0,K=A(K,H[b]),K=K+T|0,j=T,T=E,E=A(Z,10),Z=q,q=K,K=R+_[D+P[b]]|0,b<16?K+=y(L,V,Y)+$[0]:b<32?K+=g(L,V,Y)+$[1]:b<48?K+=m(L,V,Y)+$[2]:b<64?K+=w(L,V,Y)+$[3]:K+=h(L,V,Y)+$[4],K=K|0,K=A(K,W[b]),K=K+ie|0,R=ie,ie=Y,Y=A(V,10),V=L,L=K;K=S[1]+Z+Y|0,S[1]=S[2]+E+ie|0,S[2]=S[3]+T+R|0,S[3]=S[4]+j+L|0,S[4]=S[0]+q+V|0,S[0]=K},_doFinalize:function(){var _=this._data,D=_.words,b=this._nDataBytes*8,k=_.sigBytes*8;D[k>>>5]|=128<<24-k%32,D[(k+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,_.sigBytes=(D.length+1)*4,this._process();for(var F=this._hash,S=F.words,B=0;B<5;B++){var $=S[B];S[B]=($<<8|$>>>24)&16711935|($<<24|$>>>8)&4278255360}return F},clone:function(){var _=s.clone.call(this);return _._hash=this._hash.clone(),_}});function h(_,D,b){return _^D^b}function w(_,D,b){return _&D|~_&b}function m(_,D,b){return(_|~D)^b}function g(_,D,b){return _&b|D&~b}function y(_,D,b){return _^(D|~b)}function A(_,D){return _<<D|_>>>32-D}o.RIPEMD160=s._createHelper(v),o.HmacRIPEMD160=s._createHmacHelper(v)})(),r.RIPEMD160})})(En)),En.exports}var wn={exports:{}},lb=wn.exports,Rs;function ii(){return Rs||(Rs=1,(function(e,t){(function(r,n){e.exports=n(ue())})(lb,function(r){(function(){var n=r,o=n.lib,a=o.Base,i=n.enc,s=i.Utf8,u=n.algo;u.HMAC=a.extend({init:function(c,l){c=this._hasher=new c.init,typeof l=="string"&&(l=s.parse(l));var d=c.blockSize,f=d*4;l.sigBytes>f&&(l=c.finalize(l)),l.clamp();for(var p=this._oKey=l.clone(),x=this._iKey=l.clone(),v=p.words,h=x.words,w=0;w<d;w++)v[w]^=1549556828,h[w]^=909522486;p.sigBytes=x.sigBytes=f,this.reset()},reset:function(){var c=this._hasher;c.reset(),c.update(this._iKey)},update:function(c){return this._hasher.update(c),this},finalize:function(c){var l=this._hasher,d=l.finalize(c);l.reset();var f=l.finalize(this._oKey.clone().concat(d));return f}})})()})})(wn)),wn.exports}var Cn={exports:{}},ub=Cn.exports,Os;function fb(){return Os||(Os=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ai(),ii())})(ub,function(r){return(function(){var n=r,o=n.lib,a=o.Base,i=o.WordArray,s=n.algo,u=s.SHA256,c=s.HMAC,l=s.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:u,iterations:25e4}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,f){for(var p=this.cfg,x=c.create(p.hasher,d),v=i.create(),h=i.create([1]),w=v.words,m=h.words,g=p.keySize,y=p.iterations;w.length<g;){var A=x.update(f).finalize(h);x.reset();for(var _=A.words,D=_.length,b=A,k=1;k<y;k++){b=x.finalize(b),x.reset();for(var F=b.words,S=0;S<D;S++)_[S]^=F[S]}v.concat(A),m[0]++}return v.sigBytes=g*4,v}});n.PBKDF2=function(d,f,p){return l.create(p).compute(d,f)}})(),r.PBKDF2})})(Cn)),Cn.exports}var $n={exports:{}},db=$n.exports,Ns;function Dt(){return Ns||(Ns=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),nu(),ii())})(db,function(r){return(function(){var n=r,o=n.lib,a=o.Base,i=o.WordArray,s=n.algo,u=s.MD5,c=s.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:u,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,d){for(var f,p=this.cfg,x=p.hasher.create(),v=i.create(),h=v.words,w=p.keySize,m=p.iterations;h.length<w;){f&&x.update(f),f=x.update(l).finalize(d),x.reset();for(var g=1;g<m;g++)f=x.finalize(f),x.reset();v.concat(f)}return v.sigBytes=w*4,v}});n.EvpKDF=function(l,d,f){return c.create(f).compute(l,d)}})(),r.EvpKDF})})($n)),$n.exports}var An={exports:{}},xb=An.exports,Ls;function ke(){return Ls||(Ls=1,(function(e,t){(function(r,n,o){e.exports=n(Line truncated
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*/return r.mode.CTRGladman=(function(){var n=r.lib.BlockCipherMode.extend();function o(s){if((s>>24&255)===255){var u=s>>16&255,c=s>>8&255,l=s&255;u===255?(u=0,c===255?(c=0,l===255?l=0:++l):++c):++u,s=0,s+=u<<16,s+=c<<8,s+=l}else s+=1<<24;return s}function a(s){return(s[0]=o(s[0]))===0&&(s[1]=o(s[1])),s}var i=n.Encryptor=n.extend({processBlock:function(s,u){var c=this._cipher,l=c.blockSize,d=this._iv,f=this._counter;d&&(f=this._counter=d.slice(0),this._iv=void 0),a(f);var p=f.slice(0);c.encryptBlock(p,0);for(var x=0;x<l;x++)s[u+x]^=p[x]}});return n.Decryptor=i,n})(),r.mode.CTRGladman})})(_n)),_n.exports}var Fn={exports:{}},yb=Fn.exports,js;function Eb(){return js||(js=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(yb,function(r){return r.mode.OFB=(function(){var n=r.lib.BlockCipherMode.extend(),o=n.Encryptor=n.extend({processBlock:function(a,i){var s=this._cipher,u=s.blockSize,c=this._iv,l=this._keystream;c&&(l=this._keystream=c.slice(0),this._iv=void 0),s.encryptBlock(l,0);for(var d=0;d<u;d++)a[i+d]^=l[d]}});return n.Decryptor=o,n})(),r.mode.OFB})})(Fn)),Fn.exports}var Dn={exports:{}},wb=Dn.exports,zs;function Cb(){return zs||(zs=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(wb,function(r){return r.mode.ECB=(function(){var n=r.lib.BlockCipherMode.extend();return n.Encryptor=n.extend({processBlock:function(o,a){this._cipher.encryptBlock(o,a)}}),n.Decryptor=n.extend({processBlock:function(o,a){this._cipher.decryptBlock(o,a)}}),n})(),r.mode.ECB})})(Dn)),Dn.exports}var Tn={exports:{}},$b=Tn.exports,Us;function Ab(){return Us||(Us=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})($b,function(r){return r.pad.AnsiX923={pad:function(n,o){var a=n.sigBytes,i=o*4,s=i-a%i,u=a+s-1;n.clamp(),n.words[u>>>2]|=s<<24-u%4*8,n.sigBytes+=s},unpad:function(n){var o=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=o}},r.pad.Ansix923})})(Tn)),Tn.exports}var Pn={exports:{}},Sb=Pn.exports,Ws;function Bb(){return Ws||(Ws=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(Sb,function(r){return r.pad.Iso10126={pad:function(n,o){var a=o*4,i=a-n.sigBytes%a;n.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(n){var o=n.words[n.sigBytes-1>>>2]&255;n.sigBytes-=o}},r.pad.Iso10126})})(Pn)),Pn.exports}var kn={exports:{}},_b=kn.exports,qs;function Fb(){return qs||(qs=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(_b,function(r){return r.pad.Iso97971={pad:function(n,o){n.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(n,o)},unpad:function(n){r.pad.ZeroPadding.unpad(n),n.sigBytes--}},r.pad.Iso97971})})(kn)),kn.exports}var Rn={exports:{}},Db=Rn.exports,Vs;function Tb(){return Vs||(Vs=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(Db,function(r){return r.pad.ZeroPadding={pad:function(n,o){var a=o*4;n.clamp(),n.sigBytes+=a-(n.sigBytes%a||a)},unpad:function(n){for(var o=n.words,a=n.sigBytes-1,a=n.sigBytes-1;a>=0;a--)if(o[a>>>2]>>>24-a%4*8&255){n.sigBytes=a+1;break}}},r.pad.ZeroPadding})})(Rn)),Rn.exports}var On={exports:{}},Pb=On.exports,Ks;function kb(){return Ks||(Ks=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(Pb,function(r){return r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding})})(On)),On.exports}var Nn={exports:{}},Rb=Nn.exports,Gs;function Ob(){return Gs||(Gs=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),ke())})(Rb,function(r){return(function(n){var o=r,a=o.lib,i=a.CipherParams,s=o.enc,u=s.Hex,c=o.format;c.Hex={stringify:function(l){return l.ciphertext.toString(u)},parse:function(l){var d=u.parse(l);return i.create({ciphertext:d})}}})(),r.format.Hex})})(Nn)),Nn.exports}var Ln={exports:{}},Nb=Ln.exports,Xs;function Lb(){return Xs||(Xs=1,(function(e,t){(function(r,n,o){e.exports=n(ue(),Kt(),Gt(),Dt(),ke())})(Nb,function(r){return(function(){var n=r,o=n.lib,a=o.BlockCipher,i=n.algo,s=[],u=[],c=[],l=[],d=[],f=[],p=[],x=[],v=[],h=[];(function(){for(var g=[],y=0;y<256;y++)y<128?g[y]=y<<1:g[y]=y<<1^283;for(var A=0,_=0,y=0;y<256;y++){var D=_^_<<1^_<<2^_<<3^_<<4;D=D>>>8^D&255^99,s[A]=D,u[D]=A;var b=g[A],k=g[b],F=g[k],S=g[D]*257^D*16843008;c[A]=S<<24|S>>>8,l[A]=S<<16|S>>>16,d[A]=S<<8|S>>>24,f[A]=S;var S=F*16843009^k*65537^b*257^A*16843008;p[D]=S<<24|S>>>8,x[D]=S<<16|S>>>16,v[D]=S<<8|S>>>24,h[D]=S,A?(A=b^g[g[g[F^b]]],_^=g[g[_]]):A=_=1}})();var w=[0,1,2,4,8,16,32,64,128,27,54],m=i.AES=a.extend({_doReset:function(){var g;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var y=this._keyPriorReset=this._key,A=y.words,_=y.sigBytes/4,D=this._nRounds=_+6,b=(D+1)*4,k=this._keySchedule=[],F=0;F<b;F++)F<_?k[F]=A[F]:(g=k[F-1],F%_?_>6&&F%_==4&&(g=s[g>>>24]<<24|s[g>>>16&255]<<16|s[g>>>8&255]<<8|s[g&255]):(g=g<<8|g>>>24,g=s[g>>>24]<<24|s[g>>>16&255]<<16|s[g>>>8&255]<<8|s[g&255],g^=w[F/_|0]<<24),k[F]=k[F-_]^g);for(var S=this._invKeySchedule=[],B=0;B<b;B++){var F=b-B;if(B%4)var g=k[F];else var g=k[F-4];B<4||F<=4?S[B]=g:S[B]=p[s[g>>>24]]^x[s[g>>>16&255]]^v[s[g>>>8&255]]^h[s[g&255]]}}},encryptBlock:Line truncated
|
||||
* eventsource.js
|
||||
* Available under MIT License (MIT)
|
||||
* https://github.com/Yaffle/EventSource/
|
||||
*/var Jb=Cr.exports,r0;function Qb(){return r0||(r0=1,(function(e,t){(function(r){var n=r.setTimeout,o=r.clearTimeout,a=r.XMLHttpRequest,i=r.XDomainRequest,s=r.ActiveXObject,u=r.EventSource,c=r.document,l=r.Promise,d=r.fetch,f=r.Response,p=r.TextDecoder,x=r.TextEncoder,v=r.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(M){c.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(M){function z(){}return z.prototype=M,new z}),Date.now||(Date.now=function(){return new Date().getTime()}),v==null){var h=d;d=function(M,z){var G=z.signal;return h(M,{headers:z.headers,credentials:z.credentials,cache:z.cache}).then(function(U){var Q=U.body.getReader();return G._reader=Q,G._aborted&&G._reader.cancel(),{status:U.status,statusText:U.statusText,headers:U.headers,body:{getReader:function(){return Q}}}})},v=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function w(){this.bitsNeeded=0,this.codePoint=0}w.prototype.decode=function(M){function z(xe,fe,ee){if(ee===1)return xe>=128>>fe&&xe<<fe<=2047;if(ee===2)return xe>=2048>>fe&&xe<<fe<=55295||xe>=57344>>fe&&xe<<fe<=65535;if(ee===3)return xe>=65536>>fe&&xe<<fe<=1114111;throw new Error}function G(xe,fe){if(xe===6)return fe>>6>15?3:fe>31?2:1;if(xe===12)return fe>15?3:2;if(xe===18)return 3;throw new Error}for(var U=65533,Q="",X=this.bitsNeeded,J=this.codePoint,de=0;de<M.length;de+=1){var se=M[de];X!==0&&(se<128||se>191||!z(J<<6|se&63,X-6,G(X,J)))&&(X=0,J=U,Q+=String.fromCharCode(J)),X===0?(se>=0&&se<=127?(X=0,J=se):se>=192&&se<=223?(X=6,J=se&31):se>=224&&se<=239?(X=12,J=se&15):se>=240&&se<=247?(X=18,J=se&7):(X=0,J=U),X!==0&&!z(J,X,G(X,J))&&(X=0,J=U)):(X-=6,J=J<<6|se&63),X===0&&(J<=65535?Q+=String.fromCharCode(J):(Q+=String.fromCharCode(55296+(J-65535-1>>10)),Q+=String.fromCharCode(56320+(J-65535-1&1023))))}return this.bitsNeeded=X,this.codePoint=J,Q};var m=function(){try{return new p().decode(new x().encode("test"),{stream:!0})==="test"}catch(M){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+M)}return!1};(p==null||x==null||!m())&&(p=w);var g=function(){};function y(M){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=g,this.onload=g,this.onerror=g,this.onreadystatechange=g,this._contentType="",this._xhr=M,this._sendTimeout=0,this._abort=g}y.prototype.open=function(M,z){this._abort(!0);var G=this,U=this._xhr,Q=1,X=0;this._abort=function(ee){G._sendTimeout!==0&&(o(G._sendTimeout),G._sendTimeout=0),(Q===1||Q===2||Q===3)&&(Q=4,U.onload=g,U.onerror=g,U.onabort=g,U.onprogress=g,U.onreadystatechange=g,U.abort(),X!==0&&(o(X),X=0),ee||(G.readyState=4,G.onabort(null),G.onreadystatechange())),Q=0};var J=function(){if(Q===1){var ee=0,be="",Ke=void 0;if("contentType"in U)ee=200,be="OK",Ke=U.contentType;else try{ee=U.status,be=U.statusText,Ke=U.getResponseHeader("Content-Type")}catch{ee=0,be="",Ke=void 0}ee!==0&&(Q=2,G.readyState=2,G.status=ee,G.statusText=be,G._contentType=Ke,G.onreadystatechange())}},de=function(){if(J(),Q===2||Q===3){Q=3;var ee="";try{ee=U.responseText}catch{}G.readyState=3,G.responseText=ee,G.onprogress()}},se=function(ee,be){if((be==null||be.preventDefault==null)&&(be={preventDefault:g}),de(),Q===1||Q===2||Q===3){if(Q=4,X!==0&&(o(X),X=0),G.readyState=4,ee==="load")G.onload(be);else if(ee==="error")G.onerror(be);else if(ee==="abort")G.onabort(be);else throw new TypeError;G.onreadystatechange()}},xe=function(ee){U!=null&&(U.readyState===4?(!("onload"in U)||!("onerror"in U)||!("onabort"in U))&&se(U.responseText===""?"error":"load",ee):U.readyState===3?"onprogress"in U||de():U.readyState===2&&J())},fe=function(){X=n(function(){fe()},500),U.readyState===3&&de()};"onload"in U&&(U.onload=function(ee){se("load",ee)}),"onerror"in U&&(U.onerror=function(ee){se("error",ee)}),"onabort"in U&&(U.onabort=function(ee){se("abort",ee)}),"onprogress"in U&&(U.onprogress=de),"onreadystatechange"in U&&(U.onreadystatechange=function(ee){xe(ee)}),("contentType"in U||!("ontimeout"in a.prototype))&&(z+=(z.indexOf("?")===-1?"?":"&")+"padding=true"),U.open(M,z,!0),"readyState"in U&&(X=n(function(){fe()},0))},y.prototype.abort=function(){this._abort(!1)},y.prototype.getResponseHeader=function(M){return this._contentType},y.prototype.setRequestHeader=function(M,z){var G=this._xhr;"setRequestHeader"in G&&G.setRequestHeader(M,z)},y.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},y.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var M=this;M._sendTimeout=n(function(){M._sendTimeout=0,M.send()},4);return}vLine truncated
|
||||
`),U=0;U<G.length;U+=1){var Q=G[U],X=Q.split(": "),J=X.shift(),de=X.join(": ");z[A(J)]=de}this._map=z}_.prototype.get=function(M){return this._map[A(M)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function D(){}D.prototype.open=function(M,z,G,U,Q,X,J){M.open("GET",Q);var de=0;M.onprogress=function(){var xe=M.responseText,fe=xe.slice(de);de+=fe.length,G(fe)},M.onerror=function(xe){xe.preventDefault(),U(new Error("NetworkError"))},M.onload=function(){U(null)},M.onabort=function(){U(null)},M.onreadystatechange=function(){if(M.readyState===a.HEADERS_RECEIVED){var xe=M.status,fe=M.statusText,ee=M.getResponseHeader("Content-Type"),be=M.getAllResponseHeaders();z(xe,fe,ee,new _(be))}},M.withCredentials=X;for(var se in J)Object.prototype.hasOwnProperty.call(J,se)&&M.setRequestHeader(se,J[se]);return M.send(),M};function b(M){this._headers=M}b.prototype.get=function(M){return this._headers.get(M)};function k(){}k.prototype.open=function(M,z,G,U,Q,X,J){var de=null,se=new v,xe=se.signal,fe=new p;return d(Q,{headers:J,credentials:X?"include":"same-origin",signal:xe,cache:"no-store"}).then(function(ee){return de=ee.body.getReader(),z(ee.status,ee.statusText,ee.headers.get("Content-Type"),new b(ee.headers)),new l(function(be,Ke){var mt=function(){de.read().then(function(Ae){if(Ae.done)be(void 0);else{var Ee=fe.decode(Ae.value,{stream:!0});G(Ee),mt()}}).catch(function(Ae){Ke(Ae)})};mt()})}).catch(function(ee){if(ee.name!=="AbortError")return ee}).then(function(ee){U(ee)}),{abort:function(){de!=null&&de.cancel(),se.abort()}}};function F(){this._listeners=Object.create(null)}function S(M){n(function(){throw M},0)}F.prototype.dispatchEvent=function(M){M.target=this;var z=this._listeners[M.type];if(z!=null)for(var G=z.length,U=0;U<G;U+=1){var Q=z[U];try{typeof Q.handleEvent=="function"?Q.handleEvent(M):Q.call(this,M)}catch(X){S(X)}}},F.prototype.addEventListener=function(M,z){M=String(M);var G=this._listeners,U=G[M];U==null&&(U=[],G[M]=U);for(var Q=!1,X=0;X<U.length;X+=1)U[X]===z&&(Q=!0);Q||U.push(z)},F.prototype.removeEventListener=function(M,z){M=String(M);var G=this._listeners,U=G[M];if(U!=null){for(var Q=[],X=0;X<U.length;X+=1)U[X]!==z&&Q.push(U[X]);Q.length===0?delete G[M]:G[M]=Q}};function B(M){this.type=M,this.target=void 0}function $(M,z){B.call(this,M),this.data=z.data,this.lastEventId=z.lastEventId}$.prototype=Object.create(B.prototype);function O(M,z){B.call(this,M),this.status=z.status,this.statusText=z.statusText,this.headers=z.headers}O.prototype=Object.create(B.prototype);function P(M,z){B.call(this,M),this.error=z.error}P.prototype=Object.create(B.prototype);var H=-1,W=0,j=1,q=2,Z=-1,E=0,T=1,R=2,L=3,V=/^text\/event\-stream(;.*)?$/i,Y=1e3,ie=18e6,K=function(M,z){var G=M==null?z:parseInt(M,10);return G!==G&&(G=z),re(G)},re=function(M){return Math.min(Math.max(M,Y),ie)},pe=function(M,z,G){try{typeof z=="function"&&z.call(M,G)}catch(U){S(U)}};function $e(M,z){F.call(this),z=z||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Fe(this,M,z)}function nt(){return a!=null&&"withCredentials"in a.prototype||i==null?new a:new i}var Ne=d!=null&&f!=null&&"body"in f.prototype;function Fe(M,z,G){z=String(z);var U=!!G.withCredentials,Q=G.lastEventIdQueryParameterName||"lastEventId",X=re(1e3),J=K(G.heartbeatTimeout,45e3),de="",se=X,xe=!1,fe=0,ee=G.headers||{},be=G.Transport,Ke=Ne&&be==null?void 0:new y(be!=null?new be:nt()),mt=be!=null&&typeof be!="string"?new be:Ke==null?new k:new D,Ae=void 0,Ee=0,We=H,ut="",Tt="",Je="",Xt="",De=E,ur=0,at=0,Do=function(we,Ce,He,Le){if(We===W)if(we===200&&He!=null&&V.test(He)){We=j,xe=Date.now(),se=X,M.readyState=j;var Re=new O("open",{status:we,statusText:Ce,headers:Le});M.dispatchEvent(Re),pe(M,M.onopen,Re)}else{var Se="";we!==200?(Ce&&(Ce=Ce.replace(/\s+/g," ")),Se="EventSource's response has a status "+we+" "+Ce+" that is not 200. Aborting the connection."):Se="EventSource's response has a Content-Type specifying an unsupported type: "+(He==null?"-":He.replace(/\s+/g," "))+". Aborting the connection.",fr();var Re=new O("error",{status:we,statusText:Ce,headers:Le});M.dispatchEvent(Re),pe(M,M.onerror,Re),console.error(Se)}},zr=function(we){if(We===j){for(var Ce=-1,He=0;He<we.length;He+=1){var Le=we.charCodeAt(He);(Le===10||Le===13)&&(Ce=He)}var Re=(Ce!==-1?Xt:"")+we.slice(0,Ce+1);Xt=(Ce===-1?Xt:"")+we.slice(Ce+1),we!==""&&(xe=Date.now(),fe+=we.length);for(var Se=0;Se<Re.length;Se+=1){var Le=Re.charCodeAt(Se);if(De===Z&&Le===10)De=E;else if(De===Z&&(De=E),Le===13||Le===10){if(De!==E){De===T&&(at=Se+1);var me=Re.slice(ur,at-1),Te=Re.slice(at+(at<Se&&Re.charCodeAt(at)===32?1:0),Se);me==="data"?(ut+=`
|
||||
`,ut+=Te):me==="id"?Tt=Te:me==="event"?Je=Te:me==="retry"?(X=K(Te,X),se=X):me==="heartbeatTimeout"&&(J=K(Te,J),Ee!==0&&(o(Ee),Ee=n(function(){Pt()},J)))}if(De===E){if(ut!==""){de=Tt,Je===""&&(Je="message");var ft=new $(Je,{data:ut.slice(1),lastEventId:Tt});if(M.dispatchEvent(ft),Je==="open"?pe(M,M.onopen,ft):Je==="message"?pe(M,M.onmessage,ft):Je==="error"&&pe(M,M.onerror,ft),We===q)return}ut="",Je=""}De=Le===13?Z:E}else De===E&&(ur=Se,De=T),De===T?Le===58&&(at=Se+1,De=R):De===R&&(De=L)}}},Ur=function(we){if(We===j||We===W){We=H,Ee!==0&&(o(Ee),Ee=0),Ee=n(function(){Pt()},se),se=re(Math.min(X*16,se*2)),M.readyState=W;var Ce=new P("error",{error:we});M.dispatchEvent(Ce),pe(M,M.onerror,Ce),we!=null&&console.error(we)}},fr=function(){We=q,Ae!=null&&(Ae.abort(),Ae=void 0),Ee!==0&&(o(Ee),Ee=0),M.readyState=q},Pt=function(){if(Ee=0,We!==H){if(!xe&&Ae!=null)Ur(new Error("No activity within "+J+" milliseconds. "+(We===W?"No response received.":fe+" chars received.")+" Reconnecting.")),Ae!=null&&(Ae.abort(),Ae=void 0);else{var we=Math.max((xe||Date.now())+J-Date.now(),1);xe=!1,Ee=n(function(){Pt()},we)}return}xe=!1,fe=0,Ee=n(function(){Pt()},J),We=W,ut="",Je="",Tt=de,Xt="",ur=0,at=0,De=E;var Ce=z;if(z.slice(0,5)!=="data:"&&z.slice(0,5)!=="blob:"&&de!==""){var He=z.indexOf("?");Ce=He===-1?z:z.slice(0,He+1)+z.slice(He+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Te,ft){return ft===Q?"":Te}),Ce+=(z.indexOf("?")===-1?"?":"&")+Q+"="+encodeURIComponent(de)}var Le=M.withCredentials,Re={};Re.Accept="text/event-stream";var Se=M.headers;if(Se!=null)for(var me in Se)Object.prototype.hasOwnProperty.call(Se,me)&&(Re[me]=Se[me]);try{Ae=mt.open(Ke,Do,zr,Ur,Ce,Le,Re)}catch(Te){throw fr(),Te}};M.url=z,M.readyState=W,M.withCredentials=U,M.headers=ee,M._close=fr,Pt()}$e.prototype=Object.create(F.prototype),$e.prototype.CONNECTING=W,$e.prototype.OPEN=j,$e.prototype.CLOSED=q,$e.prototype.close=function(){this._close()},$e.CONNECTING=W,$e.OPEN=j,$e.CLOSED=q,$e.prototype.withCredentials=void 0;var ot=u;a!=null&&(u==null||!("withCredentials"in u.prototype))&&(ot=$e),(function(M){{var z=M(t);z!==void 0&&(e.exports=z)}})(function(M){M.EventSourcePolyfill=$e,M.NativeEventSource=u,M.EventSource=ot})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:Jb:globalThis)})(Cr,Cr.exports)),Cr.exports}var n0=Qb();function au(e,t){return function(){return e.apply(t,arguments)}}const{toString:eg}=Object.prototype,{getPrototypeOf:si}=Object,{iterator:$o,toStringTag:iu}=Symbol,Ao=(e=>t=>{const r=eg.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),rt=e=>(e=e.toLowerCase(),t=>Ao(t)===e),So=e=>t=>typeof t===e,{isArray:cr}=Array,ir=So("undefined");function Mr(e){return e!==null&&!ir(e)&&e.constructor!==null&&!ir(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const su=rt("ArrayBuffer");function tg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&su(e.buffer),t}const rg=So("string"),ze=So("function"),cu=So("number"),Ir=e=>e!==null&&typeof e=="object",ng=e=>e===!0||e===!1,Un=e=>{if(Ao(e)!=="object")return!1;const t=si(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(iu in e)&&!($o in e)},og=e=>{if(!Ir(e)||Mr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ag=rt("Date"),ig=rt("File"),sg=rt("Blob"),cg=rt("FileList"),lg=e=>Ir(e)&&ze(e.pipe),ug=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=Ao(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},fg=rt("URLSearchParams"),[dg,xg,pg,hg]=["ReadableStream","Request","Response","Headers"].map(rt),vg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hr(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),cr(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Mr(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let s;for(n=0;n<i;n++)s=a[n],t.call(null,e[s],s,e)}}function lu(e,t){if(Mr(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const Lt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,uu=e=>!ir(e)&&e!==Lt;function ka(){const{caseless:e,skipUndefined:t}=uu(this)&&this||{},r={},n=(o,a)=>{const i=e&&lu(r,a)||a;Un(r[i])&&Un(o)?r[i]=ka(r[i],o):Un(o)?r[i]=ka({},o):cr(o)?r[i]=o.slice():(!t||!ir(o))&&(r[i]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Hr(arguments[o],n);return r}const bg=(e,t,r,{allOwnKeys:n}={})=>(Hr(t,(o,a)=>{r&&ze(o)?e[a]=au(o,r):e[a]=o},{allOwnKeys:n}),e),gg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mg=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yg=(e,t,r
Line truncated
|
||||
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&tm[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},c0=Symbol("internals");function br(e){return e&&String(e).trim().toLowerCase()}function Wn(e){return e===!1||e==null?e:N.isArray(e)?e.map(Wn):String(e)}function nm(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const om=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Yo(e,t,r,n,o){if(N.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!N.isString(t)){if(N.isString(n))return t.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(t)}}function am(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function im(e,t){const r=N.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,i){return this[n].call(this,t,o,a,i)},configurable:!0})})}let Ue=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(s,u,c){const l=br(u);if(!l)throw new Error("header name must be a non-empty string");const d=N.findKey(o,l);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||u]=Wn(s))}const i=(s,u)=>N.forEach(s,(c,l)=>a(c,l,u));if(N.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(N.isString(t)&&(t=t.trim())&&!om(t))i(rm(t),r);else if(N.isObject(t)&&N.isIterable(t)){let s={},u,c;for(const l of t){if(!N.isArray(l))throw TypeError("Object iterator must return a key-value pair");s[c=l[0]]=(u=s[c])?N.isArray(u)?[...u,l[1]]:[u,l[1]]:l[1]}i(s,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=br(t),t){const n=N.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return nm(o);if(N.isFunction(r))return r.call(this,o,n);if(N.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=br(t),t){const n=N.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Yo(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(i){if(i=br(i),i){const s=N.findKey(n,i);s&&(!r||Yo(n,n[s],s,r))&&(delete n[s],o=!0)}}return N.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Yo(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return N.forEach(this,(o,a)=>{const i=N.findKey(n,a);if(i){r[i]=Wn(o),delete r[a];return}const s=t?am(a):String(a).trim();s!==a&&delete r[a],r[s]=Wn(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return N.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&N.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[c0]=this[c0]={accessors:{}}).accessors,o=this.prototype;function a(i){const s=br(i);n[s]||(im(o,i),n[s]=!0)}return N.isArray(t)?t.forEach(a):a(t),this}};Ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(Ue.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});N.freezeMethods(Ue);function Zo(e,t){const r=this||jr,n=t||r,o=Ue.from(n.headers);let a=n.data;return N.forEach(e,function(s){a=s.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function yu(e){return!!(e&&e.__CANCEL__)}function lr(e,t,r){oe.call(this,e??"canceled",oe.ERR_CANCELED,t,r),this.name="CanceledError"}N.inherits(lr,oe,{__CANCEL__:!0});function Eu(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function sm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cm(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),l=n[a];i||(i=c),r[o]=u,n[o]=c;let d=a,f=0;for(;d!==o;)f+=r[d++],d=d%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),c-i<t)return;const p=l&&c-l;return p?Math.round(f*1e3/p):void 0}}function lm(e,t){let r=0,n=1e3/t,o,a;const i=(c,l=Date.now())=>{r=l,o=null,a&&(clearTimeout(a),a=null),e(...c)};return[(...c)=>{const l=Date.now(),d=l-r;d>=n?i(c,l):(o=c,a||(a=setTimeout(()=>{a=null,i(o)},n-d)))},()=>o&&i(o)]}const ao=(e,t,r=3)=>{let n=0;const o=cm(50,250);return lm(a=>{const i=a.loaded,s=a.lengthComputable?a.total:void 0,u=i-n,c=o(u),l=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:u,rate:c||void 0,estimated:c&&s&&l?(s-i)/c:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},r)},l0=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},u0=e=>(...t)=>N.asap(()=>e(...t)),um=Ie.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ie.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ie.origin),Ie.navigator&&/(msie|trident)/i.test(Ie.navigator.userAgent)):()=>!0,fm=Ie.hasStandardBrowserEnv?{write(e,t,r,n,o,a,i){if(typeof document>"u")return;const s=[`${e}=${encodeURIComponent(t)}`];N.isNumber(r)&&s.push(`expires=${new Date(r).toUTCString()}`),N.isString(n)&&s.push(`path=${n}`),N.isString(o)&&s.push(`domain=${o}`),a===!0&&s.push("secure"),N.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function dm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xm(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function wu(e,t,r){let n=!dm(t);return e&&(n||r==!1)?xm(e,t):t}const f0=e=>e instanceof Ue?{...e}:e;function Wt(e,t){t=t||{};const r={};function n(c,l,d,f){return N.isPlainObject(c)&&N.isPlainObject(l)?N.merge.call({caseless:f},c,l):N.isPlainObject(l)?N.merge({},l):N.isArray(l)?l.slice():l}function o(c,l,d,f){if(N.isUndefined(l)){if(!N.isUndefined(c))return n(void 0,c,d,f)}else return n(c,l,d,f)}function a(c,l){if(!N.isUndefined(l))return n(void 0,l)}function i(c,l){if(N.isUndefined(l)){if(!N.isUndefined(c))return n(void 0,c)}else return n(void 0,l)}function s(c,l,d){if(d in t)return n(c,l);if(d in e)return n(void 0,c)}const u={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,l,d)=>o(f0(c),f0(l),d,!0)};return N.forEach(Object.keys({...e,...t}),function(l){const d=u[l]||o,f=d(e[l],t[l],l);N.isUndefined(f)&&d!==s||(r[l]=f)}),r}const Cu=e=>{const t=Wt({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Ue.from(i),t.url=bu(wu(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),N.isFormData(r)){if(Ie.hasStandardBrowserEnv||Ie.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(N.isFunction(r.getHeaders)){const u=r.getHeaders(),c=["content-type","content-length"];Object.entries(u).forEach(([l,d])=>{c.inclu
Line truncated
|
||||
`+i.map(b0).join(`
|
||||
`):" "+b0(i[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o}const Au={getAdapter:$m,adapters:ui};function Jo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new lr(null,e)}function g0(e){return Jo(e),e.headers=Ue.from(e.headers),e.data=Zo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Au.getAdapter(e.adapter||jr.adapter,e)(e).then(function(n){return Jo(e),n.data=Zo.call(e,e.transformResponse,n),n.headers=Ue.from(n.headers),n},function(n){return yu(n)||(Jo(e),n&&n.response&&(n.response.data=Zo.call(e,e.transformResponse,n.response),n.response.headers=Ue.from(n.response.headers))),Promise.reject(n)})}const Su="1.13.2",_o={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{_o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const m0={};_o.transitional=function(t,r,n){function o(a,i){return"[Axios v"+Su+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,s)=>{if(t===!1)throw new oe(o(i," has been removed"+(r?" in "+r:"")),oe.ERR_DEPRECATED);return r&&!m0[i]&&(m0[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,s):!0}};_o.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Am(e,t,r){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const s=e[a],u=s===void 0||i(s,a,e);if(u!==!0)throw new oe("option "+a+" must be "+u,oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new oe("Unknown option "+a,oe.ERR_BAD_OPTION)}}const qn={assertOptions:Am,validators:_o},it=qn.validators;let Mt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new s0,response:new s0}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||||
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Wt(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&qn.assertOptions(n,{silentJSONParsing:it.transitional(it.boolean),forcedJSONParsing:it.transitional(it.boolean),clarifyTimeoutError:it.transitional(it.boolean)},!1),o!=null&&(N.isFunction(o)?r.paramsSerializer={serialize:o}:qn.assertOptions(o,{encode:it.function,serialize:it.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),qn.assertOptions(r,{baseUrl:it.spelling("baseURL"),withXsrfToken:it.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=a&&N.merge(a.common,a[r.method]);a&&N.forEach(["delete","get","head","post","put","patch","common"],x=>{delete a[x]}),r.headers=Ue.concat(i,a);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let l,d=0,f;if(!u){const x=[g0.bind(this),void 0];for(x.unshift(...s),x.push(...c),f=x.length,l=Promise.resolve(r);d<f;)l=l.then(x[d++],x[d++]);return l}f=s.length;let p=r;for(;d<f;){const x=s[d++],v=s[d++];try{p=x(p)}catch(h){v.call(this,h);break}}try{l=g0.call(this,p)}catch(x){return Promise.reject(x)}for(d=0,f=c.length;d<f;)l=l.then(c[d++],c[d++]);return l}getUri(t){t=Wt(this.defaults,t);const r=wu(t.baseURL,t.url,t.allowAbsoluteUrls);return bu(r,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){Mt.prototype[t]=function(r,n){return this.request(Wt(n||{},{method:t,url:r,data:(n||{}).data}))}});N.forEach(["post","put","patch"],function(t){function r(n){return function(a,i,s){return this.request(Wt(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Mt.prototype[t]=r(),Mt.prototype[t+"Form"]=r(!0)});let Sm=class Bu{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(o=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(s=>{n.subscribe(s),a=s}).then(o);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,s){n.reason||(n.reason=new lr(a,i,s),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Bu(function(o){t=o}),cancel:t}}};function Bm(e){return function(r){return e.apply(null,r)}}function _m(e){return N.isObject(e)&&e.isAxiosError===!0}const Na={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,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Na).forEach(([e,t])=>{Na[t]=e});function _u(e){const t=new Mt(e),r=au(Mt.prototype.request,t);return N.extend(r,Mt.prototype,t,{allOwnKeys:!0}),N.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return _u(Wt(e,o))},r}const ye=_u(jr);ye.Axios=Mt;ye.CanceledError=lr;ye.CancelToken=Sm;ye.isCancel=yu;ye.VERSION=Su;ye.toFormData=Bo;ye.AxiosError=oe;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=Bm;ye.isAxiosError=_m;ye.mergeConfig=Wt;ye.AxiosH
Line truncated
|
||||
`),t([i])}catch(i){console.error(i)}},o.onerror=a=>{console.error("SSE连接出错:",a),o.close()},o}static getSystemStatus(t){const r=localStorage.getItem("token");if(!r)throw new Error("未登录");const n=JSON.parse(r),o=new n0.EventSourcePolyfill("/api/base/GetSysStatusRealTime",{headers:{Authorization:`Bearer ${n}`,Accept:"text/event-stream"},withCredentials:!0});return o.onmessage=a=>{try{const i=JSON.parse(a.data);t(i)}catch(i){console.error(i)}},o.onerror=a=>{console.error("SSE连接出错:",a),o.close()},o}static async getWebUIConfig(){const{data:t}=await le.get("/WebUIConfig/GetConfig");return t.data}static async updateWebUIConfig(t){const{data:r}=await le.post("/WebUIConfig/UpdateConfig",t);return r.data}static async getDisableWebUI(){const{data:t}=await le.get("/WebUIConfig/GetDisableWebUI");return t.data}static async updateDisableWebUI(t){const{data:r}=await le.post("/WebUIConfig/UpdateDisableWebUI",{disable:t});return r.data}static async getClientIP(){const{data:t}=await le.get("/WebUIConfig/GetClientIP");return t.data}static async getSSLStatus(){const{data:t}=await le.get("/WebUIConfig/GetSSLStatus");return t.data}static async saveSSLCert(t,r){const{data:n}=await le.post("/WebUIConfig/UploadSSLCert",{cert:t,key:r});return n.data}static async deleteSSLCert(){const{data:t}=await le.post("/WebUIConfig/DeleteSSLCert");return t.data}static async generatePasskeyRegistrationOptions(){const{data:t}=await le.post("/auth/passkey/generate-registration-options");return t.data}static async verifyPasskeyRegistration(t){const{data:r}=await le.post("/auth/passkey/verify-registration",{response:t});return r.data}static async generatePasskeyAuthenticationOptions(){const{data:t}=await le.post("/auth/passkey/generate-authentication-options");return t.data}static async verifyPasskeyAuthentication(t){const{data:r}=await le.post("/auth/passkey/verify-authentication",{response:t});return r.data}static async GetSnowCatFileHash(){const{data:t}=await le.get("/base/GetSnowCatFileHash");return t.data}}fi(Fu,"VersionTypes",{RELEASE:"release",PRERELEASE:"prerelease",ACTION:"action"});const Du=document.createElement("style");document.head.appendChild(Du);const Fo=document.createElement("style");Fo.id="font-preview-style";document.head.appendChild(Fo);function Dm(){Fm("/files/theme.css?_t="+Date.now()).then(e=>e.data).then(e=>{Du.innerHTML=e,Fo.innerHTML="",document.documentElement.style.removeProperty("--font-family-base")}).catch(()=>{console.error("Failed to load theme.css")})}const Tm=e=>{let t="";e==="aacute"?t=`
|
||||
@font-face {
|
||||
font-family: 'Aa偷吃可爱长大的';
|
||||
src: url('/webui/fonts/AaCute.woff') format('woff');
|
||||
font-display: swap;
|
||||
}`:e==="custom"&&(t=`
|
||||
@font-face {
|
||||
font-family: 'CustomFont';
|
||||
src: url('/webui/fonts/CustomFont.woff') format('woff');
|
||||
font-display: swap;
|
||||
}`),Fo.innerHTML=t},Oy=["--heroui-background","--heroui-foreground-50","--heroui-foreground-100","--heroui-foreground-200","--heroui-foreground-300","--heroui-foreground-400","--heroui-foreground-500","--heroui-foreground-600","--heroui-foreground-700","--heroui-foreground-800","--heroui-foreground-900","--heroui-foreground","--heroui-content1","--heroui-content1-foreground","--heroui-content2","--heroui-content2-foreground","--heroui-content3","--heroui-content3-foreground","--heroui-content4","--heroui-content4-foreground","--heroui-default-50","--heroui-default-100","--heroui-default-200","--heroui-default-300","--heroui-default-400","--heroui-default-500","--heroui-default-600","--heroui-default-700","--heroui-default-800","--heroui-default-900","--heroui-default-foreground","--heroui-default","--heroui-danger-50","--heroui-danger-100","--heroui-danger-200","--heroui-danger-300","--heroui-danger-400","--heroui-danger-500","--heroui-danger-600","--heroui-danger-700","--heroui-danger-800","--heroui-danger-900","--heroui-danger-foreground","--heroui-danger","--heroui-primary-50","--heroui-primary-100","--heroui-primary-200","--heroui-primary-300","--heroui-primary-400","--heroui-primary-500","--heroui-primary-600","--heroui-primary-700","--heroui-primary-800","--heroui-primary-900","--heroui-primary-foreground","--heroui-primary","--heroui-secondary-50","--heroui-secondary-100","--heroui-secondary-200","--heroui-secondary-300","--heroui-secondary-400","--heroui-secondary-500","--heroui-secondary-600","--heroui-secondary-700","--heroui-secondary-800","--heroui-secondary-900","--heroui-secondary-foreground","--heroui-secondary","--heroui-success-50","--heroui-success-100","--heroui-success-200","--heroui-success-300","--heroui-success-400","--heroui-success-500","--heroui-success-600","--heroui-success-700","--heroui-success-800","--heroui-success-900","--heroui-success-foreground","--heroui-success","--heroui-warning-50","--heroui-warning-100","--heroui-warning-200","--heroui-warning-300","--heroui-warning-400","--heroui-warning-500","--heroui-warning-600","--heroui-warning-700","--heroui-warning-800","--heroui-warning-900","--heroui-warning-foreground","--heroui-warning","--heroui-focus","--heroui-overlay","--heroui-divider","--heroui-code-background","--heroui-strong","--heroui-code-mdx"],Ny=(e,t)=>{let r=`:root ${t?`.${t}`:""}, .light ${t?`.${t}`:""}, [data-theme="light"] ${t?`.${t}`:""} {`;for(const n in e.light){const o=n;r+=`${o}: ${e.light[o]};`}r+="}",r+=`.dark ${t?`.${t}`:""}, [data-theme="dark"] ${t?`.${t}`:""} {`;for(const n in e.dark){const o=n;r+=`${o}: ${e.dark[o]};`}return r+="}",r},Ly=e=>{const t=document.documentElement;Tm(e),e==="aacute"?(t.style.setProperty("--font-family-base","'Aa偷吃可爱长大的', var(--font-family-fallbacks)","important"),t.style.setProperty("--font-family-mono","'Aa偷吃可爱长大的', var(--font-family-fallbacks)","important")):e==="custom"?(t.style.setProperty("--font-family-base","'CustomFont', var(--font-family-fallbacks)","important"),t.style.setProperty("--font-family-mono","'CustomFont', var(--font-family-fallbacks)","important")):(t.style.setProperty("--font-family-base","var(--font-family-fallbacks)","important"),t.style.setProperty("--font-family-mono",'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',"important"))},My=e=>{};Fu.checkWebUiLogined();const Qo=localStorage.getItem(lt.token),ea=localStorage.getItem(lt.theme);Qo&&!Qo.startsWith('"')&&localStorage.setItem(lt.token,JSON.stringify(Qo));ea&&!ea.startsWith('"')&&localStorage.setItem(lt.theme,JSON.stringify(ea));Dm();Ou.createRoot(document.getElementById("root")).render(I.jsx(Mu,{basename:"/webui/",children:I.jsx(Lv,{children:I.jsx(Rv,{})})}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{const e="/webui/",t=`${e}sw.js`;navigator.serviceWorker.register(t,{scope:e}).then(r=>{console.log("SW registered: ",r)}).catch(r=>{console.log("SW registration failed: ",r)})});export{Rp as $,gl as A,z0 as B,Zb as C,st as D,sr as E,Ly as F,My as G,Dm as H,Ny as I,Oy as J,Ry as K,le as L,Ul as M,Gt as N,y1 as O,xd as P,p1 as Q,v1 as R,s1 as S,h1 as T,C1 as U,ne as V,Fu as W,nr as X,Fi as Y,zm as Z,Im as _,bd as a,xp as a$,Um as a0,xy as a1,np as a2,ct as a3,sy as a4,ep as a5,rc as a6,nx as a7,_r as a8,Br as a9,x1 as aA,Gi as aB,ya as aC,Pe as aD,Ca as aE,c1 as aF,Ol as aG,Ip as aH,n0 as aI,w1 as aJ,Zm as aK,$x as aL,la as aM,or as aN,Oi as aO,Xa as aP,cx as aQ,Wm as aR,Vm as aS,Ap as aT,g1 as aU,Bp as aV,Bx as aW,Np as aX,hx as aY,ny as aZ,iy as a_,Bt as aa,xa as ab,Cc as ac,cc as ad,Jm as ae,Ua as af,ey as ag,Cx as ah,ac as ai,ty as aj,ry as ak,fo as al,jh as am,Ye as an,_e as ao,he as ap,Wh as aq,ja as ar,qd as as,pp as at,$c as au,t1 as av,Km as aw,Mm as ax,Lm as ay,hy as az,ss as b,_h as b$,jm as b0,Ga as b1,Ym as b2,cy as b3,E1 as b4,$1 as b5,sc as b6,o1 as b7,n1 as b8,Hm as b9,$t as bA,vx as bB,ay as bC,bc as bD,Ii as bE,ip as bF,Hd a
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as c}from"./iconBase-B7bT1FlI.js";function h(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M430.1 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 12-36.6.1-47.7zM120 216c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm40 126c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-161c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm72 219c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm24-208c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"},child:[]}]})(t)}function l(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.6 48 48 141.6 48 256s93.6 208 208 208 208-93.6 208-208S370.4 48 256 48zm-42.7 318.9L106.7 260.3l29.9-29.9 76.8 76.8 162.1-162.1 29.9 29.9-192.1 191.9z"},child:[]}]})(t)}function r(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M186.301 339.893L96 249.461l-32 30.507L186.301 402 448 140.506 416 110z"},child:[]}]})(t)}function i(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(t)}function d(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 199.5h-91.4V64H187.4v135.5H96l160 158.1 160-158.1zM96 402.8V448h320v-45.2H96z"},child:[]}]})(t)}function o(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M160 48v224h64v192l128-256h-64l64-160H160z"},child:[]}]})(t)}function n(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M192 277.4h189.7l-43.6 44.7L368 352l96-96-96-96-31 29.9 44.7 44.7H192v42.8z"},child:[]},{tag:"path",attr:{d:"M255.7 421.3c-44.1 0-85.5-17.2-116.7-48.4-31.2-31.2-48.3-72.7-48.3-116.9 0-44.1 17.2-85.7 48.3-116.9 31.2-31.2 72.6-48.4 116.7-48.4 44 0 85.3 17.1 116.5 48.2l30.3-30.3c-8.5-8.4-17.8-16.2-27.7-23.2C339.7 61 298.6 48 255.7 48 141.2 48 48 141.3 48 256s93.2 208 207.7 208c42.9 0 84-13 119-37.5 10-7 19.2-14.7 27.7-23.2l-30.2-30.2c-31.1 31.1-72.5 48.2-116.5 48.2zM448.004 256.847l-.849-.848.849-.849.848.849z"},child:[]}]})(t)}function e(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405.34 405.332H106.66V106.668H240V64H106.66C83.191 64 64 83.197 64 106.668v298.664C64 428.803 83.191 448 106.66 448h298.68c23.469 0 42.66-19.197 42.66-42.668V272h-42.66v133.332zM288 64v42.668h87.474L159.999 322.133l29.866 29.866 215.476-215.47V224H448V64H288z"},child:[]}]})(t)}function s(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M96.4 416h77.1l50.9-96.6V96h-160v223.4h77.1L96.4 416zm224 0h77.1l50-96.6V96H288.4v223.4h82l-50 96.6z"},child:[]}]})(t)}function M(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 388c-72.597 0-132-59.405-132-132 0-72.601 59.403-132 132-132 36.3 0 69.299 15.4 92.406 39.601L278 234h154V80l-51.698 51.702C348.406 99.798 304.406 80 256 80c-96.797 0-176 79.203-176 176s78.094 176 176 176c81.045 0 148.287-54.134 169.401-128H378.85c-18.745 49.561-67.138 84-122.85 84z"},child:[]}]})(t)}function u(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M337.509 305.372h-17.501l-6.571-5.486c20.791-25.232 33.922-57.054 33.922-93.257C347.358 127.632 283.896 64 205.135 64 127.452 64 64 127.632 64 206.629s63.452 142.628 142.225 142.628c35.011 0 67.831-13.167 92.991-34.008l6.561 5.487v17.551L415.18 448 448 415.086 337.509 305.372zm-131.284 0c-54.702 0-98.463-43.887-98.463-98.743 0-54.858 43.761-98.742 98.463-98.742 54.7 0 98.462 43.884 98.462 98.742 0 54.856-43.762 98.743-98.462 98.743z"},child:[]}]})(t)}function z(t){return c({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M413.967 276.8c1.06-6.235 1.06-13.518 1.06-20.8s-1.06-13.518-1.06-20.8l44.667-34.318c4.26-3.118 5.319-8.317 2.13-13.518L418.215 115.6c-2.129-4.164-8.507-6.235-12.767-4.164l-53.186 20.801c-10.638-8.318-23.394-15.601-36.16-20.801l-7.448-55.117c-1.06-4.154-5.319-8.318-10.638-8.318h-85.098c-5.318 0-9.577 4.164-10.637 8.318l-8.508 55.117c-12.767 5.2-24.464 12.482-36.171 20.801l-53.186-20.801c-5.319-2.071-10.638 0-12.767 4.164L49.1 187.365c-2.119 4.153-1.061 10.399 2.129 13.518L96.97 235.2c0 7.282-1.06 13.518-1.06 20.8s1.06 13.518 1.06 20.8l-44.668 34.318c-4.26 3.118-5.318 8.317-2.13 13.518L92.721 396.4c2.13 4.164 8.508 6.235 12.767 4.164l53.187-20.801c10.637 8.318 23.394 15.601 36.16 20.801l8.508 55.117c1.069 5.2 5.318 8.318 10.637 8.318h85.098c5.319 0 9.578-4.164 10.638-8.318l8.518-55.117c12.757-5.2 24.464-12.482 36.16-20.801l53.187 20.801c5.318 2.071 10.637 0 12.767-4.164l42.549-71.765c2.129-4.153 1.06-10.399-2.13-13.518l-46.8-34.317zm-158.499 52c-41.489 0-74.46-32.235-74.46-72.8s32.971-72.8 74.46-72.8 74.461Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as d,j as e,R as j}from"./react-vendor-jWT2yUdV.js";import{b as y,u as k,k as N,c as f,a as W,d as Q,A as _,P as G,s as J}from"./index-DiaaLdUu.js";import{c as V,b as X,a as P}from"./chunk-B75B6XQK-aFCr8AK6.js";import{c as Y}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{i as M}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{t as B}from"./chunk-6LIX6LVT-B246pOuK.js";import{M as Z,a as $,b as ee,c as te,d as re,e as ae,f as se}from"./index-DE7yoXMZ.js";import{d as ne}from"./chunk-IHO36JMK-DJPUeGG0.js";import{I as oe}from"./index-DvErMbt6.js";import{l as A}from"./logo-kBMoCJob.js";import{u as T}from"./use-dialog-CRIMuzeE.js";import{u as D,b as O,m as R,O as ie}from"./react-router-dom-C6k78GT4.js";import{m as w}from"./proxy-BsRmjYPH.js";import{s as le,P as ce,w as de}from"./process_utils-Bjmp-2dU.js";import{Q as F}from"./qq_manager-BfRTEAby.js";import"./qface-BZLvZXJ8.js";import"./react-hot-toast-cGcFZPSt.js";import"./usePress-BrNwsdVw.js";import"./useFocusable-DA5Croun.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./index-BsnVex0g.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./iconBase-B7bT1FlI.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./gestures-BHfQC-M8.js";import"./layout-Buao20KT.js";import"./index-BBhZPeTB.js";const ue=d.createContext(null),S={didCatch:!1,error:null};class fe extends d.Component{constructor(r){super(r),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=S}static getDerivedStateFromError(r){return{didCatch:!0,error:r}}resetErrorBoundary(){const{error:r}=this.state;if(r!==null){for(var t,a,s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];(t=(a=this.props).onReset)===null||t===void 0||t.call(a,{args:n,reason:"imperative-api"}),this.setState(S)}}componentDidCatch(r,t){var a,s;(a=(s=this.props).onError)===null||a===void 0||a.call(s,r,t)}componentDidUpdate(r,t){const{didCatch:a}=this.state,{resetKeys:s}=this.props;if(a&&t.error!==null&&me(r.resetKeys,s)){var n,o;(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{next:s,prev:r.resetKeys,reason:"keys"}),this.setState(S)}}render(){const{children:r,fallbackRender:t,FallbackComponent:a,fallback:s}=this.props,{didCatch:n,error:o}=this.state;let c=r;if(n){const h={error:o,resetErrorBoundary:this.resetErrorBoundary};if(typeof t=="function")c=t(h);else if(a)c=d.createElement(a,h);else if(s!==void 0)c=s;else throw o}return d.createElement(ue.Provider,{value:{didCatch:n,error:o,resetErrorBoundary:this.resetErrorBoundary}},c)}}function me(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return i.length!==r.length||i.some((t,a)=>!Object.is(t,r[a]))}function he({error:i,resetErrorBoundary:r}){return e.jsxs("div",{className:"pt-32 flex flex-col justify-center items-center",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(Z,{className:"mr-2",color:"red",size:30}),e.jsx("h1",{className:"text-2xl",children:"出错了"})]}),e.jsxs("div",{className:"my-6 flex flex-col justify-center items-center",children:[e.jsx("p",{className:"mb-2",children:"错误信息"}),e.jsx(V,{children:i.message})]}),e.jsx(y,{color:"primary",size:"md",onPress:r,children:"重试"})]})}const q=(i,r=!1)=>i==null?void 0:i.map(t=>{var b;const a=D(),s=O(),[n,o]=j.useState(!!t.autoOpen),c=j.useMemo(()=>t.items&&t.items.length>0,[t.items]),[h]=k(N.backgroundImage,""),[m]=k(N.customIcons,{}),u=j.useMemo(()=>t.href?!!R(t.href,s.pathname):!1,[t.href,s.pathname]),E=C=>{a(C)};j.useEffect(()=>{t.items&&t.items.some(g=>(g==null?void 0:g.href)&&!!R(g.href,s.pathname))&&o(!0)},[t.items,s.pathname]);const p=j.useRef(null);return e.jsxs("div",{children:[e.jsx(y,{className:f("group relative flex items-center w-full h-10 text-left justify-start rounded-xl px-3","transition-all duration-200",u?"bg-primary-500/[0.12] text-primary-600 dark:bg-primary-500/[0.16] dark:text-primary-300 font-semibold shadow-sm shadow-primary-500/10":"text-default-600 hover:bg-default-100/70 hover:text-default-900 dark:text-default-300 dark:hover:bg-white/[0.06]",h&&!u&&"text-white/85 hover:bg-white/15 hover:text-white",u&&"before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-5 before:w-[3px] before:rounded-full before:bg-primary-500"),color:"default",disableRipple:!0,endContent:c?e.jsx("div",{className:f("ml-auto relative w-3 h-3 transition-transform duration-300",n&&"transform rotate-180",u?"text-primary-500":"text-default-300 dark:text-white/40","before:rounded-full",'before:content-[""]',"before:block","before:absolute","before:w-3","before:h-[4.5px]","before:bg-current","before:top-1/2","before:-left-[3px]","before:transform","before:-translate-y-1/2","before:rotate-45","after:rounded-full",'after:content-[""]',"after:block","after:absolute","after:w-3","after:h-[4.5px]","after:bg-current","after:top-1/2","after:left-[3pLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{G as a}from"./iconBase-B7bT1FlI.js";function i(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 176v160m80-80H176"},child:[]}]})(t)}function o(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(t)}function e(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm0 319.91a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.94v-.05a21.74 21.74 0 1 1 43.44 0z"},child:[]}]})(t)}function c(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M244 400 100 256l144-144M120 256h292"},child:[]}]})(t)}function h(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 184 144 144 144-144"},child:[]}]})(t)}function n(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(t)}function l(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M160 389a20.91 20.91 0 0 1-13.82-5.2l-128-112a21 21 0 0 1 0-31.6l128-112a21 21 0 0 1 27.66 31.61L63.89 256l109.94 96.19A21 21 0 0 1 160 389zm192 0a21 21 0 0 1-13.84-36.81L448.11 256l-109.94-96.19a21 21 0 0 1 27.66-31.61l128 112a21 21 0 0 1 0 31.6l-128 112A20.89 20.89 0 0 1 352 389z"},child:[]}]})(t)}function d(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M408 480H184a72 72 0 0 1-72-72V184a72 72 0 0 1 72-72h224a72 72 0 0 1 72 72v224a72 72 0 0 1-72 72z"},child:[]},{tag:"path",attr:{d:"M160 80h235.88A72.12 72.12 0 0 0 328 32H104a72 72 0 0 0-72 72v224a72.12 72.12 0 0 0 48 67.88V160a80 80 0 0 1 80-80z"},child:[]}]})(t)}function s(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M428 224H288a48 48 0 0 1-48-48V36a4 4 0 0 0-4-4h-92a64 64 0 0 0-64 64v320a64 64 0 0 0 64 64h224a64 64 0 0 0 64-64V228a4 4 0 0 0-4-4z"},child:[]},{tag:"path",attr:{d:"M419.22 188.59 275.41 44.78a2 2 0 0 0-3.41 1.41V176a16 16 0 0 0 16 16h129.81a2 2 0 0 0 1.41-3.41z"},child:[]}]})(t)}function u(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M336 176h40a40 40 0 0 1 40 40v208a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V216a40 40 0 0 1 40-40h40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m176 272 80 80 80-80M256 48v288"},child:[]}]})(t)}function v(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448zm-.5-244a16 16 0 0 0-15.5-12H307.19L335.4 37.63c.05-.3.1-.59.13-.89A18.45 18.45 0 0 0 302.73 23l-92.58 114.46a4 4 0 0 0 .29 5.35l151 151a4 4 0 0 0 5.94-.31l60.8-75.16A16.37 16.37 0 0 0 431.5 204zM301.57 369.19l-151-151a4 4 0 0 0-5.93.31L83.8 293.64A16.37 16.37 0 0 0 80.5 308 16 16 0 0 0 96 320h108.83l-28.09 154.36v.11a18.37 18.37 0 0 0 32.5 14.53l92.61-114.46a4 4 0 0 0-.28-5.35z"},child:[]}]})(t)}function p(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M194.82 496a18.36 18.36 0 0 1-18.1-21.53v-.11L204.83 320H96a16 16 0 0 1-12.44-26.06L302.73 23a18.45 18.45 0 0 1 32.8 13.71c0 .3-.08.59-.13.89L307.19 192H416a16 16 0 0 1 12.44 26.06L209.24 489a18.45 18.45 0 0 1-14.42 7z"},child:[]}]})(t)}function g(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"},child:[]},{tag:"path",attr:{d:"M256 360a16 16 0 0 1-9-2.78c-39.3-26.68-56.32-45-65.7-56.41-20-24.37-29.58-49.4-29.3-76.5.31-31.06 25.22-56.33 55.53-56.33 20.4 0 35 10.63 44.1 20.41a6 6 0 0 0 8.72 0c9.11-9.78 23.7-20.41 44.1-20.41 30.31 0 55.22 25.27 55.53 56.33.28 27.1-9.31 52.13-29.3 76.5-9.38 11.44-26.4 29.73-65.7 56.41A16 16 0 0 1 256 360z"},child:[]}]})(t)}function M(t){return a({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M218.1 167.17c0 13 0 25.6 4.1 37.4-43.1 50.6-156.9 184.3-167.5 194.5a20.17 20.17 0 0 0-6.7 15c0 8.5 5.2 16.7 9.6 21.3 6.6 6.9 34.8 33 40 28 15.4-15 18.5-19 24.8-25.2 9.5-9.3-1-28.3 2.3-36s6.8-9.2 12.5-10.4 15.8 2.9 23.7 3c8.3.1 12.8-3.4 19-9.2 5-4.6 8.6-8.9 8.7-15.6.2-9-12.8-20.9-3.1-30.4s23.7 6.2 34 5 22.8-15.5 24.1-21.6-11.7-21.8-9.7-30.7cLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as t}from"./react-vendor-jWT2yUdV.js";import{O as r}from"./react-router-dom-C6k78GT4.js";import"./qface-BZLvZXJ8.js";function s(){return t.jsx(r,{})}export{s as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{G as l}from"./iconBase-B7bT1FlI.js";function a(c){return l({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.754 420.445c-11.526 1.393-44.86-52.741-44.86-52.741 0 31.345-16.136 72.247-51.051 101.786 16.842 5.192 54.843 19.167 45.803 34.421-7.316 12.343-125.51 7.881-159.632 4.037-34.122 3.844-152.316 8.306-159.632-4.037-9.045-15.25 28.918-29.214 45.783-34.415-34.92-29.539-51.059-70.445-51.059-101.792 0 0-33.334 54.134-44.859 52.741-5.37-.65-12.424-29.644 9.347-99.704 10.261-33.024 21.995-60.478 40.144-105.779C60.683 98.063 108.982.006 224 0c113.737.006 163.156 96.133 160.264 214.963 18.118 45.223 29.912 72.85 40.144 105.778 21.768 70.06 14.716 99.053 9.346 99.704z"},child:[]}]})(c)}function i(c){return l({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"},child:[]}]})(c)}function r(c){return l({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zm2 226.3c37.1 22.4 62 63.1 62 109.7s-24.9 87.3-62 109.7c-7.6 4.6-17.4 2.1-22-5.4s-2.1-17.4 5.4-22C269.4 401.5 288 370.9 288 336s-18.6-65.5-46.5-82.3c-7.6-4.6-10-14.4-5.4-22s14.4-10 22-5.4zm-91.9 30.9c6 2.5 9.9 8.3 9.9 14.8l0 128c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5L113.4 376 80 376c-8.8 0-16-7.2-16-16l0-48c0-8.8 7.2-16 16-16l33.4 0 35.3-35.3c4.6-4.6 11.5-5.9 17.4-3.5zm51 34.9c6.6-5.9 16.7-5.3 22.6 1.3C249.8 304.6 256 319.6 256 336s-6.2 31.4-16.3 42.7c-5.9 6.6-16 7.1-22.6 1.3s-7.1-16-1.3-22.6c5.1-5.7 8.1-13.1 8.1-21.3s-3.1-15.7-8.1-21.3c-5.9-6.6-5.3-16.7 1.3-22.6z"},child:[]}]})(c)}function s(c){return l({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM153 289l-31 31 31 31c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L71 337c-9.4-9.4-9.4-24.6 0-33.9l48-48c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9zM265 255l48 48c9.4 9.4 9.4 24.6 0 33.9l-48 48c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l31-31-31-31c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0z"},child:[]}]})(c)}function e(c){return l({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 144-208 0c-35.3 0-64 28.7-64 64l0 144-48 0c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128zM200 352l16 0c22.1 0 40 17.9 40 40l0 8c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-8c0-4.4-3.6-8-8-8l-16 0c-4.4 0-8 3.6-8 8l0 80c0 4.4 3.6 8 8 8l16 0c4.4 0 8-3.6 8-8l0-8c0-8.8 7.2-16 16-16s16 7.2 16 16l0 8c0 22.1-17.9 40-40 40l-16 0c-22.1 0-40-17.9-40-40l0-80c0-22.1 17.9-40 40-40zm133.1 0l34.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-34.9 0c-7.2 0-13.1 5.9-13.1 13.1c0 5.2 3 9.9 7.8 12l37.4 16.6c16.3 7.2 26.8 23.4 26.8 41.2c0 24.9-20.2 45.1-45.1 45.1L304 512c-8.8 0-16-7.2-16-16s7.2-16 16-16l42.9 0c7.2 0 13.1-5.9 13.1-13.1c0-5.2-3-9.9-7.8-12l-37.4-16.6c-16.3-7.2-26.8-23.4-26.8-41.2c0-24.9 20.2-45.1 45.1-45.1zm98.9 0c8.8 0 16 7.2 16 16l0 31.6c0 23 5.5 45.6 16 66c10.5-20.3 16-42.9 16-66l0-31.6c0-8.8 7.2-16 16-16s16 7.2 16 16l0 31.6c0 34.7-10.3 68.7-29.6 97.6l-5.1 7.7c-3 4.5-8 7.1-13.3 7.1s-10.3-2.7-13.3-7.1l-5.1-7.7c-19.3-28.9-29.6-62.9-29.6-97.6l0-31.6c0-8.8 7.2-16 16-16z"},child:[]}]})(c)}function d(c){return l({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM155.7 250.2L192 302.1l36.3-51.9c7.6-10.9 22.6-13.5 33.4-5.9s13.5 22.6 5.9 33.4L221.3 344l46.4 66.2c7.6 10.9 5 25.8-5.9 33.4s-25.8 5-33.4-5.9L192 385.8l-36.3 51.9c-7.6 10.9-22.6 13.5-33.4 5.9s-13.5-22.6-5.9-33.4L162.7 344l-46.4-66.2c-7.6-10.9-5-25.8 5.9-33.4s25.8-5 33.4 5.9z"},child:[]}]})(c)}function n(c){return l({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM64 256a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm152 32c5.3 0 10.2 2.6 13.2 6.9l88 128c3.4 4.9 3.7 11.3 1 16.5s-8.2 8.6-14.2 8.6l-88 0-40 0-48 0-48 0c-5.8 0-11.1-3.1-13.9-8.1s-2.8-11.2 .2-16.1l48-80c2.9-4.8 8.1-7.8 13.7-7.8s10.8 2.9 13.7 7.8l12.8 21.4 48.3-70.2c3-4.3 7.9-6.9 13.2-6.9z"},child:[]}]})(c)}function z(c){return l({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM112 256l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-16-16s7.2-16 16-16zm0 64l160 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-160 0c-8.8 0-16-7.2-1Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e,r as x}from"./react-vendor-jWT2yUdV.js";import{a as M,c as C}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as f}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{d as je}from"./chunk-IHO36JMK-DJPUeGG0.js";import{u as S,k as V,c as o,P as ae,b as E,r as be,W as v,s as U,M as we,e as ve,a as Ne,g as _}from"./index-DiaaLdUu.js";import{u as T}from"./useRequest-B1BwPztr.js";import{z as G}from"./react-hot-toast-cGcFZPSt.js";import{G as K}from"./iconBase-B7bT1FlI.js";import{L as ke}from"./index-BBhZPeTB.js";import{t as N}from"./chunk-6LIX6LVT-B246pOuK.js";import{b as ye,c as ze,d as Ce,e as Se}from"./index-DvErMbt6.js";import{d as Me,e as Le,f as Ie,g as _e,h as qe}from"./index-FvTxWQTZ.js";import{a as Ue}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{B as Ve}from"./index-DPx4wqle.js";import{c as Te}from"./chunk-D5XJWRAV-DVN21qSw.js";import{s as He,l as Pe}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{s as Qe}from"./chunk-J6JGI6RM-Djlxjgjl.js";import{p as Be}from"./chunk-APIAPHLK-nGgOe_Nr.js";import{t as Fe,a as te}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{i as $e}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{F as We,a as Ee}from"./index-_HIxriDC.js";import{M as Ae,a as De}from"./mirror_selector_modal-CyjkhfUx.js";import{u as ne}from"./use-dialog-CRIMuzeE.js";import{B as Oe}from"./index-Bz8pD9tN.js";import{u as Re}from"./use-config-Cu0QvgCe.js";import{Q as Ze}from"./qq_manager-BfRTEAby.js";import"./qface-BZLvZXJ8.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./react-router-dom-C6k78GT4.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./useFocusable-DA5Croun.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./index-BsnVex0g.js";import"./Item-D8Sud-UP.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./useToggle-B3ZYBe5S.js";import"./index-BV9-YCKp.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";function Ge(s){return K({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"},child:[]}]})(s)}const q=({count:s,label:a,size:n="md",accent:t=!1})=>{const[i]=S(V.backgroundImage,""),r=!!i;return e.jsx(M,{className:o("backdrop-blur-sm border transition-all duration-300 min-w-0 h-full",t?"bg-gradient-to-br from-primary-500/90 to-primary-400/80 border-primary-300/40 text-white shadow-md shadow-primary-500/20":r?"bg-white/10 dark:bg-black/10 border-white/30 hover:bg-white/20 dark:hover:bg-black/20 hover:-translate-y-0.5":"bg-white/50 dark:bg-black/30 border-white/50 dark:border-white/10 hover:bg-white/70 dark:hover:bg-black/40 hover:-translate-y-0.5"),shadow:"none",children:e.jsxs(C,{className:"items-center gap-0.5 p-2 md:p-3",children:[e.jsx("div",{className:o("font-mono font-bold leading-none tabular-nums",n==="md"?"text-3xl md:text-4xl":"text-2xl md:text-3xl",t||r?"text-white drop-shadow-sm":"text-default-700 dark:text-gray-200"),children:s}),e.jsx("div",{className:o("whitespace-nowrap text-nowrap flex-shrink-0 font-medium",n==="md"?"text-xs md:text-sm":"text-[11px]",t?"text-white/85":r?"text-white/80":"text-default-500"),children:a})]})})};function Ke(){const{data:s,error:a,loading:n,run:t}=T(()=>be.get("https://hi.logacg.com/"),{throttleWait:1e3}),i={hitokoto:"凡是过往,皆为序章。",from:"暴风雨",from_who:"莎士比亚"},r=(s==null?void 0:s.data)||(a?i:void 0),[c]=S(V.backgroundImage,""),d=!!c,m=()=>{try{const h=`${r==null?void 0:r.hitokoto} —— ${r==null?void 0:r.from} ${r==null?void 0:r.from_who}`;navigator.clipboard.writeText(h),G.success("复制成功")}catch{G.error("复制失败, 请手动复制")}};return e.jsxs("div",{className:"overflow-hidden",children:[e.jsxs("div",{className:"relative flex flex-col items-center justify-center px-4 pt-5 pb-3 md:px-7",children:[n&&!r&&e.jsx(ae,{}),r&&e.jsxs(e.Fragment,{children:[e.jsx(ye,{className:o("text-3xl mb-3",d?"text-white/25":"text-primary-400/30")}),e.jsxs("div",{className:o("text-lg md:text-xl font-medium tracking-wide leading-relaxed italic text-center max-w-4xl mx-auto",d?"text-white drop-shadow-sm":"text-default-700 dark:text-gray-200"),children:["“",r==null?void 0:r.hitokoto,"”"]}),e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",children:[e.jsxs("span",{className:o("font-semibold",d?"text-white/85":"text-primary-500"),children:["—— ",r==null?void 0:r.from]}),(r==null?void 0:r.from_who)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:o("w-1 h-1 rounded-full",d?"bg-white/40":"bg-default-300")}),e.jsx("span",{className:d?"text-white/60":"text-default-400",children:r==null?void 0:r.from_who})]})]})]})]}),e.jsxs("div",{className:"flex gap-2 justify-center pb-Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{i as L,b as et,d as ce,m as x,e as E,f as S,h as ue,j as Ft,p as de,k as U,s as fe,l as me,n as J,o as v,q as pe,r as ge,t as ye,u as it,v as Nt,F as Wt,w,x as st,y as $t,z as Gt,A as zt,B as Ht,C as Xt,D as ve,E as nt,S as xe,G as Pe,H as z,I as V,J as O,K as F,L as ot,M as Te,N as De,O as Ee,P as B,Q as Se}from"./gestures-BHfQC-M8.js";import{bf as Re,bg as Yt,bh as N,bi as G,bj as qt,bk as Ae,bd as Le,bl as Ce,bm as je,bn as Ve,bo as H,bp as rt}from"./index-DiaaLdUu.js";import{r as Q,j as Be}from"./react-vendor-jWT2yUdV.js";function we(t){return t==="x"||t==="y"?L[t]?null:(L[t]=!0,()=>{L[t]=!1}):L.x||L.y?null:(L.x=L.y=!0,()=>{L.x=L.y=!1})}function _t(t){return Re(t)&&"ownerSVGElement"in t}function ke(t){return _t(t)&&t.tagName==="svg"}function M(t,e,s,n){return et(t,e,ce(s),n)}const Kt=1e-4,Me=1-Kt,be=1+Kt,Zt=.01,Ie=0-Zt,Ue=0+Zt;function D(t){return t.max-t.min}function Oe(t,e,s){return Math.abs(t-e)<=s}function at(t,e,s,n=.5){t.origin=n,t.originPoint=x(e.min,e.max,t.origin),t.scale=D(s)/D(e),t.translate=x(s.min,s.max,t.origin)-t.originPoint,(t.scale>=Me&&t.scale<=be||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ie&&t.translate<=Ue||isNaN(t.translate))&&(t.translate=0)}function b(t,e,s,n){at(t.x,e.x,s.x,n?n.originX:void 0),at(t.y,e.y,s.y,n?n.originY:void 0)}function lt(t,e,s){t.min=s.min+e.min,t.max=t.min+D(e)}function Fe(t,e,s){lt(t.x,e.x,s.x),lt(t.y,e.y,s.y)}function ht(t,e,s){t.min=e.min-s.min,t.max=t.min+D(e)}function I(t,e,s){ht(t.x,e.x,s.x),ht(t.y,e.y,s.y)}function A(t){return[t("x"),t("y")]}const Jt=({current:t})=>t?t.ownerDocument.defaultView:null,ct=(t,e)=>Math.abs(t-e);function Ne(t,e){const s=ct(t.x,e.x),n=ct(t.y,e.y);return Math.sqrt(s**2+n**2)}class Qt{constructor(e,s,{transformPagePoint:n,contextWindow:a=window,dragSnapToOrigin:u=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Y(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=Ne(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!f&&!m)return;const{point:p}=d,{timestamp:y}=E;this.history.push({...p,timestamp:y});const{onStart:g,onMove:P}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=X(f,this.transformPagePoint),S.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:m,onSessionEnd:p,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const g=Y(d.type==="pointercancel"?this.lastMoveEventInfo:X(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,g),p&&p(d,g)},!ue(e))return;this.dragSnapToOrigin=u,this.handlers=s,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=a||window;const o=Ft(e),r=X(o,this.transformPagePoint),{point:l}=r,{timestamp:h}=E;this.history=[{...l,timestamp:h}];const{onSessionStart:c}=s;c&&c(e,Y(r,this.history)),this.removeListeners=de(M(this.contextWindow,"pointermove",this.handlePointerMove),M(this.contextWindow,"pointerup",this.handlePointerUp),M(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),U(this.updatePoint)}}function X(t,e){return e?{point:e(t.point)}:t}function ut(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Y({point:t},e){return{point:t,delta:ut(t,te(e)),offset:ut(t,We(e)),velocity:$e(e,.1)}}function We(t){return t[0]}function te(t){return t[t.length-1]}function $e(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,n=null;const a=te(t);for(;s>=0&&(n=t[s],!(a.timestamp-n.timestamp>fe(e)));)s--;if(!n)return{x:0,y:0};const u=me(a.timestamp-n.timestamp);if(u===0)return{x:0,y:0};const i={x:(a.x-n.x)/u,y:(a.y-n.y)/u};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ge(t,{min:e,max:s},n){return e!==void 0&&t<e?t=n?x(e,t,n.min):Math.max(t,e):s!==void 0&&t>s&&(t=n?x(s,t,n.max):Math.min(t,s)),t}function dt(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function ze(t,{top:e,left:s,bottom:n,right:a}){return{x:dt(t.x,s,a),y:dt(t.y,e,n)}}function ft(t,e){let s=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,n]=[n,s]),{min:s,max:n}}function He(t,e){return{x:ft(t.x,e.x),y:ft(t.y,e.y)}}function Xe(t,e){let s=.5;const n=D(t),a=D(e);return a>n?s=J(e.min,e.max-n,t.min):n>a&&(s=J(t.min,t.max-a,e.min)),Yt(0,1,s)}function Ye(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}const tt=.35;function qe(t=tt){return t===!1?t=0:t===!0&&(t=tt),{x:mt(t,"left","right"),y:mt(t,"top","bottom")}}function mt(t,e,s){return{min:pt(t,e),max:pt(t,s)}}function pt(t,e){return typeof t=="number"?t:t[e]||0}const _e=new WeakMap;class Ke{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currLine truncated
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
const o="/webui/assets/logo-D_DsPxOt.png";export{o as l};
|
||||
@@ -0,0 +1,6 @@
|
||||
import{j as e,r as m}from"./react-vendor-jWT2yUdV.js";import{t as I,a as R}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{u as z}from"./useRequest-B1BwPztr.js";import{z as v}from"./react-hot-toast-cGcFZPSt.js";import{u as E,k as A,c as S,b as k,P as $,W as j}from"./index-DiaaLdUu.js";import{a as D,c as W}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as T}from"./chunk-D5XJWRAV-DVN21qSw.js";import{s as _,l as C}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{X as y}from"./xterm-m1lN6Krd.js";import{c as B}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{y as P}from"./index-FvTxWQTZ.js";import"./qface-BZLvZXJ8.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./react-router-dom-C6k78GT4.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./useHover-DC1o5-bm.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./iconBase-B7bT1FlI.js";var o=(r=>(r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error",r.FATAL="fatal",r))(o||{});const G={[o.DEBUG]:"green",[o.INFO]:"black",[o.WARN]:"yellow",[o.ERROR]:"red",[o.FATAL]:"red"},X=r=>{var u;const l=r.match(/\[[a-zA-Z]+\]/)||[];let t=r;const a=((u=l==null?void 0:l[0])==null?void 0:u.replace("[","").replace("]",""))??o.INFO;switch(G[a]){case"green":t=`\x1B[32m${t}\x1B[0m`;break;case"black":t=`\x1B[30m${t}\x1B[0m`;break;case"yellow":t=`\x1B[33m${t}\x1B[0m`;break;case"red":t=`\x1B[31m${t}\x1B[0m`;break;default:t=`\x1B[30m${t}\x1B[0m`}return{content:t,level:a}},N=(r,l)=>{let t=r;switch(l){case o.DEBUG:t=`\x1B[32m[DEBUG] ${r}\x1B[0m`;break;case o.INFO:t=`\x1B[30m[INFO] ${r}\x1B[0m`;break;case o.WARN:t=`\x1B[33m[WARN] ${r}\x1B[0m`;break;case o.ERROR:t=`\x1B[31m[ERROR] ${r}\x1B[0m`;break;case o.FATAL:t=`\x1B[31m[FATAL] ${r}\x1B[0m`;break;default:t=`\x1B[30m${r}\x1B[0m`}return t},M={[o.DEBUG]:"default",[o.INFO]:"primary",[o.WARN]:"warning",[o.ERROR]:"primary",[o.FATAL]:"primary"},O=r=>{const{selectedKeys:l,onSelectionChange:t}=r;return e.jsx(_,{selectedKeys:l,onSelectionChange:a=>{a!=="all"&&(a==null?void 0:a.size)===0&&(a="all"),t(a)},label:"日志级别",selectionMode:"multiple","aria-label":"Log Level",classNames:{label:"mb-2",trigger:"bg-white/80 dark:bg-white/[0.06] border border-black/[0.08] dark:border-white/12 backdrop-blur-sm hover:!bg-white/95 dark:hover:!bg-white/[0.09]",popoverContent:"bg-white/90 dark:bg-zinc-900/90 backdrop-blur-xl border border-white/70 dark:border-white/10"},size:"sm",items:[{label:"Debug",value:o.DEBUG},{label:"Info",value:o.INFO},{label:"Warn",value:o.WARN},{label:"Error",value:o.ERROR},{label:"Fatal",value:o.FATAL}],renderValue:a=>a.length===5?e.jsx(B,{size:"sm",color:"primary",variant:"flat",children:"全部"}):e.jsx("div",{className:"flex gap-2",children:a.map(i=>{var u,x;return e.jsx(B,{size:"sm",color:M[(u=i.data)==null?void 0:u.value],variant:"flat",children:(x=i.data)==null?void 0:x.label},i.key)})}),children:a=>e.jsx(C,{value:a.value,children:a.label},a.value)})},q=r=>{const{list:l,onSelect:t,selectedLog:a,refreshList:i,refreshLog:u,listLoading:x,logContent:f,listError:p,logLoading:g}=r,c=m.useRef(null),[n,s]=m.useState(new Set(["info","warn","error"])),[b]=E(A.backgroundImage,""),L=!!b,U=d=>d.split(`
|
||||
`).map(h=>X(h)).filter(h=>n==="all"?!0:n.has(h.level)).map(h=>h.content).join(`\r
|
||||
`),F=()=>{if(!f)return;const d=new Blob([f],{type:"text/plain"}),w=URL.createObjectURL(d),h=document.createElement("a");h.href=w,h.download=`${a}.log`,h.click(),URL.revokeObjectURL(w)};return m.useEffect(()=>{if(!c.current||!f)return;c.current.clear();const d=U(f);c.current.write(d+`\r
|
||||
snowcat@webui:~$ `)},[f,n]),e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"历史日志 - SnowCat WebUI"}),e.jsxs(D,{className:S("max-w-full h-full backdrop-blur-sm border border-white/40 dark:border-white/10 shadow-sm",L?"bg-black/25 dark:bg-black/30":"bg-white/60 dark:bg-white/[0.04]"),children:[e.jsxs(T,{className:"flex-row justify-start gap-3",children:[e.jsx(_,{label:"选择日志",size:"sm",isLoading:x,errorMessage:p==null?void 0:p.message,classNames:{trigger:"bg-default-100/50 backdrop-blur-sm hover:!bg-default-200/50"},placeholder:"选择日志",onChange:d=>{const w=d.target.value;w&&t(w)},selectedKeys:[a||""],items:l.map(d=>({value:d,label:d})),children:d=>e.jsx(C,{value:d.value,children:d.label},d.value)}),e.jsx(O,{selectedKeys:n,onSelectionChange:s}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsx(k,{className:"flex-shrink-0",onPress:F,size:"sm",variant:"flat",color:"primary",children:"下载日志"}),e.jsx(k,{onPress:i,size:"sm",variant:"flat",children:"刷新列表"}),e.jsx(k,{onPress:u,size:"sm",variant:"flat",children:"刷新日志"})]})]}),e.jsxs(W,{className:"relative",children:[e.jsx($,{loading:g}),e.jsx(y,{className:"w-full h-full",ref:c})]})]})]})},H=()=>{const r=m.useRef(null),[l,t]=m.useState(new Set(["info","warn","error"])),[a,i]=m.useState([]),[u]=E(A.backgroundImage,""),x=!!u,f=()=>{const g=a.filter(b=>l==="all"?!0:l.has(b.level)).map(b=>N(b.message,b.level)).join(`\r
|
||||
`),c=new Blob([g],{type:"text/plain"}),n=URL.createObjectURL(c),s=document.createElement("a");s.href=n,s.download="snowcat.log",s.click(),URL.revokeObjectURL(n)},p=()=>{var g,c;try{const n=a.filter(s=>l==="all"?!0:l.has(s.level)).map(s=>N(s.message,s.level)).join(`\r
|
||||
`);(g=r.current)==null||g.clear(),(c=r.current)==null||c.write(n)}catch(n){console.error(n),v.error("获取实时日志失败")}};return m.useEffect(()=>{p()},[l,a]),m.useEffect(()=>{const c=(()=>{try{const n=j.getRealTimeLogs(s=>{i(b=>{const L=[...b,...s];return L.length>1e3&&L.splice(0,L.length-1e3),L})});return()=>{n.close()}}catch{v.error("获取实时日志失败")}})();return()=>{console.log("close"),c==null||c()}},[]),e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"实时日志 - SnowCat WebUI"}),e.jsxs("div",{className:S("flex items-center gap-2 p-2 rounded-2xl border backdrop-blur-sm transition-all shadow-sm mb-4",x?"bg-black/25 dark:bg-black/30 border-white/20 dark:border-white/10":"bg-white/60 dark:bg-white/[0.04] border-white/60 dark:border-white/10"),children:[e.jsx(O,{selectedKeys:l,onSelectionChange:t}),e.jsx(k,{className:"flex-shrink-0 bg-white/60 dark:bg-white/[0.06] text-default-600 border border-white/50 dark:border-white/10 font-medium",radius:"full",onPress:f,startContent:e.jsx(P,{className:"text-lg"}),variant:"flat",children:"下载日志"})]}),e.jsx("div",{className:"flex-1 h-full overflow-hidden",children:e.jsx(y,{ref:r})})]})};function je(){const{data:r,loading:l,error:t,refresh:a}=z(j.getLogList),[i,u]=m.useState(null),[x,f]=m.useState(null),[p,g]=m.useState(!1),c=s=>{u(s)},n=async()=>{if(i){g(!0);try{const s=await j.getLogContent(i);f(s)}catch(s){const b=s.message;v.error(`加载日志失败: ${b}`)}finally{g(!1)}}};return m.useEffect(()=>{r&&r.length>0&&u(r[0])},[r]),m.useEffect(()=>{i&&n()},[i]),e.jsx("div",{className:"h-[calc(100vh-3.5rem)] flex flex-col gap-3 items-center pt-4 px-3 md:px-6",children:e.jsxs(I,{"aria-label":"Logs",classNames:{panel:"w-full flex-1 h-full py-0 flex flex-col gap-4",base:"flex-shrink-0 !h-fit",tabList:"sc-tablist",cursor:"sc-tab-cursor"},children:[e.jsx(R,{title:"实时日志",children:e.jsx(H,{})}),e.jsx(R,{title:"历史日志",children:e.jsx(q,{list:r||[],onSelect:c,selectedLog:i||void 0,refreshList:a,refreshLog:n,listLoading:l,logLoading:p,listError:t,logContent:x||void 0})})]})})}export{je as default};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as c,j as t}from"./react-vendor-jWT2yUdV.js";import{L as w,k as F,aI as I,O as P,Q as $,R as A,b as v,S as B,T as G,c as H}from"./index-DiaaLdUu.js";import{c as M}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{t as J}from"./chunk-6LIX6LVT-B246pOuK.js";import{d as O,k as q,c as Q}from"./index-DvErMbt6.js";class z{static async getMirrorList(){const{data:s}=await w.get("/Mirror/List");return s.data}static async setCustomMirror(s){await w.post("/Mirror/SetCustom",{mirror:s})}static async testSingleMirror(s,r="file"){const{data:o}=await w.post("/Mirror/Test",{mirror:s,type:r});return o.data}static testMirrorsSSE(s="file",r){const o=localStorage.getItem(F.token);if(!o)throw new Error("未登录");const u=JSON.parse(o),a=new I.EventSourcePolyfill(`/api/Mirror/Test/SSE?type=${s}`,{headers:{Authorization:`Bearer ${u}`,Accept:"text/event-stream"},withCredentials:!0});return a.onmessage=d=>{var l,m,h,x,f;try{const i=JSON.parse(d.data);switch(i.type){case"start":(l=r.onStart)==null||l.call(r,i);break;case"testing":(m=r.onTesting)==null||m.call(r,i);break;case"result":(h=r.onResult)==null||h.call(r,i);break;case"complete":(x=r.onComplete)==null||x.call(r,i),a.close();break;case"error":(f=r.onError)==null||f.call(r,i.error),a.close();break}}catch(i){console.error("Failed to parse SSE message:",i)}},a.onerror=d=>{var l;console.error("SSE连接出错:",d),(l=r.onError)==null||l.call(r,"连接中断"),a.close()},a}}function Y({isOpen:n,onClose:s,onSelect:r,currentMirror:o,type:u="file"}){const[a,d]=c.useState([]),[l,m]=c.useState(o||"auto"),[h,x]=c.useState(new Map),[f,i]=c.useState(!1),[C,S]=c.useState(0),[T,p]=c.useState(""),[N,E]=c.useState(null);c.useEffect(()=>{n&&R()},[n]);const R=async()=>{try{const e=await z.getMirrorList(),g=u==="raw"?e.rawMirrors:e.fileMirrors;d(g),e.customMirror&&m(e.customMirror)}catch(e){console.error("Failed to load mirrors:",e)}},L=()=>{i(!0),S(0),x(new Map),E(null),p("准备测速..."),z.testMirrorsSSE(u,{onStart:e=>{p(e.message)},onTesting:e=>{S(e.index/e.total*100),p(e.message)},onResult:e=>{x(g=>{const j=new Map(g);return j.set(e.result.mirror,e.result),j}),S((e.index+1)/e.total*100)},onComplete:e=>{i(!1),S(100),p(e.message),e.fastest&&E(e.fastest.mirror)},onError:e=>{i(!1),p(`测速失败: ${e}`)}})},b=()=>{r(l==="auto"?void 0:l),s()};return t.jsx(P,{isOpen:n,onClose:s,size:"2xl",scrollBehavior:"inside",classNames:{backdrop:"z-[200]",wrapper:"z-[200]"},children:t.jsxs($,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:[t.jsxs(A,{className:"flex flex-col gap-1",children:[t.jsxs("div",{className:"flex items-center justify-between pr-8",children:[t.jsx("span",{children:"选择镜像源"}),t.jsx(v,{size:"sm",color:"primary",variant:"flat",startContent:!f&&t.jsx(O,{}),onPress:L,isLoading:f,children:f?"测速中...":"一键测速"})]}),f&&t.jsxs("div",{className:"mt-2",children:[t.jsx("div",{className:"w-full bg-default-200 rounded-full h-2",children:t.jsx("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${C}%`}})}),t.jsx("p",{className:"text-xs text-default-500 mt-1",children:T})]})]}),t.jsx(B,{children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(y,{value:"auto",label:"自动选择",description:"系统自动选择最快的镜像源",isSelected:l==="auto",onSelect:()=>m("auto"),badge:t.jsx(M,{size:"sm",color:"primary",variant:"flat",children:"推荐"})}),t.jsx(y,{value:"https://github.com",label:"GitHub 原始",description:"直连 GitHub(可能较慢)",isSelected:l==="https://github.com",onSelect:()=>m("https://github.com"),testResult:h.get("https://github.com (原始)"),isFastest:N==="https://github.com (原始)"}),a.map(e=>{if(!e)return null;const g=h.get(e),j=N===e;let _=e;try{_=new URL(e).hostname}catch{}return t.jsx(y,{value:e,label:_,description:e,isSelected:l===e,onSelect:()=>m(e),testResult:g,isFastest:j},e)})]})}),t.jsxs(G,{children:[t.jsx(v,{variant:"light",onPress:s,children:"取消"}),t.jsx(v,{color:"primary",onPress:b,children:"确认选择"})]})]})})}function y({label:n,description:s,isSelected:r,onSelect:o,testResult:u,isFastest:a,badge:d}){return t.jsxs("div",{className:H("flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all","bg-content1 hover:bg-content2 border-2",r?"border-primary":"border-transparent",a&&"ring-2 ring-success"),onClick:o,children:[t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"font-medium",children:n}),t.jsx("p",{className:"text-xs text-default-500 truncate",children:s})]}),t.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[d,a&&!d&&t.jsx(M,{size:"sm",color:"success",variant:"flat",children:"最快"}),u&&t.jsx(U,{result:u})]})]})}function U({result:n}){const s=o=>o>=5e3?">5s":o>=1e3?`${(o/1e3).toFixed(1)}s`:`${o}ms`;if(!n.success)return t.jsx(J,{content:n.error||"连接失败",children:t.jsx(M,{size:"sm",color:"dangerLine truncated
|
||||
@@ -0,0 +1,55 @@
|
||||
var mo=Object.defineProperty;var bo=(s,t,e)=>t in s?mo(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var q=(s,t,e)=>bo(s,typeof t!="symbol"?t+"":t,e);import{j as b,r as H}from"./react-vendor-jWT2yUdV.js";import{t as yo,V as dt,v as il,x as vo,y as xo,z as wo,B as al,X as Xi,Y as No,D as Ao,E as Eo,b as lt,c as To,U as Co,O as Lo,Q as So,R as _o,S as Oo,T as qo}from"./index-DiaaLdUu.js";import{z as Er}from"./react-hot-toast-cGcFZPSt.js";import{c as Te,g as ll,l as Yi}from"./qface-BZLvZXJ8.js";import{t as xt}from"./chunk-6LIX6LVT-B246pOuK.js";import{u as Io}from"./use-dialog-CRIMuzeE.js";import{i as Kt}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{p as $t,a as Ut,b as Ft}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{d as Ro,e as jo}from"./index-_HIxriDC.js";import{t as Qi,u as ko,v as Mo}from"./index-FvTxWQTZ.js";import{n as Gs,o as Vs,p as Bo,q as Po,r as Do,s as $o}from"./index-DE7yoXMZ.js";import{g as Uo,h as Fo}from"./index-DPx4wqle.js";import{i as Ho}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{p as zo}from"./index-BBhZPeTB.js";import{F as Go}from"./chunk-SLABUSGS-Cmz8sGrU.js";import{s as Vo,l as Ko}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{t as Zo,a as Ji}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{u as Wo,C as Ur}from"./react-hook-form-DTbqnRcd.js";import{e as ta,f as Xo}from"./code_editor-TFSnOENo.js";import{G as Yo}from"./iconBase-B7bT1FlI.js";var Hn=yo({slots:{base:"inline-flex items-center justify-between h-fit rounded-large gap-2",pre:"bg-transparent text-inherit font-mono font-normal inline-block whitespace-nowrap",content:"flex flex-col",symbol:"select-none",copyButton:["group","relative","z-10","text-large","text-inherit","data-[hover=true]:bg-transparent"],copyIcon:["absolute text-inherit opacity-100 scale-100 group-data-[copied=true]:opacity-0 group-data-[copied=true]:scale-50"],checkIcon:["absolute text-inherit opacity-0 scale-50 group-data-[copied=true]:opacity-100 group-data-[copied=true]:scale-100"]},variants:{variant:{flat:"",solid:"",bordered:"border-medium bg-transparent",shadow:""},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{base:"px-1.5 py-0.5 text-tiny rounded-small"},md:{base:"px-3 py-1.5 text-small rounded-medium"},lg:{base:"px-4 py-2 text-medium rounded-large"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},fullWidth:{true:{base:"w-full"}},disableAnimation:{true:{},false:{copyIcon:"transition-transform-opacity",checkIcon:"transition-transform-opacity"}}},defaultVariants:{color:"default",variant:"flat",size:"md",fullWidth:!1},compoundVariants:[{variant:["solid","shadow"],color:"default",class:{copyButton:"data-[focus-visible]:outline-default-foreground"}},{variant:["solid","shadow"],color:"primary",class:{copyButton:"data-[focus-visible]:outline-primary-foreground"}},{variant:["solid","shadow"],color:"secondary",class:{copyButton:"data-[focus-visible]:outline-secondary-foreground"}},{variant:["solid","shadow"],color:"success",class:{copyButton:"data-[focus-visible]:outline-success-foreground"}},{variant:["solid","shadow"],color:"warning",class:{copyButton:"data-[focus-visible]:outline-warning-foreground"}},{variant:["solid","shadow"],color:"danger",class:{copyButton:"data-[focus-visible]:outline-danger-foreground"}},{variant:"flat",color:"default",class:{base:dt.flat.default}},{variant:"flat",color:"primary",class:{base:dt.flat.primary}},{variant:"flat",color:"secondary",class:{base:dt.flat.secondary}},{variant:"flat",color:"success",class:{base:dt.flat.success}},{variant:"flat",color:"warning",class:{base:dt.flat.warning}},{variant:"flat",color:"danger",class:{base:dt.flat.danger}},{variant:"solid",color:"default",class:{base:dt.solid.default}},{variant:"solid",color:"primary",class:{base:dt.solid.primary}},{variant:"solid",color:"secondary",class:{base:dt.solid.secondary}},{variant:"solid",color:"success",class:{base:dt.solid.success}},{variant:"solid",color:"warning",class:{base:dt.solid.warning}},{variant:"solid",color:"danger",class:{base:dt.solid.danger}},{variant:"shadow",color:"default",class:{base:dt.shadow.default}},{variant:"shadow",color:"primary",class:{base:dt.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:dt.shadow.secondary}},{variant:"shadow",color:"success",class:{base:dt.shadow.success}},{variant:"shadow",color:"warning",class:{base:dt.shadow.warning}},{variant:"shadow",color:"danger",class:{base:dt.shadow.danger}},{variant:"bordered",color:"default",class:{base:dt.bordered.default}},{variant:"bordered",color:"primary",class:{base:dt.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:dt.bordered.secondary}},{variant:"bordered",color:"success",class:{base:dt.bordered.success}},{variant:"bordered",color:"warning",class:{base:dt.bordered.warning}},{variant:"bordered",color:"danger",class:{base:dt.bordered.danger}}]}),Qo=s=>b.jsxs("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",role:"presentatiLine truncated
|
||||
`){const v=new o.default(this.ops);let w=new m,N=0;for(;v.hasNext();){if(v.peekType()!=="insert")return;const T=v.peek(),O=l.default.length(T)-v.peekLength(),k=typeof T.insert=="string"?T.insert.indexOf(d,O)-O:-1;if(k<0)w.push(v.next());else if(k>0)w.push(v.next(k));else{if(f(w,v.next(1).attributes||{},N)===!1)return;N+=1,w=new m}}w.length()>0&&f(w,{},N)}invert(f){const d=new m;return this.reduce((v,w)=>{if(w.insert)d.delete(l.default.length(w));else{if(typeof w.retain=="number"&&w.attributes==null)return d.retain(w.retain),v+w.retain;if(w.delete||typeof w.retain=="number"){const N=w.delete||w.retain;return f.slice(v,v+N).forEach(O=>{w.delete?d.push(O):w.retain&&w.attributes&&d.retain(l.default.length(O),i.default.invert(w.attributes,O.attributes))}),v+N}else if(typeof w.retain=="object"&&w.retain!==null){const N=f.slice(v,v+1),T=new o.default(N.ops).next(),[O,k,z]=h(w.retain,T.insert),j=m.getHandler(O);return d.retain({[O]:j.invert(k,z)},i.default.invert(w.attributes,T.attributes)),v+1}}return v},0),d.chop()}transform(f,d=!1){if(d=!!d,typeof f=="number")return this.transformPosition(f,d);const v=f,w=new o.default(this.ops),N=new o.default(v.ops),T=new m;for(;w.hasNext()||N.hasNext();)if(w.peekType()==="insert"&&(d||N.peekType()!=="insert"))T.retain(l.default.length(w.next()));else if(N.peekType()==="insert")T.push(N.next());else{const O=Math.min(w.peekLength(),N.peekLength()),k=w.next(O),z=N.next(O);if(k.delete)continue;if(z.delete)T.push(z);else{const j=k.retain,V=z.retain;let tt=typeof V=="object"&&V!==null?V:O;if(typeof j=="object"&&j!==null&&typeof V=="object"&&V!==null){const J=Object.keys(j)[0];if(J===Object.keys(V)[0]){const pt=m.getHandler(J);pt&&(tt={[J]:pt.transform(j[J],V[J],d)})}}T.retain(tt,i.default.transform(k.attributes,z.attributes,d))}}return T.chop()}transformPosition(f,d=!1){d=!!d;const v=new o.default(this.ops);let w=0;for(;v.hasNext()&&w<=f;){const N=v.peekLength(),T=v.peekType();if(v.next(),T==="delete"){f-=Math.min(N,f-w);continue}else T==="insert"&&(w<f||!d)&&(f+=N);w+=N}return f}}m.Op=l.default,m.OpIterator=o.default,m.AttributeMap=i.default,m.handlers={},t.default=m,s.exports=m,s.exports.default=m})(_s,_s.exports)),_s.exports}var Dt=$d();const P=ll(Dt);class Jt extends Rt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Jt.blotName="break";Jt.tagName="BR";let Yt=class extends zs{};const Ud={"&":"&","<":"<",">":">",'"':""","'":"'"};function Qs(s){return s.replace(/[&<>"']/g,t=>Ud[t])}const ie=class ie extends Bi{static compare(t,e){const r=ie.order.indexOf(t),n=ie.order.indexOf(e);return r>=0||n>=0?r-n:t===e?0:t<e?-1:1}formatAt(t,e,r,n){if(ie.compare(this.statics.blotName,r)<0&&this.scroll.query(r,D.BLOT)){const i=this.isolate(t,e);n&&i.wrap(r,n)}else super.formatAt(t,e,r,n)}optimize(t){if(super.optimize(t),this.parent instanceof ie&&ie.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}};q(ie,"allowedChildren",[ie,Jt,Rt,Yt]),q(ie,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let ce=ie;const ka=1;class At extends ts{constructor(){super(...arguments);q(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Ul(this)),this.cache.delta}deleteAt(e,r){super.deleteAt(e,r),this.cache={}}formatAt(e,r,n,i){r<=0||(this.scroll.query(n,D.BLOCK)?e+r===this.length()&&this.format(n,i):super.formatAt(e,Math.min(r,this.length()-e-1),n,i),this.cache={})}insertAt(e,r,n){if(n!=null){super.insertAt(e,r,n),this.cache={};return}if(r.length===0)return;const i=r.split(`
|
||||
`),l=i.shift();l.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});let o=this;i.reduce((c,h)=>(o=o.split(c,!0),o.insertAt(0,h),h.length),e+l.length)}insertBefore(e,r){const{head:n}=this.children;super.insertBefore(e,r),n instanceof Jt&&n.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+ka),this.cache.length}moveChildren(e,r){super.moveChildren(e,r),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(e===0||e>=this.length()-ka)){const i=this.clone();return e===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const n=super.split(e,r);return this.cache={},n}}At.blotName="block";At.tagName="P";At.defaultChild=Jt;At.allowedChildren=[Jt,ce,Rt,Yt];let Pt=class extends Rt{attach(){super.attach(),this.attributes=new Xs(this.domNode)}delta(){return new P().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const r=this.scroll.query(t,D.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,e)}formatAt(t,e,r,n){this.format(r,n)}insertAt(t,e,r){if(r!=null){super.insertAt(t,e,r);return}const n=e.split(`
|
||||
`),i=n.pop(),l=n.map(c=>{const h=this.scroll.create(At.blotName);return h.insertAt(0,c),h}),o=this.split(t);l.forEach(c=>{this.parent.insertBefore(c,o)}),i&&this.parent.insertBefore(this.scroll.create("text",i),o)}};Pt.scope=D.BLOCK_BLOT;function Ul(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return s.descendants(Lt).reduce((e,r)=>r.length()===0?e:e.insert(r.value(),Mt(r,{},t)),new P).insert(`
|
||||
`,Mt(s))}function Mt(s){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return s==null||("formats"in s&&typeof s.formats=="function"&&(t={...t,...s.formats()},e&&delete t["code-token"]),s.parent==null||s.parent.statics.blotName==="scroll"||s.parent.statics.scope!==s.statics.scope)?t:Mt(s.parent,t,e)}const kt=class kt extends Rt{static value(){}constructor(t,e,r){super(t,e),this.selection=r,this.textNode=document.createTextNode(kt.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let r=this,n=0;for(;r!=null&&r.statics.scope!==D.BLOCK_BLOT;)n+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=kt.CONTENTS.length,r.optimize(),r.formatAt(n,kt.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof Yt?this.prev:null,r=e?e.length():0,n=this.next instanceof Yt?this.next:null,i=n?n.text:"",{textNode:l}=this,o=l.data.split(kt.CONTENTS).join("");l.data=kt.CONTENTS;let c;if(e)c=e,(o||n)&&(e.insertAt(e.length(),o+i),n&&n.remove());else if(n)c=n,n.insertAt(0,o);else{const h=document.createTextNode(o);c=this.scroll.create(h),this.parent.insertBefore(c,this)}if(this.remove(),t){const h=(f,d)=>e&&f===e.domNode?d:f===l?r+d-1:n&&f===n.domNode?r+o.length+d:null,m=h(t.start.node,t.start.offset),y=h(t.end.node,t.end.offset);if(m!==null&&y!==null)return{startNode:c.domNode,startOffset:m,endNode:c.domNode,endOffset:y}}return null}update(t,e){if(t.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(e.range=r)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=kt.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}};q(kt,"blotName","cursor"),q(kt,"className","ql-cursor"),q(kt,"tagName","span"),q(kt,"CONTENTS","\uFEFF");let xr=kt;var Wn={exports:{}},Ma;function Fd(){return Ma||(Ma=1,(function(s){var t=Object.prototype.hasOwnProperty,e="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(e=!1));function n(c,h,m){this.fn=c,this.context=h,this.once=m||!1}function i(c,h,m,y,f){if(typeof m!="function")throw new TypeError("The listener must be a function");var d=new n(m,y||c,f),v=e?e+h:h;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],d]:c._events[v].push(d):(c._events[v]=d,c._eventsCount++),c}function l(c,h){--c._eventsCount===0?c._events=new r:delete c._events[h]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var h=[],m,y;if(this._eventsCount===0)return h;for(y in m=this._events)t.call(m,y)&&h.push(e?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(m)):h},o.prototype.listeners=function(h){var m=e?e+h:h,y=this._events[m];if(!y)return[];if(y.fn)return[y.fn];for(var f=0,d=y.length,v=new Array(d);f<d;f++)v[f]=y[f].fn;return v},o.prototype.listenerCount=function(h){var m=e?e+h:h,y=this._events[m];return y?y.fn?1:y.length:0},o.prototype.emit=function(h,m,y,f,d,v){var w=e?e+h:h;if(!this._events[w])return!1;var N=this._events[w],T=arguments.length,O,k;if(N.fn){switch(N.once&&this.removeListener(h,N.fn,void 0,!0),T){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,m),!0;case 3:return N.fn.call(N.context,m,y),!0;case 4:return N.fn.call(N.context,m,y,f),!0;case 5:return N.fn.call(N.context,m,y,f,d),!0;case 6:return N.fn.call(N.context,m,y,f,d,v),!0}for(k=1,O=new Array(T-1);k<T;k++)O[k-1]=arguments[k];N.fn.apply(N.context,O)}else{var z=N.length,j;for(k=0;k<z;k++)switch(N[k].once&&this.removeListener(h,N[k].fn,void 0,!0),T){case 1:N[k].fn.call(N[k].context);break;case 2:N[k].fn.call(N[k].context,m);break;case 3:N[k].fn.call(N[k].context,m,y);break;case 4:N[k].fn.call(N[k].context,m,y,f);break;default:if(!O)for(j=1,O=new Array(T-1);j<T;j++)O[j-1]=arguments[j];N[k].fn.apply(N[k].context,O)}}return!0},o.prototype.on=function(h,m,y){return i(this,h,m,y,!1)},o.prototype.once=function(h,m,y){return i(this,h,m,y,!0)},o.prototype.removeListener=function(h,m,y,f){var d=e?e+h:h;if(!this._events[d])return this;if(!m)return l(this,d),this;var v=this._events[d];if(v.fn)v.fn===m&&(!f||v.once)&&(!y||v.context===y)&&l(this,d);else{for(var w=0,N=[],T=v.length;w<T;w++)(v[w].fn!==m||f&&!v[w].once||y&&v[w].context!==y)&&N.push(v[w]);N.length?this._events[d]=N.length===1?N[0]:N:l(this,d)}return this},o
Line truncated
|
||||
`)&&(e<=l||!!this.scroll.descendant(Pt,l)[0]),this.scroll.insertAt(l,v);const[w,N]=this.scroll.line(l);let T=Se({},Mt(w));if(w instanceof At){const[O]=w.descendant(Lt,N);O&&(T=Se(T,Mt(O)))}h=Dt.AttributeMap.diff(T,h)||{}}else if(typeof o.insert=="object"){const v=Object.keys(o.insert)[0];if(v==null)return l;const w=this.scroll.query(v,D.INLINE)!=null;if(w)(e<=l||this.scroll.descendant(Pt,l)[0])&&(y=!0);else if(l>0){const[N,T]=this.scroll.descendant(Lt,l-1);N instanceof Yt?N.value()[T]!==`
|
||||
`&&(m=!0):N instanceof Rt&&N.statics.scope===D.INLINE_BLOT&&(m=!0)}if(this.scroll.insertAt(l,v,o.insert[v]),w){const[N]=this.scroll.descendant(Lt,l);if(N){const T=Se({},Mt(N));h=Dt.AttributeMap.diff(T,h)||{}}}}e+=c}else if(n.push(o),o.retain!==null&&typeof o.retain=="object"){const v=Object.keys(o.retain)[0];if(v==null)return l;this.scroll.updateEmbedAt(l,v,o.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(l,c,v,h[v])});const f=m?1:0,d=y?1:0;return e+=f+d,n.retain(f),n.delete(d),l+c+f+d},0),n.reduce((l,o)=>typeof o.delete=="number"?(this.scroll.deleteAt(l,o.delete),l):l+Dt.Op.length(o),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new P().retain(t).delete(e))}formatLine(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(i=>{this.scroll.lines(t,Math.max(e,1)).forEach(l=>{l.format(i,r[i])})}),this.scroll.optimize();const n=new P().retain(t).retain(e,gr(r));return this.update(n)}formatText(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(i=>{this.scroll.formatAt(t,e,i,r[i])});const n=new P().retain(t).retain(e,gr(r));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new P)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],n=[];e===0?this.scroll.path(t).forEach(o=>{const[c]=o;c instanceof At?r.push(c):c instanceof Lt&&n.push(c)}):(r=this.scroll.lines(t,e),n=this.scroll.descendants(Lt,t,e));const[i,l]=[r,n].map(o=>{const c=o.shift();if(c==null)return{};let h=Mt(c);for(;Object.keys(h).length>0;){const m=o.shift();if(m==null)return h;h=Wd(Mt(m),h)}return h});return{...i,...l}}getHTML(t,e){const[r,n]=this.scroll.line(t);if(r){const i=r.length();return r.length()>=n+e&&!(n===0&&e===i)?es(r,n,e,!0):es(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(t,e){const r=Ba(e),n=new P().retain(t).concat(r);return this.scroll.insertContents(t,r),this.update(n)}insertEmbed(t,e,r){return this.scroll.insertAt(t,e,r),this.update(new P().retain(t).insert({[e]:r}))}insertText(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,`
|
||||
`).replace(/\r/g,`
|
||||
`),this.scroll.insertAt(t,e),Object.keys(r).forEach(n=>{this.scroll.formatAt(t,e.length,n,r[n])}),this.update(new P().retain(t).insert(e,gr(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if((t==null?void 0:t.statics.blotName)!==At.blotName)return!1;const e=t;return e.children.length>1?!1:e.children.head instanceof Jt}removeFormat(t,e){const r=this.getText(t,e),[n,i]=this.scroll.line(t+e);let l=0,o=new P;n!=null&&(l=n.length()-i,o=n.delta().slice(i,i+l-1).insert(`
|
||||
`));const h=this.getContents(t,e+l).diff(new P().insert(r).concat(o)),m=new P().retain(t).concat(h);return this.applyDelta(m)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(Kd)&&this.scroll.find(e[0].target)){const i=this.scroll.find(e[0].target),l=Mt(i),o=i.offset(this.scroll),c=e[0].oldValue.replace(xr.CONTENTS,""),h=new P().insert(c),m=new P().insert(i.value()),y=r&&{oldRange:Pa(r.oldRange,-o),newRange:Pa(r.newRange,-o)};t=new P().retain(o).concat(h.diff(m,y)).reduce((d,v)=>v.insert?d.insert(v.insert,l):d.push(v),new P),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!Mi(n.compose(t),this.delta))&&(t=n.diff(this.delta,r));return t}}function ur(s,t,e){if(s.length===0){const[d]=Jn(e.pop());return t<=0?`</li></${d}>`:`</li></${d}>${ur([],t-1,e)}`}const[{child:r,offset:n,length:i,indent:l,type:o},...c]=s,[h,m]=Jn(o);if(l>t)return e.push(o),l===t+1?`<${h}><li${m}>${es(r,n,i)}${ur(c,l,e)}`:`<${h}><li>${ur(s,t+1,e)}`;const y=e[e.length-1];if(l===t&&o===y)return`</li><li${m}>${es(r,n,i)}${ur(c,l,e)}`;const[f]=Jn(e.pop());return`</li></${f}>${ur(s,t-1,e)}`}function es(s,t,e){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in s&&typeof s.html=="function")return s.html(t,e);if(s instanceof Yt)return Qs(s.value().slice(t,t+e)).replaceAll(" "," ");if(s instanceof Xt){if(s.statics.blotName==="list-container"){const h=[];return s.children.forEachAt(t,e,(m,y,f)=>{const d="formats"in m&&typeof m.formats=="function"?m.formats():{};h.push({child:m,offset:y,length:f,indent:d.indent||0,type:d.list})}),ur(h,-1,[])}const n=[];if(s.children.forEachAt(t,e,(h,m,y)=>{n.push(es(h,m,y))}),r||s.statics.blotName==="list")return n.join("");const{outerHTML:i,innerHTML:l}=s.domNode,[o,c]=i.split(`>${l}<`);return o==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${c}`:`${o}>${n.join("")}<${c}`}return s.domNode instanceof Element?s.domNode.outerHTML:""}function Wd(s,t){return Object.keys(t).reduce((e,r)=>{if(s[r]==null)return e;const n=t[r];return n===s[r]?e[r]=n:Array.isArray(n)?n.indexOf(s[r])<0?e[r]=n.concat([s[r]]):e[r]=n:e[r]=[n,s[r]],e},{})}function Jn(s){const t=s==="ordered"?"ol":"ul";switch(s){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Ba(s){return s.reduce((t,e)=>{if(typeof e.insert=="string"){const r=e.insert.replace(/\r\n/g,`
|
||||
`).replace(/\r/g,`
|
||||
`);return t.insert(r,e.attributes)}return t.push(e)},new P)}function Pa(s,t){let{index:e,length:r}=s;return new Ue(e+t,r)}function Xd(s){const t=[];return s.forEach(e=>{typeof e.insert=="string"?e.insert.split(`
|
||||
`).forEach((n,i)=>{i&&t.push({insert:`
|
||||
`,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}class te{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}}q(te,"DEFAULTS",{});const Rs="\uFEFF";let Di=class extends Rt{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(Rs),this.rightGuard=document.createTextNode(Rs),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,r;const n=t.data.split(Rs).join("");if(t===this.leftGuard)if(this.prev instanceof Yt){const i=this.prev.length();this.prev.insertAt(i,n),e={startNode:this.prev.domNode,startOffset:i+n.length}}else r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this),e={startNode:r,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof Yt?(this.next.insertAt(0,n),e={startNode:this.next.domNode,startOffset:n.length}):(r=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(r),this.next),e={startNode:r,startOffset:n.length}));return t.data=Rs,e}update(t,e){t.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const n=this.restore(r.target);n&&(e.range=n)}})}};class Yd{constructor(t,e){q(this,"isComposing",!1);this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof Di)&&(this.emitter.emit(M.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(M.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(M.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(M.events.COMPOSITION_END,t),this.isComposing=!1}}const Wr=class Wr{constructor(t,e){q(this,"modules",{});this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}};q(Wr,"DEFAULTS",{modules:{}}),q(Wr,"themes",{default:Wr});let wr=Wr;const Qd=s=>s.parentElement||s.getRootNode().host||null,Jd=s=>{const t=s.getBoundingClientRect(),e="offsetWidth"in s&&Math.abs(t.width)/s.offsetWidth||1,r="offsetHeight"in s&&Math.abs(t.height)/s.offsetHeight||1;return{top:t.top,right:t.left+s.clientWidth*e,bottom:t.top+s.clientHeight*r,left:t.left}},js=s=>{const t=parseInt(s,10);return Number.isNaN(t)?0:t},Da=(s,t,e,r,n,i)=>s<e&&t>r?0:s<e?-(e-s+n):t>r?t-s>r-e?s+n-e:t-r+i:0,tp=(s,t)=>{var i,l,o;const e=s.ownerDocument;let r=t,n=s;for(;n;){const c=n===e.body,h=c?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??e.documentElement.clientWidth,bottom:((l=window.visualViewport)==null?void 0:l.height)??e.documentElement.clientHeight,left:0}:Jd(n),m=getComputedStyle(n),y=Da(r.left,r.right,h.left,h.right,js(m.scrollPaddingLeft),js(m.scrollPaddingRight)),f=Da(r.top,r.bottom,h.top,h.bottom,js(m.scrollPaddingTop),js(m.scrollPaddingBottom));if(y||f)if(c)(o=e.defaultView)==null||o.scrollBy(y,f);else{const{scrollLeft:d,scrollTop:v}=n;f&&(n.scrollTop+=f),y&&(n.scrollLeft+=y);const w=n.scrollLeft-d,N=n.scrollTop-v;r={left:r.left-w,top:r.top-N,right:r.right-w,bottom:r.bottom-N}}n=c||m.position==="fixed"?null:Qd(n)}},ep=100,rp=["block","break","cursor","inline","scroll","text"],sp=(s,t,e)=>{const r=new vr;return rp.forEach(n=>{const i=t.query(n);i&&r.register(i)}),s.forEach(n=>{let i=t.query(n);i||e.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let l=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,l+=1,l>ep){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),r},br=xe("quill"),ks=new vr;Xt.uiClass="ql-ui";const Vt=class Vt{static debug(t){t===!0&&(t="log"),xe.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return mi.get(t)||ks.find(t,e)}static import(t){return this.imports[t]==null&&br.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in t?t.attrName:t.blotName;typeof r=="string"?this.register(`formats/${r}`,t,e):Object
Line truncated
|
||||
`});this.setContents(l)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const r=t;t=document.createElement("div"),t.classList.add(r)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,r){return[t,e,,r]=ge(t,e,r),Gt.call(this,()=>this.editor.deleteText(t,e),r,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M.sources.API;return Gt.call(this,()=>{const n=this.getSelection(!0);let i=new P;if(n==null)return i;if(this.scroll.query(t,D.BLOCK))i=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(n.length===0)return this.selection.format(t,e),i;i=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,M.sources.SILENT),i},r)}formatLine(t,e,r,n,i){let l;return[t,e,l,i]=ge(t,e,r,n,i),Gt.call(this,()=>this.editor.formatLine(t,e,l),i,t,0)}formatText(t,e,r,n,i){let l;return[t,e,l,i]=ge(t,e,r,n,i),Gt.call(this,()=>this.editor.formatText(t,e,l),i,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof t=="number"?r=this.selection.getBounds(t,e):r=this.selection.getBounds(t.index,t.length),!r)return null;const n=this.container.getBoundingClientRect();return{bottom:r.bottom-n.top,height:r.height,left:r.left-n.left,right:r.right-n.left,top:r.top-n.top,width:r.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=ge(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=ge(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=ge(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Vt.sources.API;return Gt.call(this,()=>this.editor.insertEmbed(t,e,r),n,t)}insertText(t,e,r,n,i){let l;return[t,,l,i]=ge(t,0,r,n,i),Gt.call(this,()=>this.editor.insertText(t,e,l),i,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,r){return[t,e,,r]=ge(t,e,r),Gt.call(this,()=>this.editor.removeFormat(t,e),r,t)}scrollRectIntoView(t){tp(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M.sources.API;return Gt.call(this,()=>{t=new P(t);const r=this.getLength(),n=this.editor.deleteText(0,r),i=this.editor.insertContents(0,t),l=this.editor.deleteText(this.getLength()-1,1);return n.compose(i).compose(l)},e)}setSelection(t,e,r){t==null?this.selection.setRange(null,e||Vt.sources.API):([t,e,,r]=ge(t,e,r),this.selection.setRange(new Ue(Math.max(0,t),e),r),r!==M.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M.sources.API;const r=new P().insert(t);return this.setContents(r,e)}update
Line truncated
|
||||
`)?n.insertAt(0,e.slice(0,-1),r):n.insertAt(0,e,r)}else{const n=this.scroll.create(e,r);this.appendChild(n)}else super.insertAt(t,e,r);this.optimize()}insertBefore(t,e){if(t.statics.scope===D.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(t),super.insertBefore(r,e)}else super.insertBefore(t,e)}insertContents(t,e){const r=this.deltaToRenderBlocks(e.concat(new P().insert(`
|
||||
`))),n=r.pop();if(n==null)return;this.batchStart();const i=r.shift();if(i){const c=i.type==="block"&&(i.delta.length()===0||!this.descendant(Pt,t)[0]&&t<this.length()),h=i.type==="block"?i.delta:new P().insert({[i.key]:i.value});ei(this,t,h);const m=i.type==="block"?1:0,y=t+h.length()+m;c&&this.insertAt(y-1,`
|
||||
`);const f=Mt(this.line(t)[0]),d=Dt.AttributeMap.diff(f,i.attributes)||{};Object.keys(d).forEach(v=>{this.formatAt(y-1,1,v,d[v])}),t=y}let[l,o]=this.children.find(t);if(r.length&&(l&&(l=l.split(o),o=0),r.forEach(c=>{if(c.type==="block"){const h=this.createBlock(c.attributes,l||void 0);ei(h,0,c.delta)}else{const h=this.create(c.key,c.value);this.insertBefore(h,l||void 0),Object.keys(c.attributes).forEach(m=>{h.format(m,c.attributes[m])})}})),n.type==="block"&&n.delta.length()){const c=l?l.offset(l.scroll)+o:this.length();ei(this,c,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[r,n]=e;return r instanceof Lt?[r,n]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Ha,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(n,i,l)=>{let o=[],c=l;return n.children.forEachAt(i,l,(h,m,y)=>{Ha(h)?o.push(h):h instanceof Ys&&(o=o.concat(r(h,m,c))),c-=y}),o};return r(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(M.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=M.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(r=>{let{target:n}=r;const i=this.find(n,!0);return i&&!za(i)}),t.length>0&&this.emitter.emit(M.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(M.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,r){const[n]=this.descendant(i=>i instanceof Pt,t);n&&n.statics.blotName===e&&za(n)&&n.updateContent(r)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let r=new P;return t.forEach(n=>{const i=n==null?void 0:n.insert;if(i)if(typeof i=="string"){const l=i.split(`
|
||||
`);l.slice(0,-1).forEach(c=>{r.insert(c,n.attributes),e.push({type:"block",delta:r,attributes:n.attributes??{}}),r=new P});const o=l[l.length-1];o&&r.insert(o,n.attributes)}else{const l=Object.keys(i)[0];if(!l)return;this.query(l,D.INLINE)?r.push(n):(r.length()&&e.push({type:"block",delta:r,attributes:{}}),r=new P,e.push({type:"blockEmbed",key:l,value:i[l],attributes:n.attributes??{}}))}}),r.length()&&e.push({type:"block",delta:r,attributes:{}}),e}createBlock(t,e){let r;const n={};Object.entries(t).forEach(o=>{let[c,h]=o;this.query(c,D.BLOCK&D.BLOT)!=null?r=c:n[c]=h});const i=this.create(r||this.statics.defaultChild.blotName,r?t[r]:void 0);this.insertBefore(i,e||void 0);const l=i.length();return Object.entries(n).forEach(o=>{let[c,h]=o;i.formatAt(0,l,c,h)}),i}}q(hr,"blotName","scroll"),q(hr,"className","ql-editor"),q(hr,"tagName","DIV"),q(hr,"defaultChild",At),q(hr,"allowedChildren",[At,Pt,Ge]);function ei(s,t,e){e.reduce((r,n)=>{const i=Dt.Op.length(n);let l=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){const o=n.insert;s.insertAt(r,o);const[c]=s.descendant(Lt,r),h=Mt(c);l=Dt.AttributeMap.diff(h,l)||{}}else if(typeof n.insert=="object"){const o=Object.keys(n.insert)[0];if(o==null)return r;if(s.insertAt(r,o,n.insert[o]),s.scroll.query(o,D.INLINE)!=null){const[h]=s.descendant(Lt,r),m=Mt(h);l=Dt.AttributeMap.diff(m,l)||{}}}}return Object.keys(l).forEach(o=>{s.formatAt(r,i,o,l[o])}),r+i},t)}const $i={scope:D.BLOCK,whitelist:["right","center","justify"]},ip=new oe("align","align",$i),Hl=new Qt("align","ql-align",$i),zl=new qe("align","text-align",$i);class Gl extends qe{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):e}}const ap=new Qt("color","ql-color",{scope:D.INLINE}),Ui=new Gl("color","color",{scope:D.INLINE}),lp=new Qt("background","ql-bg",{scope:D.INLINE}),Fi=new Gl("background","background-color",{scope:D.INLINE});class Ve extends Ge{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
|
||||
`).slice(t,t+e)}html(t,e){return`<pre>
|
||||
${Qs(this.code(t,e))}
|
||||
</pre>`}}class St extends At{static register(){E.register(Ve)}}q(St,"TAB"," ");class Hi extends ce{}Hi.blotName="code";Hi.tagName="CODE";St.blotName="code-block";St.className="ql-code-block";St.tagName="DIV";Ve.blotName="code-block-container";Ve.className="ql-code-block-container";Ve.tagName="DIV";Ve.allowedChildren=[St];St.allowedChildren=[Yt,Jt,xr];St.requiredContainer=Ve;const zi={scope:D.BLOCK,whitelist:["rtl"]},Vl=new oe("direction","dir",zi),Kl=new Qt("direction","ql-direction",zi),Zl=new qe("direction","direction",zi),Wl={scope:D.INLINE,whitelist:["serif","monospace"]},Xl=new Qt("font","ql-font",Wl);class op extends qe{value(t){return super.value(t).replace(/["']/g,"")}}const Yl=new op("font","font-family",Wl),Ql=new Qt("size","ql-size",{scope:D.INLINE,whitelist:["small","large","huge"]}),Jl=new qe("size","font-size",{scope:D.INLINE,whitelist:["10px","18px","32px"]}),cp=xe("quill:keyboard"),up=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Js extends te{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!e[r]!==t[r]&&e[r]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=fp(t);if(n==null){cp.warn("Attempted to add invalid keyboard binding",n);return}typeof e=="function"&&(e={handler:e}),typeof r=="function"&&(r={handler:r}),(Array.isArray(n.key)?n.key:[n.key]).forEach(l=>{const o={...n,key:l,...e,...r};this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(T=>Js.match(t,T));if(n.length===0)return;const i=E.find(t.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const l=this.quill.getSelection();if(l==null||!this.quill.hasFocus())return;const[o,c]=this.quill.getLine(l.index),[h,m]=this.quill.getLeaf(l.index),[y,f]=l.length===0?[h,m]:this.quill.getLeaf(l.index+l.length),d=h instanceof zs?h.value().slice(0,m):"",v=y instanceof zs?y.value().slice(f):"",w={collapsed:l.length===0,empty:l.length===0&&o.length()<=1,format:this.quill.getFormat(l),line:o,offset:c,prefix:d,suffix:v,event:t};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==w.collapsed||T.empty!=null&&T.empty!==w.empty||T.offset!=null&&T.offset!==w.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(O=>w.format[O]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(O=>T.format[O]===!0?w.format[O]!=null:T.format[O]===!1?w.format[O]==null:Mi(T.format[O],w.format[O])))return!1;return T.prefix!=null&&!T.prefix.test(w.prefix)||T.suffix!=null&&!T.suffix.test(w.suffix)?!1:T.handler.call(this,l,w,T)!==!0})&&t.preventDefault()})}handleBackspace(t,e){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={};const[i]=this.quill.getLine(t.index);let l=new P().retain(t.index-r).delete(r);if(e.offset===0){const[o]=this.quill.getLine(t.index-1);if(o&&!(o.statics.blotName==="block"&&o.length()<=1)){const h=i.formats(),m=this.quill.getFormat(t.index-1,1);if(n=Dt.AttributeMap.diff(h,m)||{},Object.keys(n).length>0){const y=new P().retain(t.index+i.length()-2).retain(1,n);l=l.compose(y)}}}this.quill.updateContents(l,E.sources.USER),this.quill.focus()}handleDelete(t,e){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-r)return;let n={};const[i]=this.quill.getLine(t.index);let l=new P().retain(t.index).delete(r);if(e.offset>=i.length()-1){const[o]=this.quill.getLine(t.index+1);if(o){const c=i.formats(),h=this.quill.getFormat(t.index,1);n=Dt.AttributeMap.diff(c,h)||{},Object.keys(n).length>0&&(l=l.retain(o.length()-1).retain(1,n))}}this.quill.updateContents(l,E.sources.USER),this.quill.focus()}handleDeleteRange(t){Gi({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const r=ObLine truncated
|
||||
`,r);this.quill.updateContents(n,E.sources.USER),this.quill.setSelection(t.index+1,E.sources.SILENT),this.quill.focus()}}const hp={bindings:{bold:ri("bold"),italic:ri("italic"),underline:ri("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(s,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",E.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(s,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",E.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(s,t){t.format.indent!=null?this.quill.format("indent","-1",E.sources.USER):t.format.list!=null&&this.quill.format("list",!1,E.sources.USER)}},"indent code-block":Ga(!0),"outdent code-block":Ga(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(s){this.quill.deleteText(s.index-1,1,E.sources.USER)}},tab:{key:"Tab",handler(s,t){if(t.format.table)return!0;this.quill.history.cutoff();const e=new P().retain(s.index).delete(s.length).insert(" ");return this.quill.updateContents(e,E.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(s.index+1,E.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,E.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(s,t){const e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(s.index,s.length,e,E.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(s){const[t,e]=this.quill.getLine(s.index),r={...t.formats(),list:"checked"},n=new P().retain(s.index).insert(`
|
||||
`,r).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,E.sources.USER),this.quill.setSelection(s.index+1,E.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(s,t){const[e,r]=this.quill.getLine(s.index),n=new P().retain(s.index).insert(`
|
||||
`,t.format).retain(e.length()-r-1).retain(1,{header:null});this.quill.updateContents(n,E.sources.USER),this.quill.setSelection(s.index+1,E.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(s){const t=this.quill.getModule("table");if(t){const[e,r,n,i]=t.getTable(s),l=dp(e,r,n,i);if(l==null)return;let o=e.offset();if(l<0){const c=new P().retain(o).insert(`
|
||||
`);this.quill.updateContents(c,E.sources.USER),this.quill.setSelection(s.index+1,s.length,E.sources.SILENT)}else if(l>0){o+=e.length();const c=new P().retain(o).insert(`
|
||||
`);this.quill.updateContents(c,E.sources.USER),this.quill.setSelection(o,E.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(s,t){const{event:e,line:r}=t,n=r.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(n-1,E.sources.USER):this.quill.setSelection(n+r.length(),E.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(s,t){if(this.quill.scroll.query("list")==null)return!0;const{length:e}=t.prefix,[r,n]=this.quill.getLine(s.index);if(n>e)return!0;let i;switch(t.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(s.index," ",E.sources.USER),this.quill.history.cutoff();const l=new P().retain(s.index-n).delete(e+1).retain(r.length()-2-n).retain(1,{list:i});return this.quill.updateContents(l,E.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(s.index-e,E.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(s){const[t,e]=this.quill.getLine(s.index);let r=2,n=t;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,r-=1,r<=0){const i=new P().retain(s.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,E.sources.USER),this.quill.setSelection(s.index-1,E.sources.SILENT),!1}return!0}},"embed left":Ms("ArrowLeft",!1),"embed left shift":Ms("ArrowLeft",!0),"embed right":Ms("ArrowRight",!1),"embed right shift":Ms("ArrowRight",!0),"table down":Va(!1),"table up":Va(!0)}};Js.DEFAULTS=hp;function Ga(s){return{key:"Tab",shiftKey:!s,format:{"code-block":!0},handler(t,e){let{event:r}=e;const n=this.quill.scroll.query("code-block"),{TAB:i}=n;if(t.length===0&&!r.shiftKey){this.quill.insertText(t.index,i,E.sources.USER),this.quill.setSelection(t.index+i.length,E.sources.SILENT);return}const l=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:o,length:c}=t;l.forEach((h,m)=>{s?(h.insertAt(0,i),m===0?o+=i.length:c+=i.length):h.domNode.textContent.startsWith(i)&&(h.deleteAt(0,i.length),m===0?o-=i.length:c-=i.length)}),this.quill.update(E.sources.USER),this.quill.setSelection(o,c,E.sources.SILENT)}}}function Ms(s,t){return{key:s,shiftKey:t,altKey:null,[s==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:n}=r;s==="ArrowRight"&&(n+=r.length+1);const[i]=this.quill.getLeaf(n);return i instanceof Rt?(s==="ArrowLeft"?t?this.quill.setSelection(r.index-1,r.length+1,E.sources.USER):this.quill.setSelection(r.index-1,E.sources.USER):t?this.quill.setSelection(r.index,r.length+1,E.sources.USER):this.quill.setSelection(r.index+r.length+1,E.sources.USER),!1):!0}}}function ri(s){return{key:s[0],shortKey:!0,handler(t,e){this.quill.format(s,!e.format[s],E.sources.USER)}}}function Va(s){return{key:s?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){const r=s?"prev":"next",n=e.line,i=n.parent[r];if(i!=null){if(i.statics.blotName==="table-row"){let l=i.children.head,o=n;for(;o.prev!=null;)o=o.prev,l=l.next;const c=l.offset(this.quill.scroll)+Math.min(e.offset,l.length()-1);this.quill.setSelection(c,0,E.sources.USER)}}else{const l=n.table()[r];l!=null&&(s?this.quill.setSelection(l.offset(this.quill.scroll)+l.length()-1,0,E.sources.USER):this.quill.setSelection(l.offset(this.quill.scroll),0,E.sources.USER))}return!1}}}function fp(s){if(typeof s=="string"||typeof s=="number")s={key:s};else if(typeof s=="object")s=gr(s);else return null;return s.shortKey&&(s[up]=s.shortKey,delete s.shortKey),s}function Gi(s){let{quill:t,range:e}=s;const r=t.getLines(e);let n={};if(r.length>1){const i=r[0].formats(),l=r[r.length-1].formats();n=Dt.AttributeMap.diff(l,i)||{}}t.deleteText(e,E.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,E.sources.USER),t.setSelection(e.index,E.sources.SILENT)}function dp(s,t,e,r){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?r===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const pp=/font-weight:\s*normal/,gp=["P","OL","UL"],Ka=s=>s&&gp.includes(s.tagName),mp=s=>{Array.from(s.querySelectorAll("br")).filter(t=>Ka(t.previousElementSibling)&&Ka(t.nextElementSibling)).forEach(t=>{var e;(e=t.parentNode)==null||e.removeChild(t)})},bp=s=>{Array.from(s.querySelectorAll('b[style*="font-weight"]')).filter(t=>{var e;return(e=t.getAttribute("style"))==null?void 0:e.match(pp)}).forEach(t=>{var r;const e=s.createDocumentFragment();e.append(...t.childNodes),(r=t.parentNode)==null||r.replaceChild(e,t)})};function yp(s){s.querySelector('[id^="docs-internal-guid-"]')&&(bp(s),mp(s))}const vp=/\bmso-list:[^;]*ignore/i,xp=/\bmso-list:[^;]*\bl(\d+)/i,wp=/\bmso-list:[^;]*\blevel(\d+)/i,Np=(s,t)=>{const e=s.getAttribute("style"),r=e==null?void 0:e.match(xp);if(!r)return null;const n=Number(r[1]),i=e==null?void 0:e.match(wp),l=i?Number(i[1]):1,o=new RegExp(`@list l${n}:level${l}\\s*\\{Line truncated
|
||||
`)&&(i.ops[i.ops.length-1].attributes==null||n.table)?i.compose(new P().retain(i.length()-1).delete(1)):i}normalizeHTML(t){Cp(t)}convertHTML(t){const e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);const r=e.body,n=new WeakMap,[i,l]=this.prepareMatching(r,n);return Vi(this.quill.scroll,r,i,l,n)}dangerouslyPasteHTML(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E.sources.API;if(typeof t=="string"){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,E.sources.SILENT)}else{const n=this.convert({html:e,text:""});this.quill.updateContents(new P().retain(t).concat(n),r),this.quill.setSelection(t+n.length(),E.sources.SILENT)}}onCaptureCopy(t){var l,o;let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:n,text:i}=this.onCopy(r,e);(l=t.clipboardData)==null||l.setData("text/plain",i),(o=t.clipboardData)==null||o.setData("text/html",n),e&&Gi({range:r,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(`
|
||||
`)}onCapturePaste(t){var l,o,c,h,m;if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(e==null)return;const r=(l=t.clipboardData)==null?void 0:l.getData("text/html");let n=(o=t.clipboardData)==null?void 0:o.getData("text/plain");if(!r&&!n){const y=(c=t.clipboardData)==null?void 0:c.getData("text/uri-list");y&&(n=this.normalizeURIList(y))}const i=Array.from(((h=t.clipboardData)==null?void 0:h.files)||[]);if(!r&&i.length>0){this.quill.uploader.upload(e,i);return}if(r&&i.length>0){const y=new DOMParser().parseFromString(r,"text/html");if(y.body.childElementCount===1&&((m=y.body.firstElementChild)==null?void 0:m.tagName)==="IMG"){this.quill.uploader.upload(e,i);return}}this.onPaste(e,{html:r,text:n})}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:r,html:n}=e;const i=this.quill.getFormat(t.index),l=this.convert({text:r,html:n},i);Lp.log("onPaste",l,{text:r,html:n});const o=new P().retain(t.index).delete(t.length).concat(l);this.quill.updateContents(o,E.sources.USER),this.quill.setSelection(o.length()-t.length,E.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const r=[],n=[];return this.matchers.forEach(i=>{const[l,o]=i;switch(l){case Node.TEXT_NODE:n.push(o);break;case Node.ELEMENT_NODE:r.push(o);break;default:Array.from(t.querySelectorAll(l)).forEach(c=>{if(e.has(c)){const h=e.get(c);h==null||h.push(o)}else e.set(c,[o])});break}}),[r,n]}}q(to,"DEFAULTS",{matchers:[]});function Ke(s,t,e,r){return r.query(t)?s.reduce((n,i)=>{if(!i.insert)return n;if(i.attributes&&i.attributes[t])return n.push(i);const l=e?{[t]:e}:{};return n.insert(i.insert,{...l,...i.attributes})},new P):s}function is(s,t){let e="";for(let r=s.ops.length-1;r>=0&&e.length<t.length;--r){const n=s.ops[r];if(typeof n.insert!="string")break;e=n.insert+e}return e.slice(-1*t.length)===t}function Ce(s,t){if(!(s instanceof Element))return!1;const e=t.query(s);return e&&e.prototype instanceof Rt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(s.tagName.toLowerCase())}function Op(s,t){return s.previousElementSibling&&s.nextElementSibling&&!Ce(s.previousElementSibling,t)&&!Ce(s.nextElementSibling,t)}const Bs=new WeakMap;function eo(s){return s==null?!1:(Bs.has(s)||(s.tagName==="PRE"?Bs.set(s,!0):Bs.set(s,eo(s.parentNode))),Bs.get(s))}function Vi(s,t,e,r,n){return t.nodeType===t.TEXT_NODE?r.reduce((i,l)=>l(t,i,s),new P):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((i,l)=>{let o=Vi(s,l,e,r,n);return l.nodeType===t.ELEMENT_NODE&&(o=e.reduce((c,h)=>h(l,c,s),o),o=(n.get(l)||[]).reduce((c,h)=>h(l,c,s),o)),i.concat(o)},new P):new P}function si(s){return(t,e,r)=>Ke(e,s,!0,r)}function qp(s,t,e){const r=oe.keys(s),n=Qt.keys(s),i=qe.keys(s),l={};return r.concat(n).concat(i).forEach(o=>{let c=e.query(o,D.ATTRIBUTE);c!=null&&(l[c.attrName]=c.value(s),l[c.attrName])||(c=_p[o],c!=null&&(c.attrName===o||c.keyName===o)&&(l[c.attrName]=c.value(s)||void 0),c=Za[o],c!=null&&(c.attrName===o||c.keyName===o)&&(c=Za[o],l[c.attrName]=c.value(s)||void 0))}),Object.entries(l).reduce((o,c)=>{let[h,m]=c;return Ke(o,h,m,e)},t)}function Ip(s,t,e){const r=e.query(s);if(r==null)return t;if(r.prototype instanceof Rt){const n={},i=r.value(s);if(i!=null)return n[r.blotName]=i,new P().insert(n,r.formats(s,e))}else if(r.prototype instanceof ts&&!is(t,`
|
||||
`)&&t.insert(`
|
||||
`),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return Ke(t,r.blotName,r.formats(s,e),e);return t}function Rp(s,t){return is(t,`
|
||||
`)||t.insert(`
|
||||
`),t}function jp(s,t,e){const r=e.query("code-block"),n=r&&"formats"in r&&typeof r.formats=="function"?r.formats(s,e):!0;return Ke(t,"code-block",n,e)}function kp(){return new P}function Mp(s,t,e){const r=e.query(s);if(r==null||r.blotName!=="list"||!is(t,`
|
||||
`))return t;let n=-1,i=s.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(n+=1),i=i.parentNode;return n<=0?t:t.reduce((l,o)=>o.insert?o.attributes&&typeof o.attributes.indent=="number"?l.push(o):l.insert(o.insert,{indent:n,...o.attributes||{}}):l,new P)}function Bp(s,t,e){const r=s;let n=r.tagName==="OL"?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(n=i==="true"?"checked":"unchecked"),Ke(t,"list",n,e)}function Wa(s,t,e){if(!is(t,`
|
||||
`)){if(Ce(s,e)&&(s.childNodes.length>0||s instanceof HTMLParagraphElement))return t.insert(`
|
||||
`);if(t.length()>0&&s.nextSibling){let r=s.nextSibling;for(;r!=null;){if(Ce(r,e))return t.insert(`
|
||||
`);const n=e.query(r);if(n&&n.prototype instanceof Pt)return t.insert(`
|
||||
`);r=r.firstChild}}}return t}function Pp(s,t,e){var i;const r={},n=s.style||{};return n.fontStyle==="italic"&&(r.italic=!0),n.textDecoration==="underline"&&(r.underline=!0),n.textDecoration==="line-through"&&(r.strike=!0),((i=n.fontWeight)!=null&&i.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(r.bold=!0),t=Object.entries(r).reduce((l,o)=>{let[c,h]=o;return Ke(l,c,h,e)},t),parseFloat(n.textIndent||0)>0?new P().insert(" ").concat(t):t}function Dp(s,t,e){var n,i;const r=((n=s.parentElement)==null?void 0:n.tagName)==="TABLE"?s.parentElement:(i=s.parentElement)==null?void 0:i.parentElement;if(r!=null){const o=Array.from(r.querySelectorAll("tr")).indexOf(s)+1;return Ke(t,"table",o,e)}return t}function $p(s,t,e){var n;let r=s.data;if(((n=s.parentElement)==null?void 0:n.tagName)==="O:P")return t.insert(r.trim());if(!eo(s)){if(r.trim().length===0&&r.includes(`
|
||||
`)&&!Op(s,e))return t;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(s.previousSibling==null&&s.parentElement!=null&&Ce(s.parentElement,e)||s.previousSibling instanceof Element&&Ce(s.previousSibling,e))&&(r=r.replace(/^ /,"")),(s.nextSibling==null&&s.parentElement!=null&&Ce(s.parentElement,e)||s.nextSibling instanceof Element&&Ce(s.nextSibling,e))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return t.insert(r)}class ro extends te{constructor(e,r){super(e,r);q(this,"lastRecorded",0);q(this,"ignoreChange",!1);q(this,"stack",{undo:[],redo:[]});q(this,"currentRange",null);this.quill.on(E.events.EDITOR_CHANGE,(n,i,l,o)=>{n===E.events.SELECTION_CHANGE?i&&o!==E.sources.SILENT&&(this.currentRange=i):n===E.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||o===E.sources.USER?this.record(i,l):this.transform(i)),this.currentRange=vi(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",n=>{n.inputType==="historyUndo"?(this.undo(),n.preventDefault()):n.inputType==="historyRedo"&&(this.redo(),n.preventDefault())})}change(e,r){if(this.stack[e].length===0)return;const n=this.stack[e].pop();if(!n)return;const i=this.quill.getContents(),l=n.delta.invert(i);this.stack[r].push({delta:l,range:vi(n.range,l)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n.delta,E.sources.USER),this.ignoreChange=!1,this.restoreSelection(n)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,r){if(e.ops.length===0)return;this.stack.redo=[];let n=e.invert(r),i=this.currentRange;const l=Date.now();if(this.lastRecorded+this.options.delay>l&&this.stack.undo.length>0){const o=this.stack.undo.pop();o&&(n=n.compose(o.delta),i=o.range)}else this.lastRecorded=l;n.length()!==0&&(this.stack.undo.push({delta:n,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Xa(this.stack.undo,e),Xa(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,E.sources.USER);else{const r=Fp(this.quill.scroll,e.delta);this.quill.setSelection(r,E.sources.USER)}}}q(ro,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Xa(s,t){let e=t;for(let r=s.length-1;r>=0;r-=1){const n=s[r];s[r]={delta:e.transform(n.delta,!0),range:n.range&&vi(n.range,e)},e=n.delta.transform(e),s[r].delta.length()===0&&s.splice(r,1)}}function Up(s,t){const e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(`
|
||||
`):e.attributes!=null?Object.keys(e.attributes).some(r=>s.query(r,D.BLOCK)!=null):!1}function Fp(s,t){const e=t.reduce((n,i)=>n+(i.delete||0),0);let r=t.length()-e;return Up(s,t)&&(r-=1),r}function vi(s,t){if(!s)return s;const e=t.transformPosition(s.index),r=t.transformPosition(s.index+s.length);return{index:e,length:r-e}}class so extends te{constructor(t,e){super(t,e),t.root.addEventListener("drop",r=>{var l;r.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const o=document.caretPositionFromPoint(r.clientX,r.clientY);n=document.createRange(),n.setStart(o.offsetNode,o.offset),n.setEnd(o.offsetNode,o.offset)}const i=n&&t.selection.normalizeNative(n);if(i){const o=t.selection.normalizedToRange(i);(l=r.dataTransfer)!=null&&l.files&&this.upload(o,r.dataTransfer.files)}})}upload(t,e){const r=[];Array.from(e).forEach(n=>{var i;n&&((i=this.options.mimetypes)!=null&&i.includes(n.type))&&r.push(n)}),r.length>0&&this.options.handler.call(this,t,r)}}so.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(s,t){if(!this.quill.scroll.query("image"))return;const e=t.map(r=>new Promise(n=>{const i=new FileReader;i.onload=()=>{n(i.result)},i.readAsDataURL(r)}));Promise.all(e).then(r=>{const n=r.reduce((i,l)=>i.insert({image:l}),new P().retain(s.index).delete(s.length));this.quill.updateContents(n,M.sources.USER),this.quill.setSelection(s.index+r.length,M.sources.SILENT)})}};const Hp=["insertText","insertReplacementText"];class zp extends te{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||t.on(E.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){Gi({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){const r=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new P().retain(t.index).insert(e,r),E.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,E.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Hp.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;const r=Gp(t);if(r==null)return;const n=this.quill.selection.normalizeNative(e),i=n?this.quill.selection.normalizedToRange(n):null;i&&this.replaceText(i,r)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function Gp(s){var t;return typeof s.data=="string"?s.data:(t=s.dataTransfer)!=null&&t.types.includes("text/plain")?s.dataTransfer.getData("text/plain"):null}const Vp=/Mac/i.test(navigator.platform),Kp=100,Zp=s=>!!(s.key==="ArrowLeft"||s.key==="ArrowRight"||s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="Home"||Vp&&s.key==="a"&&s.ctrlKey===!0);class Wp extends te{constructor(e,r){super(e,r);q(this,"isListening",!1);q(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,r){let{line:n,event:i}=r;if(!(n instanceof Xt)||!n.uiNode)return!0;const l=getComputedStyle(n.domNode).direction==="rtl";return l&&i.key!=="ArrowRight"||!l&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(i.shiftKey?1:0),E.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&Zp(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Kp,this.isListening)return;this.isListening=!0;const e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const r=e.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const n=this.quill.scroll.find(r.startContainer);if(!(n instanceof Xt)||!n.uiNode)return;const i=document.createRange();i.setStartAfter(n.uiNode),i.setEndAfter(n.uiNode),e.removeAllRanges(),e.addRange(i)}}E.register({"blots/block":At,"blots/block/embed":Pt,"blots/break":Jt,"blots/container":Ge,"blots/cursor":xr,"blots/embed":Di,"blots/inline":ce,"blots/scroll":hr,"blots/text":Yt,"modules/clipboard":to,"modules/history":ro,"modules/keyboard":Js,"modules/uploader":so,"modules/input":zp,"modules/uiNode":Wp});class Xp extends Qt{add(t,e){let r=0;if(e==="+1"||e==="-1"){const n=this.value(t)||0;r=e==="+1"?n+1:n-1}else typeof e=="number"&&(r=e);return r===0?(this.remove(t),!0):super.add(t,r.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const Yp=new Xp("indent","ql-indent",{scope:D.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class xi exten
Line truncated
|
||||
`)}
|
||||
`,i=Bt.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){const l=this.children.reduce((c,h)=>c.concat(Ul(h,!1)),new P),o=t(n,i);l.diff(o).reduce((c,h)=>{let{retain:m,attributes:y}=h;return m?(y&&Object.keys(y).forEach(f=>{[Bt.blotName,be.blotName].includes(f)&&this.formatAt(c,m,f,y[f])}),c+m):c},0)}this.cachedText=n,this.forceNext=!1}}html(t,e){const[r]=this.children.find(t);return`<pre data-language="${r?Bt.formats(r.domNode):"plain"}">
|
||||
${Qs(this.code(t,e))}
|
||||
</pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const e=Bt.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}Zr.allowedChildren=[Bt];Bt.requiredContainer=Zr;Bt.allowedChildren=[be,xr,Yt,Jt];const Qp=(s,t,e)=>{if(typeof s.versionString=="string"){const r=s.versionString.split(".")[0];if(parseInt(r,10)>=11)return s.highlight(e,{language:t}).value}return s.highlight(t,e).value};class io extends te{static register(){E.register(be,!0),E.register(Bt,!0),E.register(Zr,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,n)=>{let{key:i}=n;return r[i]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(E.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof Zr))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:n,label:i}=r;const l=e.ownerDocument.createElement("option");l.textContent=i,l.setAttribute("value",n),e.appendChild(l)}),e.addEventListener("change",()=>{t.format(Bt.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=Bt.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(E.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(E.sources.USER);const r=this.quill.getSelection();(t==null?this.quill.scroll.descendants(Zr):[t]).forEach(i=>{i.highlight(this.highlightBlot,e)}),this.quill.update(E.sources.SILENT),r!=null&&this.quill.setSelection(r,E.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return Qs(t).split(`
|
||||
`).reduce((n,i,l)=>(l!==0&&n.insert(`
|
||||
`,{[St.blotName]:e}),n.insert(i)),new P);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(St.className),r.innerHTML=Qp(this.options.hljs,e,t),Vi(this.quill.scroll,r,[(n,i)=>{const l=Vr.value(n);return l?i.compose(new P().retain(i.length(),{[be.blotName]:l})):i}],[(n,i)=>n.data.split(`
|
||||
`).reduce((l,o,c)=>(c!==0&&l.insert(`
|
||||
`,{[St.blotName]:e}),l.insert(o)),i)],new WeakMap)}}io.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Xr=class Xr extends At{static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",Ki()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Xr.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};q(Xr,"blotName","table"),q(Xr,"tagName","TD");let Wt=Xr;class ye extends Ge{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),e=this.children.tail.formats(),r=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.table===e.table&&t.table===r.table&&t.table===n.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;const r=e.formats(),n=e.next.formats();if(r.table!==n.table){const i=this.splitAfter(e);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}q(ye,"blotName","table-row"),q(ye,"tagName","TR");class le extends Ge{}q(le,"blotName","table-body"),q(le,"tagName","TBODY");class Nr extends Ge{balanceCells(){const t=this.descendants(ye),e=t.reduce((r,n)=>Math.max(n.children.length,r),0);t.forEach(r=>{new Array(e-r.children.length).fill(0).forEach(()=>{let n;r.children.head!=null&&(n=Wt.formats(r.children.head.domNode));const i=this.scroll.create(Wt.blotName,n);r.appendChild(i),i.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){const[e]=this.descendant(le);e==null||e.children.head==null||e.children.forEach(r=>{const n=r.children.at(t);n!=null&&n.remove()})}insertColumn(t){const[e]=this.descendant(le);e==null||e.children.head==null||e.children.forEach(r=>{const n=r.children.at(t),i=Wt.formats(r.children.head.domNode),l=this.scroll.create(Wt.blotName,i);r.insertBefore(l,n)})}insertRow(t){const[e]=this.descendant(le);if(e==null||e.children.head==null)return;const r=Ki(),n=this.scroll.create(ye.blotName);e.children.head.children.forEach(()=>{const l=this.scroll.create(Wt.blotName,r);n.appendChild(l)});const i=e.children.at(t);e.insertBefore(n,i)}rows(){const t=this.children.head;return t==null?[]:t.children.map(e=>e)}}q(Nr,"blotName","table-container"),q(Nr,"tagName","TABLE");Nr.allowedChildren=[le];le.requiredContainer=Nr;le.allowedChildren=[ye];ye.requiredContainer=le;ye.allowedChildren=[Wt];Wt.requiredContainer=ye;function Ki(){return`row-${Math.random().toString(36).slice(2,6)}`}class Jp extends te{static register(){E.register(Wt),E.register(ye),E.register(le),E.register(Nr)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Nr).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(E.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(E.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove(),this.quill.update(E.sources.USER),this.quill.setSelection(e,E.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,r]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Wt.blotName)return[null,null,null,-1];const n=e.parent;return[n.parent.parent,n,e,r]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[r,n,i]=this.getTable(e);if(i==null)return;const l=i.cellOffset();r.insertColumn(l+t),this.quill.update(E.sources.USER);let o=n.rowOffset();t===0&&(o+=1),this.quill.setSelection(e.index+o,e.length,E.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[r,n,i]=this.getTable(e);if(i==null)return;const l=n.rowOffset();r.insertRow(l+t),this.quill.update(E.sources.USER),t>0?this.quill.setSelection(e,E.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,E.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const r=this.quill.getSelection();if(r==null)return;const n=new Array(t).fill(0).reduce(i=>{const l=new Array(e).fill(`
|
||||
`).join("");return i.insert(l,{table:Ki()})},new P().retain(r.index));this.quill.updateContents(n,E.sources.USER),this.quill.setSelection(r.index,E.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(E.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(E.events.TEXT_CHANGE,(r,n,i)=>{i===E.sources.USER&&this.balanceTables()}),!0):!1)})}}const Ja=xe("quill:toolbar");class Zi extends te{constructor(t,e){var r,n;if(super(t,e),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),t1(i,this.options.container),(n=(r=t.container)==null?void 0:r.parentNode)==null||n.insertBefore(i,t.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Ja.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var o;const l=(o=this.options.handlers)==null?void 0:o[i];l&&this.addHandler(i,l)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(E.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(n=>n.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){Ja.warn("ignoring attaching to nonexistent format",e,t);return}const r=t.tagName==="SELECT"?"change":"click";t.addEventListener(r,n=>{let i;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const o=t.options[t.selectedIndex];o.hasAttribute("selected")?i=!1:i=o.value||!1}else t.classList.contains("ql-active")?i=!1:i=t.value||!t.hasAttribute("value"),n.preventDefault();this.quill.focus();const[l]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,i);else if(this.quill.scroll.query(e).prototype instanceof Rt){if(i=prompt(`Enter ${e}`),!i)return;this.quill.updateContents(new P().retain(l.index).delete(l.length).insert({[e]:i}),E.sources.USER)}else this.quill.format(e,i,E.sources.USER);this.update(l)}),this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(r=>{const[n,i]=r;if(i.tagName==="SELECT"){let l=null;if(t==null)l=null;else if(e[n]==null)l=i.querySelector("option[selected]");else if(!Array.isArray(e[n])){let o=e[n];typeof o=="string"&&(o=o.replace(/"/g,'\\"')),l=i.querySelector(`option[value="${o}"]`)}l==null?(i.value="",i.selectedIndex=-1):l.selected=!0}else if(t==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const l=e[n],o=l===i.getAttribute("value")||l!=null&&l.toString()===i.getAttribute("value")||l==null&&!i.getAttribute("value");i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}else{const l=e[n]!=null;i.classList.toggle("ql-active",l),i.setAttribute("aria-pressed",l.toString())}})}}Zi.DEFAULTS={};function tl(s,t,e){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${t}`),r.setAttribute("aria-pressed","false"),e!=null?(r.value=e,r.setAttribute("aria-label",`${t}: ${e}`)):r.setAttribute("aria-label",t),s.appendChild(r)}function t1(s,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{const r=document.createElement("span");r.classList.add("ql-formats"),e.forEach(n=>{if(typeof n=="string")tl(r,n);else{const i=Object.keys(n)[0],l=n[i];Array.isArray(l)?e1(r,i,l):tl(r,i,l)}}),s.appendChild(r)})}function e1(s,t,e){const r=document.createElement("select");r.classList.add(`ql-${t}`),e.forEach(n=>{const i=document.createElement("option");n!==!1?i.setAttribute("value",String(n)):i.setAttribute("selected","selected"),r.appendChild(i)}),s.appendChild(r)}Zi.DEFAULTS={container:null,handlers:{clean(){const s=this.quill.getSelection();if(s!=null)if(s.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,D.INLINE)!=null&&this.quill.format(e,!1,E.sources.USER)})}else this.quill.removeFormat(s.index,s.length,E.sources.USER)},direction(s){const{align:t}=this.quill.getFormat();s==="rtl"&&t==null?this.quill.format("align","right",E.sources.USER):!s&&t==="right"&&this.quill.format("align",!1,E.sources.USER),this.quill.format("direction",s,E.sources.USER)},indent(s){const t=this.quill.getSelection(),e=this.quill.getFormat(t),r=parseInt(e.indent||0,10);if(s==="+1"||s==="-1"){let n=s==="+1"?1:-1;e.direction==="rtl"&&(n*=-1),this.quill.format("indent",r+n,E.sources.USER)}},link(s){s===!0&&(s=prompt("Enter link URL:")),this.quill.format("link",s,E.sources.USER)},list(s){const t=this.quill.getSelection(),e=this.quill.getFormat(t);s==="check"?e.list
Line truncated
|
||||
`)});const it=N||et||((Q=C.current)==null?void 0:Q.textContent)||"";_(it),V==null||V(it)},[_,N,T,V,m]),W={"aria-label":typeof I.content=="string"?I.content:"Copy to clipboard",size:"sm",variant:"light",isDisabled:T,onPress:ut,isIconOnly:!0,...J},nt=H.useCallback(()=>({...W,"data-copied":Ao(B),className:Z.copyButton({class:Xi(f==null?void 0:f.copyButton)})}),[Z,R,K,T,f==null?void 0:f.copyButton,W,G]);return{Component:g,as:h,domRef:S,preRef:C,children:m,slots:Z,classNames:f,copied:B,onCopy:ut,copyIcon:v,checkIcon:w,symbolBefore:Y,isMultiLine:$,isFocusVisible:R,hideCopyButton:k,disableCopy:T,disableTooltip:O,hideSymbol:j,tooltipProps:I,getSnippetProps:ct,getCopyButtonProps:nt}}var go=Eo((s,t)=>{const{Component:e,domRef:r,preRef:n,children:i,slots:l,classNames:o,copied:c,copyIcon:h=b.jsx(Qo,{}),checkIcon:m=b.jsx(Jo,{}),symbolBefore:y,disableCopy:f,disableTooltip:d,hideSymbol:v,hideCopyButton:w,tooltipProps:N,isMultiLine:T,onCopy:O,getSnippetProps:k,getCopyButtonProps:z}=K1({...s,ref:t}),j=H.useCallback(({children:J})=>b.jsx(xt,{...N,isDisabled:c||N.isDisabled,children:J}),[al(N)]),V=H.useMemo(()=>{if(w)return null;const J=m&&H.cloneElement(m,{className:l.checkIcon()}),pt=h&&H.cloneElement(h,{className:l.copyIcon()}),gt=b.jsxs(lt,{...z(),children:[J,pt]});return d?gt:b.jsx(j,{children:gt})},[l,o==null?void 0:o.copyButton,c,m,h,O,j,f,d,w]),tt=H.useMemo(()=>T&&i&&Array.isArray(i)?b.jsx("div",{className:l.content({class:o==null?void 0:o.content}),children:i.map((J,pt)=>b.jsxs("pre",{className:l.pre({class:o==null?void 0:o.pre}),children:[!v&&b.jsx("span",{className:l.symbol({class:o==null?void 0:o.symbol}),children:y}),J]},`${pt}-${J}`))}):b.jsxs("pre",{ref:n,className:l.pre({class:o==null?void 0:o.pre}),children:[!v&&b.jsx("span",{className:l.symbol({class:o==null?void 0:o.symbol}),children:y}),i]}),[i,v,T,y,o==null?void 0:o.pre,l]);return b.jsxs(e,{ref:r,...k(),children:[tt,V]})});go.displayName="HeroUI.Snippet";var Z1=go;const W1=({messages:s})=>b.jsx(Z1,{hideSymbol:!0,codeString:JSON.stringify(s,null,2),tooltipProps:{content:"点击复制"},classNames:{copyButton:"self-start sticky top-0 right-0"},className:"bg-content1 h-96 overflow-y-scroll items-start",children:JSON.stringify(s,null,2).split(`
|
||||
`).map((t,e)=>b.jsx("span",{className:"whitespace-pre-wrap break-all",children:t},e))}),Ze=()=>{const s=Io();return e=>{s.alert({title:"消息内容",size:"3xl",content:H.createElement(W1,{messages:e})})}};var It=(s=>(s.GroupUpload="group_upload",s.GroupAdmin="group_admin",s.GroupDecrease="group_decrease",s.GroupIncrease="group_increase",s.GroupBan="group_ban",s.FriendAdd="friend_add",s.GroupRecall="group_recall",s.FriendRecall="friend_recall",s.Notify="notify",s.GroupMsgEmojiLike="group_msg_emoji_like",s.GroupMsgEmojiLikeLagrange="reaction",s.GroupEssence="essence",s.GroupCard="group_card",s))(It||{});const Dg=s=>{switch(s){case"message":return"消息";case"notice":return"通知";case"request":return"请求";case"meta_event":return"元事件";case"message_sent":return"消息上报";default:return"未知"}},$g=s=>{switch(s){case"enable":return"启用";case"disable":return"停用";case"connect":return"连接";default:return"未知"}},Ug=s=>{switch(s){case"enable":return"success";case"disable":return"danger";case"connect":return"success";default:return"default"}},Fg=s=>"post_type"in s,Hg=s=>"status"in s&&"retcode"in s,zg=s=>{switch(s){case"ok":return"成功";case"failed":return"失败";case"async":return"异步";default:return"未知"}},Gg=s=>{switch(s){case"ok":return"success";case"failed":return"danger";case"async":return"warning";default:return"default"}},Vg=s=>{switch(s){case It.GroupUpload:return"群文件上传";case It.GroupAdmin:return"群管理员变动";case It.GroupDecrease:return"群成员减少";case It.GroupIncrease:return"群成员增加";case It.GroupBan:return"群禁言";case It.FriendAdd:return"好友添加";case It.GroupRecall:return"群消息撤回";case It.FriendRecall:return"好友消息撤回";case It.Notify:return"通知";case It.GroupMsgEmojiLike:return"群消息表情回应";case It.GroupEssence:return"群消息精华";case It.GroupCard:return"群名片更新";default:return"未知"}},Kg=s=>s.message_type==="group",X1=s=>{var e,r,n;let t={type:"text",data:{text:s.insert}};return typeof s.insert!="string"&&((e=s.insert)!=null&&e.image?t={type:"image",data:{file:s.insert.image.src}}:(r=s.insert)!=null&&r.emoji?t={type:"face",data:{id:s.insert.emoji.id}}:(n=s.insert)!=null&&n.reply&&(t={type:"reply",data:{id:s.insert.reply.messageId}})),t},Ar=s=>/^(http|https|file):\/\/.*/.test(s),Y1=()=>{const[s,t]=H.useState(""),e=H.useRef(null),r=Ze(),n=j=>{r([{type:"record",data:{file:j}}])},[i,l]=H.useState(!1),o=H.useRef(null),c=H.useRef([]),[h,m]=H.useState(null),[y,f]=H.useState(!1),d=H.useRef(null),[v,w]=H.useState(0),N=H.useRef(null);H.useEffect(()=>{var j;i?(navigator.mediaDevices.getUserMedia({audio:!0}).then(V=>{d.current=V;const tt=new MediaRecorder(V);o.current=tt,tt.start(),tt.ondataavailable=J=>{J.data.size>0&&c.current.push(J.data)},tt.onstop=()=>{if(c.current.length>0){const J=new Blob(c.current,{type:"audio/wav"}),pt=new FileReader;pt.readAsDataURL(J),pt.onloadend=()=>{const gt=pt.result;m(gt),f(!0)},c.current=[]}V.getTracks().forEach(J=>J.stop())}}),N.current=setInterval(()=>{w(V=>V+1)},1e3)):((j=o.current)==null||j.stop(),N.current&&(clearInterval(N.current),N.current=null))},[i]);const T=()=>{m(null),f(!1),w(0),l(!0)},O=()=>{l(!1)},k=()=>{h&&n(h)},z=j=>{const V=Math.floor(j/60),tt=j%60;return`${V}:${tt.toString().padStart(2,"0")}`};return b.jsxs(b.Fragment,{children:[b.jsxs($t,{children:[b.jsx(xt,{content:"发送音频",children:b.jsx("div",{className:"max-w-fit",children:b.jsx(Ut,{children:b.jsx(lt,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",children:b.jsx(Qi,{className:"text-xl"})})})})}),b.jsxs(Ft,{className:"flex-row gap-2 p-4",children:[b.jsx(xt,{content:"上传音频",children:b.jsx(lt,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",onPress:()=>{var j;(j=e==null?void 0:e.current)==null||j.click()},children:b.jsx(Gs,{})})}),b.jsxs($t,{children:[b.jsx(xt,{content:"输入音频地址",children:b.jsx("div",{className:"max-w-fit",children:b.jsx(Ut,{tooltip:"输入音频地址",children:b.jsx(lt,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:b.jsx(Vs,{})})})})}),b.jsxs(Ft,{className:"flex-row gap-1 p-2",children:[b.jsx(Kt,{value:s,onChange:j=>t(j.target.value),placeholder:"请输入音频地址"}),b.jsx(lt,{color:"primary",variant:"flat",isIconOnly:!0,radius:"full",onPress:()=>{if(!Ar(s)){Er.error("请输入正确的音频地址");return}n(s),t("")},children:b.jsx(Ro,{})})]})]}),b.jsxs($t,{children:[b.jsx(xt,{content:"录制音频",children:b.jsx("div",{className:"max-w-fit",children:b.jsx(Ut,{children:b.jsx(lt,{className:"text-lg",color:"primary",isIconOnly:!0,variant:"flat",radius:"full",children:b.jsx(Qi,{})})})})}),b.jsxs(Ft,{className:"flex-col gap-2 p-4",children:[b.jsxs("div",{className:"flex gap-2",children:[b.jsx(lt,{color:"primary",variant:"flat",onPress:i?O:T,children:i?"停止录制":"开始录制"}),y&&h&&b.jsx(lt,{color:"primary",variant:"flat",onPress:k,children:"查看消息"
Line truncated
|
||||
`,l.sources.SILENT)}),i.on("editor-change",f=>{var d;if(f==="text-change"){const w=i.getContents().ops[0];w&&typeof w.insert!="string"&&((d=w.insert)!=null&&d.reply)&&i.getLength()===1&&i.insertText(1,`
|
||||
`,l.sources.SILENT)}}),i.root.addEventListener("compositionstart",()=>{var v;const d=i.getContents().ops[0];d&&typeof d.insert!="string"&&((v=d.insert)!=null&&v.reply)&&i.getLength()===1&&i.insertText(1,`
|
||||
`,l.sources.SILENT)}));const o=f=>{if(f){const d=i==null?void 0:i.getSelection();d&&(s.current=d)}},c=f=>{const d=s.current||(i==null?void 0:i.getSelection());i==null||i.deleteText((d==null?void 0:d.index)||0,(d==null?void 0:d.length)||0),i==null||i.insertEmbed((d==null?void 0:d.index)||0,"image",{src:f,alt:"图片"}),i==null||i.setSelection(((d==null?void 0:d.index)||0)+1,0)};function h(f){var T;if(!/^(?:0|(?:-?[1-9]\d*))$/.test(f)){Er.error("请输入正确的消息ID");return}const v=i==null?void 0:i.getContents(),w=v==null?void 0:v.ops[0],N=i==null?void 0:i.getSelection();if(w&&typeof w.insert!="string"&&((T=w.insert)!=null&&T.reply)){const O=i==null?void 0:i.getContents();O&&(O.ops[0]={insert:{reply:{messageId:f}}},i==null||i.setContents(O,l.sources.USER))}else i==null||i.insertEmbed(0,"reply",{messageId:f},l.sources.USER);i==null||i.setSelection(((N==null?void 0:N.index)||0)+1,0),i==null||i.blur()}const m=f=>{const d=s.current||(i==null?void 0:i.getSelection());i==null||i.deleteText((d==null?void 0:d.index)||0,(d==null?void 0:d.length)||0),i==null||i.insertEmbed((d==null?void 0:d.index)||0,"emoji",{alt:f.alt,src:f.src,id:f.id}),i==null||i.setSelection(((d==null?void 0:d.index)||0)+1,0)},y=()=>{var w;const f=i==null?void 0:i.getContents();return(((w=f==null?void 0:f.ops)==null?void 0:w.filter(N=>N.insert!==`
|
||||
`))??[]).map(N=>X1(N))};return b.jsxs("div",{children:[b.jsx("div",{ref:n,className:"border border-default-200 rounded-md !mb-2 !text-base !h-64"}),b.jsxs("div",{id:"toolbar",className:"!border-none flex gap-2",children:[b.jsx(eg,{insertImage:c,onOpenChange:o}),b.jsx(J1,{onInsertEmoji:m,onOpenChange:o}),b.jsx(sg,{insertReply:h}),b.jsx(tg,{}),b.jsx(Y1,{}),b.jsx(ag,{}),b.jsx(rg,{}),b.jsx(Q1,{}),b.jsx(ig,{}),b.jsx(lt,{color:"primary",onPress:()=>{const f=y();t(f)},className:"ml-auto",children:"获取JSON格式"})]})]})};function Zg({children:s}){const{isOpen:t,onOpen:e,onOpenChange:r}=Co();return b.jsxs(b.Fragment,{children:[s?s(e):b.jsx(lt,{onPress:e,color:"primary",radius:"full",variant:"flat",size:"sm",className:"bg-primary/10 text-primary",children:"构造消息"}),b.jsx(Lo,{size:"4xl",scrollBehavior:"inside",isOpen:t,onOpenChange:r,children:b.jsx(So,{children:n=>b.jsxs(b.Fragment,{children:[b.jsx(_o,{className:"flex flex-col gap-1",children:"构造消息"}),b.jsx(Oo,{className:"overflow-y-auto",children:b.jsx("div",{className:"overflow-y-auto",children:b.jsx(ug,{})})}),b.jsx(qo,{children:b.jsx(lt,{color:"primary",onPress:n,variant:"flat",children:"关闭"})})]})})})]})}export{Zg as C,It as O,Ug as a,Vg as b,zg as c,Gg as d,Dg as e,Fg as f,$g as g,Hg as h,Kg as i,Z1 as s};
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Quill Editor v2.0.3
|
||||
* https://quilljs.com
|
||||
* Copyright (c) 2017-2024, Slab
|
||||
* Copyright (c) 2014, Jason Chen
|
||||
* Copyright (c) 2013, salesforce.com
|
||||
*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:"•"}.ql-editor li[data-list=checked]>.ql-ui:before{content:"☑"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:"☐"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) ". "}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) ". "}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) ". "Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e,r as T}from"./react-vendor-jWT2yUdV.js";import{b as y,u as X,k as Y,c as D,S as ee,T as te,O as ae,Q as se,R as re,U as le,g as ne,P as oe}from"./index-DiaaLdUu.js";import{t as ie,a as ce}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{z as j}from"./react-hot-toast-cGcFZPSt.js";import{a as de}from"./index-DvErMbt6.js";import{d as ue,a as me,b as pe,m as P}from"./chunk-KQ5CH2X7-DgF-_fDD.js";import{t as W}from"./chunk-6LIX6LVT-B246pOuK.js";import{s as I}from"./index-_HIxriDC.js";import{z as he,A as be}from"./index-FvTxWQTZ.js";import{P as xe,H as $,a as fe,W as we,b as ge}from"./icons-C0t6aNgu.js";import{c as C}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{s as ve}from"./chunk-J6JGI6RM-Djlxjgjl.js";import{G as ye}from"./iconBase-B7bT1FlI.js";import{f as Se}from"./index-CVa9XolR.js";import{t as ke}from"./index-DE7yoXMZ.js";import{a as je,c as Ce}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as Ne}from"./chunk-TE6SZS6W-DGowl7ka.js";import{c as Pe}from"./chunk-D5XJWRAV-DVN21qSw.js";import{E as Te}from"./empty_state-BmDJmEaB.js";import{u as U}from"./use-config-Cu0QvgCe.js";import{u as B}from"./use-dialog-CRIMuzeE.js";import{i as De}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{s as Ee,l as He}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{u as Re,C as _e}from"./react-hook-form-DTbqnRcd.js";import{S as Fe}from"./switch_card-5j4Yjx-K.js";import{P as We}from"./page_header-Dr2OAQrb.js";import{L as Z}from"./index-BBhZPeTB.js";import"./qface-BZLvZXJ8.js";import"./react-router-dom-C6k78GT4.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./chunk-2QQAR2RD-YG5LNmAk.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./useHover-DC1o5-bm.js";import"./useFocusable-DA5Croun.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./useToggle-B3ZYBe5S.js";import"./qq_manager-BfRTEAby.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";const Ie=a=>{const{onOpen:s}=a;return e.jsxs(ue,{classNames:{content:"bg-white/90 dark:bg-zinc-900/90 backdrop-blur-2xl border border-white/70 dark:border-white/10 shadow-2xl shadow-primary-900/10 rounded-2xl"},placement:"right",children:[e.jsx(me,{children:e.jsx(y,{className:"bg-gradient-to-r from-primary-400 to-primary-600 text-white font-semibold shadow-md shadow-primary-500/25 hover:shadow-lg hover:shadow-primary-500/30 transition-all",radius:"full",startContent:e.jsx(he,{className:"text-xl"}),children:"新建"})}),e.jsxs(pe,{"aria-label":"Create Network Config",color:"default",variant:"flat",onAction:i=>{s(i)},children:[e.jsx(P,{isReadOnly:!0,className:"cursor-default hover:!bg-transparent",textValue:"title",children:e.jsxs("div",{className:"flex items-center gap-2 justify-center",children:[e.jsx("div",{className:"w-5 h-5 -ml-3 flex items-center justify-center",children:e.jsx(xe,{})}),e.jsx("div",{className:"text-primary-400",children:"新建网络配置"})]})},"title"),e.jsx(P,{textValue:"httpServers",startContent:e.jsx("div",{className:"w-6 h-6",children:e.jsx($,{})}),children:e.jsxs("div",{className:"flex gap-1 items-center",children:["HTTP服务器",e.jsx(W,{content:"「由SnowCat建立」一个HTTP服务器,你可以「使用框架连接」此服务器或者「自己构造请求发送」至此服务器。SnowCat会根据你配置的IP和端口等建立一个地址,你或者你的框架应该连接到这个地址。",showArrow:!0,className:"max-w-64",children:e.jsx(y,{isIconOnly:!0,radius:"full",size:"sm",variant:"light",className:"w-4 h-4 min-w-0",children:e.jsx(I,{})})})]})},"httpServers"),e.jsx(P,{textValue:"httpSseServers",startContent:e.jsx("div",{className:"w-6 h-6",children:e.jsx($,{})}),children:e.jsxs("div",{className:"flex gap-1 items-center",children:["HTTP SSE服务器",e.jsx(W,{content:"「由SnowCat建立」一个HTTP SSE服务器,你可以「使用框架连接」此服务器或者「自己构造请求发送」至此服务器。SnowCat会根据你配置的IP和端口等建立一个地址,你或者你的框架应该连接到这个地址。",showArrow:!0,className:"max-w-64",children:e.jsx(y,{isIconOnly:!0,radius:"full",size:"sm",variant:"light",className:"w-4 h-4 min-w-0",children:e.jsx(I,{})})})]})},"httpSseServers"),e.jsx(P,{textValue:"httpClients",startContent:e.jsx("div",{className:"w-6 h-6",children:e.jsx(fe,{})}),children:e.jsxs("div",{className:"flex gap-1 items-center",children:["HTTP客户端",e.jsx(W,{content:"「由框架或者你自己建立」的一个用于「接收」SnowCat向你发送请求的客户端,通常框架会提供一个HTTP地址。这个地址是你使用的框架提供的,SnowCat会主动连接它。",showArrow:!0,className:"max-w-64",children:e.jsx(y,{isIconOnly:!0,radius:"full",size:"sm",variaLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as e}from"./react-vendor-jWT2yUdV.js";import{c as a}from"./index-DiaaLdUu.js";const n=({icon:l,title:r,description:s,actions:c,accent:t="primary",className:m})=>e.jsxs("div",{className:a("sc-panel px-3 py-3 md:px-4 md:py-3.5 flex items-center gap-3 mb-4 md:mb-5",m),children:[e.jsx("div",{className:a("w-10 h-10 flex-shrink-0 text-lg",t==="primary"?"sc-accent-tile":"sc-accent-tile-blue"),children:l}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"sc-title truncate",children:r}),s&&e.jsx("p",{className:"sc-subtitle truncate mt-0.5",children:s})]}),c&&e.jsx("div",{className:"flex items-center gap-2 flex-shrink-0",children:c})]});export{n as P};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as i,j as e}from"./react-vendor-jWT2yUdV.js";import{u as X,k as D,c as L,b as M,aI as Y,O as ee,Q as se,R as ae,S as te,T as re,U as ne,P as le}from"./index-DiaaLdUu.js";import{z as m}from"./react-hot-toast-cGcFZPSt.js";import{a as oe}from"./index-DvErMbt6.js";import{j as O}from"./index-BBhZPeTB.js";import{E as A}from"./empty_state-BmDJmEaB.js";import{P as ce}from"./page_header-Dr2OAQrb.js";import{a as ie}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{a as de,c as ue}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as fe}from"./chunk-TE6SZS6W-DGowl7ka.js";import{c as V}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{s as Q}from"./chunk-J6JGI6RM-Djlxjgjl.js";import{t as $}from"./chunk-6LIX6LVT-B246pOuK.js";import{g as xe,t as pe}from"./index-DE7yoXMZ.js";import{P as E}from"./plugin_manager-OIjldREQ.js";import{u as he}from"./use-dialog-CRIMuzeE.js";import{i as J}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{s as K,l as B}from"./chunk-KVDW62ZT-CGYYmJoP.js";import"./qface-BZLvZXJ8.js";import"./react-router-dom-C6k78GT4.js";import"./iconBase-B7bT1FlI.js";import"./index-BsnVex0g.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./useToggle-B3ZYBe5S.js";import"./usePress-BrNwsdVw.js";import"./useFocusable-DA5Croun.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./Item-D8Sud-UP.js";import"./SelectionManager-Dl9uHsLK.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";function me(a){if(a)try{const o=localStorage.getItem(D.token);if(!o)return a;const c=JSON.parse(o),x=new URL(a,window.location.origin);return x.searchParams.set("webui_token",c),x.pathname+x.search}catch{return a}}const ge=({data:a,onToggleStatus:o,onUninstall:c,onConfig:x,hasConfig:p=!1})=>{const{name:h,version:u,author:f,description:y,status:v,icon:z}=a,R=v==="active",[k,w]=i.useState(!1),[C,P]=i.useState(!1),[l]=X(D.backgroundImage,""),g=!!l,_=me(z)||`https://avatar.vercel.sh/${encodeURIComponent(h)}`,N=()=>{w(!0),o().finally(()=>w(!1))},S=()=>{w(!0),c().finally(()=>w(!1))};return e.jsxs(de,{className:L("group w-full backdrop-blur-xl rounded-2xl overflow-hidden transition-all duration-300","hover:shadow-lg hover:shadow-primary-500/10 hover:-translate-y-0.5","border border-white/60 dark:border-white/10 hover:border-primary/40",g?"bg-black/25 dark:bg-black/30":"bg-white/65 dark:bg-white/[0.04]"),shadow:"none",children:[e.jsxs(ue,{className:"p-4 flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(ie,{src:_,name:f||"?",className:"flex-shrink-0",size:"sm",isBordered:!0,radius:"full",color:"default"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h3",{className:"text-[15px] font-bold text-default-900 dark:text-white truncate leading-tight",title:h,children:h}),e.jsxs("p",{className:"text-[11px] text-default-400 mt-0.5 truncate",children:["by ",e.jsx("span",{className:"font-medium",children:f||"未知"})]})]})]}),e.jsx(V,{size:"sm",variant:"flat",color:v==="active"?"success":v==="stopped"?"warning":"default",className:"flex-shrink-0 font-medium h-6 px-1",children:v==="active"?"运行中":v==="stopped"?"已停止":"已禁用"})]}),e.jsx("div",{className:"relative min-h-[2.5rem] cursor-pointer group/desc",onClick:()=>P(!C),children:e.jsx($,{content:y,isDisabled:!y||y.length<50||C,placement:"bottom",className:"max-w-[280px]",delay:500,children:e.jsx("p",{className:L("text-sm text-default-600 dark:text-default-400 leading-relaxed transition-all duration-300",C?"line-clamp-none":"line-clamp-2"),children:y||"暂无描述"})})}),e.jsx("div",{children:e.jsxs(V,{size:"sm",variant:"flat",color:"primary",className:"h-5 text-xs font-semibold px-0.5",classNames:{content:"px-1"},children:["v",u]})})]}),e.jsxs(fe,{className:"px-4 pb-4 pt-0 gap-3",children:[e.jsx(Q,{isDisabled:k,isSelected:R,onValueChange:N,size:"sm",color:"success",classNames:{wrapper:"group-data-[selected=true]:bg-success"},children:e.jsx("span",{className:"text-xs font-medium text-default-600",children:R?"已启用":"已禁用"})}),e.jsx("div",{className:"flex-1"}),p&&e.jsx($,{content:"插件配置",children:e.jsx(M,{isIconOnly:!0,radius:"full",size:"sm",variant:"light",color:"primary",onPress:x,children:e.jsx(xe,{size:20})})}),e.jsx($,{content:"卸载插件",color:"danger",children:e.jsx(M,{isIconOnly:!0,radius:"full",size:"sm",variant:"light",color:"danger",onPress:S,isDisabled:k,children:e.jsx(pe,{size:20})})})]})]})};function H(a,o=60){if(a.length<=o)return a;const c=a.includes("\\")?"\\":"/",x=a.split(c);if(x.length<=3)return a.substring(0,o-3)+"...";const p=x[0],h=x.slice(-2).join(c),u=`${p}${c}...${c}${h}`;return u.length>o?a.substring(0,o-3)+"...":u}function be(a,o=100){if(a.length<=o)return a;const c=/[A-Za-z]:\\[^\s'"]+/g,x=/\/[^\s'"]+(?:\/[^\s'"]+)+/g;let p=a;const h=a.match(c);if(h)for(const f of
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{L as n}from"./index-DiaaLdUu.js";class o{static async getPluginList(){const{data:t}=await n.get("/Plugin/List");return t.data}static async registerPluginManager(){const{data:t}=await n.post("/Plugin/RegisterManager");return t.data}static async setPluginStatus(t,a){await n.post("/Plugin/SetStatus",{id:t,enable:a})}static async uninstallPlugin(t,a){await n.post("/Plugin/Uninstall",{id:t,cleanData:a})}static async importLocalPlugin(t){const a=new FormData;a.append("plugin",t);const{data:i}=await n.post("/Plugin/Import",a,{headers:{"Content-Type":"multipart/form-data"},timeout:6e4});return i.data}static async getPluginStoreList(t=!1){const a=t?{forceRefresh:"true"}:{},{data:i}=await n.get("/Plugin/Store/List",{params:a});return i.data}static async getPluginStoreDetail(t){const{data:a}=await n.get(`/Plugin/Store/Detail/${t}`);return a.data}static async installPluginFromStore(t,a){await n.post("/Plugin/Store/Install",{id:t,mirror:a},{timeout:3e5})}static async getPluginConfig(t){const{data:a}=await n.get("/Plugin/Config",{params:{id:t}});return a.data}static async setPluginConfig(t,a){await n.post("/Plugin/Config",{id:t,config:a})}static async notifyConfigChange(t,a,i,s,e){await n.post("/Plugin/Config/Change",{id:t,sessionId:a,key:i,value:s,currentConfig:e})}static getConfigSSEUrl(t,a){const i=new URLSearchParams({id:t});return a&&i.set("config",JSON.stringify(a)),`/api/Plugin/Config/SSE?${i.toString()}`}}export{o as P};
|
||||
@@ -0,0 +1,31 @@
|
||||
import{r as Q,j as g}from"./react-vendor-jWT2yUdV.js";import{u as yr,k as Qt,c as Ye,b as ge,O as zi,Q as ji,R as Ni,S as Li,s as kr,T as Di,aI as _i}from"./index-DiaaLdUu.js";import{i as Fi}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{t as Ri,a as Mi}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{t as Xe}from"./chunk-6LIX6LVT-B246pOuK.js";import{p as Oi}from"./chunk-APIAPHLK-nGgOe_Nr.js";import{z as Ce}from"./react-hot-toast-cGcFZPSt.js";import{g as Yt,h as In,i as An,a as Bi,j as $i,e as Hi}from"./index-DvErMbt6.js";import{k as Xt}from"./index-BBhZPeTB.js";import{a as br}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{a as Ui,c as Vi}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as qi}from"./chunk-TE6SZS6W-DGowl7ka.js";import{c as De}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{u as wr,v as Wi}from"./index-DE7yoXMZ.js";import{E as Qi}from"./empty_state-BmDJmEaB.js";import{P as Tt}from"./plugin_manager-OIjldREQ.js";import{M as Pn}from"./mirror_selector_modal-CyjkhfUx.js";import{g as Sr}from"./qface-BZLvZXJ8.js";import{u as Yi}from"./use-dialog-CRIMuzeE.js";import{c as Xi}from"./react-router-dom-C6k78GT4.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./iconBase-B7bT1FlI.js";import"./index-BsnVex0g.js";function Gi(e,n){if(n)try{const t=new URL(n);if(t.hostname==="github.com"||t.hostname==="www.github.com"){const r=t.pathname.split("/").filter(Boolean);if(r.length>=1)return`https://github.com/${r[0]}.png`}}catch{}if(e)try{const t=new URL(e);if(t.hostname==="github.com"||t.hostname==="www.github.com"){const r=t.pathname.split("/").filter(Boolean);if(r.length>=1)return`https://github.com/${r[0]}.png`}else return`https://api.iowen.cn/favicon/${t.hostname}.png`}catch{}}const Ki=({data:e,onInstall:n,onViewDetail:t,installStatus:r="not-installed",installedVersion:i})=>{const{name:o,version:l,author:a,description:s,tags:u,homepage:f,downloadUrl:c}=e,[p]=yr(Qt.backgroundImage,""),[h,x]=Q.useState(!1),C=!!p,w=Gi(f,c)||`https://avatar.vercel.sh/${encodeURIComponent(o)}`,y=g.jsx("span",{className:Ye("font-medium transition-colors",f?"hover:text-primary hover:underline cursor-pointer":""),children:a||"未知作者"});return g.jsxs(Ui,{className:Ye("group w-full backdrop-blur-xl rounded-2xl overflow-hidden transition-all duration-300","hover:shadow-lg hover:shadow-primary-500/10 hover:-translate-y-0.5","border border-white/60 dark:border-white/10 hover:border-primary/40",C?"bg-black/25 dark:bg-black/30":"bg-white/65 dark:bg-white/[0.04]"),shadow:"none",children:[g.jsxs(Vi,{className:Ye("p-4 flex flex-col gap-3",t&&"cursor-pointer"),onClick:t,children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(br,{src:w,name:a||"?",size:"md",isBordered:!0,color:"default",radius:"full",className:"flex-shrink-0 transition-transform group-hover:scale-105"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center justify-between",children:g.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:f?g.jsx(Xe,{content:"访问项目主页",placement:"top",delay:500,children:g.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:"text-base font-bold text-default-900 hover:text-primary transition-colors truncate",onClick:v=>v.stopPropagation(),children:o})}):g.jsx("h3",{className:"text-base font-bold text-default-900 truncate",title:o,children:o})})}),g.jsxs("div",{className:"text-xs text-default-500 mt-0.5 truncate",children:["by ",f?g.jsx("a",{href:f,target:"_blank",rel:"noreferrer",onClick:v=>v.stopPropagation(),children:y}):y]})]})]}),g.jsx("div",{className:"relative min-h-[2.5rem] cursor-pointer group/desc",onClick:()=>x(!h),children:g.jsx(Xe,{content:s,isDisabled:!s||s.length<50||h,placement:"bottom",className:"max-w-[280px]",delay:500,children:g.jsx("p",{className:Ye("text-sm text-default-600 dark:text-default-400 leading-relaxed transition-all duration-300",h?"line-clamp-none":"line-clamp-2"),children:s||"暂无描述"})})}),g.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[g.jsxs(De,{size:"sm",variant:"flat",color:"primary",className:"h-5 text-xs font-semibold px-0.5",classNames:{content:"px-1"},children:["v",l]}),u==null?void 0:u.slice(0,2).map(v=>g.jsx(De,{size:"sm",variant:"flat",className:"h-5 text-xs px-0.5 bg-default-100 dark:bg-default-50/50 text-default-600",classNames:{content:"px-1"},children:v},v)),u&&u.length>2&&g.jsx(Xe,{content:g.jsx("div",{className:"flex flex-wrap gap-1 max-w-[200px] p-1",children:u.map(v=>g.jsx("span",{className:"text-xs bg-white/10 px-1.5 py-0.5 rounded-md border border-white/10",children:v},v))Line truncated
|
||||
`,u="/",f="*",c="",p="comment",h="declaration";function x(w,y){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];y=y||{};var v=1,E=1;function D(j){var P=j.match(n);P&&(v+=P.length);var W=j.lastIndexOf(s);E=~W?j.length-W:E+j.length}function F(){var j={line:v,column:E};return function(P){return P.position=new b(j),B(),P}}function b(j){this.start=j,this.end={line:v,column:E},this.source=y.source}b.prototype.content=w;function _(j){var P=new Error(y.source+":"+v+":"+E+": "+j);if(P.reason=j,P.filename=y.source,P.line=v,P.column=E,P.source=w,!y.silent)throw P}function U(j){var P=j.exec(w);if(P){var W=P[0];return D(W),w=w.slice(W.length),P}}function B(){U(t)}function k(j){var P;for(j=j||[];P=T();)P!==!1&&j.push(P);return j}function T(){var j=F();if(!(u!=w.charAt(0)||f!=w.charAt(1))){for(var P=2;c!=w.charAt(P)&&(f!=w.charAt(P)||u!=w.charAt(P+1));)++P;if(P+=2,c===w.charAt(P-1))return _("End of comment missing");var W=w.slice(2,P-2);return E+=2,D(W),w=w.slice(P),E+=2,j({type:p,comment:W})}}function z(){var j=F(),P=U(r);if(P){if(T(),!U(i))return _("property missing ':'");var W=U(o),ee=j({type:h,property:C(P[0].replace(e,c)),value:W?C(W[0].replace(e,c)):c});return U(l),ee}}function q(){var j=[];k(j);for(var P;P=z();)P!==!1&&(j.push(P),k(j));return j}return B(),q()}function C(w){return w?w.replace(a,c):c}return jt=x,jt}var Dn;function gl(){if(Dn)return qe;Dn=1;var e=qe&&qe.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=t;const n=e(dl());function t(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,n.default)(r),a=typeof i=="function";return l.forEach(s=>{if(s.type!=="declaration")return;const{property:u,value:f}=s;a?i(u,f,s):f&&(o=o||{},o[u]=f)}),o}return qe}var nt={},_n;function xl(){if(_n)return nt;_n=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(u){return!u||t.test(u)||e.test(u)},l=function(u,f){return f.toUpperCase()},a=function(u,f){return"".concat(f,"-")},s=function(u,f){return f===void 0&&(f={}),o(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(n,l))};return nt.camelCase=s,nt}var rt,Fn;function yl(){if(Fn)return rt;Fn=1;var e=rt&&rt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},n=e(gl()),t=xl();function r(i,o){var l={};return!i||typeof i!="string"||(0,n.default)(i,function(a,s){a&&s&&(l[(0,t.camelCase)(a,o)]=s)}),l}return r.default=r,rt=r,rt}var kl=yl();const bl=Sr(kl),zr=jr("end"),cn=jr("start");function jr(e){return n;function n(t){const r=t&&t.position&&t.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 wl(e){const n=cn(e),t=zr(e);if(n&&t)return{start:n,end:t}}function ot(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rn(e.position):"start"in e||"end"in e?Rn(e):"line"in e||"column"in e?Zt(e):""}function Zt(e){return Mn(e&&e.line)+":"+Mn(e&&e.column)}function Rn(e){return Zt(e&&e.start)+"-"+Zt(e&&e.end)}function Mn(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?o.ruleId=r:(o.source=r.slice(0,s),o.ruleId=r.slice(s+1))}if(!o.place&&o.ancestors&&o.ancestors){const s=o.ancestors[o.ancestors.length-1];s&&(o.place=s.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=ot(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.column=void 0;ie.prototype.line=void 0;ie.prototype.ancestors=void 0;ie.prototype.cause=void 0;ie.prototype.fatal=void 0;ie.prototype.place=void 0;ie.prototype.ruleId=void 0;ie.prototype.source=void 0;const fn={}.hasOwnProperty,Sl=new Map,Cl=/[A-Z]/g,vl=new Set(["table","tbody","thead","tfoot","tr"]),El=new Set(["td","th"]),Nr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Il(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n
Line truncated
|
||||
`;break}case-3:{l=`\r
|
||||
`;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function _a(e){const r={constructs:Rr([ja,...(e||{}).extensions||[]]),content:i(Xl),defined:[],document:i(Kl),flow:i(ga),lazy:{},string:i(ka),text:i(ba)};return r;function i(o){return l;function l(a){return Na(r,o,a)}}}function Fa(e){for(;!Hr(e););return e}const Yn=/[\0\t\n\r]/g;function Ra(){let e=1,n="",t=!0,r;return i;function i(o,l,a){const s=[];let u,f,c,p,h;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),c=0,n="",t&&(o.charCodeAt(0)===65279&&c++,t=void 0);c<o.length;){if(Yn.lastIndex=c,u=Yn.exec(o),p=u&&u.index!==void 0?u.index:o.length,h=o.charCodeAt(p),!u){n=o.slice(c);break}if(h===10&&c===p&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),c<p&&(s.push(o.slice(c,p)),e+=p-c),h){case 0:{s.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,s.push(-2);e++<f;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}c=p+1}return a&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}const Ma=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Oa(e){return e.replace(Ma,Ba)}function Ba(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Mr(t.slice(o?2:1),o?16:10)}return dn(t)||e}const Yr={}.hasOwnProperty;function $a(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Ha(t)(Fa(_a(t).document().write(Ra()(e,n,!0))))}function Ha(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ne),autolinkProtocol:B,autolinkEmail:B,atxHeading:o($),blockQuote:o(je),characterEscape:B,characterReference:B,codeFenced:o(He),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(He,l),codeText:o(Pt,l),codeTextData:B,data:B,codeFlowValue:B,definition:o(N),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Y),hardBreakEscape:o(J),hardBreakTrailing:o(J),htmlFlow:o(be,l),htmlFlowData:B,htmlText:o(be,l),htmlTextData:B,image:o(Re),label:l,link:o(Ne),listItem:o(Z),listItemValue:p,listOrdered:o(Ue,c),listUnordered:o(Ue),paragraph:o(he),reference:d,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o($),strong:o(Ai),thematicBreak:o(Ti)},exit:{atxHeading:s(),atxHeadingSequence:F,autolink:s(),autolinkEmail:ze,autolinkProtocol:ke,blockQuote:s(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:ne,characterReference:Fe,codeFenced:s(w),codeFencedFence:C,codeFencedFenceInfo:h,codeFencedFenceMeta:x,codeFlowValue:k,codeIndented:s(y),codeText:s(P),codeTextData:k,data:k,definition:s(),definitionDestinationString:D,definitionLabelString:v,definitionTitleString:E,emphasis:s(),hardBreakEscape:s(z),hardBreakTrailing:s(z),htmlFlow:s(q),htmlFlowData:k,htmlText:s(j),htmlTextData:k,image:s(ee),label:fe,labelText:le,lineEnding:T,link:s(W),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:se,resourceDestinationString:m,resourceTitleString:oe,resource:ye,setextHeading:s(U),setextHeadingLineSequence:_,setextHeadingText:b,strong:s(),thematicBreak:s()}};Xr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let A={type:"root",children:[]};const R={stack:[A],tokenStack:[],config:n,enter:a,exit:u,buffer:l,resume:f,data:t},H=[];let X=-1;for(;++X<S.length;)if(S[X][1].type==="listOrdered"||S[X][1].type==="listUnordered")if(S[X][0]==="enter")H.push(X);else{const we=H.pop();X=i(S,we,X)}for(X=-1;++X<S.length;){const we=n[S[X][0]];Yr.call(we,S[X][1].type)&&we[S[X][1].type].call(Object.assign({sliceSerialize:S[X][2].sliceSerialize},R),S[X][1])}if(R.tokenStack.length>0){const we=R.tokenStack[R.tokenStack.length-1];(we[1]||Xn).call(R,void 0,we[0])}for(A.position={start:Le(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:Le(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},X=-1;++X<n.transforms.length;)A=n.transforms[X](A)||A;return A}function i(S,A,R){let H=A-1,X=-1,we=!1,Me,Ae,et,tt;for(;++H<=R;){const pe=S[H];switch(pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pe[0]==="enter"?X++:X--,tt=void 0;break}case"lineEndingBlank":{pe[0]==="enter"&&(Me&&!tt&&!X&&!et&&(et=H),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!X&&pe[0]==="enter"&&pe[1].type==="listItemPrefix"||X===-1&&pe[0]==="exit"&&(pe[1].type==="listUnordered"||pe[1].type==="listOrdered")){if(Me){let Ve=H;for(Ae=void 0;Ve--;){const Pe=S[Ve];if(Pe[1].type==="lineEnding"||Pe[1].type==="lineEndingBlank"){if(Pe[0]==="exit")continue;Ae&&(S[Ae][1].type="lineEndingBlank",we=!0),Pe[1].type="lineEnding",Ae=Ve}else if(!(Pe[1].type==="linePrefix"||Pe[1].type==="blockQuotePrefix"||Pe[1].type==="blockQuotePrefixWhitespace"||Pe[1].type==="blockQuoteMarker"||Pe[1].type==="listItemIndent"))break}etLine truncated
|
||||
`}]}function Qa(e,n){const t=n.value?n.value+`
|
||||
`:"",r={};n.lang&&(r.className=["language-"+n.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(i.data={meta:n.meta}),e.patch(n,i),i=e.applyData(n,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(n,i),i}function Ya(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Xa(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ga(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Ze(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const s={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(n,u),e.applyData(n,u)}function Ka(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ja(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function Gr(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Za(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Gr(e,n);const i={src:Ze(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function es(e,n){const t={src:Ze(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function ts(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function ns(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return Gr(e,n);const i={href:Ze(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function rs(e,n){const t={href:Ze(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function is(e,n,t){const r=e.all(n),i=t?ls(t):Kr(n),o={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
||||
`}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
||||
`});const u={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,u),e.applyData(n,u)}function ls(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Kr(t[r])}return n}function Kr(e){const n=e.spread;return n??e.children.length>1}function os(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function as(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ss(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function us(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function cs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=cn(n.children[1]),s=zr(n.children[n.children.length-1]);a&&s&&(l.position={start:a,end:s}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function fs(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let s=-1;const u=[];for(;++s<a;){const c=n.children[s],p={},h=l?l[s]:void 0;h&&(p.align=h);let x={type:"element",tagName:o,properties:p,children:[]};c&&(x.children=e.all(c),e.patch(c,x),x=e.applyData(c,x)),u.push(x)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,f),e.applyData(n,f)}function hs(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Gn=9,Kn=32;function ps(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(Jn(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(Jn(n.slice(i),i>0,!1)),o.join("")}function Jn(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===Gn||o===Kn;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===Gn||o===Kn;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ms(e,n){const t={type:"text",value:ps(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function ds(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const gs={blockquote:qa,break:Wa,code:Qa,delete:Ya,emphasis:Xa,footnoteReference:Ga,heading:Ka,html:Ja,imageReference:Za,image:es,inlineCode:ts,linkReference:ns,link:rs,listItem:is,list:os,paragraph:as,root:ss,strong:us,table:cs,tableCell:hs,tableRow:fs,text:ms,thematicBreak:ds,toml:mt,yaml:mt,definition:mt,footnoteDefinition:mt};function mt(){}const Jr=-1,Et=0,st=1,bt=2,xn=3,yn=4,kn=5,bn=6,Zr=7,ei=8,Zn=typeof self=="object"?self:globalThis,xs=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case Et:case Jr:return t(l,i);case st:{const a=t([],i);for(const s of l)a.push(r(s));return a}case bt:{const a=t({},i);for(const[s,u]of l)a[r(s)]=r(u);return a}case xn:return t(new Date(l),i);case yn:{const{source:a,flags:s}=l;return t(new RegExp(a,s),i)}case kn:{const a=t(new Map,i);for(const[s,u]of l)a.set(r(s),r(u));return a}case bn:{const a=t(new Set,i);for(const s of l)a.add(r(s));return a}case Zr:{const{name:a,message:s}=l;return t(new Zn[a](s),i)}case ei:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}}return t(new Zn[o](l),i)};return r},er=e=>xs(new Map,e)(0),We="",{toString:ys}={},{keys:ks}=Object,lt=e=>{const n=typeof e;if(n!=="object"||!e)return[Et,n];const t=ys.call(e).slice(8,-1);switch(t){case"Array":return[st,We];case"Object":return[bt,We];case"Date":return[xn,We];case"RegExp":return[yn,We];case"Map":return[kn,We];case"Set":return[bn,We];case"DataView":return[st,t]}return t.includes("Array")?[st,t]:t.includes("Error")?[Zr,t]:[bt,t]},dt=([e,n])=>e===Et&&(n==="function"||n==="symbol"),bs=(e,n,t,r)=>{const i=(l,a)=>{const s=r.push(l)-1;return t.set(a,s),s},o=l=>{if(t.has(l))return t.get(l);let[a,s]=lt(l);switch(a){case Et:{let f=l;switch(s){case"bigint":a=ei,f=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([Jr],l)}return i([a,f],l)}case st:{if(s){let p=l;return s==="DataView"?p=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(p=new Uint8Array(
Line truncated
|
||||
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
|
||||
`}]}}const It=(function(e){if(e==null)return As;if(typeof e=="function")return At(e);if(typeof e=="object")return Array.isArray(e)?vs(e):Es(e);if(typeof e=="string")return Is(e);throw new Error("Expected function, string, or object as test")});function vs(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=It(e[t]);return At(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function Es(e){const n=e;return At(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function Is(e){return At(n);function n(t){return t&&t.type===e}}function At(e){return n;function n(t,r,i){return!!(Ps(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function As(){return!0}function Ps(e){return e!==null&&typeof e=="object"&&"type"in e}const ti=[],Ts=!0,nn=!1,zs="skip";function ni(e,n,t,r){let i;typeof n=="function"&&typeof t!="function"?(r=t,t=n):i=n;const o=It(i),l=r?-1:1;a(e,void 0,[])();function a(s,u,f){const c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){const h=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return p;function p(){let h=ti,x,C,w;if((!n||o(s,u,f[f.length-1]||void 0))&&(h=js(t(s,f)),h[0]===nn))return h;if("children"in s&&s.children){const y=s;if(y.children&&h[0]!==zs)for(C=(r?y.children.length:-1)+l,w=f.concat(y);C>-1&&C<y.children.length;){const v=y.children[C];if(x=a(v,C,w)(),x[0]===nn)return x;C=typeof x[1]=="number"?x[1]:C+l}}return h}}}function js(e){return Array.isArray(e)?e:typeof e=="number"?[Ts,e]:e==null?ti:[e]}function wn(e,n,t,r){let i,o,l;typeof n=="function"&&typeof t!="function"?(o=void 0,l=n,i=t):(o=n,l=t,i=r),ni(e,o,a,i);function a(s,u){const f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return l(s,c,f)}}const rn={}.hasOwnProperty,Ns={};function Ls(e,n){const t=n||Ns,r=new Map,i=new Map,o=new Map,l={...gs,...t.handlers},a={all:u,applyData:_s,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:s,options:t,patch:Ds,wrap:Rs};return wn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const c=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();c.has(p)||c.set(p,f)}}),a;function s(f,c){const p=f.type,h=a.handlers[p];if(rn.call(a.handlers,p)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:C,...w}=f,y=wt(w);return y.children=a.all(f),y}return wt(f)}return(a.options.unknownHandler||Fs)(a,f,c)}function u(f){const c=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const x=a.one(p[h],f);if(x){if(h&&p[h-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=nr(x.value)),!Array.isArray(x)&&x.type==="element")){const C=x.children[0];C&&C.type==="text"&&(C.value=nr(C.value))}Array.isArray(x)?c.push(...x):c.push(x)}}}return c}}function Ds(e,n){e.position&&(n.position=wl(e))}function _s(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const l="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,wt(o)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function Fs(e,n){const t=n.data||{},r="value"in n&&!(rn.call(t,"hProperties")||rn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Rs(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
||||
`});++r<e.length;)r&&t.push({type:"text",value:`
|
||||
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
||||
`}),t}function nr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function rr(e,n){const t=Ls(e,n),r=t.one(e,void 0),i=Cs(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
||||
`},i),o}function Ms(e,n){return e&&"run"in e?async function(t,r){const i=rr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return rr(t,{file:r,...e||n})}}function ir(e){if(e)throw e}var _t,lr;function Os(){if(lr)return _t;lr=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):n.call(u)==="[object Array]"},o=function(u){if(!u||n.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),c=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!c)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},l=function(u,f){t&&f.name==="__proto__"?t(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},a=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return _t=function s(){var u,f,c,p,h,x,C=arguments[0],w=1,y=arguments.length,v=!1;for(typeof C=="boolean"&&(v=C,C=arguments[1]||{},w=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});w<y;++w)if(u=arguments[w],u!=null)for(f in u)c=a(C,f),p=a(u,f),C!==p&&(v&&p&&(o(p)||(h=i(p)))?(h?(h=!1,x=c&&i(c)?c:[]):x=c&&o(c)?c:{},l(C,{name:f,newValue:s(v,x,p)})):typeof p<"u"&&l(C,{name:f,newValue:p}));return C},_t}var Bs=Os();const Ft=Sr(Bs);function ln(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $s(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(s,...u){const f=e[++o];let c=-1;if(s){l(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?Hs(f,a)(...u):l(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Hs(e,n){let t;return r;function r(...l){const a=e.length>l.length;let s;a&&l.push(i);try{s=e.apply(this,l)}catch(u){const f=u;if(a&&t)throw f;return i(f)}a||(s&&s.then&&typeof s.then=="function"?s.then(o,i):s instanceof Error?i(s):o(s))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const ve={basename:Us,dirname:Vs,extname:qs,join:Ws,sep:"/"};function Us(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');pt(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function Vs(e){if(pt(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function qs(e){pt(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Ws(...e){let n=-1,t;for(;++n<e.length;)pt(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Qs(t)}function Qs(e){pt(e);const n=e.codePointAt(0)===47;let t=Ys(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Ys(e,n){let t="",r=0,i=-1,o=0,l=-1,a,s;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function pt(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Xs={cwd:Gs};function Gs(){return"/"}function on(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ks(e){if(typeof e=="string")e=new URL(e);else if(!on(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Js(e)}function Js(e){if(e.hostname!==""){consLine truncated
|
||||
`:" ")+o.indentLines(o.containerFlow(r,a.current()),n?oi:Hu))),u(),s}}function Hu(e,n,t){return n===0?e:oi(e,n,t)}function oi(e,n,t){return(t?"":" ")+e}const Uu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ai.peek=Yu;function Vu(){return{canContainEols:["delete"],enter:{strikethrough:Wu},exit:{strikethrough:Qu}}}function qu(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Uu}],handlers:{delete:ai}}}function Wu(e){this.enter({type:"delete",children:[]},e)}function Qu(e){this.exit(e)}function ai(e,n,t,r){const i=t.createTracker(r),o=t.enter("strikethrough");let l=i.move("~~");return l+=t.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function Yu(){return"~"}function Xu(e){return e.length}function Gu(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||Xu,o=[],l=[],a=[],s=[];let u=0,f=-1;for(;++f<e.length;){const C=[],w=[];let y=-1;for(e[f].length>u&&(u=e[f].length);++y<e[f].length;){const v=Ku(e[f][y]);if(t.alignDelimiters!==!1){const E=i(v);w[y]=E,(s[y]===void 0||E>s[y])&&(s[y]=E)}C.push(v)}l[f]=C,a[f]=w}let c=-1;if(typeof r=="object"&&"length"in r)for(;++c<u;)o[c]=hr(r[c]);else{const C=hr(r);for(;++c<u;)o[c]=C}c=-1;const p=[],h=[];for(;++c<u;){const C=o[c];let w="",y="";C===99?(w=":",y=":"):C===108?w=":":C===114&&(y=":");let v=t.alignDelimiters===!1?1:Math.max(1,s[c]-w.length-y.length);const E=w+"-".repeat(v)+y;t.alignDelimiters!==!1&&(v=w.length+v+y.length,v>s[c]&&(s[c]=v),h[c]=v),p[c]=E}l.splice(1,0,p),a.splice(1,0,h),f=-1;const x=[];for(;++f<l.length;){const C=l[f],w=a[f];c=-1;const y=[];for(;++c<u;){const v=C[c]||"";let E="",D="";if(t.alignDelimiters!==!1){const F=s[c]-(w[c]||0),b=o[c];b===114?E=" ".repeat(F):b===99?F%2?(E=" ".repeat(F/2+.5),D=" ".repeat(F/2-.5)):(E=" ".repeat(F/2),D=E):D=" ".repeat(F)}t.delimiterStart!==!1&&!c&&y.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&v==="")&&(t.delimiterStart!==!1||c)&&y.push(" "),t.alignDelimiters!==!1&&y.push(E),y.push(v),t.alignDelimiters!==!1&&y.push(D),t.padding!==!1&&y.push(" "),(t.delimiterEnd!==!1||c!==u-1)&&y.push("|")}x.push(t.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return x.join(`
|
||||
`)}function Ku(e){return e==null?"":String(e)}function hr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function Ju(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),Zu);return i(),l}function Zu(e,n,t){return">"+(t?"":" ")+e}function ec(e,n){return pr(e,n.inConstruct,!0)&&!pr(e,n.notInConstruct,!1)}function pr(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function mr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;)if(t.unsafe[i].character===`
|
||||
`&&ec(t.stack,t.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
||||
`}function tc(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function nc(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function rc(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function ic(e,n,t,r){const i=rc(t),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(nc(e,t)){const c=t.enter("codeIndented"),p=t.indentLines(o,lc);return c(),p}const a=t.createTracker(r),s=i.repeat(Math.max(tc(o,i)+1,3)),u=t.enter("codeFenced");let f=a.move(s);if(e.lang){const c=t.enter(`codeFencedLang${l}`);f+=a.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),c()}if(e.lang&&e.meta){const c=t.enter(`codeFencedMeta${l}`);f+=a.move(" "),f+=a.move(t.safe(e.meta,{before:f,after:`
|
||||
`,encode:["`"],...a.current()})),c()}return f+=a.move(`
|
||||
`),o&&(f+=a.move(o+`
|
||||
`)),f+=a.move(s),u(),f}function lc(e,n,t){return(t?"":" ")+e}function Cn(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function oc(e,n,t,r){const i=Cn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("[");return u+=s.move(t.safe(t.associationId(e),{before:u,after:"]",...s.current()})),u+=s.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":`
|
||||
`,...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),l(),u}function ac(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function ct(e){return"&#x"+e.toString(16).toUpperCase()+";"}function St(e,n,t){const r=Ke(e),i=Ke(n);return r===void 0?i===void 0?t==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}si.peek=sc;function si(e,n,t,r){const i=ac(t),o=t.enter("emphasis"),l=t.createTracker(r),a=l.move(i);let s=l.move(t.containerPhrasing(e,{after:i,before:a,...l.current()}));const u=s.charCodeAt(0),f=St(r.before.charCodeAt(r.before.length-1),u,i);f.inside&&(s=ct(u)+s.slice(1));const c=s.charCodeAt(s.length-1),p=St(r.after.charCodeAt(0),c,i);p.inside&&(s=s.slice(0,-1)+ct(c));const h=l.move(i);return o(),t.attentionEncodeSurroundingInfo={after:p.outside,before:f.outside},a+s+h}function sc(e,n,t){return t.options.emphasis||"*"}function uc(e,n){let t=!1;return wn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,nn}),!!((!e.depth||e.depth<3)&&mn(e)&&(n.options.setext||t))}function cc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(uc(e,t)){const f=t.enter("headingSetext"),c=t.enter("phrasing"),p=t.containerPhrasing(e,{...o.current(),before:`
|
||||
`,after:`
|
||||
`});return c(),f(),p+`
|
||||
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
||||
`))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),s=t.enter("phrasing");o.move(l+" ");let u=t.containerPhrasing(e,{before:"# ",after:`
|
||||
`,...o.current()});return/^[\t ]/.test(u)&&(u=ct(u.charCodeAt(0))+u.slice(1)),u=u?l+" "+u:l,t.options.closeAtx&&(u+=" "+l),s(),a(),u}ui.peek=fc;function ui(e){return e.value||""}function fc(){return"<"}ci.peek=hc;function ci(e,n,t,r){const i=Cn(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const s=t.createTracker(r);let u=s.move("![");return u+=s.move(t.safe(e.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(t.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(a=t.enter("destinationRaw"),u+=s.move(t.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),a(),e.title&&(a=t.enter(`title${o}`),u+=s.move(" "+i),u+=s.move(t.safe(e.title,{before:u,after:i,...s.current()})),u+=s.move(i),a()),u+=s.move(")"),l(),u}function hc(){return"!"}fi.peek=pc;function fi(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("![");const u=t.safe(e.alt,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function pc(){return"!"}hi.peek=mc;function hi(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);let s;if(l.atBreak)for(;s=a.exec(r);){let u=s.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1)}}return i+r+i}function mc(){return"`"}function pi(e,n){const t=mn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}mi.peek=dc;function mi(e,n,t,r){const i=Cn(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);let a,s;if(pi(e,t)){const f=t.stack;t.stack=[],a=t.enter("autolink");let c=l.move("<");return c+=l.move(t.containerPhrasing(e,{before:c,after:">",...l.current()})),c+=l.move(">"),a(),t.stack=f,c}a=t.enter("link"),s=t.enter("label");let u=l.move("[");return u+=l.move(t.containerPhrasing(e,{before:u,after:"](",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(t.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=t.enter("destinationRaw"),u+=l.move(t.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(t.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function dc(e,n,t){return pi(e,t)?"<":"["}di.peek=gc;function di(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let s=a.move("[");const u=t.containerPhrasing(e,{before:s,after:"]",...a.current()});s+=a.move(u+"]["),l();const f=t.stack;t.stack=[],l=t.enter("reference");const c=t.safe(t.associationId(e),{before:s,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!u||u!==c?s+=a.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=a.move("]"),s}function gc(){return"["}function vn(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function xc(e){const n=vn(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function yc(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function gi(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function kc(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?yc(t):vn(t);const a=e.ordered?l==="."?")":".":xc(t);let s=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(s=!0),gi(t)===l&&f){let c=-1;for(;++c<e.chilLine truncated
|
||||
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:l,tableCell:s,tableRow:a}};function l(h,x,C,w){return u(f(h,C,w),h.align)}function a(h,x,C,w){const y=c(h,C,w),v=u([y]);return v.slice(0,v.indexOf(`
|
||||
`))}function s(h,x,C,w){const y=C.enter("tableCell"),v=C.enter("phrasing"),E=C.containerPhrasing(h,{...w,before:o,after:o});return v(),y(),E}function u(h,x){return Gu(h,{align:x,alignDelimiters:r,padding:t,stringLength:i})}function f(h,x,C){const w=h.children;let y=-1;const v=[],E=x.enter("table");for(;++y<w.length;)v[y]=c(w[y],x,C);return E(),v}function c(h,x,C){const w=h.children;let y=-1;const v=[],E=x.enter("tableRow");for(;++y<w.length;)v[y]=s(w[y],h,x,C);return E(),v}function p(h,x,C){let w=yi.inlineCode(h,x,C);return C.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function Rc(){return{exit:{taskListCheckValueChecked:gr,taskListCheckValueUnchecked:gr,paragraph:Oc}}}function Mc(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Bc}}}function gr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Oc(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Bc(e,n,t,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",a=t.createTracker(r);o&&a.move(l);let s=yi.listItem(e,n,t,{...r,...a.current()});return o&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+l}}function $c(){return[ku(),Bu(),Vu(),zc(),Rc()]}function Hc(e){return{extensions:[bu(),$u(e),qu(),Fc(e),Mc()]}}const Uc={tokenize:Xc,partial:!0},ki={tokenize:Gc,partial:!0},bi={tokenize:Kc,partial:!0},wi={tokenize:Jc,partial:!0},Vc={tokenize:Zc,partial:!0},Si={name:"wwwAutolink",tokenize:Qc,previous:vi},Ci={name:"protocolAutolink",tokenize:Yc,previous:Ei},Te={name:"emailAutolink",tokenize:Wc,previous:Ii},Ee={};function qc(){return{text:Ee}}let Oe=48;for(;Oe<123;)Ee[Oe]=Te,Oe++,Oe===58?Oe=65:Oe===91&&(Oe=97);Ee[43]=Te;Ee[45]=Te;Ee[46]=Te;Ee[95]=Te;Ee[72]=[Te,Ci];Ee[104]=[Te,Ci];Ee[87]=[Te,Si];Ee[119]=[Te,Si];function Wc(e,n,t){const r=this;let i,o;return l;function l(c){return!an(c)||!Ii.call(r,r.previous)||En(r.events)?t(c):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(c))}function a(c){return an(c)?(e.consume(c),a):c===64?(e.consume(c),s):t(c)}function s(c){return c===46?e.check(Vc,f,u)(c):c===45||c===95||re(c)?(o=!0,e.consume(c),s):f(c)}function u(c){return e.consume(c),i=!0,s}function f(c){return o&&i&&ae(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(c)):t(c)}}function Qc(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!vi.call(r,r.previous)||En(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Uc,e.attempt(ki,e.attempt(bi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function Yc(e,n,t){const r=this;let i="",o=!1;return l;function l(c){return(c===72||c===104)&&Ei.call(r,r.previous)&&!En(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),e.consume(c),a):t(c)}function a(c){if(ae(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(c),s}return t(c)}function s(c){return c===47?(e.consume(c),o?u:(o=!0,s)):t(c)}function u(c){return c===null||kt(c)||G(c)||Be(c)||Ct(c)?t(c):e.attempt(ki,e.attempt(bi,f),t)(c)}function f(c){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(c)}}function Xc(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Gc(e,n,t){let r,i,o;return l;function l(u){return u===46||u===95?e.check(wi,s,a)(u):u===null||G(u)||Be(u)||u!==45&&Ct(u)?s(u):(o=!0,e.consume(u),l)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),l}function s(u){return i||r||!o?t(u):n(u)}}function Kc(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(wi,n,o)(l):l===null||G(l)||Be(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function Jc(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||G(a)||Be(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||G(a)||Be(a)?n(a):r(a)}function o(a){return ae(a)?l(a):t(a)}function l(a){return
Line truncated
|
||||
|
||||
`),n.trim()}function Tf({isOpen:e,onClose:n,plugin:t,installStatus:r="not-installed",installedVersion:i,onInstall:o}){const[l,a]=Q.useState(""),[s,u]=Q.useState(!1),[f,c]=Q.useState(!1),p=t?If(t.homepage):null;if(Q.useEffect(()=>{if(!e||!p){a(""),c(!1);return}(async()=>{u(!0),c(!1);try{const _=await Af(p.owner,p.repo);a(Pf(_))}catch(_){console.error("Failed to fetch README:",_),c(!0)}finally{u(!1)}})()},[e,p==null?void 0:p.owner,p==null?void 0:p.repo]),!t)return null;const{name:h,version:x,author:C,description:w,tags:y,homepage:v,downloadUrl:E,minVersion:D}=t,F=Ef(v,E)||`https://avatar.vercel.sh/${encodeURIComponent(h)}`;return g.jsx(zi,{isOpen:e,onClose:n,size:"4xl",scrollBehavior:"inside",classNames:{backdrop:"z-[200]",wrapper:"z-[200]"},children:g.jsx(ji,{className:"rounded-3xl border border-white/70 dark:border-white/10 bg-white/92 dark:bg-zinc-900/92 backdrop-blur-2xl shadow-2xl shadow-primary-900/15",children:b=>g.jsxs(g.Fragment,{children:[g.jsx(Ni,{className:"flex flex-col gap-3 pb-2",children:g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx(br,{src:F,name:C||"?",size:"lg",isBordered:!0,color:"primary",radius:"lg",className:"flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("h2",{className:"text-2xl font-bold text-default-900",children:h}),v&&g.jsx(Xe,{content:"访问项目主页",children:g.jsx(ge,{isIconOnly:!0,size:"sm",variant:"flat",color:"primary",as:"a",href:v,target:"_blank",rel:"noreferrer",children:g.jsx(In,{size:18})})})]}),g.jsxs("p",{className:"text-sm text-default-500 mt-1",children:["by ",g.jsx("span",{className:"font-medium",children:C||"未知作者"})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-2 flex-wrap",children:[g.jsxs(De,{size:"sm",color:"primary",variant:"flat",children:["v",x]}),y==null?void 0:y.map(_=>g.jsx(De,{size:"sm",variant:"flat",className:"bg-default-100 text-default-600",children:_},_)),r==="update-available"&&i&&g.jsx(De,{size:"sm",color:"warning",variant:"shadow",className:"animate-pulse",children:"可更新"}),r==="installed"&&g.jsx(De,{size:"sm",color:"success",variant:"flat",startContent:g.jsx(Yt,{size:14}),children:"已安装"})]})]})]})}),g.jsxs(Li,{className:"gap-4",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-sm font-semibold text-default-700 mb-2",children:"插件描述"}),g.jsx("p",{className:"text-sm text-default-600 leading-relaxed",children:w||"暂无描述"})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-sm font-semibold text-default-700 mb-3",children:"插件信息"}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 text-sm",children:[g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-default-500",children:"最新版本:"}),g.jsxs("span",{className:"font-medium text-default-900",children:["v",x]})]}),i&&g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-default-500",children:"已安装版本:"}),g.jsxs("span",{className:"font-medium text-default-900",children:["v",i]})]}),D&&g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-default-500",children:"最低要求版本:"}),g.jsxs("span",{className:"font-medium text-default-900",children:["v",D]})]}),g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-default-500",children:"插件 ID:"}),g.jsx("span",{className:"font-mono text-xs text-default-900",children:t.id})]}),E&&g.jsxs("div",{className:"flex justify-between items-center",children:[g.jsx("span",{className:"text-default-500",children:"下载地址:"}),g.jsx(ge,{size:"sm",variant:"flat",color:"primary",as:"a",href:E,target:"_blank",rel:"noreferrer",startContent:g.jsx(An,{size:14}),children:"下载插件"})]})]})]}),p&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:"mt-2",children:[g.jsx("h3",{className:"text-sm font-semibold text-default-700 mb-3",children:"详情"}),s&&g.jsx("div",{className:"flex justify-center items-center py-12",children:g.jsx(kr,{size:"lg"})}),f&&g.jsxs("div",{className:"text-center py-8",children:[g.jsx("p",{className:"text-sm text-default-500 mb-3",children:"无法加载 README"}),g.jsx(ge,{color:"primary",variant:"flat",as:"a",href:v,target:"_blank",rel:"noreferrer",startContent:g.jsx(In,{}),children:"在 GitHub 查看"})]}),!s&&!f&&l&&g.jsx("div",{className:"rounded-lg border border-default-200 p-4 bg-default-50",children:g.jsx(vf,{content:l})})]})})]}),g.jsxs(Di,{children:[g.jsx(ge,{variant:"light",onPress:b,children:"关闭"}),r==="installed"?g.jsx(ge,{color:"success",variant:"flat",startContent:g.jsx(Yt,{size:18}),isDisabled:!0,children:"已安装"}):r==="update-available"?g.jsxs(ge,{color:"warning",variant:"shadow",startContent:g.jsx(wr,{size:18}),onPress:()=>{o==null||o(),b()},children:["更新到 v",x]}):g.jsx(ge,{color:"primary",variant:"shadow",startContent:g.jsx(An,{size
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{j as a}from"./react-vendor-jWT2yUdV.js";import{e as i,L as o,f as c,g as h,h as m,i as f,j as w,k as u,l as x,m as b,n as g,o as L}from"./index-BBhZPeTB.js";import{L as j}from"./index-DiaaLdUu.js";import{Q as p}from"./qq_manager-BfRTEAby.js";const v={navItems:[{label:"基础信息",icon:a.jsx(i,{className:"w-5 h-5"}),href:"/"},{label:"网络配置",icon:a.jsx(o,{className:"w-5 h-5"}),href:"/network"},{label:"雪猫日志",icon:a.jsx(c,{className:"w-5 h-5"}),href:"/logs"},{label:"接口调试",icon:a.jsx(h,{className:"w-5 h-5"}),href:"/debug/http"},{label:"实时调试",icon:a.jsx(m,{className:"w-5 h-5"}),href:"/debug/ws"},{label:"文件管理",icon:a.jsx(f,{className:"w-5 h-5"}),href:"/file_manager"},{label:"插件管理",icon:a.jsx(w,{className:"w-5 h-5"}),href:"/plugins"},{label:"插件商店",icon:a.jsx(u,{className:"w-5 h-5"}),href:"/plugin_store"},{label:"扩展页面",icon:a.jsx(x,{className:"w-5 h-5"}),href:"/extension"},{label:"系统终端",icon:a.jsx(b,{className:"w-5 h-5"}),href:"/terminal"},{label:"系统配置",icon:a.jsx(g,{className:"w-5 h-5"}),href:"/config"},{label:"关于我们",icon:a.jsx(L,{className:"w-5 h-5"}),href:"/about"}]};class Q{static async restartProcess(){return(await j.post("/Process/Restart")).data.data}}async function k(t=15e3,e,s){const n=Date.now();return new Promise(r=>{const l=setInterval(async()=>{try{await p.getQQLoginInfo({timeout:500}),clearInterval(l),e==null||e(),r(!0)}catch{Date.now()-n>t&&(clearInterval(l),s==null||s(),r(!1))}},500)})}export{Q as P,v as s,k as w};
|
||||
@@ -0,0 +1 @@
|
||||
import{g as a,a as o,c as t}from"./gestures-BHfQC-M8.js";import{am as m}from"./index-DiaaLdUu.js";import{l as r,d as s}from"./layout-Buao20KT.js";const e={...o,...a,...s,...r},l=m(e,t);export{l as m};
|
||||
@@ -0,0 +1 @@
|
||||
import{R as c,j as t,r as b}from"./react-vendor-jWT2yUdV.js";import{a as T}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as l,a as W,$ as z}from"./index-DiaaLdUu.js";import{u as _}from"./chunk-EN4B57RQ-Ief8qCCd.js";import{M as B,S as F,G}from"./icons-C0t6aNgu.js";import{l as Q}from"./chunk-OPTZHMJX-CY9g90YL.js";import{t as A}from"./chunk-6LIX6LVT-B246pOuK.js";const Z=o=>{const{children:r,maxXRotation:n=5,maxYRotation:u=5,className:p,style:d,lightClassName:f,lightStyle:s}=o,e=c.useRef(null),a=c.useRef(null),[x,i]=c.useState(!1),[h,S]=c.useState({left:0,top:0});return t.jsxs(T,{...o,ref:e,className:l("relative overflow-hidden bg-opacity-50 backdrop-blur-lg",p),style:{willChange:"transform",transform:"perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",...d},onMouseEnter:()=>{e.current&&(e.current.style.transition="transform 0.3s ease-out")},onMouseLeave:()=>{i(!1),e.current&&(e.current.style.transition="transform 0.5s",e.current.style.transform="perspective(1000px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)")},onMouseMove:R=>{var m,g;if(e.current){i(!0);const{x:I,y:C}=e.current.getBoundingClientRect(),{clientX:M,clientY:X}=R,j=M-I,w=X-C,Y=((m=s==null?void 0:s.width)==null?void 0:m.toString())||"100",E=((g=s==null?void 0:s.height)==null?void 0:g.toString())||"100",L=parseInt(Y),N=parseInt(E),P=j-L/2,$=w-N/2;S({left:P,top:$}),e.current.style.transition="transform 0.1s";const v=400/2,y=400/2,k=(w-y)/y*n,H=-1*((j-v)/v)*u;e.current.style.transform=`perspective(1000px) rotateX(${k}deg) rotateY(${H}deg)`}},children:[t.jsx("div",{ref:a,className:l(x?"opacity-100":"opacity-0","absolute rounded-full blur-[100px] filter transition-opacity duration-300 bg-gradient-to-r from-primary-400 to-secondary-400 w-[150px] h-[150px]",f),style:{...h}}),r]})},tt=({className:o,classNames:r})=>{const[n,u]=b.useState(!1),{theme:p,toggleTheme:d}=W(),f=d,{Component:s,slots:e,isSelected:a,getBaseProps:x,getInputProps:i,getWrapperProps:h}=_({isSelected:p==="light",onChange:f});return b.useEffect(()=>{u(!0)},[n]),n?t.jsxs(s,{"aria-label":a?"Switch to dark mode":"Switch to light mode",...x({className:l("px-px transition-opacity hover:opacity-80 cursor-pointer",o,r==null?void 0:r.base)}),children:[t.jsx(z,{children:t.jsx("input",{...i()})}),t.jsx("div",{...h(),className:e.wrapper({class:l(["w-auto h-auto","bg-transparent","rounded-lg","flex items-center justify-center","group-data-[selected=true]:bg-transparent","!text-default-500","pt-px","px-0","mx-0"],r==null?void 0:r.wrapper)}),children:a?t.jsx(B,{size:22}):t.jsx(F,{size:22})})]}):t.jsx("div",{className:"w-6 h-6"})};function et({children:o}){return t.jsxs("div",{className:"relative flex flex-col h-screen",children:[t.jsx("div",{className:"absolute right-0 top-0 p-3 z-10",children:t.jsx(A,{content:"查看 WebUI 源码",placement:"left",showArrow:!0,children:t.jsx(Q,{isExternal:!0,href:"https://github.com/DandanLLab/SnowCatQQ",children:t.jsx(G,{className:"text-default-400 hover:text-primary w-7 h-7 transition-all hover:-translate-y-0.5"})})})}),t.jsx("main",{className:"flex-grow w-full flex flex-col justify-center items-center px-3",children:o}),t.jsx("div",{className:"absolute bottom-0 inset-x-0 pb-4 text-center pointer-events-none",children:t.jsx("span",{className:"text-[10px] tracking-[0.3em] uppercase text-default-300 dark:text-default-600",children:"SnowCat · 雪猫控制台"})})]})}export{Z as H,et as P,tt as T};
|
||||
@@ -0,0 +1 @@
|
||||
var p=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function u(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function E(i){if(Object.prototype.hasOwnProperty.call(i,"__esModule"))return i;var e=i.default;if(typeof e=="function"){var n=function I(){return this instanceof I?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(i).forEach(function(I){var d=Object.getOwnPropertyDescriptor(i,I);Object.defineProperty(n,I,d.get?d:{enumerable:!0,get:function(){return i[I]}})}),n}const S=JSON.parse('[{"QSid":"0","QDes":"/惊讶","IQLid":"33","AQLid":"33","EMCode":"114","Input":["jingya","jy"]},{"QSid":"1","QDes":"/撇嘴","IQLid":"40","AQLid":"40","EMCode":"101","Input":["piezui","pz"]},{"QSid":"2","QDes":"/色","IQLid":"19","AQLid":"19","EMCode":"102","Input":["se"]},{"QSid":"3","QDes":"/发呆","IQLid":"43","AQLid":"43","EMCode":"103","Input":["fadai","fd"]},{"QSid":"4","QDes":"/得意","IQLid":"21","AQLid":"21","EMCode":"104","Input":["deyi","dy"]},{"QSid":"5","QDes":"/流泪","IQLid":"9","AQLid":"9","EMCode":"105","Input":["liulei","ll"]},{"QSid":"6","QDes":"/害羞","IQLid":"20","AQLid":"20","EMCode":"106","Input":["haixiu","hx"]},{"QSid":"7","QDes":"/闭嘴","IQLid":"104","AQLid":"106","EMCode":"107","Input":["bizui","bz"]},{"QSid":"8","QDes":"/睡","IQLid":"35","AQLid":"35","EMCode":"108","Input":["shui"]},{"QSid":"9","QDes":"/大哭","IQLid":"10","AQLid":"10","EMCode":"109","Input":["daku","dk"]},{"QSid":"10","QDes":"/尴尬","IQLid":"25","AQLid":"25","EMCode":"110","Input":["ganga","gg"]},{"QSid":"11","QDes":"/发怒","IQLid":"24","AQLid":"24","EMCode":"111","Input":["fanu","fn"]},{"QSid":"12","QDes":"/调皮","IQLid":"1","AQLid":"1","EMCode":"112","Input":["tiaopi","tp"]},{"QSid":"13","QDes":"/呲牙","IQLid":"0","AQLid":"0","EMCode":"113","Input":["ziya","zy"]},{"QSid":"14","QDes":"/微笑","IQLid":"23","AQLid":"23","EMCode":"100","Input":["weixiao","wx"]},{"QSid":"15","QDes":"/难过","IQLid":"32","AQLid":"32","EMCode":"115","isStatic":"1","Input":["nanguo","ng"]},{"QSid":"16","QDes":"/酷","IQLid":"12","AQLid":"12","EMCode":"116","Input":["ku"]},{"QSid":"18","QDes":"/抓狂","IQLid":"13","AQLid":"13","EMCode":"118","Input":["zhuakuang","zk"]},{"QSid":"19","QDes":"/吐","IQLid":"22","AQLid":"22","EMCode":"119","Input":["tu"]},{"QSid":"20","QDes":"/偷笑","IQLid":"3","AQLid":"3","EMCode":"120","Input":["touxiao","tx"]},{"QSid":"21","QDes":"/可爱","IQLid":"18","AQLid":"18","EMCode":"121","Input":["keai","ka"]},{"QSid":"22","QDes":"/白眼","IQLid":"30","AQLid":"30","EMCode":"122","Input":["baiyan","by"]},{"QSid":"23","QDes":"/傲慢","IQLid":"31","AQLid":"31","EMCode":"123","Input":["aoman","am"]},{"QSid":"24","QDes":"/饥饿","IQLid":"79","AQLid":"81","EMCode":"124","Input":["jie","je"]},{"QSid":"25","QDes":"/困","IQLid":"80","AQLid":"82","EMCode":"125","Input":["kun"]},{"QSid":"26","QDes":"/惊恐","IQLid":"26","AQLid":"26","EMCode":"126","Input":["jingkong","jk"]},{"QSid":"27","QDes":"/流汗","IQLid":"2","AQLid":"2","EMCode":"127","Input":["liuhan","lh"]},{"QSid":"28","QDes":"/憨笑","IQLid":"37","AQLid":"37","EMCode":"128","Input":["hanxiao","hx"]},{"QSid":"29","QDes":"/悠闲","IQLid":"50","AQLid":"50","EMCode":"129","Input":["youxian","yx"]},{"QSid":"30","QDes":"/奋斗","IQLid":"42","AQLid":"42","EMCode":"130","Input":["fendou","fd"]},{"QSid":"31","QDes":"/咒骂","IQLid":"81","AQLid":"83","EMCode":"131","Input":["zhouma","zm"]},{"QSid":"32","QDes":"/疑问","IQLid":"34","AQLid":"34","EMCode":"132","Input":["yiwen","yw"]},{"QSid":"33","QDes":"/嘘","IQLid":"11","AQLid":"11","EMCode":"133","Input":["xu"]},{"QSid":"34","QDes":"/晕","IQLid":"49","AQLid":"49","EMCode":"134","Input":["yun"]},{"QSid":"35","QDes":"/折磨","IQLid":"82","AQLid":"84","EMCode":"135","Input":["zhemo","zm"]},{"QSid":"36","QDes":"/衰","isStatic":"1","IQLid":"39","AQLid":"39","EMCode":"136","Input":["shuai"]},{"QSid":"37","QDes":"/骷髅","isStatic":"1","IQLid":"76","AQLid":"78","EMCode":"137","Input":["kulou","kl"]},{"QSid":"38","QDes":"/敲打","IQLid":"5","AQLid":"5","EMCode":"138","Input":["qiaoda","qd"]},{"QSid":"39","QDes":"/再见","IQLid":"4","AQLid":"4","EMCode":"139","Input":["zaijian","zj"]},{"QSid":"41","QDes":"/发抖","isStatic":"1","IQLid":"69","AQLid":"71","EMCode":"193","Input":["fadou","fd"]},{"QSid":"42","QDes":"/爱情","IQLid":"38","AQLid":"38","EMCode":"190","Input":["aiqing","aq"]},{"QSid":"43","QDes":"/跳跳","IQLid":"93","AQLid":"95","EMCode":"192","Input":["tiaotiao","tt"]},{"QSid":"46","QDes":"/猪头","isStatic":"1","IQLid":"7","AQLid":"7","EMCode":"162","Input":["zhutou","zt"]},{"QSid":"49","QDes":"/拥抱","IQLid":"45","AQLid":"45","EMCode":"178","Input":["yongbao","yb"]},{"QSid":"53","QDes":"/蛋糕","IQLid":"59","AQLid":"59","EMCode":"168","Input":["dangao","dg"]},{"QLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r,j as e}from"./react-vendor-jWT2yUdV.js";import{s as P,b,M as me,C as M}from"./index-DiaaLdUu.js";import{c as fe}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as ge}from"./chunk-D5XJWRAV-DVN21qSw.js";import{i as V}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{t as xe,a as D}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{n as p}from"./react-hot-toast-cGcFZPSt.js";import{g as pe}from"./index-DE7yoXMZ.js";import{l as he}from"./logo-kBMoCJob.js";import{Q as Z,G as je}from"./index-D6HfLP9Q.js";import{P as we,H as ye,T as ve}from"./pure-XNiwTrk_.js";import{a as T}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{d as be,a as Ne,b as Qe,m as Ce}from"./chunk-KQ5CH2X7-DgF-_fDD.js";import{i as K}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{b as ke,c as _e,d as X}from"./index-FvTxWQTZ.js";import{Q as C}from"./qq_manager-BfRTEAby.js";import{s as Se,l as Re}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{a as qe}from"./index-DvErMbt6.js";import{u as Le}from"./use-dialog-CRIMuzeE.js";import{u as Ue}from"./react-router-dom-C6k78GT4.js";import{m as ze}from"./proxy-BsRmjYPH.js";import"./qface-BZLvZXJ8.js";import"./index-BsnVex0g.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./iconBase-B7bT1FlI.js";import"./chunk-IHO36JMK-DJPUeGG0.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./chunk-NAV3ZXLI-ChbUTMf0.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./useToggle-B3ZYBe5S.js";import"./useFocusable-DA5Croun.js";import"./icons-C0t6aNgu.js";import"./chunk-OPTZHMJX-CY9g90YL.js";import"./chunk-6LIX6LVT-B246pOuK.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./chunk-2QQAR2RD-YG5LNmAk.js";import"./chunk-FGM523TA-CgSvUh2a.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./DOMLayoutDelegate-DOgfSALU.js";const L=a=>!!a&&"nickName"in a&&"faceUrl"in a;function Pe(a){const l={};try{new URL(a).searchParams.forEach((o,m)=>{l[m]=o})}catch{const n=a.match(/[?&]([^#]+)/);n&&n[1].split("&").forEach(o=>{const[m,i]=o.split("=");m&&(l[m]=decodeURIComponent(i||""))})}return l}function Y(a){return new Promise((l,n)=>{if(window.TencentCaptcha){l();return}const o=document.createElement("script");o.src=a,o.onload=()=>l(),o.onerror=()=>n(new Error(`Failed to load ${a}`)),document.head.appendChild(o)})}const Ee=({proofWaterUrl:a,onSuccess:l,onCancel:n})=>{const o=r.useRef(null),m=r.useRef(!0),i=r.useCallback((d,t)=>{m.current&&(d.ret===0&&d.ticket&&d.randstr?l({ticket:d.ticket,randstr:d.randstr,appid:d.appid||"",sid:t}):n==null||n())},[l,n]);return r.useEffect(()=>{m.current=!0;const d=Pe(a),t=d.aid||"2081081773",g=d.sid||"";return(async()=>{try{await Y("https://captcha.gtimg.com/TCaptcha.js")}catch{try{await Y("https://ssl.captcha.qq.com/TCaptcha.js")}catch{m.current&&i({ret:0,ticket:`terror_1001_${t}_${Math.floor(Date.now()/1e3)}`,randstr:"@"+Math.random().toString(36).substring(2),errorCode:1001,errorMessage:"jsload_error"},g);return}}if(m.current)try{const f=new window.TencentCaptcha(t,h=>i(h,g),{type:"popup",showHeader:!1,login_appid:d.login_appid,uin:d.uin,sid:d.sid,enableAged:!0});o.current=f,f.show()}catch{m.current&&i({ret:0,ticket:`terror_1001_${t}_${Math.floor(Date.now()/1e3)}`,randstr:"@"+Math.random().toString(36).substring(2),errorCode:1001,errorMessage:"init_error"},g)}})(),()=>{var f;m.current=!1,(f=o.current)==null||f.destroy(),o.current=null}},[a,i]),e.jsxs("div",{className:"flex items-center justify-center py-8 gap-3",children:[e.jsx(P,{size:"lg"}),e.jsx("span",{className:"text-default-500",children:"正在加载验证码..."})]})},Ie=({jumpUrl:a,uin:l,onVerified:n,onCancel:o})=>{const[m,i]=r.useState(""),[d,t]=r.useState("loading"),[g,y]=r.useState(""),f=r.useRef(null),h=r.useRef(!0),w=r.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),k=r.useCallback(v=>{w(),f.current=setInterval(async()=>{if(h.current)try{const _=await C.pollNewDeviceQR(l,v);if(!h.current)return;const U=_==null?void 0:_.uint32_guarantee_status;if(U===3)t("scanned");else if(U===1){w(),t("confirmed");const E=(_==null?void 0:_.str_nt_succ_token)||"";n(E)}}catch{}},2500)},[l,n,w]),N=r.useCallback(async()=>{t("loading"),y("");try{const v=await C.getNewDeviceQRCode(l,a);if(!h.current)return;v!=null&&v.str_url?(i(v.str_url),t("waiting"),k(v.bytes_token||"")):(t("error"),y("获取二维码失败,请重试"))}catch(v){if(!h.current)return;t("error"),y(v.message||"获取二维码失败")}},[l,a,k]);r.useEffect(()=>(h.current=!0,N(),()=>{h.current=!1,w()}),[N,w]);const j={loading:"正在获取二维码...",waiting:"请使用手机QQ扫描二维码完成验证",scanned:"已扫描,请在手机上确认",confirmed:"验证成功,正在登录...",error:g||"获取二维码失败"},R={loading:"text-default-500",waiting:"text-warning",scanned:"tLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{L as a}from"./index-DiaaLdUu.js";class Q{static async getOB11Config(){return(await a.post("/OB11Config/GetConfig")).data.data}static async setOB11Config(t){await a.post("/OB11Config/SetConfig",{config:JSON.stringify(t)})}static async checkQQLoginStatus(){return(await a.post("/QQLogin/CheckLoginStatus")).data.data}static async checkQQLoginStatusWithQrcode(){return(await a.post("/QQLogin/CheckLoginStatus")).data.data}static async refreshQRCode(){return(await a.post("/QQLogin/RefreshQRcode")).data.data}static async getQQLoginQrcode(){return(await a.post("/QQLogin/GetQQLoginQrcode")).data.data.qrcode}static async getQQQuickLoginList(){return(await a.post("/QQLogin/GetQuickLoginList")).data.data}static async getQQQuickLoginListNew(){return(await a.post("/QQLogin/GetQuickLoginListNew")).data.data}static async setQuickLogin(t){await a.post("/QQLogin/SetQuickLogin",{uin:t})}static async getQQLoginInfo(t){return(await a.post("/QQLogin/GetQQLoginInfo",{},t)).data.data}static async getQuickLoginQQ(){const{data:t}=await a.post("/QQLogin/GetQuickLoginQQ");return t.data}static async setQuickLoginQQ(t){await a.post("/QQLogin/SetQuickLoginQQ",{uin:t})}static async passwordLogin(t,i){return(await a.post("/QQLogin/PasswordLogin",{uin:t,passwordMd5:i})).data.data}static async captchaLogin(t,i,s,n,o){return(await a.post("/QQLogin/CaptchaLogin",{uin:t,passwordMd5:i,ticket:s,randstr:n,sid:o})).data.data}static async newDeviceLogin(t,i,s){return(await a.post("/QQLogin/NewDeviceLogin",{uin:t,passwordMd5:i,newDevicePullQrCodeSig:s})).data.data}static async getNewDeviceQRCode(t,i){const n=(await a.post("/QQLogin/GetNewDeviceQRCode",{uin:t,jumpUrl:i})).data.data;if(n!=null&&n.str_url){let o=n.bytes_token||"";if(!o&&n.str_url)try{const e=new URL(n.str_url).searchParams.get("str_url")||"";o=e?btoa(e):""}catch{o=""}return{str_url:n.str_url,bytes_token:o,uint32_guarantee_status:n.uint32_guarantee_status,ActionStatus:n.ActionStatus,ErrorCode:n.ErrorCode,ErrorInfo:n.ErrorInfo}}return n}static async pollNewDeviceQR(t,i){return(await a.post("/QQLogin/PollNewDeviceQR",{uin:t,bytesToken:i})).data.data}static async resetDeviceID(){await a.post("/QQLogin/ResetDeviceID")}static async restartSnowCat(){await a.post("/QQLogin/RestartSnowCat")}static async getDeviceGUID(){return(await a.post("/QQLogin/GetDeviceGUID")).data.data}static async setDeviceGUID(t){await a.post("/QQLogin/SetDeviceGUID",{guid:t})}static async getGUIDBackups(){return(await a.post("/QQLogin/GetGUIDBackups")).data.data}static async restoreGUIDBackup(t){await a.post("/QQLogin/RestoreGUIDBackup",{backupName:t})}static async createGUIDBackup(){return(await a.post("/QQLogin/CreateGUIDBackup")).data.data}static async getPlatformInfo(){return(await a.post("/QQLogin/GetPlatformInfo")).data.data}static async getLinuxMAC(){return(await a.post("/QQLogin/GetLinuxMAC")).data.data}static async setLinuxMAC(t){await a.post("/QQLogin/SetLinuxMAC",{mac:t})}static async getLinuxMachineId(){return(await a.post("/QQLogin/GetLinuxMachineId")).data.data}static async computeLinuxGUID(t,i){return(await a.post("/QQLogin/ComputeLinuxGUID",{mac:t,machineId:i})).data.data}static async getLinuxMachineInfoBackups(){return(await a.post("/QQLogin/GetLinuxMachineInfoBackups")).data.data}static async createLinuxMachineInfoBackup(){return(await a.post("/QQLogin/CreateLinuxMachineInfoBackup")).data.data}static async restoreLinuxMachineInfoBackup(t){await a.post("/QQLogin/RestoreLinuxMachineInfoBackup",{backupName:t})}static async resetLinuxDeviceID(){await a.post("/QQLogin/ResetLinuxDeviceID")}static async getSnowCatConfig(){const{data:t}=await a.get("/SnowCatConfig/GetConfig");return t.data}static async setSnowCatConfig(t){await a.post("/SnowCatConfig/SetConfig",t)}static async getSnowCatUinConfig(){const{data:t}=await a.get("/SnowCatConfig/GetUinConfig");return t.data}static async setSnowCatUinConfig(t){await a.post("/SnowCatConfig/SetUinConfig",t)}}export{Q};
|
||||
@@ -0,0 +1 @@
|
||||
import{R as _}from"./react-vendor-jWT2yUdV.js";var ge=e=>e.type==="checkbox",ue=e=>e instanceof Date,q=e=>e==null;const it=e=>typeof e=="object";var U=e=>!q(e)&&!Array.isArray(e)&&it(e)&&!ue(e),at=e=>U(e)&&e.target?ge(e.target)?e.target.checked:e.target.value:e,Dt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ut=(e,s)=>e.has(Dt(s)),kt=e=>{const s=e.constructor&&e.constructor.prototype;return U(s)&&s.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function N(e){let s;const t=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)s=new Date(e);else if(!(Re&&(e instanceof Blob||i))&&(t||U(e)))if(s=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!kt(e))s=e;else for(const l in e)e.hasOwnProperty(l)&&(s[l]=N(e[l]));else return e;return s}var me=e=>/^\w*$/.test(e),T=e=>e===void 0,Oe=e=>Array.isArray(e)?e.filter(Boolean):[],Te=e=>Oe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,s,t)=>{if(!s||!U(e))return t;const i=(me(s)?[s]:Te(s)).reduce((l,u)=>q(l)?l:l[u],e);return T(i)||i===e?T(e[s])?t:e[s]:i},$=e=>typeof e=="boolean",S=(e,s,t)=>{let i=-1;const l=me(s)?[s]:Te(s),u=l.length,d=u-1;for(;++i<u;){const c=l[i];let R=t;if(i!==d){const O=e[c];R=U(O)||Array.isArray(O)?O:isNaN(+l[i+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=R,e=e[c]}};const _e={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Y={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},nt=_.createContext(null);nt.displayName="HookFormContext";const Le=()=>_.useContext(nt);var lt=(e,s,t,i=!0)=>{const l={defaultValues:s._defaultValues};for(const u in e)Object.defineProperty(l,u,{get:()=>{const d=u;return s._proxyFormState[d]!==Y.all&&(s._proxyFormState[d]=!i||Y.all),t&&(t[d]=!0),e[d]}});return l};const Me=typeof window<"u"?_.useLayoutEffect:_.useEffect;function Et(e){const s=Le(),{control:t=s.control,disabled:i,name:l,exact:u}=e||{},[d,c]=_.useState(t._formState),R=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Me(()=>t._subscribe({name:l,formState:R.current,exact:u,callback:O=>{!i&&c({...t._formState,...O})}}),[l,i,u]),_.useEffect(()=>{R.current.isValid&&t._setValid(!0)},[t]),_.useMemo(()=>lt(d,t,R.current,!1),[d,t])}var K=e=>typeof e=="string",Ee=(e,s,t,i,l)=>K(e)?(i&&s.watch.add(e),y(t,e,l)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),y(t,u))):(i&&(s.watchAll=!0),t),Se=e=>q(e)||!it(e);function J(e,s,t=new WeakSet){if(Se(e)||Se(s))return e===s;if(ue(e)&&ue(s))return e.getTime()===s.getTime();const i=Object.keys(e),l=Object.keys(s);if(i.length!==l.length)return!1;if(t.has(e)||t.has(s))return!0;t.add(e),t.add(s);for(const u of i){const d=e[u];if(!l.includes(u))return!1;if(u!=="ref"){const c=s[u];if(ue(d)&&ue(c)||U(d)&&U(c)||Array.isArray(d)&&Array.isArray(c)?!J(d,c,t):d!==c)return!1}}return!0}function St(e){const s=Le(),{control:t=s.control,name:i,defaultValue:l,disabled:u,exact:d,compute:c}=e||{},R=_.useRef(l),O=_.useRef(c),b=_.useRef(void 0),A=_.useRef(t),v=_.useRef(i);O.current=c;const[X,p]=_.useState(()=>{const w=t._getWatch(i,R.current);return O.current?O.current(w):w}),C=_.useCallback(w=>{const F=Ee(i,t._names,w||t._formValues,!1,R.current);return O.current?O.current(F):F},[t._formValues,t._names,i]),B=_.useCallback(w=>{if(!u){const F=Ee(i,t._names,w||t._formValues,!1,R.current);if(O.current){const H=O.current(F);J(H,b.current)||(p(H),b.current=H)}else p(F)}},[t._formValues,t._names,u,i]);Me(()=>((A.current!==t||!J(v.current,i))&&(A.current=t,v.current=i,B()),t._subscribe({name:i,formState:{values:!0},exact:d,callback:w=>{B(w.values)}})),[t,d,i,B]),_.useEffect(()=>t._removeUnmounted());const Z=A.current!==t,V=v.current,k=_.useMemo(()=>{if(u)return null;const w=!Z&&!J(V,i);return Z||w?C():null},[u,Z,i,V,C]);return k!==null?k:X}function Ct(e){const s=Le(),{name:t,disabled:i,control:l=s.control,shouldUnregister:u,defaultValue:d}=e,c=ut(l._names.array,t),R=_.useMemo(()=>y(l._formValues,t,y(l._defaultValues,t,d)),[l,t,d]),O=St({control:l,name:t,defaultValue:R,exact:!0}),b=Et({control:l,name:t,exact:!0}),A=_.useRef(e),v=_.useRef(void 0),X=_.useRef(l.register(t,{...e.rules,value:O,...$(e.disabled)?{disabled:e.disabled}:{}}));A.current=e;const p=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(b.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(b.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(b.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(b.validatingFields,t)},error:{enumerable:!0,get:()=>y(b.errors,t)}}),[b,t]),C=_.useCallback(k=>X.current.onChange({target:{value:at(k),name:t},type:_e.CHANGE}),[t]),B=_.useCallback(()=>X.current.onBlur({target:{value:y(l._formValues,t),name:t},type:_e.BLUR}),[t,l._formValues]),Z=_.useCallback(k=>{const w=y(l._fields,t);wLine truncated
|
||||
@@ -0,0 +1,177 @@
|
||||
import{r as d}from"./react-vendor-jWT2yUdV.js";let Z={data:""},q=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Z},K=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Q=/\/\*[^]*?\*\/| +/g,_=/\n+/g,x=(e,t)=>{let a="",s="",o="";for(let i in e){let r=e[i];i[0]=="@"?i[1]=="i"?a=i+" "+r+";":s+=i[1]=="f"?x(r,i):i+"{"+x(r,i[1]=="k"?"":t)+"}":typeof r=="object"?s+=x(r,t?t.replace(/([^,])+/g,n=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,n):n?n+" "+l:l)):i):r!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=x.p?x.p(i,r):i+":"+r+";")}return a+(t&&o?t+"{"+o+"}":o)+s},b={},L=e=>{if(typeof e=="object"){let t="";for(let a in e)t+=a+L(e[a]);return t}return e},V=(e,t,a,s,o)=>{let i=L(e),r=b[i]||(b[i]=(l=>{let u=0,p=11;for(;u<l.length;)p=101*p+l.charCodeAt(u++)>>>0;return"go"+p})(i));if(!b[r]){let l=i!==e?e:(u=>{let p,c,m=[{}];for(;p=K.exec(u.replace(Q,""));)p[4]?m.shift():p[3]?(c=p[3].replace(_," ").trim(),m.unshift(m[0][c]=m[0][c]||{})):m[0][p[1]]=p[2].replace(_," ").trim();return m[0]})(e);b[r]=x(o?{["@keyframes "+r]:l}:l,a?"":"."+r)}let n=a&&b.g?b.g:null;return a&&(b.g=b[r]),((l,u,p,c)=>{c?u.data=u.data.replace(c,l):u.data.indexOf(l)===-1&&(u.data=p?l+u.data:u.data+l)})(b[r],t,s,n),r},W=(e,t,a)=>e.reduce((s,o,i)=>{let r=t[i];if(r&&r.call){let n=r(a),l=n&&n.props&&n.props.className||/^go/.test(n)&&n;r=l?"."+l:n&&typeof n=="object"?n.props?"":x(n,""):n===!1?"":n}return s+o+(r??"")},"");function O(e){let t=this||{},a=e.call?e(t.p):e;return V(a.unshift?a.raw?W(a,[].slice.call(arguments,1),t.p):a.reduce((s,o)=>Object.assign(s,o&&o.call?o(t.p):o),{}):a,q(t.target),t.g,t.o,t.k)}let M,A,I;O.bind({g:1});let v=O.bind({k:1});function G(e,t,a,s){x.p=t,M=e,A=a,I=s}function w(e,t){let a=this||{};return function(){let s=arguments;function o(i,r){let n=Object.assign({},i),l=n.className||o.className;a.p=Object.assign({theme:A&&A()},n),a.o=/ *go\d+/.test(l),n.className=O.apply(a,s)+(l?" "+l:"");let u=e;return e[0]&&(u=n.as||e,delete n.as),I&&u[0]&&I(n),M(u,n)}return o}}var J=e=>typeof e=="function",D=(e,t)=>J(e)?e(t):e,X=(()=>{let e=0;return()=>(++e).toString()})(),S=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),ee=20,P="default",H=(e,t)=>{let{toastLimit:a}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,a)};case 1:return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:s}=t;return H(e,{type:e.toasts.find(r=>r.id===s.id)?1:0,toast:s});case 3:let{toastId:o}=t;return{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,dismissed:!0,visible:!1}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+i}))}}},C=[],R={toasts:[],pausedAt:void 0,settings:{toastLimit:ee}},h={},B=(e,t=P)=>{h[t]=H(h[t]||R,e),C.forEach(([a,s])=>{a===t&&s(h[t])})},U=e=>Object.keys(h).forEach(t=>B(e,t)),te=e=>Object.keys(h).find(t=>h[t].toasts.some(a=>a.id===e)),j=(e=P)=>t=>{B(t,e)},ae={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},re=(e={},t=P)=>{let[a,s]=d.useState(h[t]||R),o=d.useRef(h[t]);d.useEffect(()=>(o.current!==h[t]&&s(h[t]),C.push([t,s]),()=>{let r=C.findIndex(([n])=>n===t);r>-1&&C.splice(r,1)}),[t]);let i=a.toasts.map(r=>{var n,l,u;return{...e,...e[r.type],...r,removeDelay:r.removeDelay||((n=e[r.type])==null?void 0:n.removeDelay)||(e==null?void 0:e.removeDelay),duration:r.duration||((l=e[r.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||ae[r.type],style:{...e.style,...(u=e[r.type])==null?void 0:u.style,...r.style}}});return{...a,toasts:i}},se=(e,t="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...a,id:(a==null?void 0:a.id)||X()}),E=e=>(t,a)=>{let s=se(t,e,a);return j(s.toasterId||te(s.id))({type:2,toast:s}),s.id},f=(e,t)=>E("blank")(e,t);f.error=E("error");f.success=E("success");f.loading=E("loading");f.custom=E("custom");f.dismiss=(e,t)=>{let a={type:3,toastId:e};t?j(t)(a):U(a)};f.dismissAll=e=>f.dismiss(void 0,e);f.remove=(e,t)=>{let a={type:4,toastId:e};t?j(t)(a):U(a)};f.removeAll=e=>f.remove(void 0,e);f.promise=(e,t,a)=>{let s=f.loading(t.loading,{...a,...a==null?void 0:a.loading});return typeof e=="function"&&(e=e()),e.then(o=>{let i=t.success?D(t.success,o):void 0;return i?f.success(i,{id:s,...a,...a==null?void 0:a.success}):f.dismiss(s),o}).catch(o=>{let i=t.error?D(t.error,o):void 0;i?f.error(i,{id:s,...a,...a==null?void 0:a.error}):f.dismiss(s)}),e};var ie=1e3,oe=(e,t="default")=>{letLine truncated
|
||||
from {
|
||||
transform: scale(0) rotate(45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(45deg);
|
||||
opacity: 1;
|
||||
}`,le=v`
|
||||
from {
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}`,de=v`
|
||||
from {
|
||||
transform: scale(0) rotate(90deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(90deg);
|
||||
opacity: 1;
|
||||
}`,ce=w("div")`
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background: ${e=>e.primary||"#ff4b4b"};
|
||||
position: relative;
|
||||
transform: rotate(45deg);
|
||||
|
||||
animation: ${ne} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
animation-delay: 100ms;
|
||||
|
||||
&:after,
|
||||
&:before {
|
||||
content: '';
|
||||
animation: ${le} 0.15s ease-out forwards;
|
||||
animation-delay: 150ms;
|
||||
position: absolute;
|
||||
border-radius: 3px;
|
||||
opacity: 0;
|
||||
background: ${e=>e.secondary||"#fff"};
|
||||
bottom: 9px;
|
||||
left: 4px;
|
||||
height: 2px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
animation: ${de} 0.15s ease-out forwards;
|
||||
animation-delay: 180ms;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
`,ue=v`
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
`,pe=w("div")`
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid;
|
||||
border-radius: 100%;
|
||||
border-color: ${e=>e.secondary||"#e0e0e0"};
|
||||
border-right-color: ${e=>e.primary||"#616161"};
|
||||
animation: ${ue} 1s linear infinite;
|
||||
`,me=v`
|
||||
from {
|
||||
transform: scale(0) rotate(45deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: scale(1) rotate(45deg);
|
||||
opacity: 1;
|
||||
}`,fe=v`
|
||||
0% {
|
||||
height: 0;
|
||||
width: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
40% {
|
||||
height: 0;
|
||||
width: 6px;
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
height: 10px;
|
||||
}`,ge=w("div")`
|
||||
width: 20px;
|
||||
opacity: 0;
|
||||
height: 20px;
|
||||
border-radius: 10px;
|
||||
background: ${e=>e.primary||"#61d345"};
|
||||
position: relative;
|
||||
transform: rotate(45deg);
|
||||
|
||||
animation: ${me} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
animation-delay: 100ms;
|
||||
&:after {
|
||||
content: '';
|
||||
box-sizing: border-box;
|
||||
animation: ${fe} 0.2s ease-out forwards;
|
||||
opacity: 0;
|
||||
animation-delay: 200ms;
|
||||
position: absolute;
|
||||
border-right: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-color: ${e=>e.secondary||"#fff"};
|
||||
bottom: 6px;
|
||||
left: 6px;
|
||||
height: 10px;
|
||||
width: 6px;
|
||||
}
|
||||
`,ye=w("div")`
|
||||
position: absolute;
|
||||
`,he=w("div")`
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
`,be=v`
|
||||
from {
|
||||
transform: scale(0.6);
|
||||
opacity: 0.4;
|
||||
}
|
||||
to {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}`,ve=w("div")`
|
||||
position: relative;
|
||||
transform: scale(0.6);
|
||||
opacity: 0.4;
|
||||
min-width: 20px;
|
||||
animation: ${be} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
||||
forwards;
|
||||
`,xe=({toast:e})=>{let{icon:t,type:a,iconTheme:s}=e;return t!==void 0?typeof t=="string"?d.createElement(ve,null,t):t:a==="blank"?null:d.createElement(he,null,d.createElement(pe,{...s}),a!=="loading"&&d.createElement(ye,null,a==="error"?d.createElement(ce,{...s}):d.createElement(ge,{...s})))},we=e=>`
|
||||
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
||||
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
||||
`,Ee=e=>`
|
||||
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
||||
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
||||
`,ke="0%{opacity:0;} 100%{opacity:1;}",$e="0%{opacity:1;} 100%{opacity:0;}",Ce=w("div")`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
color: #363636;
|
||||
line-height: 1.3;
|
||||
will-change: transform;
|
||||
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
||||
max-width: 350px;
|
||||
pointer-events: auto;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
`,De=w("div")`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 4px 10px;
|
||||
color: inherit;
|
||||
flex: 1 1 auto;
|
||||
white-space: pre-line;
|
||||
`,Oe=(e,t)=>{let a=e.includes("top")?1:-1,[s,o]=S()?[ke,$e]:[we(a),Ee(a)];return{animation:t?`${v(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${v(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},je=d.memo(({toast:e,position:t,style:a,children:s})=>{let o=e.height?Oe(e.position||t||"top-center",e.visible):{opacity:0},i=d.createElement(xe,{toast:e}),r=d.createElement(De,{...e.ariaProps},D(e.message,e));return d.createElement(Ce,{className:e.className,style:{...o,...a,...e.style}},typeof s=="function"?s({icon:i,message:r}):d.createElement(d.Fragment,null,i,r))});G(d.createElement);var ze=({id:e,className:t,style:a,onHeightUpdate:s,children:o})=>{let i=d.useCallback(r=>{if(r){let n=()=>{let l=r.getBoundingClientRect().height;s(e,l)};n(),new MutationObserver(n).observe(r,{subtree:!0,childList:!0,characterData:!0})}},[e,s]);return d.createElement("div",{ref:i,className:t,style:a},o)},Ne=(e,t)=>{let a=e.includes("top"),s=a?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:S()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(a?1:-1)}px)`,...s,...o}},Ae=O`
|
||||
z-index: 9999;
|
||||
> * {
|
||||
pointer-events: auto;
|
||||
}
|
||||
`,$=16,Pe=({reverseOrder:e,position:t="top-center",toastOptions:a,gutter:s,children:o,toasterId:i,containerStyle:r,containerClassName:n})=>{let{toasts:l,handlers:u}=oe(a,i);return d.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:$,left:$,right:$,bottom:$,pointerEvents:"none",...r},className:n,onMouseEnter:u.startPause,onMouseLeave:u.endPause},l.map(p=>{let c=p.position||t,m=u.calculateOffset(p,{reverseOrder:e,gutter:s,defaultPosition:t}),g=Ne(c,m);return d.createElement(ze,{id:p.id,key:p.id,onHeightUpdate:u.updateHeight,className:p.visible?Ae:"",style:g},p.type==="custom"?D(p.message,p):o?o(p):d.createElement(je,{toast:p,position:c}))}))},Te=f;export{Pe as F,f as n,Te as z};
|
||||
@@ -0,0 +1,12 @@
|
||||
import{r as i}from"./react-vendor-jWT2yUdV.js";/**
|
||||
* react-router v7.9.5
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/var oe="popstate";function ke(e={}){function t(n,a){let{pathname:o,search:l,hash:s}=n.location;return G("",{pathname:o,search:l,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:B(a)}return Fe(t,r,null,e)}function x(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function P(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function $e(){return Math.random().toString(36).substring(2,10)}function le(e,t){return{usr:e.state,key:e.key,idx:t}}function G(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?N(t):t,state:r,key:t&&t.key||n||$e()}}function B({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function N(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Fe(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,s="POP",u=null,c=f();c==null&&(c=0,l.replaceState({...l.state,idx:c},""));function f(){return(l.state||{idx:null}).idx}function h(){s="POP";let d=f(),y=d==null?null:d-c;c=d,u&&u({action:s,location:w.location,delta:y})}function m(d,y){s="PUSH";let R=G(w.location,d,y);c=f()+1;let p=le(R,c),E=w.createHref(R);try{l.pushState(p,"",E)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(E)}o&&u&&u({action:s,location:w.location,delta:1})}function g(d,y){s="REPLACE";let R=G(w.location,d,y);c=f();let p=le(R,c),E=w.createHref(R);l.replaceState(p,"",E),o&&u&&u({action:s,location:w.location,delta:0})}function v(d){return Ie(d)}let w={get action(){return s},get location(){return e(a,l)},listen(d){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(oe,h),u=d,()=>{a.removeEventListener(oe,h),u=null}},createHref(d){return t(a,d)},createURL:v,encodeLocation(d){let y=v(d);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:m,replace:g,go(d){return l.go(d)}};return w}function Ie(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),x(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:B(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function ce(e,t,r="/"){return Ne(e,t,r,!1)}function Ne(e,t,r,n){let a=typeof t=="string"?N(t):t,o=$(a.pathname||"/",r);if(o==null)return null;let l=fe(e);Te(l);let s=null;for(let u=0;s==null&&u<l.length;++u){let c=Ve(o);s=_e(l[u],c,n)}return s}function fe(e,t=[],r=[],n="",a=!1){let o=(l,s,u=a,c)=>{let f={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&u)return;x(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let h=k([n,f.relativePath]),m=r.concat(f);l.children&&l.children.length>0&&(x(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),fe(l.children,t,m,h,u)),!(l.path==null&&!l.index)&&t.push({path:h,score:We(h,l.index),routesMeta:m})};return e.forEach((l,s)=>{var u;if(l.path===""||!((u=l.path)!=null&&u.includes("?")))o(l,s);else for(let c of he(l.path))o(l,s,!0,c)}),t}function he(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=he(n.join("/")),s=[];return s.push(...l.map(u=>u===""?o:[o,u].join("/"))),a&&s.push(...l),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Te(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:He(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var De=/^:[\w-]+$/,Me=3,Be=2,Oe=1,Ae=10,Ue=-2,ie=e=>e==="*";function We(e,t){let r=e.split("/"),n=r.length;return r.some(ie)&&(n+=Ue),t&&(n+=Be),r.filter(a=>!ie(a)).reduce((a,o)=>a+(De.test(o)?Me:o===""?Oe:Ae),n)}function He(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function _e(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let s=0;s<n.length;++s){let u=n[s],c=s===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",h=z({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),m=u.route;if(!h&&c&&r&&!n[n.length-1].route.index&&(h=z({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:k([o,h.pathname]),pathnameBase:Ye(k([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=k([o,h.pathnameBase]))}return l}function z(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end
Line truncated
|
||||
|
||||
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let m=F(),g;if(t){let p=typeof t=="string"?N(t):t;x(f==="/"||((R=p.pathname)==null?void 0:R.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${p.pathname}" was given in the \`location\` prop.`),g=p}else g=m;let v=g.pathname||"/",w=v;if(f!=="/"){let p=f.replace(/^\//,"").split("/");w="/"+v.replace(/^\//,"").split("/").slice(p.length).join("/")}let d=ce(e,{pathname:w});P(h||d!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),P(d==null||d[d.length-1].route.element!==void 0||d[d.length-1].route.Component!==void 0||d[d.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=ct(d&&d.map(p=>Object.assign({},p,{params:Object.assign({},u,p.params),pathname:k([f,o.encodeLocation?o.encodeLocation(p.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?f:k([f,o.encodeLocation?o.encodeLocation(p.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),l,r,n,a);return t&&y?i.createElement(O.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},y):y}function lt(){let e=mt(),t=Xe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=i.createElement(i.Fragment,null,i.createElement("p",null,"💿 Hey developer 👋"),i.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",i.createElement("code",{style:o},"ErrorBoundary")," or"," ",i.createElement("code",{style:o},"errorElement")," prop on your route.")),i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:a},r):null,l)}var it=i.createElement(lt,null),ut=class extends i.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?i.createElement(L.Provider,{value:this.props.routeContext},i.createElement(Z.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function st({routeContext:e,match:t,children:r}){let n=i.useContext(T);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),i.createElement(L.Provider,{value:e},r)}function ct(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,l=r==null?void 0:r.errors;if(l!=null){let c=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);x(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let s=!1,u=-1;if(r)for(let c=0;c<o.length;c++){let f=o[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:h,errors:m}=r,g=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!m||m[f.route.id]===void 0);if(f.route.lazy||g){s=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let m,g=!1,v=null,w=null;r&&(m=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||it,s&&(u<0&&h===0?(xe("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,w=null):u===h&&(g=!0,w=f.route.hydrateFallbackElement||null)));let d=t.concat(o.slice(0,h+1)),y=()=>{let R;return m?R=v:g?R=w:f.route.Component?R=i.createElement(f.route.Component,null):f.route.element?R=f.route.element:R=c,i.createElement(st,{match:f,routeContext:{outlet:c,matches:d,isDataRoute:r!=null},children:R})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?i.createElement(ut,{location:r.location,revaliLine truncated
|
||||
@@ -0,0 +1,49 @@
|
||||
import{g as vi}from"./qface-BZLvZXJ8.js";var ai={exports:{}},ge={};/**
|
||||
* @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 sm;function Js(){if(sm)return ge;sm=1;var r=Symbol.for("react.transitional.element"),_l=Symbol.for("react.fragment");function el(S,ml,zl){var Ol=null;if(zl!==void 0&&(Ol=""+zl),ml.key!==void 0&&(Ol=""+ml.key),"key"in ml){zl={};for(var pl in ml)pl!=="key"&&(zl[pl]=ml[pl])}else zl=ml;return ml=zl.ref,{$$typeof:r,type:S,key:Ol,ref:ml!==void 0?ml:null,props:zl}}return ge.Fragment=_l,ge.jsx=el,ge.jsxs=el,ge}var dm;function ws(){return dm||(dm=1,ai.exports=Js()),ai.exports}var ed=ws(),ei={exports:{}},be={},ni={exports:{}},fi={};/**
|
||||
* @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 hm;function Ws(){return hm||(hm=1,(function(r){function _l(b,_){var q=b.length;b.push(_);l:for(;0<q;){var I=q-1>>>1,ul=b[I];if(0<ml(ul,_))b[I]=_,b[q]=ul,q=I;else break l}}function el(b){return b.length===0?null:b[0]}function S(b){if(b.length===0)return null;var _=b[0],q=b.pop();if(q!==_){b[0]=q;l:for(var I=0,ul=b.length,y=ul>>>1;I<y;){var E=2*(I+1)-1,O=b[E],D=E+1,Y=b[D];if(0>ml(O,q))D<ul&&0>ml(Y,O)?(b[I]=Y,b[D]=q,I=D):(b[I]=O,b[E]=q,I=E);else if(D<ul&&0>ml(Y,q))b[I]=Y,b[D]=q,I=D;else break l}}return _}function ml(b,_){var q=b.sortIndex-_.sortIndex;return q!==0?q:b.id-_.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var zl=performance;r.unstable_now=function(){return zl.now()}}else{var Ol=Date,pl=Ol.now();r.unstable_now=function(){return Ol.now()-pl}}var N=[],A=[],W=1,p=null,cl=3,wl=!1,Bl=!1,ql=!1,Ut=!1,Wl=typeof setTimeout=="function"?setTimeout:null,wt=typeof clearTimeout=="function"?clearTimeout:null,Nl=typeof setImmediate<"u"?setImmediate:null;function nt(b){for(var _=el(A);_!==null;){if(_.callback===null)S(A);else if(_.startTime<=b)S(A),_.sortIndex=_.expirationTime,_l(N,_);else break;_=el(A)}}function Tt(b){if(ql=!1,nt(b),!Bl)if(el(N)!==null)Bl=!0,Gl||(Gl=!0,Ql());else{var _=el(A);_!==null&&ot(Tt,_.startTime-b)}}var Gl=!1,x=-1,Xl=5,Et=-1;function Qu(){return Ut?!0:!(r.unstable_now()-Et<Xl)}function At(){if(Ut=!1,Gl){var b=r.unstable_now();Et=b;var _=!0;try{l:{Bl=!1,ql&&(ql=!1,wt(x),x=-1),wl=!0;var q=cl;try{t:{for(nt(b),p=el(N);p!==null&&!(p.expirationTime>b&&Qu());){var I=p.callback;if(typeof I=="function"){p.callback=null,cl=p.priorityLevel;var ul=I(p.expirationTime<=b);if(b=r.unstable_now(),typeof ul=="function"){p.callback=ul,nt(b),_=!0;break t}p===el(N)&&S(N),nt(b)}else S(N);p=el(N)}if(p!==null)_=!0;else{var y=el(A);y!==null&&ot(Tt,y.startTime-b),_=!1}}break l}finally{p=null,cl=q,wl=!1}_=void 0}}finally{_?Ql():Gl=!1}}}var Ql;if(typeof Nl=="function")Ql=function(){Nl(At)};else if(typeof MessageChannel<"u"){var zu=new MessageChannel,rt=zu.port2;zu.port1.onmessage=At,Ql=function(){rt.postMessage(null)}}else Ql=function(){Wl(At,0)};function ot(b,_){x=Wl(function(){b(r.unstable_now())},_)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(b){b.callback=null},r.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Xl=0<b?Math.floor(1e3/b):5},r.unstable_getCurrentPriorityLevel=function(){return cl},r.unstable_next=function(b){switch(cl){case 1:case 2:case 3:var _=3;break;default:_=cl}var q=cl;cl=_;try{return b()}finally{cl=q}},r.unstable_requestPaint=function(){Ut=!0},r.unstable_runWithPriority=function(b,_){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var q=cl;cl=b;try{return _()}finally{cl=q}},r.unstable_scheduleCallback=function(b,_,q){var I=r.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?I+q:I):q=I,b){case 1:var ul=-1;break;case 2:ul=250;break;case 5:ul=1073741823;break;case 4:ul=1e4;break;default:ul=5e3}return ul=q+ul,b={id:W++,callback:_,priorityLevel:b,startTime:q,expirationTime:ul,sortIndex:-1},q>I?(b.sortIndex=q,_l(A,b),el(N)===null&&b===el(A)&&(ql?(wt(x),x=-1):ql=!0,ot(Tt,q-I))):(b.sortIndex=ul,_l(N,b),Bl||wl||(Bl=!0,Gl||(Gl=!0,Ql()))),b},r.unstable_shouldYield=Qu,r.unstable_wrapCallback=function(b){var _=cl;return function(){var q=cl;cl=_;try{return b.apply(this,arguments)}finally{cl=q}}}})(fi)),fi}var Sm;function $s(){return Sm||(Sm=1,ni.exports=Ws()),ni.exports}var ci={exports:{}},C={};/**
|
||||
* @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 om;function Fs(){if(om)return C;om=1;var r=Symbol.for("react.transitional.element"),_l=Symbol.for("react.portal"),el=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),ml=Symbol.for("react.profiler"),zl=Symbol.for("react.consumer"),Ol=Symbol.for("react.context"),pl=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),cl=Symbol.iterator;function wl(y){return y===null||typeof y!="object"?null:(y=cl&&y[cl]||y["@@iterator"],typeof y=="function"?y:null)}var Bl={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ql=Object.assign,Ut={};function Wl(y,E,O){this.props=y,this.context=E,this.refs=Ut,this.updater=O||Bl}Wl.prototype.isReactComponent={},Wl.prototype.setState=function(y,E){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,E,"setState")},Wl.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function wt(){}wt.prototype=Wl.prototype;function Nl(y,E,O){this.props=y,this.context=E,this.refs=Ut,this.updater=O||Bl}var nt=Nl.prototype=new wt;nt.constructor=Nl,ql(nt,Wl.prototype),nt.isPureReactComponent=!0;var Tt=Array.isArray;function Gl(){}var x={H:null,A:null,T:null,S:null},Xl=Object.prototype.hasOwnProperty;function Et(y,E,O){var D=O.ref;return{$$typeof:r,type:y,key:E,ref:D!==void 0?D:null,props:O}}function Qu(y,E){return Et(y.type,E,y.props)}function At(y){return typeof y=="object"&&y!==null&&y.$$typeof===r}function Ql(y){var E={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(O){return E[O]})}var zu=/\/+/g;function rt(y,E){return typeof y=="object"&&y!==null&&y.key!=null?Ql(""+y.key):E.toString(36)}function ot(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(Gl,Gl):(y.status="pending",y.then(function(E){y.status==="pending"&&(y.status="fulfilled",y.value=E)},function(E){y.status==="pending"&&(y.status="rejected",y.reason=E)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function b(y,E,O,D,Y){var X=typeof y;(X==="undefined"||X==="boolean")&&(y=null);var $=!1;if(y===null)$=!0;else switch(X){case"bigint":case"string":case"number":$=!0;break;case"object":switch(y.$$typeof){case r:case _l:$=!0;break;case W:return $=y._init,b($(y._payload),E,O,D,Y)}}if($)return Y=Y(y),$=D===""?"."+rt(y,0):D,Tt(Y)?(O="",$!=null&&(O=$.replace(zu,"$&/")+"/"),b(Y,E,O,"",function(Oa){return Oa})):Y!=null&&(At(Y)&&(Y=Qu(Y,O+(Y.key==null||y&&y.key===Y.key?"":(""+Y.key).replace(zu,"$&/")+"/")+$)),E.push(Y)),1;$=0;var Cl=D===""?".":D+":";if(Tt(y))for(var sl=0;sl<y.length;sl++)D=y[sl],X=Cl+rt(D,sl),$+=b(D,E,O,X,Y);else if(sl=wl(y),typeof sl=="function")for(y=sl.call(y),sl=0;!(D=y.next()).done;)D=D.value,X=Cl+rt(D,sl++),$+=b(D,E,O,X,Y);else if(X==="object"){if(typeof y.then=="function")return b(ot(y),E,O,D,Y);throw E=String(y),Error("Objects are not valid as a React child (found: "+(E==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.")}return $}function _(y,E,O){if(y==null)return y;var D=[],Y=0;return b(y,D,"","",function(X){return E.call(O,X,Y++)}),D}function q(y){if(y._status===-1){var E=y._result;E=E(),E.then(function(O){(y._status===0||y._status===-1)&&(y._status=1,y._result=O)},function(O){(y._status===0||y._status===-1)&&(y._status=2,y._result=O)}),y._status===-1&&(y._status=0,y._result=E)}if(y._status===1)return y._result.default;throw y._result}var I=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var E=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(E))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},ul={map:_,forEach:function(y,E,O){_(y,function(){E.apply(this,arguments)},O)},count:function(y){var E=0;return _(y,function(){E++}),E},toArray:function(y){return _(y,function(E){return E})||[]},only:function(y){if(!At(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return C.Activity=p,C.Children=ul,C.Component=Wl,C.Fragment=el,C.Profiler=ml,C.PureComponent=Nl,C.StrictMode=S,C.Suspense=N,C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,C.__COMPILER_RUNTIME={__proto__:null,c:function(y){return x.H.useMemoCache(y)}},C.cache=function(y){return function(){return y.apply(null,arguments)}},C.cacheSignal=function(){return null},C.cloneElement=function(y,E,O){if(y==null)throw Error("The argumeLine truncated
|
||||
* @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 bm;function ks(){if(bm)return Rl;bm=1;var r=yi();function _l(N){var A="https://react.dev/errors/"+N;if(1<arguments.length){A+="?args[]="+encodeURIComponent(arguments[1]);for(var W=2;W<arguments.length;W++)A+="&args[]="+encodeURIComponent(arguments[W])}return"Minified React error #"+N+"; visit "+A+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function el(){}var S={d:{f:el,r:function(){throw Error(_l(522))},D:el,C:el,L:el,m:el,X:el,S:el,M:el},p:0,findDOMNode:null},ml=Symbol.for("react.portal");function zl(N,A,W){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ml,key:p==null?null:""+p,children:N,containerInfo:A,implementation:W}}var Ol=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function pl(N,A){if(N==="font")return"";if(typeof A=="string")return A==="use-credentials"?A:""}return Rl.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,Rl.createPortal=function(N,A){var W=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!A||A.nodeType!==1&&A.nodeType!==9&&A.nodeType!==11)throw Error(_l(299));return zl(N,A,null,W)},Rl.flushSync=function(N){var A=Ol.T,W=S.p;try{if(Ol.T=null,S.p=2,N)return N()}finally{Ol.T=A,S.p=W,S.d.f()}},Rl.preconnect=function(N,A){typeof N=="string"&&(A?(A=A.crossOrigin,A=typeof A=="string"?A==="use-credentials"?A:"":void 0):A=null,S.d.C(N,A))},Rl.prefetchDNS=function(N){typeof N=="string"&&S.d.D(N)},Rl.preinit=function(N,A){if(typeof N=="string"&&A&&typeof A.as=="string"){var W=A.as,p=pl(W,A.crossOrigin),cl=typeof A.integrity=="string"?A.integrity:void 0,wl=typeof A.fetchPriority=="string"?A.fetchPriority:void 0;W==="style"?S.d.S(N,typeof A.precedence=="string"?A.precedence:void 0,{crossOrigin:p,integrity:cl,fetchPriority:wl}):W==="script"&&S.d.X(N,{crossOrigin:p,integrity:cl,fetchPriority:wl,nonce:typeof A.nonce=="string"?A.nonce:void 0})}},Rl.preinitModule=function(N,A){if(typeof N=="string")if(typeof A=="object"&&A!==null){if(A.as==null||A.as==="script"){var W=pl(A.as,A.crossOrigin);S.d.M(N,{crossOrigin:W,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0})}}else A==null&&S.d.M(N)},Rl.preload=function(N,A){if(typeof N=="string"&&typeof A=="object"&&A!==null&&typeof A.as=="string"){var W=A.as,p=pl(W,A.crossOrigin);S.d.L(N,W,{crossOrigin:p,integrity:typeof A.integrity=="string"?A.integrity:void 0,nonce:typeof A.nonce=="string"?A.nonce:void 0,type:typeof A.type=="string"?A.type:void 0,fetchPriority:typeof A.fetchPriority=="string"?A.fetchPriority:void 0,referrerPolicy:typeof A.referrerPolicy=="string"?A.referrerPolicy:void 0,imageSrcSet:typeof A.imageSrcSet=="string"?A.imageSrcSet:void 0,imageSizes:typeof A.imageSizes=="string"?A.imageSizes:void 0,media:typeof A.media=="string"?A.media:void 0})}},Rl.preloadModule=function(N,A){if(typeof N=="string")if(A){var W=pl(A.as,A.crossOrigin);S.d.m(N,{as:typeof A.as=="string"&&A.as!=="script"?A.as:void 0,crossOrigin:W,integrity:typeof A.integrity=="string"?A.integrity:void 0})}else S.d.m(N)},Rl.requestFormReset=function(N){S.d.r(N)},Rl.unstable_batchedUpdates=function(N,A){return N(A)},Rl.useFormState=function(N,A,W){return Ol.H.useFormState(N,A,W)},Rl.useFormStatus=function(){return Ol.H.useHostTransitionStatus()},Rl.version="19.2.0",Rl}var zm;function Am(){if(zm)return ii.exports;zm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(_l){console.error(_l)}}return r(),ii.exports=ks(),ii.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 Tm;function Is(){if(Tm)return be;Tm=1;var r=$s(),_l=yi(),el=Am();function S(l){var t="https://react.dev/errors/"+l;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)t+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ml(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function zl(l){var t=l,u=l;if(l.alternate)for(;t.return;)t=t.return;else{l=t;do t=l,(t.flags&4098)!==0&&(u=t.return),l=t.return;while(l)}return t.tag===3?u:null}function Ol(l){if(l.tag===13){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function pl(l){if(l.tag===31){var t=l.memoizedState;if(t===null&&(l=l.alternate,l!==null&&(t=l.memoizedState)),t!==null)return t.dehydrated}return null}function N(l){if(zl(l)!==l)throw Error(S(188))}function A(l){var t=l.alternate;if(!t){if(t=zl(l),t===null)throw Error(S(188));return t!==l?null:l}for(var u=l,a=t;;){var e=u.return;if(e===null)break;var n=e.alternate;if(n===null){if(a=e.return,a!==null){u=a;continue}break}if(e.child===n.child){for(n=e.child;n;){if(n===u)return N(e),l;if(n===a)return N(e),t;n=n.sibling}throw Error(S(188))}if(u.return!==a.return)u=e,a=n;else{for(var f=!1,c=e.child;c;){if(c===u){f=!0,u=e,a=n;break}if(c===a){f=!0,a=e,u=n;break}c=c.sibling}if(!f){for(c=n.child;c;){if(c===u){f=!0,u=n,a=e;break}if(c===a){f=!0,a=n,u=e;break}c=c.sibling}if(!f)throw Error(S(189))}}if(u.alternate!==a)throw Error(S(190))}if(u.tag!==3)throw Error(S(188));return u.stateNode.current===u?l:t}function W(l){var t=l.tag;if(t===5||t===26||t===27||t===6)return l;for(l=l.child;l!==null;){if(t=W(l),t!==null)return t;l=l.sibling}return null}var p=Object.assign,cl=Symbol.for("react.element"),wl=Symbol.for("react.transitional.element"),Bl=Symbol.for("react.portal"),ql=Symbol.for("react.fragment"),Ut=Symbol.for("react.strict_mode"),Wl=Symbol.for("react.profiler"),wt=Symbol.for("react.consumer"),Nl=Symbol.for("react.context"),nt=Symbol.for("react.forward_ref"),Tt=Symbol.for("react.suspense"),Gl=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),Xl=Symbol.for("react.lazy"),Et=Symbol.for("react.activity"),Qu=Symbol.for("react.memo_cache_sentinel"),At=Symbol.iterator;function Ql(l){return l===null||typeof l!="object"?null:(l=At&&l[At]||l["@@iterator"],typeof l=="function"?l:null)}var zu=Symbol.for("react.client.reference");function rt(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===zu?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case ql:return"Fragment";case Wl:return"Profiler";case Ut:return"StrictMode";case Tt:return"Suspense";case Gl:return"SuspenseList";case Et:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case Bl:return"Portal";case Nl:return l.displayName||"Context";case wt:return(l._context.displayName||"Context")+".Consumer";case nt:var t=l.render;return l=l.displayName,l||(l=t.displayName||t.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case x:return t=l.displayName||null,t!==null?t:rt(l.type)||"Memo";case Xl:t=l._payload,l=l._init;try{return rt(l(t))}catch{}}return null}var ot=Array.isArray,b=_l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=el.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},I=[],ul=-1;function y(l){return{current:l}}function E(l){0>ul||(l.current=I[ul],I[ul]=null,ul--)}function O(l,t){ul++,I[ul]=l.current,l.current=t}var D=y(null),Y=y(null),X=y(null),$=y(null);function Cl(l,t){switch(O(X,t),O(Y,l),O(D,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?Yy(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=Yy(t),l=By(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}E(D),O(D,l)}function sl(){E(D),E(Y),E(X)}function Oa(l){l.memoizedState!==null&&O($,l);var t=D.current,u=By(t,l.type);t!==u&&(O(Y,l),O(D,u))}function ze(l){Y.current===l&&(E(D),E(Y)),$.current===l&&(E($),de._currentValue=q)}var Xn,mi;function Tu(l){if(Xn===void 0)try{throw Error()}catch(u){var t=u.stack.trim().match(/\n( *(at )?)/);Xn=t&&t[1]||"",mi=-1<u.stack.indexOf(`
|
||||
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||
`+Xn+l+mi}var Qn=!1;function jn(l,t){if(!l||Qn)return"";Qn=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(o){var h=o}Reflect.construct(l,[],T)}else{try{T.call()}catch(o){h=o}l.call(T.prototype)}}else{try{throw Error()}catch(o){h=o}(T=l())&&typeof T.catch=="function"&&T.catch(function(){})}}catch(o){if(o&&h&&typeof o.stack=="string")return[o.stack,h.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var e=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");e&&e.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=a.DetermineComponentFrameRoot(),f=n[0],c=n[1];if(f&&c){var i=f.split(`
|
||||
`),d=c.split(`
|
||||
`);for(e=a=0;a<i.length&&!i[a].includes("DetermineComponentFrameRoot");)a++;for(;e<d.length&&!d[e].includes("DetermineComponentFrameRoot");)e++;if(a===i.length||e===d.length)for(a=i.length-1,e=d.length-1;1<=a&&0<=e&&i[a]!==d[e];)e--;for(;1<=a&&0<=e;a--,e--)if(i[a]!==d[e]){if(a!==1||e!==1)do if(a--,e--,0>e||i[a]!==d[e]){var g=`
|
||||
`+i[a].replace(" at new "," at ");return l.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",l.displayName)),g}while(1<=a&&0<=e);break}}}finally{Qn=!1,Error.prepareStackTrace=u}return(u=l?l.displayName||l.name:"")?Tu(u):""}function _m(l,t){switch(l.tag){case 26:case 27:case 5:return Tu(l.type);case 16:return Tu("Lazy");case 13:return l.child!==t&&t!==null?Tu("Suspense Fallback"):Tu("Suspense");case 19:return Tu("SuspenseList");case 0:case 15:return jn(l.type,!1);case 11:return jn(l.type.render,!1);case 1:return jn(l.type,!0);case 31:return Tu("Activity");default:return""}}function si(l){try{var t="",u=null;do t+=_m(l,u),u=l,l=l.return;while(l);return t}catch(a){return`
|
||||
Error generating stack: `+a.message+`
|
||||
`+a.stack}}var Zn=Object.prototype.hasOwnProperty,Vn=r.unstable_scheduleCallback,xn=r.unstable_cancelCallback,Om=r.unstable_shouldYield,Mm=r.unstable_requestPaint,$l=r.unstable_now,Dm=r.unstable_getCurrentPriorityLevel,di=r.unstable_ImmediatePriority,hi=r.unstable_UserBlockingPriority,Te=r.unstable_NormalPriority,Um=r.unstable_LowPriority,Si=r.unstable_IdlePriority,rm=r.log,Hm=r.unstable_setDisableYieldValue,Ma=null,Fl=null;function Wt(l){if(typeof rm=="function"&&Hm(l),Fl&&typeof Fl.setStrictMode=="function")try{Fl.setStrictMode(Ma,l)}catch{}}var kl=Math.clz32?Math.clz32:pm,Nm=Math.log,Rm=Math.LN2;function pm(l){return l>>>=0,l===0?32:31-(Nm(l)/Rm|0)|0}var Ee=256,Ae=262144,_e=4194304;function Eu(l){var t=l&42;if(t!==0)return t;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Oe(l,t,u){var a=l.pendingLanes;if(a===0)return 0;var e=0,n=l.suspendedLanes,f=l.pingedLanes;l=l.warmLanes;var c=a&134217727;return c!==0?(a=c&~n,a!==0?e=Eu(a):(f&=c,f!==0?e=Eu(f):u||(u=c&~l,u!==0&&(e=Eu(u))))):(c=a&~n,c!==0?e=Eu(c):f!==0?e=Eu(f):u||(u=a&~l,u!==0&&(e=Eu(u)))),e===0?0:t!==0&&t!==e&&(t&n)===0&&(n=e&-e,u=t&-t,n>=u||n===32&&(u&4194048)!==0)?t:e}function Da(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function qm(l,t){switch(l){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oi(){var l=_e;return _e<<=1,(_e&62914560)===0&&(_e=4194304),l}function Ln(l){for(var t=[],u=0;31>u;u++)t.push(l);return t}function Ua(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Cm(l,t,u,a,e,n){var f=l.pendingLanes;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=u,l.entangledLanes&=u,l.errorRecoveryDisabledLanes&=u,l.shellSuspendCounter=0;var c=l.entanglements,i=l.expirationTimes,d=l.hiddenUpdates;for(u=f&~u;0<u;){var g=31-kl(u),T=1<<g;c[g]=0,i[g]=-1;var h=d[g];if(h!==null)for(d[g]=null,g=0;g<h.length;g++){var o=h[g];o!==null&&(o.lane&=-536870913)}u&=~T}a!==0&&gi(l,a,0),n!==0&&e===0&&l.tag!==0&&(l.suspendedLanes|=n&~(f&~t))}function gi(l,t,u){l.pendingLanes|=t,l.suspendedLanes&=~t;var a=31-kl(t);l.entangledLanes|=t,l.entanglements[a]=l.entanglements[a]|1073741824|u&261930}function bi(l,t){var u=l.entangledLanes|=t;for(l=l.entanglements;u;){var a=31-kl(u),e=1<<a;e&t|l[a]&t&&(l[a]|=t),u&=~e}}function zi(l,t){var u=t&-t;return u=(u&42)!==0?1:Kn(u),(u&(l.suspendedLanes|t))!==0?0:u}function Kn(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function Jn(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function Ti(){var l=_.p;return l!==0?l:(l=window.event,l===void 0?32:nm(l.type))}function Ei(l,t){var u=_.p;try{return _.p=l,t()}finally{_.p=u}}var $t=Math.random().toString(36).slice(2),Ml="__reactFiber$"+$t,jl="__reactProps$"+$t,ju="__reactContainer$"+$t,wn="__reactEvents$"+$t,Ym="__reactListeners$"+$t,Bm="__reactHandles$"+$t,Ai="__reactResources$"+$t,ra="__reactMarker$"+$t;function Wn(l){delete l[Ml],delete l[jl],delete l[wn],delete l[Ym],delete l[Bm]}function Zu(l){var t=l[Ml];if(t)return t;for(var u=l.parentNode;u;){if(t=u[ju]||u[Ml]){if(u=t.alternate,t.child!==null||u!==null&&u.child!==null)for(l=xy(l);l!==null;){if(u=l[Ml])return u;l=xy(l)}return t}l=u,u=l.parentNode}return null}function Vu(l){if(l=l[Ml]||l[ju]){var t=l.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return l}return null}function Ha(l){var t=l.tag;if(t===5||t===26||t===27||t===6)return l.stateNode;throw Error(S(33))}function xu(l){var t=l[Ai];return t||(t=l[Ai]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function El(l){l[ra]=!0}var _i=new Set,Oi={};function Au(l,t){Lu(l,t),Lu(l+"Capture",t)}function Lu(l,t){for(Oi[l]=t,l=0;l<t.length;l++)_i.add(t[l])}var Gm=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u21
Line truncated
|
||||
`).replace(hs,"")}function qy(l,t){return t=py(t),py(l)===t}function ll(l,t,u,a,e,n){switch(u){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ju(l,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ju(l,""+a);break;case"className":De(l,"class",a);break;case"tabIndex":De(l,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":De(l,u,a);break;case"style":qi(l,a,n);break;case"data":if(t!=="object"){De(l,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||u!=="href")){l.removeAttribute(u);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(u);break}a=re(""+a),l.setAttribute(u,a);break;case"action":case"formAction":if(typeof a=="function"){l.setAttribute(u,"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 n=="function"&&(u==="formAction"?(t!=="input"&&ll(l,t,"name",e.name,e,null),ll(l,t,"formEncType",e.formEncType,e,null),ll(l,t,"formMethod",e.formMethod,e,null),ll(l,t,"formTarget",e.formTarget,e,null)):(ll(l,t,"encType",e.encType,e,null),ll(l,t,"method",e.method,e,null),ll(l,t,"target",e.target,e,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){l.removeAttribute(u);break}a=re(""+a),l.setAttribute(u,a);break;case"onClick":a!=null&&(l.onclick=Nt);break;case"onScroll":a!=null&&j("scroll",l);break;case"onScrollEnd":a!=null&&j("scrollend",l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(S(61));if(u=a.__html,u!=null){if(e.children!=null)throw Error(S(60));l.innerHTML=u}}break;case"multiple":l.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":l.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){l.removeAttribute("xlink:href");break}u=re(""+a),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(u,""+a):l.removeAttribute(u);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":a&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(u,""):l.removeAttribute(u);break;case"capture":case"download":a===!0?l.setAttribute(u,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?l.setAttribute(u,a):l.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?l.setAttribute(u,a):l.removeAttribute(u);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?l.removeAttribute(u):l.setAttribute(u,a);break;case"popover":j("beforetoggle",l),j("toggle",l),Me(l,"popover",a);break;case"xlinkActuate":Ht(l,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Ht(l,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Ht(l,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Ht(l,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Ht(l,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Ht(l,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Ht(l,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Ht(l,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Ht(l,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Me(l,"is",a);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Vm.get(u)||u,Me(l,u,a))}}function Qc(l,t,u,a,e,n){switch(u){case"style":qi(l,a,n);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(S(61));if(u=a.__html,u!=null){if(e.children!=null)throw Error(S(60));l.innerHTML=u}}break;case"children":typeof a=="string"?Ju(l,a):(typeof a=="number"||typeof a=="bigint")&&Ju(l,""+a);break;case"onScroll":a!=null&&j("scroll",l);break;case"onScrollEnd":a!=null&&j("scrollend",l);break;case"onClick":a!=null&&(l.onclick=Nt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML"
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{r as c,j as e}from"./react-vendor-jWT2yUdV.js";import{s as n}from"./chunk-J6JGI6RM-Djlxjgjl.js";import{c as u}from"./index-DiaaLdUu.js";const x=c.forwardRef((r,a)=>{const{label:s,description:l,value:t,onValueChange:i,disabled:d}=r,o=t?"true":"false";return e.jsx(n,{classNames:{base:u("inline-flex flex-row-reverse w-full max-w-full bg-white/60 dark:bg-white/[0.04] hover:bg-white/80 dark:hover:bg-white/[0.07] items-center","justify-between cursor-pointer rounded-2xl gap-2 p-3.5 border border-black/[0.08] dark:border-white/10 transition-all duration-200","data-[selected=true]:border-primary/25 data-[selected=true]:bg-primary/[0.045] data-[selected=true]:shadow-none backdrop-blur-xl")},...r,ref:a,isDisabled:d,isSelected:t,value:o,onValueChange:i,children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("p",{className:"text-medium",children:s}),e.jsx("p",{className:"text-tiny text-default-400",children:l})]})})});x.displayName="SwitchCard";export{x as S};
|
||||
@@ -0,0 +1,5 @@
|
||||
var Tn=Object.defineProperty;var Mn=(e,t,n)=>t in e?Tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var lt=(e,t,n)=>Mn(e,typeof t!="symbol"?t+"":t,n);import{r as l,R as j,d as Oe,j as T}from"./react-vendor-jWT2yUdV.js";import{c as Fe,L as ct,u as Nn,k as An,b as jt}from"./index-DiaaLdUu.js";import{z as Bt}from"./react-hot-toast-cGcFZPSt.js";import{p as On,x as Ft}from"./index-FvTxWQTZ.js";import{X as kn}from"./xterm-m1lN6Krd.js";import"./qface-BZLvZXJ8.js";import"./react-router-dom-C6k78GT4.js";import"./iconBase-B7bT1FlI.js";function Ln(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const nt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ye(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function wt(e){return"nodeType"in e}function B(e){var t,n;return e?ye(e)?e:wt(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function xt(e){const{Document:t}=B(e);return e instanceof t}function $e(e){return ye(e)?!1:e instanceof B(e).HTMLElement}function Zt(e){return e instanceof B(e).SVGElement}function De(e){return e?ye(e)?e.document:wt(e)?xt(e)?e:$e(e)||Zt(e)?e.ownerDocument:document:document:document}const Q=nt?l.useLayoutEffect:l.useEffect;function yt(e){const t=l.useRef(e);return Q(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function zn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pe(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return Q(()=>{n.current!==e&&(n.current=e)},t),n}function Xe(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ze(e){const t=yt(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function gt(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let ut={};function Ue(e,t){return l.useMemo(()=>{if(t)return t;const n=ut[e]==null?0:ut[e]+1;return ut[e]=n,e+"-"+n},[e,t])}function Qt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,i)=>{const a=Object.entries(i);for(const[c,d]of a){const u=s[c];u!=null&&(s[c]=u+e*d)}return s},{...t})}}const xe=Qt(1),Qe=Qt(-1);function Pn(e){return"clientX"in e&&"clientY"in e}function Dt(e){if(!e)return!1;const{KeyboardEvent:t}=B(e.target);return t&&e instanceof t}function jn(e){if(!e)return!1;const{TouchEvent:t}=B(e.target);return t&&e instanceof t}function vt(e){if(jn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Pn(e)?{x:e.clientX,y:e.clientY}:null}const je=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[je.Translate.toString(e),je.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),$t="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Bn(e){return e.matches($t)?e:e.querySelector($t)}const Fn={display:"none"};function $n(e){let{id:t,value:n}=e;return j.createElement("div",{id:t,style:Fn},n)}function Xn(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return j.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function Un(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const en=l.createContext(null);function Wn(e){const t=l.useContext(en);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function Yn(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:s}=r;e.forEach(i=>{var a;return(a=i[o])==null?void 0:a.call(i,s)})},[e]),t]}const Kn={draggable:`
|
||||
To pick up a draggable item, press the space bar.
|
||||
While dragging, use the arrow keys to move the item.
|
||||
Press space again to drop the item in its new position, or press escape to cancel.
|
||||
`},Hn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Vn(e){let{announcements:t=Hn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Kn}=e;const{announce:s,announcement:i}=Un(),a=Ue("DndLiveRegion"),[c,d]=l.useState(!1);if(l.useEffect(()=>{d(!0)},[]),Wn(l.useMemo(()=>({onDragStart(f){let{active:h}=f;s(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&s(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;s(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;s(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;s(t.onDragCancel({active:h,over:g}))}}),[s,t])),!c)return null;const u=j.createElement(j.Fragment,null,j.createElement($n,{id:r,value:o.draggable}),j.createElement(Xn,{id:a,announcement:i}));return n?Oe.createPortal(u,n):u}var A;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(A||(A={}));function et(){}function qn(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function _n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const q=Object.freeze({x:0,y:0});function Jn(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Gn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Zn(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Qn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Xt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const er=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Xt(t,t.left,t.top),s=[];for(const i of r){const{id:a}=i,c=n.get(a);if(c){const d=Jn(Xt(c),o);s.push({id:a,data:{droppableContainer:i,value:d}})}}return s.sort(Gn)};function tr(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),i=o-r,a=s-n;if(r<o&&n<s){const c=t.width*t.height,d=e.width*e.height,u=i*a,f=u/(c+d-u);return Number(f.toFixed(4))}return 0}const nr=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:i}=s,a=n.get(i);if(a){const c=tr(a,t);c>0&&o.push({id:i,data:{droppableContainer:s,value:c}})}}return o.sort(Zn)};function rr(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function tn(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:q}function or(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((i,a)=>({...i,top:i.top+e*a.y,bottom:i.bottom+e*a.y,left:i.left+e*a.x,right:i.right+e*a.x}),{...n})}}const sr=or(1);function ir(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ar(e,t,n){const r=ir(t);if(!r)return e;const{scaleX:o,scaleY:s,x:i,y:a}=r,c=e.left-i-(1-o)*parseFloat(n),d=e.top-a-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,f=s?e.height/s:e.height;return{width:u,height:f,top:d,right:c+u,bottom:d+f,left:c}}const lr={ignoreTransform:!1};function Se(e,t){t===void 0&&(t=lr);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:u}=B(e).getComputedStyle(e);d&&(n=ar(n,d,u))}const{top:r,left:o,width:s,height:i,bottom:a,right:c}=n;return{top:r,left:o,width:s,height:i,bottom:a,right:c}}function Ut(e){return Se(e,{ignoreTransform:!0})}function cr(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function ur(e,t){return t===void 0&&(t=B(e).getComputedStyle(e)),t.position==="fixed"}function dr(e,t){t===void 0&&(t=B(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function St(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(xt(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!$e(o)||Zt(o)||n.includes(o))return n;const s=B(e).getComputedStyle(o);return o!==e&&dr(o,s)&&n.push(o),ur(o,s)?n:r(o.parentNode)}return e?r(
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{ax as C,ay as u,az as a,g as d}from"./index-DiaaLdUu.js";import{Q as c}from"./qq_manager-BfRTEAby.js";const f=r=>JSON.parse(JSON.stringify(r)),p=u.withTypes(),k=C.withTypes(),D=()=>{const r=k(n=>n.config.value),i=p();return{config:r,createNetworkConfig:async(n,t)=>{const e=Object.keys(r.network).reduce((s,g)=>s.concat(d(r,g).map(w=>w.name)),[]);if(t.name&&e.includes(t.name))throw new Error("已经存在相同的配置项名");const o=f(r);return o.network[n].push(t),await c.setOB11Config(o),i(a(o)),o},refreshConfig:async()=>{const n=await c.getOB11Config();return JSON.stringify(n)===JSON.stringify(r)?r:(i(a(n)),n)},updateConfig:async n=>(await c.setOB11Config(n),i(a(n)),n),updateSingleConfig:async(n,t)=>{const e=f(r);return e[n]=t,await c.setOB11Config(e),i(a(e)),e},updateNetworkConfig:async(n,t)=>{const e=f(r),o=t.name,s=e.network[n].findIndex(g=>g.name===o);if(s===-1)throw new Error("找不到对应的配置项");return e.network[n][s]=t,await c.setOB11Config(e),i(a(e)),e},deleteNetworkConfig:async(n,t)=>{const e=f(r),o=e.network[n].findIndex(s=>s.name===t);if(o===-1)throw new Error("找不到对应的配置项");return e.network[n].splice(o,1),await c.setOB11Config(e),i(a(e)),e},enableNetworkConfig:async(n,t)=>{const e=f(r),o=e.network[n].findIndex(s=>s.name===t);if(o===-1)throw new Error("找不到对应的配置项");return e.network[n][o].enable=!e.network[n][o].enable,await c.setOB11Config(e),i(a(e)),e},enableDebugNetworkConfig:async(n,t)=>{const e=f(r),o=e.network[n].findIndex(s=>s.name===t);if(o===-1)throw new Error("找不到对应的配置项");return e.network[n][o].debug=!e.network[n][o].debug,await c.setOB11Config(e),i(a(e)),e},mergeConfig:async n=>{const t=f(r);return Object.assign(t,n),await c.setOB11Config(t),i(a(t)),t},saveConfigWithoutNetwork:async n=>(n.network=r.network,await c.setOB11Config(n),i(a(n)),n)}};export{D as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{R as o}from"./react-vendor-jWT2yUdV.js";import{b5 as t}from"./index-DiaaLdUu.js";const s=()=>o.useContext(t);export{s as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{au as u,at as n,a8 as s,ab as l,b6 as i}from"./index-DiaaLdUu.js";import{r,R as x}from"./react-vendor-jWT2yUdV.js";let p=x.createContext(null);function P(e){let t=r.useContext(p)||{};i(t,e);let{ref:f,...a}=t;return a}function C(e,t){let{focusProps:f}=u(e),{keyboardProps:a}=n(e),$=s(f,a),b=P(t),d=e.isDisabled?{}:b,o=r.useRef(e.autoFocus);r.useEffect(()=>{o.current&&t.current&&l(t.current),o.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:s({...$,tabIndex:c},d)}}export{C as $};
|
||||
@@ -0,0 +1 @@
|
||||
import{ba as T,ap as P,bb as x}from"./index-DiaaLdUu.js";import{r as i}from"./react-vendor-jWT2yUdV.js";let g=!1,f=0;function G(){g=!0,setTimeout(()=>{g=!1},50)}function b(u){u.pointerType==="touch"&&G()}function L(){if(!(typeof document>"u"))return f===0&&typeof PointerEvent<"u"&&document.addEventListener("pointerup",b),f++,()=>{f--,!(f>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",b)}}function C(u){let{onHoverStart:s,onHoverChange:o,onHoverEnd:d,isDisabled:n}=u,[m,$]=i.useState(!1),e=i.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;i.useEffect(L,[]);let{addGlobalListener:c,removeAllGlobalListeners:E}=T(),{hoverProps:H,triggerHoverEnd:h}=i.useMemo(()=>{let y=(t,r)=>{if(e.pointerType=r,n||r==="touch"||e.isHovered||!t.currentTarget.contains(t.target))return;e.isHovered=!0;let a=t.currentTarget;e.target=a,c(P(t.target),"pointerover",p=>{e.isHovered&&e.target&&!x(e.target,p.target)&&l(p,p.pointerType)},{capture:!0}),s&&s({type:"hoverstart",target:a,pointerType:r}),o&&o(!0),$(!0)},l=(t,r)=>{let a=e.target;e.pointerType="",e.target=null,!(r==="touch"||!e.isHovered||!a)&&(e.isHovered=!1,E(),d&&d({type:"hoverend",target:a,pointerType:r}),o&&o(!1),$(!1))},v={};return typeof PointerEvent<"u"&&(v.onPointerEnter=t=>{g&&t.pointerType==="mouse"||y(t,t.pointerType)},v.onPointerLeave=t=>{!n&&t.currentTarget.contains(t.target)&&l(t,t.pointerType)}),{hoverProps:v,triggerHoverEnd:l}},[s,o,d,n,e,c,E]);return i.useEffect(()=>{n&&h({currentTarget:e.target},e.pointerType)},[n]),{hoverProps:H,isHovered:m}}export{C as $};
|
||||
@@ -0,0 +1,7 @@
|
||||
import{bw as ee,ap as K,bx as ae,ba as oe,a3 as E,by as le,bz as fe,bb as $,bA as v,bB as ce,bC as ue,bs as de,a8 as te,bD as pe,b6 as ve,bE as z,bF as $e,bG as be,bv as N,aM as ge,a9 as ye,aN as Pe,an as j}from"./index-DiaaLdUu.js";import{r as k}from"./react-vendor-jWT2yUdV.js";let w="default",R="",A=new WeakMap;function Te(s){if(ee()){if(w==="default"){const i=K(s);R=i.documentElement.style.webkitUserSelect,i.documentElement.style.webkitUserSelect="none"}w="disabled"}else if(s instanceof HTMLElement||s instanceof SVGElement){let i="userSelect"in s.style?"userSelect":"webkitUserSelect";A.set(s,s.style[i]),s.style[i]="none"}}function W(s){if(ee()){if(w!=="disabled")return;w="restoring",setTimeout(()=>{ae(()=>{if(w==="restoring"){const i=K(s);i.documentElement.style.webkitUserSelect==="none"&&(i.documentElement.style.webkitUserSelect=R||""),R="",w="default"}})},300)}else if((s instanceof HTMLElement||s instanceof SVGElement)&&s&&A.has(s)){let i=A.get(s),o="userSelect"in s.style?"userSelect":"webkitUserSelect";s.style[o]==="none"&&(s.style[o]=i),s.getAttribute("style")===""&&s.removeAttribute("style"),A.delete(s)}}function Ee(s){let i=k.useContext(pe);if(i){let{register:o,...l}=i;s=te(l,s),o()}return ve(i,s.ref),s}var O=new WeakMap;class D{continuePropagation(){z(this,O,!1)}get shouldStopPropagation(){return $e(this,O)}constructor(i,o,l,u){be(this,O,{writable:!0,value:void 0}),z(this,O,!0);var b;let g=(b=u==null?void 0:u.target)!==null&&b!==void 0?b:l.currentTarget;const p=g==null?void 0:g.getBoundingClientRect();let M,h=0,I,y=null;l.clientX!=null&&l.clientY!=null&&(I=l.clientX,y=l.clientY),p&&(I!=null&&y!=null?(M=I-p.left,h=y-p.top):(M=p.width/2,h=p.height/2)),this.type=i,this.pointerType=o,this.target=l.currentTarget,this.shiftKey=l.shiftKey,this.metaKey=l.metaKey,this.ctrlKey=l.ctrlKey,this.altKey=l.altKey,this.x=M,this.y=h}}const q=Symbol("linkClicked"),J="react-aria-pressable-style",Q="data-react-aria-pressable";function ke(s){let{onPress:i,onPressChange:o,onPressStart:l,onPressEnd:u,onPressUp:b,onClick:g,isDisabled:p,isPressed:M,preventFocusOnPress:h,shouldCancelOnPointerExit:I,allowTextSelectionOnPress:y,ref:_,...se}=Ee(s),[ne,G]=k.useState(!1),S=k.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:C,removeAllGlobalListeners:H}=oe(),U=E((e,n)=>{let c=S.current;if(p||c.didFirePressStart)return!1;let t=!0;if(c.isTriggeringEvent=!0,l){let a=new D("pressstart",n,e);l(a),t=a.shouldStopPropagation}return o&&o(!0),c.isTriggeringEvent=!1,c.didFirePressStart=!0,G(!0),t}),x=E((e,n,c=!0)=>{let t=S.current;if(!t.didFirePressStart)return!1;t.didFirePressStart=!1,t.isTriggeringEvent=!0;let a=!0;if(u){let r=new D("pressend",n,e);u(r),a=r.shouldStopPropagation}if(o&&o(!1),G(!1),i&&c&&!p){let r=new D("press",n,e);i(r),a&&(a=r.shouldStopPropagation)}return t.isTriggeringEvent=!1,a}),L=E((e,n)=>{let c=S.current;if(p)return!1;if(b){c.isTriggeringEvent=!0;let t=new D("pressup",n,e);return b(t),c.isTriggeringEvent=!1,t.shouldStopPropagation}return!0}),T=E(e=>{let n=S.current;if(n.isPressed&&n.target){n.didFirePressStart&&n.pointerType!=null&&x(m(n.target,e),n.pointerType,!1),n.isPressed=!1,n.isOverTarget=!1,n.activePointerId=null,n.pointerType=null,H(),y||W(n.target);for(let c of n.disposables)c();n.disposables=[]}}),X=E(e=>{I&&T(e)}),F=E(e=>{p||g==null||g(e)}),V=E((e,n)=>{if(!p&&g){let c=new MouseEvent("click",e);le(c,n),g(fe(c))}}),ie=k.useMemo(()=>{let e=S.current,n={onKeyDown(t){if(B(t.nativeEvent,t.currentTarget)&&$(t.currentTarget,v(t.nativeEvent))){var a;Z(v(t.nativeEvent),t.key)&&t.preventDefault();let r=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=U(t,"keyboard");let f=t.currentTarget,d=P=>{B(P,f)&&!P.repeat&&$(f,v(P))&&e.target&&L(m(e.target,P),"keyboard")};C(K(t.currentTarget),"keyup",ye(d,c),!0)}r&&t.stopPropagation(),t.metaKey&&Pe()&&((a=e.metaKeyEvents)===null||a===void 0||a.set(t.key,t.nativeEvent))}else t.key==="Meta"&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!$(t.currentTarget,v(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!N.isOpening){let a=!0;if(p&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType==="virtual"||ge(t.nativeEvent))){let r=U(t,"virtual"),f=L(t,"virtual"),d=x(t,"virtual");F(t),a=r&&f&&d}else if(e.isPressed&&e.pointerType!=="keyboard"){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",f=L(m(t.currentTarget,t),r),d=x(m(t.currentTarget,t),r,!0);a=f&&d,e.isOverTarget=!1,F(t),T(t)}e.ignoreEmulatedMouseEvents=!1,a&&t.stopPropagation()}}},c=t=>{var a;if(e.isPressed&&e.target&&B(t,e.target)){var r;Z(v(t),t.key)&&t.preventDefault();let d=v(t),P=$(e.target,v(t));x(m(e.target,t),"keyboard",P),P&&V(t,e.target),H(),t.key!=="Enter"&&Y(e.target)&&$(e.target,d)&&!t[q]&&(t[q]=!0,N(e.target,t,!1)),e.isPressed=!1,(r=e.metaKeyEvents)===null||r===void 0||r.delete(t.keLine truncated
|
||||
@layer {
|
||||
[${Q}] {
|
||||
touch-action: pan-x pan-y pinch-zoom;
|
||||
}
|
||||
}
|
||||
`.trim(),e.head.prepend(n)},[_]),k.useEffect(()=>{let e=S.current;return()=>{var n;y||W((n=e.target)!==null&&n!==void 0?n:void 0);for(let c of e.disposables)c();e.disposables=[]}},[y]),{isPressed:M||ne,pressProps:te(se,ie,{[Q]:!0})}}function Y(s){return s.tagName==="A"&&s.hasAttribute("href")}function B(s,i){const{key:o,code:l}=s,u=i,b=u.getAttribute("role");return(o==="Enter"||o===" "||o==="Spacebar"||l==="Space")&&!(u instanceof j(u).HTMLInputElement&&!re(u,o)||u instanceof j(u).HTMLTextAreaElement||u.isContentEditable)&&!((b==="link"||!b&&Y(u))&&o!=="Enter")}function m(s,i){let o=i.clientX,l=i.clientY;return{currentTarget:s,shiftKey:i.shiftKey,ctrlKey:i.ctrlKey,metaKey:i.metaKey,altKey:i.altKey,clientX:o,clientY:l}}function me(s){return s instanceof HTMLInputElement?!1:s instanceof HTMLButtonElement?s.type!=="submit"&&s.type!=="reset":!Y(s)}function Z(s,i){return s instanceof HTMLInputElement?!re(s,i):me(s)}const he=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function re(s,i){return s.type==="checkbox"||s.type==="radio"?i===" ":he.has(s.type)}export{ke as $};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as m}from"./react-vendor-jWT2yUdV.js";import{c as L,g as je}from"./qface-BZLvZXJ8.js";var w=function(){return w=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++){n=arguments[t];for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(e[u]=n[u])}return e},w.apply(this,arguments)};function Ee(r,e){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(n[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(n[t[i]]=r[t[i]]);return n}function Ne(r,e,n,t){function i(u){return u instanceof n?u:new n(function(o){o(u)})}return new(n||(n=Promise))(function(u,o){function f(l){try{a(t.next(l))}catch(s){o(s)}}function c(l){try{a(t.throw(l))}catch(s){o(s)}}function a(l){l.done?u(l.value):i(l.value).then(f,c)}a((t=t.apply(r,e||[])).next())})}function Fe(r,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},t,i,u,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=f(0),o.throw=f(1),o.return=f(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function f(a){return function(l){return c([a,l])}}function c(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(n=0)),n;)try{if(t=1,i&&(u=a[0]&2?i.return:a[0]?i.throw||((u=i.return)&&u.call(i),0):i.next)&&!(u=u.call(i,a[1])).done)return u;switch(i=0,u&&(a=[a[0]&2,u.value]),a[0]){case 0:case 1:u=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){n.label=a[1];break}if(a[0]===6&&n.label<u[1]){n.label=u[1],u=a;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(a);break}u[2]&&n.ops.pop(),n.trys.pop();continue}a=e.call(r,n)}catch(l){a=[6,l],i=0}finally{t=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function p(r,e){var n=typeof Symbol=="function"&&r[Symbol.iterator];if(!n)return r;var t=n.call(r),i,u=[],o;try{for(;(e===void 0||e-- >0)&&!(i=t.next()).done;)u.push(i.value)}catch(f){o={error:f}}finally{try{i&&!i.done&&(n=t.return)&&n.call(t)}finally{if(o)throw o.error}}return u}function y(r,e,n){if(n||arguments.length===2)for(var t=0,i=e.length,u;t<i;t++)(u||!(t in e))&&(u||(u=Array.prototype.slice.call(e,0,t)),u[t]=e[t]);return r.concat(u||Array.prototype.slice.call(e))}var We=function(r){return function(e,n){var t=m.useRef(!1);r(function(){return function(){t.current=!1}},[]),r(function(){if(!t.current)t.current=!0;else return e()},n)}},Me=function(r){return typeof r=="function"},C=function(r){var e=m.useRef(r);e.current=m.useMemo(function(){return r},[r]);var n=m.useRef(void 0);return n.current||(n.current=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return e.current.apply(this,t)}),n.current};const te=We(m.useEffect);var Pe=function(r,e){var n=e.manual,t=e.ready,i=t===void 0?!0:t,u=e.defaultParams,o=u===void 0?[]:u,f=e.refreshDeps,c=f===void 0?[]:f,a=e.refreshDepsAction,l=m.useRef(!1);return l.current=!1,te(function(){!n&&i&&(l.current=!0,r.run.apply(r,y([],p(o),!1)))},[i]),te(function(){l.current||n||(l.current=!0,a?a():r.refresh())},y([],p(c),!1)),{onBefore:function(){if(!i)return{stopNow:!0}}}};Pe.onInit=function(r){var e=r.ready,n=e===void 0?!0:e,t=r.manual;return{loading:!t&&n}};function De(r,e){if(r===e)return!0;for(var n=0;n<r.length;n++)if(!Object.is(r[n],e[n]))return!1;return!0}var _e=function(r,e){var n=m.useRef({deps:e,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!De(n.deps,e))&&(n.deps=e,n.obj=r(),n.initialized=!0),n.obj};function xe(r){var e=m.useRef(r);return e.current=r,e}var ie=function(r){var e=xe(r);m.useEffect(function(){return function(){e.current()}},[])},N=new Map,Be=function(r,e,n){var t=N.get(r);t!=null&&t.timer&&clearTimeout(t.timer);var i=void 0;e>-1&&(i=setTimeout(function(){N.delete(r)},e)),N.set(r,w(w({},n),{timer:i}))},Ge=function(r){return N.get(r)},F=new Map,He=function(r){return F.get(r)},ke=function(r,e){F.set(r,e),e.then(function(n){return F.delete(r),n}).catch(function(){F.delete(r)})},E={},Ue=function(r,e){E[r]&&E[r].forEach(function(n){return n(e)})},G=function(r,e){return E[r]||(E[r]=[]),E[r].push(e),function(){var t=E[r].indexOf(e);E[r].splice(t,1)}},$e=function(r,e){var n=e.cacheKey,t=e.cacheTime,i=t===void 0?300*1e3:t,u=e.staleTime,o=u===void 0?0:u,f=e.setCache,c=e.getCache,a=m.useRef(void 0),l=m.useRef(void 0),s=function(v,d){f?f(d):Be(v,i,d),Ue(v,d.data)},h=function(v,d){return d===void 0&&(d=[]),c?c(d):Ge(v)};return _e(function(){if(n){var v=h(n);v&&Object.hasOwnProperty.call(v,"data")&&(r.state.data=v.data,r.state.params=v.params,(o===-1||Date.now()-v.time<=o)&&(r.state.loading=!1)),a.current=G(n,function(d){r.setState({data:d})})}},[]),ie(function()Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{a8 as t,a7 as I}from"./index-DiaaLdUu.js";import{e as _}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{$ as u}from"./usePress-BrNwsdVw.js";import{$ as E}from"./useFocusable-DA5Croun.js";function A(a,r,i){let{isDisabled:l=!1,isReadOnly:o=!1,value:n,name:m,form:g,children:O,"aria-label":R,"aria-labelledby":U,validationState:c="valid",isInvalid:b,onPressStart:f,onPressEnd:$,onPressChange:p,onPress:s,onPressUp:P,onClick:v}=a,x=e=>{e.stopPropagation(),r.setSelected(e.target.checked)},{pressProps:S,isPressed:h}=u({onPressStart:f,onPressEnd:$,onPressChange:p,onPress:s,onPressUp:P,onClick:v,isDisabled:l}),{pressProps:y,isPressed:k}=u({onPressStart:f,onPressEnd:$,onPressChange:p,onPressUp:P,onClick:v,onPress(e){var d;s==null||s(e),r.toggle(),(d=i.current)===null||d===void 0||d.focus()},isDisabled:l||o}),{focusableProps:C}=E(a,i),D=t(S,C),L=I(a,{labelable:!0});return _(i,r.defaultSelected,r.setSelected),{labelProps:t(y,{onClick:e=>e.preventDefault()}),inputProps:t(L,{"aria-invalid":b||c==="invalid"||void 0,"aria-errormessage":a["aria-errormessage"],"aria-controls":a["aria-controls"],"aria-readonly":o||void 0,onChange:x,disabled:l,...n==null?{}:{value:n},name:m,form:g,type:"checkbox",...D}),isSelected:r.isSelected,isPressed:h||k,isDisabled:l,isReadOnly:o,isInvalid:b||c==="invalid"}}export{A as $};
|
||||
@@ -0,0 +1 @@
|
||||
import{r as n,j as e}from"./react-vendor-jWT2yUdV.js";import{u as F,k as O,b as v,W as h}from"./index-DiaaLdUu.js";import{c as R}from"./chunk-5PILOUBS-KHYNqMZE.js";import{c as z}from"./chunk-D5XJWRAV-DVN21qSw.js";import{i as L}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{i as I}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{n as g}from"./react-hot-toast-cGcFZPSt.js";import{I as H,a as _}from"./index-FvTxWQTZ.js";import{l as W}from"./logo-kBMoCJob.js";import{P as V,H as B,T as K}from"./pure-XNiwTrk_.js";import{m as J}from"./proxy-BsRmjYPH.js";import{u as M}from"./react-router-dom-C6k78GT4.js";import"./qface-BZLvZXJ8.js";import"./index-BsnVex0g.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-M3MASYO7-B4fjH-eW.js";import"./iconBase-B7bT1FlI.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./useToggle-B3ZYBe5S.js";import"./usePress-BrNwsdVw.js";import"./icons-C0t6aNgu.js";import"./chunk-OPTZHMJX-CY9g90YL.js";import"./chunk-6LIX6LVT-B246pOuK.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./useHover-DC1o5-bm.js";import"./gestures-BHfQC-M8.js";import"./layout-Buao20KT.js";function Ce(){const j=new URLSearchParams(window.location.search).get("token"),x=M(),[l,C]=n.useState(j||""),[o,d]=n.useState(!1),[m,N]=n.useState(!0),[,f]=F(O.token,""),[b,S]=n.useState(!1),[c,P]=n.useState(""),[D,A]=n.useState("");function T(t){const r=t.replace(/-/g,"+").replace(/_/g,"/"),a=atob(r),s=new Uint8Array(a.length);for(let i=0;i<a.length;i++)s[i]=a.charCodeAt(i);return s}function p(t){return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const q=async()=>{var t;if(!(!navigator.credentials||!navigator.credentials.get)){try{const r=await h.generatePasskeyAuthenticationOptions(),a=await navigator.credentials.get({publicKey:{challenge:T(r.challenge),allowCredentials:(t=r.allowCredentials)==null?void 0:t.map(k=>({id:T(k.id),type:k.type,transports:k.transports})),userVerification:r.userVerification}});if(!a)throw new Error("Passkey authentication cancelled");const s=a.response,i={id:a.id,rawId:p(new Uint8Array(a.rawId)),response:{authenticatorData:p(new Uint8Array(s.authenticatorData)),clientDataJSON:p(new Uint8Array(s.clientDataJSON)),signature:p(new Uint8Array(s.signature)),userHandle:s.userHandle?p(new Uint8Array(s.userHandle)):null},type:a.type},y=await h.verifyPasskeyAuthentication(i);if(y&&y.Credential)return f(y.Credential),x("/qq_login",{replace:!0}),!0}catch(r){console.log("Passkey login failed or not available:",r)}return!1}},u=async()=>{if(!l){g.error("请输入token");return}d(!0);try{const t=await h.loginWithToken(l);if(t){if(t.require2FA){S(!0),A(l),d(!1);return}t.Credential&&f(t.Credential),x("/qq_login",{replace:!0})}}catch(t){g.error(t.message)}finally{d(!1)}},w=async()=>{if(!c||c.length!==6){g.error("Please enter 6-digit code");return}d(!0);try{const t=await h.loginWithToken(D,c);t&&t.Credential&&(f(t.Credential),x("/qq_login",{replace:!0}))}catch(t){g.error(t.message)}finally{d(!1)}},E=()=>{S(!1),P(""),A("")},U=t=>{t.key==="Enter"&&!o&&!m&&(b?w():u())};return n.useEffect(()=>(document.addEventListener("keydown",U),()=>{document.removeEventListener("keydown",U)}),[l,c,o,m,b]),n.useEffect(()=>{if(j){N(!1),u();return}q().finally(()=>{N(!1)})},[]),e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"WebUI登录 - SnowCat WebUI"}),e.jsx(V,{children:e.jsx(J.div,{initial:{opacity:0,y:20,scale:.95},animate:{opacity:1,y:0,scale:1},transition:{duration:.5,type:"spring",stiffness:120,damping:20},className:"w-[608px] max-w-full py-8 px-2 md:px-8 overflow-hidden",children:e.jsxs(B,{className:"items-center gap-4 pt-0 pb-6 rounded-3xl border border-white/70 dark:border-white/10 bg-white/70 dark:bg-white/[0.05] shadow-2xl shadow-primary-900/10",maxXRotation:3,maxYRotation:3,children:[e.jsxs(z,{className:"inline-block max-w-lg text-center justify-center",children:[e.jsxs("div",{className:"flex items-center justify-center w-full gap-3 pt-9",children:[e.jsx(L,{alt:"logo",height:"5.5em",src:W,className:"drop-shadow-md"}),e.jsxs("div",{className:"text-left",children:[e.jsx("div",{className:"text-2xl font-bold tracking-tight bg-gradient-to-r from-primary-500 to-secondary-400 bg-clip-text text-transparent",children:"SnowCat"}),e.jsx("div",{className:"text-tiny tracking-[0.28em] text-default-400 uppercase",children:"雪猫控制台"})]})]}),e.jsx(K,{className:"absolute right-4 top-4"})]}),e.jsxs(R,{className:"flex gap-5 py-5 px-5 md:px-10",children:[m&&e.jsx("div",{className:"text-center text-small text-default-600 dark:text-default-400 px-2",children:"🔐 正在检查Passkey..."}),b?e.jsxs(e.Fragment,{children:[e.jsx(v,{isIconOnly:!0,variant:"light",className:"self-start -ml-2",onPress:E,children:e.jsx(H,{size:20})}),e.jsx("div",{className:"text-center text-default-600 dark:text-default-400",children:"请输入Authenticator中的验证码"}),e.jsx("form",{onSubmit:t=>{t.preventDefault(),w()},children:e.jsx(I,{type:"text",inputModeLine truncated
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;-moz-user-select:none;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::-moz-selection{color:transparent}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;-moz-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:double underline;text-decoration:double underline}.xterm-underline-3{-webkit-text-decoration:wavy underline;text-decoration:wavy underline}.xterm-underline-4{-webkit-text-decoration:dotted underline;text-decoration:dotted underline}.xterm-underline-5{-webkit-text-decoration:dashed underline;text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}
|
||||
@@ -0,0 +1,9 @@
|
||||
import{r as fe,j as Re}from"./react-vendor-jWT2yUdV.js";import{a as Fe,c as We}from"./index-DiaaLdUu.js";var be={exports:{}},Me;function $e(){return Me||(Me=1,(function(de,ve){(function(ae,J){de.exports=J()})(self,(()=>(()=>{var ae={903:(B,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.BaseRenderLayer=void 0;const d=a(274),_=a(627),n=a(237),c=a(860),f=a(374),m=a(296),o=a(345),e=a(859),r=a(399),t=a(855);class i extends e.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var l;return(l=this._charAtlas)==null?void 0:l.pages[0].canvas}constructor(l,g,u,p,C,b,y,w,k,D){super(),this._terminal=l,this._container=g,this._alpha=C,this._themeService=b,this._bufferService=y,this._optionsService=w,this._decorationService=k,this._coreBrowserService=D,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,m.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new e.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${u}-layer`),this._canvas.style.zIndex=p.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((P=>{this._refreshCharAtlas(P),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}))),this.register((0,e.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,f.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(l,g){}handleSelectionChanged(l,g,u=!1){this._selectionModel.update(this._terminal._core,l,g,u)}_setTransparency(l){if(l===this._alpha)return;const g=this._canvas;this._alpha=l,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,g),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(l){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,_.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,l,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,o.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let g=0;g<this._charAtlas.pages.length;g++)this._bitmapGenerator[g]=new h(this._charAtlas.pages[g].canvas)}}resize(l){this._deviceCellWidth=l.device.cell.width,this._deviceCellHeight=l.device.cell.height,this._deviceCharWidth=l.device.char.width,this._deviceCharHeight=l.device.char.height,this._deviceCharLeft=l.device.char.left,this._deviceCharTop=l.device.char.top,this._canvas.width=l.device.canvas.width,this._canvas.height=l.device.canvas.height,this._canvas.style.width=`${l.css.canvas.width}px`,this._canvas.style.height=`${l.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var l;(l=this._charAtlas)==null||l.clearTexture()}_fillCells(l,g,u,p){this._ctx.fillRect(l*this._deviceCellWidth,g*this._deviceCellHeight,u*this._deviceCellWidth,p*this._deviceCellHeight)}_fillMiddleLineAtCells(l,g,u=1){const p=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(l*this._deviceCellWidth,(g+1)*this._deviceCellHeight-p-this._coreBrowserService.dpr,u*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(l,g,u=1,p=0){this._ctx.fillRect(l*this._deviceCellWidth,(g+1)*this._deviceCellHeight+p-this._coreBrowserService.dpr-1,u*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(l,g,u=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const p=this._coreBrowserService.dpr;this._ctx.lineWidth=p;for(let C=0;C<u;C++){const b=(l+C)*this._deviceCellWidth,y=(l+C+.5)*this._deviceCellWidth,w=(l+C+1)*this._deviceCellWidth,k=(g+1)*this._deviceCellHeight-p-1,D=k-p,P=k+p;this._ctx.moveTo(b,k),this._ctx.bezierCurveTo(b,D,y,D,y,k),this._ctx.bezierCurveTo(y,P,w,P,w,k)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(l,g,u=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const p=this._coreBrowserService.dpr;this._ctx.lineWidth=p,this._ctx.setLineDash([2*p,p]);const C=l*this._deviceCellWidth,b=(g+1)*this._deviceCellHeight-p-1;this._ctx.moveTo(C,b);for(let y=0;y<Line truncated
|
||||
`)))),this.register(this._terminal.onA11yTab((l=>this._handleTab(l)))),this.register(this._terminal.onKey((l=>this._handleKey(l.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,e.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,f.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(t){for(let i=0;i<t;i++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
||||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(t){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(t)||this._charsToConsume.push(t)}_refreshRows(t,i){this._liveRegionDebouncer.refresh(t,i,this._terminal.rows)}_renderRows(t,i){const h=this._terminal.buffer,v=h.lines.length.toString();for(let l=t;l<=i;l++){const g=h.lines.get(h.ydisp+l),u=[],p=(g==null?void 0:g.translateToString(!0,void 0,void 0,u))||"",C=(h.ydisp+l+1).toString(),b=this._rowElements[l];b&&(p.length===0?(b.innerText=" ",this._rowColumns.set(b,[0,1])):(b.textContent=p,this._rowColumns.set(b,u)),b.setAttribute("aria-posinset",C),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,i){const h=t.target,v=this._rowElements[i===0?1:this._rowElements.length-2];if(h.getAttribute("aria-posinset")===(i===0?"1":`${this._terminal.buffer.lines.length}`)||t.relatedTarget!==v)return;let l,g;if(i===0?(l=h,g=this._rowElements.pop(),this._rowContainer.removeChild(g)):(l=this._rowElements.shift(),g=h,this._rowContainer.removeChild(l)),l.removeEventListener("focus",this._topBoundaryFocusListener),g.removeEventListener("focus",this._bottomBoundaryFocusListener),i===0){const u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{const u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(i===0?-1:1),this._rowElements[i===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleSelectionChange(){var p;if(this._rowElements.length===0)return;const t=document.getSelection();if(!t)return;if(t.isCollapsed)return void(this._rowContainer.contains(t.anchorNode)&&this._terminal.clearSelection());if(!t.anchorNode||!t.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:t.anchorNode,offset:t.anchorOffset},h={node:t.focusNode,offset:t.focusOffset};if((i.node.compareDocumentPosition(h.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===h.node&&i.offset>h.offset)&&([i,h]=[h,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;const v=this._rowElements.slice(-1)[0];if(h.node.compareDocumentPosition(v)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(h={node:v,offset:((p=v.textContent)==null?void 0:p.length)??0}),!this._rowContainer.contains(h.node))return;const l=({node:C,offset:b})=>{const y=C instanceof Text?C.parentNode:C;let w=parseInt(y==null?void 0:y.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const k=this._rowColumns.get(y);if(!k)return console.warn("columns is null. Race condition?"),null;let D=b<k.length?k[b]:k.slice(-1)[0]+1;return D>=this._terminal.cols&&(++w,D=0),{row:w,column:D}},g=l(i),u=l(h);if(g&&u){if(g.row>u.row||g.row===u.row&&g.column>=u.column)throw new Error("invalid range");this._terminal.select(g.column,g.row,(u.row-g.row)*this._terminal.cols-g.column+u.column)}}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let i=this._rowContainer.children.length;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const t=this._coreBrowserService.mainDocument.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}};s.AccessibilityManager=r=d([_(1,o.IInstantiationService),_(2,m.ICoreBrowserService),_(3,m.IRenderService)],r)},3614:(B,s)=>{function a(c){return c.replace(/\r?\n/g,"\r")}function d(
Line truncated
|
||||
|
||||
WARNING: This link could potentially be dangerous`)){const r=window.open();if(r){try{r.opener=null}catch{}r.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}s.OscLinkProvider=f=d([_(0,c.IBufferService),_(1,c.IOptionsService),_(2,c.IOscLinkService)],f)},6193:(B,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.RenderDebouncer=void 0,s.RenderDebouncer=class{constructor(a,d){this._renderCallback=a,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(a,d,_){this._rowCount=_,a=a!==void 0?a:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const a=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},3236:(B,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Terminal=void 0;const d=a(3614),_=a(3656),n=a(3551),c=a(9042),f=a(3730),m=a(1680),o=a(3107),e=a(5744),r=a(2950),t=a(1296),i=a(428),h=a(4269),v=a(5114),l=a(8934),g=a(3230),u=a(9312),p=a(4725),C=a(6731),b=a(8055),y=a(8969),w=a(8460),k=a(844),D=a(6114),P=a(8437),T=a(2584),A=a(7399),S=a(5941),x=a(9074),E=a(2585),R=a(5435),I=a(4567),F=a(779);class N extends y.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(M={}){super(M),this.browser=D,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new k.MutableDisposable),this._onCursorMove=this.register(new w.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new w.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new w.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new w.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new w.EventEmitter),this._onBlur=this.register(new w.EventEmitter),this._onA11yCharEmitter=this.register(new w.EventEmitter),this._onA11yTabEmitter=this.register(new w.EventEmitter),this._onWillOpen=this.register(new w.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(x.DecorationService),this._instantiationService.setService(E.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(F.LinkProviderService),this._instantiationService.setService(p.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(f.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((L,H)=>this.refresh(L,H)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((L=>this._reportWindowsOptions(L)))),this.register(this._inputHandler.onColor((L=>this._handleColorEvent(L)))),this.register((0,w.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,w.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,w.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,w.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((L=>this._afterResize(L.cols,L.rows)))),this.register((0,k.toDisposable)((()=>{var L,H;this._customKeyEventHandler=void 0,(H=(L=this.element)==null?void 0:L.parentNode)==null||H.removeChild(this.element)})))}_handleColorEvent(M){if(this._themeService)for(const L of M){let H,O="";switch(L.index){case 256:H="foreground",O="10";break;case 257:H="background",O="11";b
Line truncated
|
||||
`:`
|
||||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(u){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),r.isLinux&&u&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(u){const p=this._getMouseBufferCoords(u),C=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!!(C&&b&&p)&&this._areCoordsInSelection(p,C,b)}isCellInSelection(u,p){const C=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!C||!b)&&this._areCoordsInSelection([u,p],C,b)}_areCoordsInSelection(u,p,C){return u[1]>p[1]&&u[1]<C[1]||p[1]===C[1]&&u[1]===p[1]&&u[0]>=p[0]&&u[0]<C[0]||p[1]<C[1]&&u[1]===C[1]&&u[0]<C[0]||p[1]<C[1]&&u[1]===p[1]&&u[0]>=p[0]}_selectWordAtCursor(u,p){var y,w;const C=(w=(y=this._linkifier.currentLink)==null?void 0:y.link)==null?void 0:w.range;if(C)return this._model.selectionStart=[C.start.x-1,C.start.y-1],this._model.selectionStartLength=(0,t.getRangeLength)(C,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const b=this._getMouseBufferCoords(u);return!!b&&(this._selectWordAt(b,p),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(u,p){this._model.clearSelection(),u=Math.max(u,0),p=Math.min(p,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,u],this._model.selectionEnd=[this._bufferService.cols,p],this.refresh(),this._onSelectionChange.fire()}_handleTrim(u){this._model.handleTrim(u)&&this.refresh()}_getMouseBufferCoords(u){const p=this._mouseService.getCoords(u,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(p)return p[0]--,p[1]--,p[1]+=this._bufferService.buffer.ydisp,p}_getMouseEventScrollAmount(u){let p=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,u,this._screenElement)[1];const C=this._renderService.dimensions.css.canvas.height;return p>=0&&p<=C?0:(p>C&&(p-=C),p=Math.min(Math.max(p,-50),50),p/=50,p/Math.abs(p)+Math.round(14*p))}shouldForceSelection(u){return r.isMac?u.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:u.shiftKey}handleMouseDown(u){if(this._mouseDownTimeStamp=u.timeStamp,(u.button!==2||!this.hasSelection)&&u.button===0){if(!this._enabled){if(!this.shouldForceSelection(u))return;u.stopPropagation()}u.preventDefault(),this._dragScrollAmount=0,this._enabled&&u.shiftKey?this._handleIncrementalClick(u):u.detail===1?this._handleSingleClick(u):u.detail===2?this._handleDoubleClick(u):u.detail===3&&this._handleTripleClick(u),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(u){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(u))}_handleSingleClick(u){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(u)?3:0,this._model.selectionStart=this._getMouseBufferCoords(u),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const p=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);p&&p.length!==this._model.selectionStart[0]&&p.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(u){this._selectWordAtCursor(u,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(u){const p=this._getMouseBufferCoords(u);p&&(this._activeSelectionMode=2,this._selectLineAt(p[1]))}shouldColumnSelect(u){return u.altKey&&!(r.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(u){if(u.stopImmediatePropagation(),!this._model.selectionStart)return;const p=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(u),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._buff
Line truncated
|
||||
`,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""})(a||(s.C0=a={})),(function(n){n.PAD="",n.HOP="",n.BPH="",n.NBH="",n.IND="",n.NEL="
",n.SSA="",n.ESA="",n.HTS="",n.HTJ="",n.VTS="",n.PLD="",n.PLU="",n.RI="",n.SS2="",n.SS3="",n.DCS="",n.PU1="",n.PU2="",n.STS="",n.CCH="",n.MW="",n.SPA="",n.EPA="",n.SOS="",n.SGCI="",n.SCI="",n.CSI="",n.ST="",n.OSC="",n.PM="",n.APC=""})(d||(s.C1=d={})),(function(n){n.ST=`${a.ESC}\\`})(_||(s.C1_ESCAPED=_={}))},7399:(B,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.evaluateKeyboardEvent=void 0;const d=a(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};s.evaluateKeyboardEvent=function(n,c,f,m){const o={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?o.key=c?d.C0.ESC+"OA":d.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?o.key=c?d.C0.ESC+"OD":d.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?o.key=c?d.C0.ESC+"OC":d.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(o.key=c?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:o.key=n.ctrlKey?"\b":d.C0.DEL,n.altKey&&(o.key=d.C0.ESC+o.key);break;case 9:if(n.shiftKey){o.key=d.C0.ESC+"[Z";break}o.key=d.C0.HT,o.cancel=!0;break;case 13:o.key=n.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,o.cancel=!0;break;case 27:o.key=d.C0.ESC,n.altKey&&(o.key=d.C0.ESC+d.C0.ESC),o.cancel=!0;break;case 37:if(n.metaKey)break;e?(o.key=d.C0.ESC+"[1;"+(e+1)+"D",o.key===d.C0.ESC+"[1;3D"&&(o.key=d.C0.ESC+(f?"b":"[1;5D"))):o.key=c?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(o.key=d.C0.ESC+"[1;"+(e+1)+"C",o.key===d.C0.ESC+"[1;3C"&&(o.key=d.C0.ESC+(f?"f":"[1;5C"))):o.key=c?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(o.key=d.C0.ESC+"[1;"+(e+1)+"A",f||o.key!==d.C0.ESC+"[1;3A"||(o.key=d.C0.ESC+"[1;5A")):o.key=c?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(o.key=d.C0.ESC+"[1;"+(e+1)+"B",f||o.key!==d.C0.ESC+"[1;3B"||(o.key=d.C0.ESC+"[1;5B")):o.key=c?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(o.key=d.C0.ESC+"[2~");break;case 46:o.key=e?d.C0.ESC+"[3;"+(e+1)+"~":d.C0.ESC+"[3~";break;case 36:o.key=e?d.C0.ESC+"[1;"+(e+1)+"H":c?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:o.key=e?d.C0.ESC+"[1;"+(e+1)+"F":c?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:n.shiftKey?o.type=2:n.ctrlKey?o.key=d.C0.ESC+"[5;"+(e+1)+"~":o.key=d.C0.ESC+"[5~";break;case 34:n.shiftKey?o.type=3:n.ctrlKey?o.key=d.C0.ESC+"[6;"+(e+1)+"~":o.key=d.C0.ESC+"[6~";break;case 112:o.key=e?d.C0.ESC+"[1;"+(e+1)+"P":d.C0.ESC+"OP";break;case 113:o.key=e?d.C0.ESC+"[1;"+(e+1)+"Q":d.C0.ESC+"OQ";break;case 114:o.key=e?d.C0.ESC+"[1;"+(e+1)+"R":d.C0.ESC+"OR";break;case 115:o.key=e?d.C0.ESC+"[1;"+(e+1)+"S":d.C0.ESC+"OS";break;case 116:o.key=e?d.C0.ESC+"[15;"+(e+1)+"~":d.C0.ESC+"[15~";break;case 117:o.key=e?d.C0.ESC+"[17;"+(e+1)+"~":d.C0.ESC+"[17~";break;case 118:o.key=e?d.C0.ESC+"[18;"+(e+1)+"~":d.C0.ESC+"[18~";break;case 119:o.key=e?d.C0.ESC+"[19;"+(e+1)+"~":d.C0.ESC+"[19~";break;case 120:o.key=e?d.C0.ESC+"[20;"+(e+1)+"~":d.C0.ESC+"[20~";break;case 121:o.key=e?d.C0.ESC+"[21;"+(e+1)+"~":d.C0.ESC+"[21~";break;case 122:o.key=e?d.C0.ESC+"[23;"+(e+1)+"~":d.C0.ESC+"[23~";break;case 123:o.key=e?d.C0.ESC+"[24;"+(e+1)+"~":d.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(f&&!m||!n.altKey||n.metaKey)!f||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?o.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(o.key=d.C0.US),n.key==="@"&&(o.key=d.C0.NUL)):n.keyCode===65&&(o.type=1);else{const r=_[n.keyCode],t=r==null?void 0:r[n.shiftKey?1:0];if(t)o.key=d.C0.ESC+t;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let h=String.fromCharCode(i);n.shiftKey&&(h=h.toUpperCase()),o.key=d.C0.ESC+h}else if(n.keyCode===32)o.key=d.C0.ESC+(n.ctrlKey?d.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),o.key=d.C0.ESC+i,o.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?o.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?o.key=d.C0.NUL:n.keyCode>=51&&n.keyCode<=55?o.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?o.key=d.C0.DEL:n.keyCode===219?o.key=d.C0.ESC:n.keyCode===220?o.key=d.C0.FS:n.keyCode===221&&(o.key=d.C0.GS)}return o}},482:(B,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.Utf8ToUtf32=s.StringToUtf32=s.utf32ToString=s.stringFromCodePoint=void 0,s.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55Line truncated
|
||||
`,t)}paste(r){this._core.paste(r)}refresh(r,t){this._verifyIntegers(r,t),this._core.refresh(r,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(r){this._addonManager.loadAddon(this,r)}static get strings(){return s}_verifyIntegers(...r){for(const t of r)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...r){for(const t of r)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}B.Terminal=o})(),oe})()))})(Le)),Le.exports}var Ge=Ke();const Je=fe.forwardRef((de,ve)=>{const ae=fe.useRef(null),J=fe.useRef(null),{className:Z,onInput:oe,onKey:B,onResize:s,...a}=de,{theme:d}=Fe();return fe.useEffect(()=>{const _=window.innerWidth;let n=16;_<400?n=4:_<600?n=5:_<900?n=6:_<1280&&(n=12);const c=new Ge.Terminal({allowTransparency:!0,fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "JetBrains Mono", monospace',cursorInactiveStyle:"outline",drawBoldTextInBrightColors:!1,fontSize:n,lineHeight:1.2});J.current=c;const f=new ze.FitAddon;c.loadAddon(new qe.WebLinksAddon((o,e)=>{(o.ctrlKey||o.metaKey)&&window.open(e,"_blank")})),c.loadAddon(f),c.open(ae.current),c.loadAddon(new Ue.CanvasAddon),c.onData(o=>{oe&&oe(o)}),c.onKey(o=>{B&&B(o.key,o.domEvent)});const m=new ResizeObserver(()=>{f.fit();const o=c.cols,e=c.rows;s&&s(o,e)});return document.fonts.ready.then(()=>{f.fit(),m.observe(ae.current)}),()=>{m.disconnect(),setTimeout(()=>{c.dispose()},0)}},[]),fe.useEffect(()=>{if(J.current){d==="dark"?J.current.options.theme={background:"#00000000",black:"#ffffff",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightCyan:"#29b8db",brightWhite:"#e5e5e5",foreground:"#cccccc",selectionBackground:"#3a3d41",cursor:"#ffffff"}:J.current.options.theme={background:"#00000000",black:"#1b1b22",red:"#f07178",green:"#7fd88f",yellow:"#ffcb6b",blue:"#82aaff",magenta:"#c792ea",cyan:"#89ddff",white:"#d0d0d6",brightBlack:"#7a7a86",brightRed:"#ff8b92",brightGreen:"#a5e8b4",brightYellow:"#ffe0a3",brightBlue:"#a8c4ff",brightMagenta:"#e2b9ff",brightCyan:"#b5ecff",brightWhite:"#f5f5fa",foreground:"#d0d0d6",selectionBackground:"rgba(255,127,172,0.35)",cursor:"#ff7fac"};try{J.current.refresh(0,J.current.rows-1)}catch{}}},[d]),fe.useImperativeHandle(ve,()=>({write:(..._)=>{var n;return(n=J.current)==null?void 0:n.write(..._)},writeAsync:async _=>new Promise(n=>{var c;(c=J.current)==null||c.write(_,n)}),writeln:(..._)=>{var n;return(n=J.current)==null?void 0:n.writeln(..._)},writelnAsync:async _=>new Promise(n=>{var c;(c=J.current)==null||c.writeln(_,n)}),clear:()=>{var _;(_=J.current)==null||_.clear()},terminalRef:J}),[]),Re.jsx("div",{className:We("p-2.5 rounded-2xl border w-full h-full overflow-hidden backdrop-blur-sm transition-colors",d==="dark"?"bg-[#0d0d11] border-white/10":"bg-[#16161c] border-black/20",Z),...a,children:Re.jsx("div",{style:{width:"100%",height:"100%"},ref:ae})})});export{Je as X};
|
||||
Reference in new issue
Block a user