84 lines
11 KiB
JavaScript
84 lines
11 KiB
JavaScript
import{p as o,B as s,A as j,C as k,c as a,o as i,d as c,a as h,z as d,E as m,D,_ as H,t as M,F as g,f as b,e as u,u as l}from"./index-k1IBxX4P.js";async function B(e){return(await o(`${s}/api/projects/${e}/agents`)).json()}async function X(){return(await o(`${s}/api/user/agents`)).json()}async function F(e,n,t){return(await o(`${s}/api/projects/${e}/agents/${n}`,{method:"PUT",body:JSON.stringify(t)})).json()}async function V(e,n){return(await o(`${s}/api/user/agents/${e}`,{method:"PUT",body:JSON.stringify(n)})).json()}async function q(e,n){return(await o(`${s}/api/projects/${e}/agents/${n}`,{method:"DELETE"})).json()}async function G(e){return(await o(`${s}/api/user/agents/${e}`,{method:"DELETE"})).json()}async function K(e,n){return(await o(`${s}/api/projects/${e}/agents/${n}/references`)).json()}async function W(e){return(await o(`${s}/api/user/agents/${e}/references`)).json()}async function x(e){return(await o(`${s}/api/copy/agent`,{method:"POST",body:JSON.stringify(e)})).json()}const Pe=Object.freeze(Object.defineProperty({__proto__:null,copyAgent:x,deleteProjectAgent:q,deleteUserAgent:G,getProjectAgentReferences:K,getProjectAgents:B,getUserAgentReferences:W,getUserAgents:X,updateProjectAgent:F,updateUserAgent:V},Symbol.toStringTag,{value:"Module"}));async function S(e){return(await o(`${s}/api/projects/${e}/commands`)).json()}async function v(){return(await o(`${s}/api/user/commands`)).json()}async function w(e){return(await o(`${s}/api/copy/command`,{method:"POST",body:JSON.stringify(e)})).json()}async function P(e,n,t){const r=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/commands/${r}`,{method:"PUT",body:JSON.stringify(t)})).json()}async function U(e,n){const t=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/commands/${t}`,{method:"DELETE"})).json()}async function C(e,n){const t=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/commands/${t}/references`)).json()}async function E(e,n){const t=encodeURIComponent(e);return(await o(`${s}/api/user/commands/${t}`,{method:"PUT",body:JSON.stringify(n)})).json()}async function T(e){const n=encodeURIComponent(e);return(await o(`${s}/api/user/commands/${n}`,{method:"DELETE"})).json()}async function O(e){const n=encodeURIComponent(e);return(await o(`${s}/api/user/commands/${n}/references`)).json()}const Q={getProjectCommands:S,getUserCommands:v,copyCommand:w,updateProjectCommand:P,deleteProjectCommand:U,getProjectCommandReferences:C,updateUserCommand:E,deleteUserCommand:T,getUserCommandReferences:O},Ue=Object.freeze(Object.defineProperty({__proto__:null,copyCommand:w,default:Q,deleteProjectCommand:U,deleteUserCommand:T,getProjectCommandReferences:C,getProjectCommands:S,getUserCommandReferences:O,getUserCommands:v,updateProjectCommand:P,updateUserCommand:E},Symbol.toStringTag,{value:"Module"}));async function Y(e){return(await o(`${s}/api/projects/${e}/hooks`)).json()}async function Z(){return(await o(`${s}/api/user/hooks`)).json()}async function _(e,n,t){const r=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/hooks/${r}`,{method:"PUT",body:JSON.stringify(t)})).json()}async function ee(e,n){const t=encodeURIComponent(e);return(await o(`${s}/api/user/hooks/${t}`,{method:"PUT",body:JSON.stringify(n)})).json()}async function ne(e,n){const t=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/hooks/${t}`,{method:"DELETE"})).json()}async function te(e){const n=encodeURIComponent(e);return(await o(`${s}/api/user/hooks/${n}`,{method:"DELETE"})).json()}async function oe(e){return(await o(`${s}/api/copy/hook`,{method:"POST",body:JSON.stringify(e)})).json()}const Ce=Object.freeze(Object.defineProperty({__proto__:null,copyHook:oe,deleteProjectHook:ne,deleteUserHook:te,getProjectHooks:Y,getUserHooks:Z,updateProjectHook:_,updateUserHook:ee},Symbol.toStringTag,{value:"Module"}));async function R(e){return(await o(`${s}/api/projects/${e}/mcp`)).json()}async function I(){return(await o(`${s}/api/user/mcp`)).json()}async function N(e){return(await o(`${s}/api/copy/mcp`,{method:"POST",body:JSON.stringify(e)})).json()}async function A(e,n,t){const r=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/mcp/${r}`,{method:"PUT",body:JSON.stringify(t)})).json()}async function z(e,n){const t=encodeURIComponent(e);return(await o(`${s}/api/user/mcp/${t}`,{method:"PUT",body:JSON.stringify(n)})).json()}async function L(e,n){const t=encodeURIComponent(n);return(await o(`${s}/api/projects/${e}/mcp/${t}`,{method:"DELETE"})).json()}async function J(e){const n=encodeURIComponent(e);return(await o(`${s}/api/user/mcp/${n}`,{method:"DELETE"})).json()}const se={getProjectMcp:R,getUserMcp:I,copyMcp:N,updateProjectMcp:A,updateUserMcp:z,deleteProjectMcpServer:L,deleteUserMcpServer:J},Ee=Object.freeze(Object.defineProperty({__proto__:null,copyMcp:N,default:se,deleteProjectMcpServer:L,deleteUserMcpServer:J,getProjectMcp:R,getUserMcp:I,updateProjectMcp:A,updateUserMcp:z},Symbol.toStringTag,{value:"Module"}));var re=`
|
|
.p-card {
|
|
background: dt('card.background');
|
|
color: dt('card.color');
|
|
box-shadow: dt('card.shadow');
|
|
border-radius: dt('card.border.radius');
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.p-card-caption {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: dt('card.caption.gap');
|
|
}
|
|
|
|
.p-card-body {
|
|
padding: dt('card.body.padding');
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: dt('card.body.gap');
|
|
}
|
|
|
|
.p-card-title {
|
|
font-size: dt('card.title.font.size');
|
|
font-weight: dt('card.title.font.weight');
|
|
}
|
|
|
|
.p-card-subtitle {
|
|
color: dt('card.subtitle.color');
|
|
}
|
|
`,ae={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},ie=j.extend({name:"card",style:re,classes:ae}),ce={name:"BaseCard",extends:k,style:ie,provide:function(){return{$pcCard:this,$parentInstance:this}}},de={name:"Card",extends:ce,inheritAttrs:!1};function pe(e,n,t,r,f,$){return i(),a("div",d({class:e.cx("root")},e.ptmi("root")),[e.$slots.header?(i(),a("div",d({key:0,class:e.cx("header")},e.ptm("header")),[m(e.$slots,"header")],16)):c("",!0),h("div",d({class:e.cx("body")},e.ptm("body")),[e.$slots.title||e.$slots.subtitle?(i(),a("div",d({key:0,class:e.cx("caption")},e.ptm("caption")),[e.$slots.title?(i(),a("div",d({key:0,class:e.cx("title")},e.ptm("title")),[m(e.$slots,"title")],16)):c("",!0),e.$slots.subtitle?(i(),a("div",d({key:1,class:e.cx("subtitle")},e.ptm("subtitle")),[m(e.$slots,"subtitle")],16)):c("",!0)],16)):c("",!0),h("div",d({class:e.cx("content")},e.ptm("content")),[m(e.$slots,"content")],16),e.$slots.footer?(i(),a("div",d({key:1,class:e.cx("footer")},e.ptm("footer")),[m(e.$slots,"footer")],16)):c("",!0)],16)],16)}de.render=pe;var ue=`
|
|
.p-skeleton {
|
|
display: block;
|
|
overflow: hidden;
|
|
background: dt('skeleton.background');
|
|
border-radius: dt('skeleton.border.radius');
|
|
}
|
|
|
|
.p-skeleton::after {
|
|
content: '';
|
|
animation: p-skeleton-animation 1.2s infinite;
|
|
height: 100%;
|
|
left: 0;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
transform: translateX(-100%);
|
|
z-index: 1;
|
|
background: linear-gradient(90deg, rgba(255, 255, 255, 0), dt('skeleton.animation.background'), rgba(255, 255, 255, 0));
|
|
}
|
|
|
|
[dir='rtl'] .p-skeleton::after {
|
|
animation-name: p-skeleton-animation-rtl;
|
|
}
|
|
|
|
.p-skeleton-circle {
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.p-skeleton-animation-none::after {
|
|
animation: none;
|
|
}
|
|
|
|
@keyframes p-skeleton-animation {
|
|
from {
|
|
transform: translateX(-100%);
|
|
}
|
|
to {
|
|
transform: translateX(100%);
|
|
}
|
|
}
|
|
|
|
@keyframes p-skeleton-animation-rtl {
|
|
from {
|
|
transform: translateX(100%);
|
|
}
|
|
to {
|
|
transform: translateX(-100%);
|
|
}
|
|
}
|
|
`,le={root:{position:"relative"}},me={root:function(n){var t=n.props;return["p-skeleton p-component",{"p-skeleton-circle":t.shape==="circle","p-skeleton-animation-none":t.animation==="none"}]}},ye=j.extend({name:"skeleton",style:ue,classes:me,inlineStyles:le}),fe={name:"BaseSkeleton",extends:k,props:{shape:{type:String,default:"rectangle"},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave"}},style:ye,provide:function(){return{$pcSkeleton:this,$parentInstance:this}}};function y(e){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},y(e)}function ge(e,n,t){return(n=he(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function he(e){var n=$e(e,"string");return y(n)=="symbol"?n:n+""}function $e(e,n){if(y(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,n);if(y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var p={name:"Skeleton",extends:fe,inheritAttrs:!1,computed:{containerStyle:function(){return this.size?{width:this.size,height:this.size,borderRadius:this.borderRadius}:{width:this.width,height:this.height,borderRadius:this.borderRadius}},dataP:function(){return D(ge({},this.shape,this.shape))}}},be=["data-p"];function je(e,n,t,r,f,$){return i(),a("div",d({class:e.cx("root"),style:[e.sx("root"),$.containerStyle],"aria-hidden":"true"},e.ptmi("root"),{"data-p":$.dataP}),null,16,be)}p.render=je;const ke={class:"loading-state"},Se={key:0,class:"loading-message"},ve={__name:"LoadingState",props:{count:{type:Number,default:3,validator:e=>e>0},type:{type:String,default:null,validator:e=>!e||["item","card","list"].includes(e)},message:{type:String,default:null}},setup(e){return(n,t)=>(i(),a("div",ke,[e.message?(i(),a("div",Se,[t[0]||(t[0]=h("i",{class:"pi pi-spin pi-spinner","aria-hidden":"true"},null,-1)),h("p",null,M(e.message),1)])):c("",!0),e.type?(i(),a(g,{key:1},[e.type==="item"?(i(!0),a(g,{key:0},b(e.count,r=>(i(),a("div",{key:r,class:"item-skeleton"},[u(l(p),{height:"2rem",class:"mb-2"}),u(l(p),{height:"1rem",width:"80%"})]))),128)):c("",!0),e.type==="card"?(i(!0),a(g,{key:1},b(e.count,r=>(i(),a("div",{key:r,class:"card-skeleton"},[u(l(p),{height:"3rem",class:"mb-3"}),u(l(p),{height:"1.5rem",count:"2",class:"mb-2"}),u(l(p),{height:"1rem",width:"60%"})]))),128)):c("",!0),e.type==="list"?(i(!0),a(g,{key:2},b(e.count,r=>(i(),a("div",{key:r,class:"list-skeleton"},[u(l(p),{height:"1.5rem"})]))),128)):c("",!0)],64)):c("",!0)]))}},Te=H(ve,[["__scopeId","data-v-c2b840a5"]]);export{te as A,A as B,z as C,R as D,L as E,J as F,S as G,Te as L,v as a,Z as b,I as c,Ue as d,Pe as e,V as f,X as g,Ce as h,q as i,G as j,K as k,W as l,Ee as m,B as n,P as o,E as p,U as q,T as r,de as s,C as t,F as u,O as v,_ as w,ee as x,Y as y,ne as z};
|
|
//# sourceMappingURL=LoadingState-DpzKHwwk.js.map
|