@ggui-ai/iframe-runtime 0.2.0-alpha.1 → 0.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -160,7 +160,7 @@ ${u}`,()=>{s?.remove()}},[i,t,r]),(0,iD.jsx)(Sre.Provider,{value:n,children:o})}
160
160
 
161
161
  `),document.head.appendChild(e),()=>{e.remove()}},[]),null}function v9(){let[e,t]=(0,Li.useState)(()=>typeof window>"u"?!0:!window.matchMedia("(prefers-reduced-motion: reduce)").matches);return(0,Li.useEffect)(()=>{let r=window.matchMedia("(prefers-reduced-motion: reduce)"),o=n=>t(!n.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),{motionEnabled:e}}function b9(e){let[t,r]=(0,Li.useState)(0),o=(0,Li.useRef)(!0);return(0,Li.useEffect)(()=>{if(o.current){o.current=!1;return}r(n=>n+1)},[e]),t}var Li,h9,x9=$(()=>{"use strict";Li=z(X(),1);dp();h9="ggui-motion-keyframes"});var $9={};jt($9,{Accordion:()=>m9,Alert:()=>QD,Avatar:()=>Qo,Badge:()=>Jo,Box:()=>kD,Button:()=>tt,Card:()=>Xn,Checkbox:()=>Cl,Container:()=>yD,Divider:()=>ux,Grid:()=>$D,Heading:()=>xn,Icon:()=>je,Image:()=>gx,Input:()=>lp,Link:()=>yx,MotionKeyframes:()=>y9,Progress:()=>mx,RadioGroup:()=>UD,Row:()=>Ml,Select:()=>fx,Skeleton:()=>FD,Slider:()=>ZD,Spacer:()=>TD,Spinner:()=>Zt,Stack:()=>Qt,Table:()=>s9,Tabs:()=>u9,Text:()=>wt,TextArea:()=>Sg,Toast:()=>d9,Toggle:()=>ND,Tooltip:()=>o9,useAnimationKey:()=>b9,useMotion:()=>v9});var Mg=$(()=>{"use strict";vD();Y5();$g();X5();_D();SD();wD();MD();px();dx();Ai();i3();a3();AD();s3();jD();LD();VD();BD();Ko();WD();wg();YD();c3();e9();$n();p3();i9();l9();c9();f9();g9();x9()});async function O9(e){if(typeof window>"u")return{outcome:"unsupported",mechanism:null};let t=null;try{t=window.open(e,"_blank","noopener,noreferrer")}catch{t=null}try{let o=document.createElement("a");o.href=e,o.target="_blank",o.rel="noopener noreferrer",o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o)}catch{}try{window.parent.postMessage({jsonrpc:"2.0",method:"ui/request/open-url",params:{url:e}},"*")}catch{}try{window.parent.postMessage({jsonrpc:"2.0",id:Math.floor(Math.random()*1e9),method:"tools/call",params:{name:"open_url",arguments:{url:e}}},"*")}catch{}let r=!1;if(typeof navigator<"u"&&navigator.clipboard)try{await Promise.race([navigator.clipboard.writeText(e).then(()=>{r=!0},()=>{r=!1}),new Promise(n=>setTimeout(n,1500))])}catch{r=!1}return t!==null?{outcome:"opened",mechanism:"window.open"}:r?{outcome:"copied",mechanism:"clipboard"}:{outcome:"unsupported",mechanism:null}}var N9=$(()=>{"use strict"});var fp,Pr,Rg,vs,bs,xs,Cg,j9,D9,Yne,Xne,eoe,toe,U9,roe,noe,ooe,ioe,L9,o_e,q9=$(()=>{fp=function(e,t){let n=e,i=Rg[t],a=null,s=0,l=null,u=[],c={},d=function(k,M){s=n*4+17,a=(function(E){let R=new Array(E);for(let P=0;P<E;P+=1){R[P]=new Array(E);for(let Z=0;Z<E;Z+=1)R[P][Z]=null}return R})(s),f(0,0),f(s-7,0),f(0,s-7),v(),g(),y(k,M),n>=7&&x(k),l==null&&(l=_(n,i,u)),h(l,M)},f=function(k,M){for(let E=-1;E<=7;E+=1)if(!(k+E<=-1||s<=k+E))for(let R=-1;R<=7;R+=1)M+R<=-1||s<=M+R||(0<=E&&E<=6&&(R==0||R==6)||0<=R&&R<=6&&(E==0||E==6)||2<=E&&E<=4&&2<=R&&R<=4?a[k+E][M+R]=!0:a[k+E][M+R]=!1)},m=function(){let k=0,M=0;for(let E=0;E<8;E+=1){d(!0,E);let R=bs.getLostPoint(c);(E==0||k>R)&&(k=R,M=E)}return M},g=function(){for(let k=8;k<s-8;k+=1)a[k][6]==null&&(a[k][6]=k%2==0);for(let k=8;k<s-8;k+=1)a[6][k]==null&&(a[6][k]=k%2==0)},v=function(){let k=bs.getPatternPosition(n);for(let M=0;M<k.length;M+=1)for(let E=0;E<k.length;E+=1){let R=k[M],P=k[E];if(a[R][P]==null)for(let Z=-2;Z<=2;Z+=1)for(let N=-2;N<=2;N+=1)Z==-2||Z==2||N==-2||N==2||Z==0&&N==0?a[R+Z][P+N]=!0:a[R+Z][P+N]=!1}},x=function(k){let M=bs.getBCHTypeNumber(n);for(let E=0;E<18;E+=1){let R=!k&&(M>>E&1)==1;a[Math.floor(E/3)][E%3+s-8-3]=R}for(let E=0;E<18;E+=1){let R=!k&&(M>>E&1)==1;a[E%3+s-8-3][Math.floor(E/3)]=R}},y=function(k,M){let E=i<<3|M,R=bs.getBCHTypeInfo(E);for(let P=0;P<15;P+=1){let Z=!k&&(R>>P&1)==1;P<6?a[P][8]=Z:P<8?a[P+1][8]=Z:a[s-15+P][8]=Z}for(let P=0;P<15;P+=1){let Z=!k&&(R>>P&1)==1;P<8?a[8][s-P-1]=Z:P<9?a[8][15-P-1+1]=Z:a[8][15-P-1]=Z}a[s-8][8]=!k},h=function(k,M){let E=-1,R=s-1,P=7,Z=0,N=bs.getMaskFunction(M);for(let ee=s-1;ee>0;ee-=2)for(ee==6&&(ee-=1);;){for(let Ae=0;Ae<2;Ae+=1)if(a[R][ee-Ae]==null){let st=!1;Z<k.length&&(st=(k[Z]>>>P&1)==1),N(R,ee-Ae)&&(st=!st),a[R][ee-Ae]=st,P-=1,P==-1&&(Z+=1,P=7)}if(R+=E,R<0||s<=R){R-=E,E=-E;break}}},b=function(k,M){let E=0,R=0,P=0,Z=new Array(M.length),N=new Array(M.length);for(let ie=0;ie<M.length;ie+=1){let We=M[ie].dataCount,$t=M[ie].totalCount-We;R=Math.max(R,We),P=Math.max(P,$t),Z[ie]=new Array(We);for(let dr=0;dr<Z[ie].length;dr+=1)Z[ie][dr]=255&k.getBuffer()[dr+E];E+=We;let De=bs.getErrorCorrectPolynomial($t),io=Cg(Z[ie],De.getLength()-1).mod(De);N[ie]=new Array(De.getLength()-1);for(let dr=0;dr<N[ie].length;dr+=1){let Ss=dr+io.getLength()-N[ie].length;N[ie][dr]=Ss>=0?io.getAt(Ss):0}}let ee=0;for(let ie=0;ie<M.length;ie+=1)ee+=M[ie].totalCount;let Ae=new Array(ee),st=0;for(let ie=0;ie<R;ie+=1)for(let We=0;We<M.length;We+=1)ie<Z[We].length&&(Ae[st]=Z[We][ie],st+=1);for(let ie=0;ie<P;ie+=1)for(let We=0;We<M.length;We+=1)ie<N[We].length&&(Ae[st]=N[We][ie],st+=1);return Ae},_=function(k,M,E){let R=j9.getRSBlocks(k,M),P=D9();for(let N=0;N<E.length;N+=1){let ee=E[N];P.put(ee.getMode(),4),P.put(ee.getLength(),bs.getLengthInBits(ee.getMode(),k)),ee.write(P)}let Z=0;for(let N=0;N<R.length;N+=1)Z+=R[N].dataCount;if(P.getLengthInBits()>Z*8)throw"code length overflow. ("+P.getLengthInBits()+">"+Z*8+")";for(P.getLengthInBits()+4<=Z*8&&P.put(0,4);P.getLengthInBits()%8!=0;)P.putBit(!1);for(;!(P.getLengthInBits()>=Z*8||(P.put(236,8),P.getLengthInBits()>=Z*8));)P.put(17,8);return b(P,R)};c.addData=function(k,M){M=M||"Byte";let E=null;switch(M){case"Numeric":E=Yne(k);break;case"Alphanumeric":E=Xne(k);break;case"Byte":E=eoe(k);break;case"Kanji":E=toe(k);break;default:throw"mode:"+M}u.push(E),l=null},c.isDark=function(k,M){if(k<0||s<=k||M<0||s<=M)throw k+","+M;return a[k][M]},c.getModuleCount=function(){return s},c.make=function(){if(n<1){let k=1;for(;k<40;k++){let M=j9.getRSBlocks(k,i),E=D9();for(let P=0;P<u.length;P++){let Z=u[P];E.put(Z.getMode(),4),E.put(Z.getLength(),bs.getLengthInBits(Z.getMode(),k)),Z.write(E)}let R=0;for(let P=0;P<M.length;P++)R+=M[P].dataCount;if(E.getLengthInBits()<=R*8)break}n=k}d(!1,m())},c.createTableTag=function(k,M){k=k||2,M=typeof M>"u"?k*4:M;let E="";E+='<table style="',E+=" border-width: 0px; border-style: none;",E+=" border-collapse: collapse;",E+=" padding: 0px; margin: "+M+"px;",E+='">',E+="<tbody>";for(let R=0;R<c.getModuleCount();R+=1){E+="<tr>";for(let P=0;P<c.getModuleCount();P+=1)E+='<td style="',E+=" border-width: 0px; border-style: none;",E+=" border-collapse: collapse;",E+=" padding: 0px; margin: 0px;",E+=" width: "+k+"px;",E+=" height: "+k+"px;",E+=" background-color: ",E+=c.isDark(R,P)?"#000000":"#ffffff",E+=";",E+='"/>';E+="</tr>"}return E+="</tbody>",E+="</table>",E},c.createSvgTag=function(k,M,E,R){let P={};typeof arguments[0]=="object"&&(P=arguments[0],k=P.cellSize,M=P.margin,E=P.alt,R=P.title),k=k||2,M=typeof M>"u"?k*4:M,E=typeof E=="string"?{text:E}:E||{},E.text=E.text||null,E.id=E.text?E.id||"qrcode-description":null,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-title":null;let Z=c.getModuleCount()*k+M*2,N,ee,Ae,st,ie="",We;for(We="l"+k+",0 0,"+k+" -"+k+",0 0,-"+k+"z ",ie+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ie+=P.scalable?"":' width="'+Z+'px" height="'+Z+'px"',ie+=' viewBox="0 0 '+Z+" "+Z+'" ',ie+=' preserveAspectRatio="xMinYMin meet"',ie+=R.text||E.text?' role="img" aria-labelledby="'+S([R.id,E.id].join(" ").trim())+'"':"",ie+=">",ie+=R.text?'<title id="'+S(R.id)+'">'+S(R.text)+"</title>":"",ie+=E.text?'<description id="'+S(E.id)+'">'+S(E.text)+"</description>":"",ie+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ie+='<path d="',Ae=0;Ae<c.getModuleCount();Ae+=1)for(st=Ae*k+M,N=0;N<c.getModuleCount();N+=1)c.isDark(Ae,N)&&(ee=N*k+M,ie+="M"+ee+","+st+We);return ie+='" stroke="transparent" fill="black"/>',ie+="</svg>",ie},c.createDataURL=function(k,M){k=k||2,M=typeof M>"u"?k*4:M;let E=c.getModuleCount()*k+M*2,R=M,P=E-M;return ioe(E,E,function(Z,N){if(R<=Z&&Z<P&&R<=N&&N<P){let ee=Math.floor((Z-R)/k),Ae=Math.floor((N-R)/k);return c.isDark(Ae,ee)?0:1}else return 1})},c.createImgTag=function(k,M,E){k=k||2,M=typeof M>"u"?k*4:M;let R=c.getModuleCount()*k+M*2,P="";return P+="<img",P+=' src="',P+=c.createDataURL(k,M),P+='"',P+=' width="',P+=R,P+='"',P+=' height="',P+=R,P+='"',E&&(P+=' alt="',P+=S(E),P+='"'),P+="/>",P};let S=function(k){let M="";for(let E=0;E<k.length;E+=1){let R=k.charAt(E);switch(R){case"<":M+="&lt;";break;case">":M+="&gt;";break;case"&":M+="&amp;";break;case'"':M+="&quot;";break;default:M+=R;break}}return M},O=function(k){k=typeof k>"u"?2:k;let E=c.getModuleCount()*1+k*2,R=k,P=E-k,Z,N,ee,Ae,st,ie={"\u2588\u2588":"\u2588","\u2588 ":"\u2580"," \u2588":"\u2584"," ":" "},We={"\u2588\u2588":"\u2580","\u2588 ":"\u2580"," \u2588":" "," ":" "},$t="";for(Z=0;Z<E;Z+=2){for(ee=Math.floor((Z-R)/1),Ae=Math.floor((Z+1-R)/1),N=0;N<E;N+=1)st="\u2588",R<=N&&N<P&&R<=Z&&Z<P&&c.isDark(ee,Math.floor((N-R)/1))&&(st=" "),R<=N&&N<P&&R<=Z+1&&Z+1<P&&c.isDark(Ae,Math.floor((N-R)/1))?st+=" ":st+="\u2588",$t+=k<1&&Z+1>=P?We[st]:ie[st];$t+=`
162
162
  `}return E%2&&k>0?$t.substring(0,$t.length-E-1)+Array(E+1).join("\u2580"):$t.substring(0,$t.length-1)};return c.createASCII=function(k,M){if(k=k||1,k<2)return O(M);k-=1,M=typeof M>"u"?k*2:M;let E=c.getModuleCount()*k+M*2,R=M,P=E-M,Z,N,ee,Ae,st=Array(k+1).join("\u2588\u2588"),ie=Array(k+1).join(" "),We="",$t="";for(Z=0;Z<E;Z+=1){for(ee=Math.floor((Z-R)/k),$t="",N=0;N<E;N+=1)Ae=1,R<=N&&N<P&&R<=Z&&Z<P&&c.isDark(ee,Math.floor((N-R)/k))&&(Ae=0),$t+=Ae?st:ie;for(ee=0;ee<k;ee+=1)We+=$t+`
163
- `}return We.substring(0,We.length-1)},c.renderTo2dContext=function(k,M){M=M||2;let E=c.getModuleCount();for(let R=0;R<E;R++)for(let P=0;P<E;P++)k.fillStyle=c.isDark(R,P)?"black":"white",k.fillRect(P*M,R*M,M,M)},c};fp.stringToBytes=function(e){let t=[];for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);t.push(o&255)}return t};fp.createStringToBytes=function(e,t){let r=(function(){let n=noe(e),i=function(){let l=n.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=n.read();if(l==-1)break;let u=i(),c=i(),d=i(),f=String.fromCharCode(l<<8|u),m=c<<8|d;s[f]=m,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(n){let i=[];for(let a=0;a<n.length;a+=1){let s=n.charCodeAt(a);if(s<128)i.push(s);else{let l=r[n.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};Pr={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Rg={L:1,M:0,Q:3,H:2},vs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},bs=(function(){let e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],t=1335,r=7973,o=21522,n={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return n.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},n.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(r)>=0;)s^=r<<i(s)-i(r);return a<<12|s},n.getPatternPosition=function(a){return e[a-1]},n.getMaskFunction=function(a){switch(a){case vs.PATTERN000:return function(s,l){return(s+l)%2==0};case vs.PATTERN001:return function(s,l){return s%2==0};case vs.PATTERN010:return function(s,l){return l%3==0};case vs.PATTERN011:return function(s,l){return(s+l)%3==0};case vs.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case vs.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case vs.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case vs.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},n.getErrorCorrectPolynomial=function(a){let s=Cg([1],0);for(let l=0;l<a;l+=1)s=s.multiply(Cg([1,xs.gexp(l)],0));return s},n.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case Pr.MODE_NUMBER:return 10;case Pr.MODE_ALPHA_NUM:return 9;case Pr.MODE_8BIT_BYTE:return 8;case Pr.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case Pr.MODE_NUMBER:return 12;case Pr.MODE_ALPHA_NUM:return 11;case Pr.MODE_8BIT_BYTE:return 16;case Pr.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case Pr.MODE_NUMBER:return 14;case Pr.MODE_ALPHA_NUM:return 13;case Pr.MODE_8BIT_BYTE:return 16;case Pr.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},n.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let d=0;d<s;d+=1)for(let f=0;f<s;f+=1){let m=0,g=a.isDark(d,f);for(let v=-1;v<=1;v+=1)if(!(d+v<0||s<=d+v))for(let x=-1;x<=1;x+=1)f+x<0||s<=f+x||v==0&&x==0||g==a.isDark(d+v,f+x)&&(m+=1);m>5&&(l+=3+m-5)}for(let d=0;d<s-1;d+=1)for(let f=0;f<s-1;f+=1){let m=0;a.isDark(d,f)&&(m+=1),a.isDark(d+1,f)&&(m+=1),a.isDark(d,f+1)&&(m+=1),a.isDark(d+1,f+1)&&(m+=1),(m==0||m==4)&&(l+=3)}for(let d=0;d<s;d+=1)for(let f=0;f<s-6;f+=1)a.isDark(d,f)&&!a.isDark(d,f+1)&&a.isDark(d,f+2)&&a.isDark(d,f+3)&&a.isDark(d,f+4)&&!a.isDark(d,f+5)&&a.isDark(d,f+6)&&(l+=40);for(let d=0;d<s;d+=1)for(let f=0;f<s-6;f+=1)a.isDark(f,d)&&!a.isDark(f+1,d)&&a.isDark(f+2,d)&&a.isDark(f+3,d)&&a.isDark(f+4,d)&&!a.isDark(f+5,d)&&a.isDark(f+6,d)&&(l+=40);let u=0;for(let d=0;d<s;d+=1)for(let f=0;f<s;f+=1)a.isDark(f,d)&&(u+=1);let c=Math.abs(100*u/s/s-50)/5;return l+=c*10,l},n})(),xs=(function(){let e=new Array(256),t=new Array(256);for(let o=0;o<8;o+=1)e[o]=1<<o;for(let o=8;o<256;o+=1)e[o]=e[o-4]^e[o-5]^e[o-6]^e[o-8];for(let o=0;o<255;o+=1)t[e[o]]=o;let r={};return r.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},r.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},r})(),Cg=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let r=(function(){let n=0;for(;n<e.length&&e[n]==0;)n+=1;let i=new Array(e.length-n+t);for(let a=0;a<e.length-n;a+=1)i[a]=e[a+n];return i})(),o={};return o.getAt=function(n){return r[n]},o.getLength=function(){return r.length},o.multiply=function(n){let i=new Array(o.getLength()+n.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<n.getLength();s+=1)i[a+s]^=xs.gexp(xs.glog(o.getAt(a))+xs.glog(n.getAt(s)));return Cg(i,0)},o.mod=function(n){if(o.getLength()-n.getLength()<0)return o;let i=xs.glog(o.getAt(0))-xs.glog(n.getAt(0)),a=new Array(o.getLength());for(let s=0;s<o.getLength();s+=1)a[s]=o.getAt(s);for(let s=0;s<n.getLength();s+=1)a[s]^=xs.gexp(xs.glog(n.getAt(s))+i);return Cg(a,0).mod(n)},o},j9=(function(){let e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(n,i){let a={};return a.totalCount=n,a.dataCount=i,a},r={},o=function(n,i){switch(i){case Rg.L:return e[(n-1)*4+0];case Rg.M:return e[(n-1)*4+1];case Rg.Q:return e[(n-1)*4+2];case Rg.H:return e[(n-1)*4+3];default:return}};return r.getRSBlocks=function(n,i){let a=o(n,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;let s=a.length/3,l=[];for(let u=0;u<s;u+=1){let c=a[u*3+0],d=a[u*3+1],f=a[u*3+2];for(let m=0;m<c;m+=1)l.push(t(d,f))}return l},r})(),D9=function(){let e=[],t=0,r={};return r.getBuffer=function(){return e},r.getAt=function(o){let n=Math.floor(o/8);return(e[n]>>>7-o%8&1)==1},r.put=function(o,n){for(let i=0;i<n;i+=1)r.putBit((o>>>n-i-1&1)==1)},r.getLengthInBits=function(){return t},r.putBit=function(o){let n=Math.floor(t/8);e.length<=n&&e.push(0),o&&(e[n]|=128>>>t%8),t+=1},r},Yne=function(e){let t=Pr.MODE_NUMBER,r=e,o={};o.getMode=function(){return t},o.getLength=function(a){return r.length},o.write=function(a){let s=r,l=0;for(;l+2<s.length;)a.put(n(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(n(s.substring(l,l+1)),4):s.length-l==2&&a.put(n(s.substring(l,l+2)),7))};let n=function(a){let s=0;for(let l=0;l<a.length;l+=1)s=s*10+i(a.charAt(l));return s},i=function(a){if("0"<=a&&a<="9")return a.charCodeAt(0)-48;throw"illegal char :"+a};return o},Xne=function(e){let t=Pr.MODE_ALPHA_NUM,r=e,o={};o.getMode=function(){return t},o.getLength=function(i){return r.length},o.write=function(i){let a=r,s=0;for(;s+1<a.length;)i.put(n(a.charAt(s))*45+n(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(n(a.charAt(s)),6)};let n=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return o},eoe=function(e){let t=Pr.MODE_8BIT_BYTE,r=e,o=fp.stringToBytes(e),n={};return n.getMode=function(){return t},n.getLength=function(i){return o.length},n.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},n},toe=function(e){let t=Pr.MODE_KANJI,r=e,o=fp.stringToBytes;(function(a,s){let l=o(a);if(l.length!=2||(l[0]<<8|l[1])!=s)throw"sjis not supported."})("\u53CB",38726);let n=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(n.length/2)},i.write=function(a){let s=n,l=0;for(;l+1<s.length;){let u=(255&s[l])<<8|255&s[l+1];if(33088<=u&&u<=40956)u-=33088;else if(57408<=u&&u<=60351)u-=49472;else throw"illegal char at "+(l+1)+"/"+u;u=(u>>>8&255)*192+(u&255),a.put(u,13),l+=2}if(l<s.length)throw"illegal char at "+(l+1)},i},U9=function(){let e=[],t={};return t.writeByte=function(r){e.push(r&255)},t.writeShort=function(r){t.writeByte(r),t.writeByte(r>>>8)},t.writeBytes=function(r,o,n){o=o||0,n=n||r.length;for(let i=0;i<n;i+=1)t.writeByte(r[i+o])},t.writeString=function(r){for(let o=0;o<r.length;o+=1)t.writeByte(r.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let r="";r+="[";for(let o=0;o<e.length;o+=1)o>0&&(r+=","),r+=e[o];return r+="]",r},t},roe=function(){let e=0,t=0,r=0,o="",n={},i=function(s){o+=String.fromCharCode(a(s&63))},a=function(s){if(s<0)throw"n:"+s;if(s<26)return 65+s;if(s<52)return 97+(s-26);if(s<62)return 48+(s-52);if(s==62)return 43;if(s==63)return 47;throw"n:"+s};return n.writeByte=function(s){for(e=e<<8|s&255,t+=8,r+=1;t>=6;)i(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),r%3!=0){let s=3-r%3;for(let l=0;l<s;l+=1)o+="="}},n.toString=function(){return o},n},noe=function(e){let t=e,r=0,o=0,n=0,i={};i.read=function(){for(;n<8;){if(r>=t.length){if(n==0)return-1;throw"unexpected end of file./"+n}let l=t.charAt(r);if(r+=1,l=="=")return n=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),n+=6}let s=o>>>n-8&255;return n-=8,s};let a=function(s){if(65<=s&&s<=90)return s-65;if(97<=s&&s<=122)return s-97+26;if(48<=s&&s<=57)return s-48+52;if(s==43)return 62;if(s==47)return 63;throw"c:"+s};return i},ooe=function(e,t){let r=e,o=t,n=new Array(e*t),i={};i.setPixel=function(u,c,d){n[c*r+u]=d},i.write=function(u){u.writeString("GIF87a"),u.writeShort(r),u.writeShort(o),u.writeByte(128),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(255),u.writeByte(255),u.writeByte(255),u.writeString(","),u.writeShort(0),u.writeShort(0),u.writeShort(r),u.writeShort(o),u.writeByte(0);let c=2,d=s(c);u.writeByte(c);let f=0;for(;d.length-f>255;)u.writeByte(255),u.writeBytes(d,f,255),f+=255;u.writeByte(d.length-f),u.writeBytes(d,f,d.length-f),u.writeByte(0),u.writeString(";")};let a=function(u){let c=u,d=0,f=0,m={};return m.write=function(g,v){if(g>>>v)throw"length over";for(;d+v>=8;)c.writeByte(255&(g<<d|f)),v-=8-d,g>>>=8-d,f=0,d=0;f=g<<d|f,d=d+v},m.flush=function(){d>0&&c.writeByte(f)},m},s=function(u){let c=1<<u,d=(1<<u)+1,f=u+1,m=l();for(let h=0;h<c;h+=1)m.add(String.fromCharCode(h));m.add(String.fromCharCode(c)),m.add(String.fromCharCode(d));let g=U9(),v=a(g);v.write(c,f);let x=0,y=String.fromCharCode(n[x]);for(x+=1;x<n.length;){let h=String.fromCharCode(n[x]);x+=1,m.contains(y+h)?y=y+h:(v.write(m.indexOf(y),f),m.size()<4095&&(m.size()==1<<f&&(f+=1),m.add(y+h)),y=h)}return v.write(m.indexOf(y),f),v.write(d,f),v.flush(),g.toByteArray()},l=function(){let u={},c=0,d={};return d.add=function(f){if(d.contains(f))throw"dup key:"+f;u[f]=c,c+=1},d.size=function(){return c},d.indexOf=function(f){return u[f]},d.contains=function(f){return typeof u[f]<"u"},d};return i},ioe=function(e,t,r){let o=ooe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,r(l,s));let n=U9();o.write(n);let i=roe(),a=n.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},L9=fp,o_e=fp.stringToBytes});function V9({value:e,size:t=128,errorCorrection:r="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:n="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=Z9.useMemo(()=>{try{let l=L9(0,r);l.addData(e),l.make();let u=l.getModuleCount(),c=[];for(let d=0;d<u;d+=1){let f=[];for(let m=0;m<u;m+=1)f.push(l.isDark(d,m));c.push(f)}return c}catch{return null}},[e,r]);if(a===null)return null;let s=a.length;return(0,Ig.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${s}`,width:t,height:t,role:"img","aria-label":i??`QR code for ${e}`,shapeRendering:"crispEdges",style:{display:"block",flexShrink:0},children:[(0,Ig.jsx)("rect",{width:s,height:s,fill:n}),a.flatMap((l,u)=>l.map((c,d)=>c?(0,Ig.jsx)("rect",{x:d,y:u,width:1,height:1,fill:o},`${d}-${u}`):null))]})}var Z9,Ig,H9=$(()=>{"use strict";Z9=z(X(),1);q9();Ig=z(W(),1)});function soe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Le.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Le.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Le.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Le.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Le.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Le.jsx)("path",{d:"M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z",fill:e}),(0,Le.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function b3({settingsUrl:e,intent:t}){let[r,o]=_x.useState("idle"),n=_x.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),O9(e).then(s=>{typeof console<"u"&&console.log("[ggui:no-creds-card] requestOpenUrl resolved \u2192",s);let l=s.outcome==="opened"?"opened":s.outcome==="copied"?"copied":"manual";o(l),typeof window<"u"&&window.setTimeout(()=>o("idle"),loe)})},[e]);return(0,Le.jsx)(Xn,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Le.jsxs)(Qt,{gap:"lg",children:[(0,Le.jsxs)(Qt,{gap:"md",children:[(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Le.jsx)(soe,{}),(0,Le.jsx)(Jo,{variant:"info",children:"Setup needed"})]}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Le.jsx)(xn,{level:3,children:"Connect an LLM provider"}),(0,Le.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:"var(--ggui-color-onSurfaceVariant, #71717a)",opacity:.7,userSelect:"all"},title:"iframe-runtime build identifier \u2014 useful for diagnosing stale caches",children:aoe})]}),(0,Le.jsx)(wt,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:"ggui needs an LLM key to render UIs. Open this server\u2019s settings page to paste an Anthropic, OpenAI, Google, or OpenRouter API key."})]}),(0,Le.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-3, 12px)",padding:"var(--ggui-spacing-4, 16px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:(0,Le.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Le.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Le.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Le.jsx)(V9,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Le.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:"var(--ggui-font-weight-semibold, 600)",textTransform:"uppercase",letterSpacing:"0.06em",fontSize:"var(--ggui-font-size-xs, 11px)"},children:"Or open this URL in your browser"}),(0,Le.jsx)("div",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",wordBreak:"break-all",userSelect:"all",padding:"var(--ggui-spacing-3, 12px)",background:"var(--ggui-color-surface, #fff)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:"1.45"},children:e}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Le.jsx)(tt,{variant:"primary",size:"md",onClick:n,disabled:r==="working",children:r==="working"?"Opening\u2026":r==="opened"?"Opened in browser \u2713":r==="copied"?"URL copied \u2014 paste in your browser":r==="manual"?"Tap the URL above to copy":"Open settings"}),r==="idle"||r==="working"?(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Le.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var _x,Le,aoe,loe,B9=$(()=>{"use strict";_x=z(X(),1);Mg();N9();H9();Le=z(W(),1),aoe="0.2.0-alpha.1+ca6feb85";loe=4e3});function coe(){let e=_n.useRef(1e4),t=_n.useRef(new Map);return _n.useEffect(()=>{let r=o=>{let n=o.data;if(n===null||typeof n!="object")return;let i=n.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(n))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[]),_n.useCallback((r,o)=>new Promise(n=>{let i=e.current;e.current+=1,t.current.set(i,n);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:r,params:o??{}},"*")}catch(a){t.current.delete(i),n({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&n({error:{code:-32001,message:"TIMEOUT"}})},uoe)}),[])}function poe(){let[e,t]=_n.useState([]),r=_n.useRef(0);return _n.useEffect(()=>{let o=n=>{let i=n.data;if(i===null||typeof i!="object")return;let a=i;if(a.jsonrpc!=="2.0"||typeof a.method!="string"||typeof a.id=="number"&&a.id>=1e4&&(a.method==="ui/message"||a.method==="ui/update-model-context"||a.method==="ui/open-link"||a.method==="ui/request-display-mode"||a.method==="tools/call"))return;r.current+=1;let l={id:r.current,tsIso:new Date().toISOString(),method:a.method,params:a.params};t(u=>[l,...u].slice(0,50))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),e}function doe(e){switch(e){case"ui/message":return{role:"user",content:[{type:"text",text:"[ggui:probe] hello from the protocol probe card"}]};case"ui/update-model-context":return{content:[{type:"text",text:"[ggui:probe] this user prefers concise replies"}]};case"ui/open-link":return{url:"https://ggui.ai"};case"ui/request-display-mode":return{mode:"fullscreen"};case"tools/call":return{name:"ggui_runtime_submit_action",arguments:{kind:"dispatch",payload:{intent:"probe-click",data:{note:"hello from the protocol probe"}},renderId:"probe-render",appId:"probe-app",actionId:"00000000",firedAt:new Date().toISOString()}}}}function foe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function moe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function zg({method:e,description:t,call:r}){let[o,n]=_n.useState({state:"idle"}),i=_n.useCallback(()=>{let l=Date.now();n({state:"pending",startedAtMs:l});let u=doe(e);r(e,u).then(c=>{if(c.error){n({state:"error",code:c.error.code??"?",message:c.error.message??"(no message)"});return}if(n({state:"success",result:c.result??{}}),e==="tools/call"){let f=(u.arguments??{}).payload??{},m=String(f.intent??"?"),g=f.data,v=moe(g),x=v===""?"":` (${v})`,y=new Date().toISOString(),h=foe(`${m}|${JSON.stringify(g??null)}|${y}`);r("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:m,data:g??null,firedAt:y})}`}]}),r("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${m}**${x}. [id: \`${h}\`]`}]})}})},[r,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,ve.jsx)(Jo,{variant:"default",children:"idle"}):o.state==="pending"?(0,ve.jsx)(Jo,{variant:"info",children:"pending"}):o.state==="success"?(0,ve.jsx)(Jo,{variant:"success",children:"success"}):(0,ve.jsx)(Jo,{variant:"warning",children:"error"});return(0,ve.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-3, 12px)",borderRadius:"var(--ggui-shape-radius-md, 10px)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",background:"var(--ggui-color-surface, #fff)"},children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),s]}),(0,ve.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,ve.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,ve.jsx)(tt,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,ve.jsx)("pre",{style:{margin:0,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:o.state==="error"?"var(--ggui-color-warning, #b45309)":"var(--ggui-color-onSurfaceVariant, #52525b)",background:"var(--ggui-color-neutral-100, #f4f4f5)",padding:"var(--ggui-spacing-2, 8px)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",overflow:"auto",maxHeight:"120px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.state==="error"?`${o.code}: ${o.message}`:JSON.stringify(o.result,null,2)}):null]})}function x3({intent:e}){let t=coe(),r=poe();return(0,ve.jsx)(Xn,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,ve.jsxs)(Qt,{gap:"lg",children:[(0,ve.jsxs)(Qt,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)(xn,{level:3,children:"MCP Apps protocol probe"}),(0,ve.jsx)(Jo,{variant:"info",children:"diagnostic"})]}),(0,ve.jsxs)(wt,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:["One button per primary host effect emitted by the iframe runtime's gesture surfaces (Pattern \u03B1 / Pattern \u03B2 / native- idiom interceptors). Click each to verify which methods this host honors. The",(0,ve.jsx)("code",{children:"tools/call"})," row chains the full Pattern \u03B2 bridge (audit + context + consent), reproducing the production",(0,ve.jsx)("code",{children:"dispatchWiredAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,ve.jsxs)(Qt,{gap:"md",children:[(0,ve.jsx)(zg,{method:"ui/message",description:"Pattern \u03B2 step 3 \u2014 consent-gated user authorization. Host pre-fills + waits for user confirm before the LLM acts on the paired pending-action context.",call:t}),(0,ve.jsx)(zg,{method:"ui/update-model-context",description:"Pattern \u03B2 step 2 \u2014 silent structured `[ggui:pending-action]` context drop. LLM honors on next turn. No immediate UI.",call:t}),(0,ve.jsx)(zg,{method:"ui/open-link",description:"Native-idiom anchor click interceptor primary effect. Opens ggui.ai in the host's browser / new tab. Real iframe code triggers via `<a href target='_blank'>` or cross-origin href.",call:t}),(0,ve.jsx)(zg,{method:"ui/request-display-mode",description:"Native-idiom fullscreen interceptor primary effect. Request fullscreen \u2014 real iframe code calls `el.requestFullscreen()`; the runtime overrides the prototype to route through here.",call:t}),(0,ve.jsx)(zg,{method:"tools/call",description:"Pattern \u03B2 full bridge: `tools/call ggui_runtime_submit_action` (audit, kind:'dispatch') + `ui/update-model-context` + `ui/message`. Spec \xA7401 requires `_meta.ui.visibility:['app']` on the receiving tool. Pattern \u03B1 (direct fire to a same-server app-visible target) would skip steps 2+3 and add a second `tools/call` to the target tool instead.",call:t})]}),(0,ve.jsxs)(Qt,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,ve.jsx)(xn,{level:4,children:"Receive log"}),(0,ve.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[r.length," ",r.length===1?"event":"events"]})]}),r.length===0?(0,ve.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontStyle:"italic"},children:"No host notifications observed yet. Click a probe button or wait for the host to emit one."}):(0,ve.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",maxHeight:"320px",overflow:"auto",padding:"var(--ggui-spacing-2, 8px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:r.map(o=>(0,ve.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,ve.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,ve.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,ve.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,ve.jsx)("pre",{style:{margin:"4px 0 0 16px",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:JSON.stringify(o.params,null,2)})]},o.id))})]}),e?(0,ve.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var _n,ve,uoe,G9=$(()=>{"use strict";_n=z(X(),1);Mg();ve=z(W(),1),uoe=5e3});function F9(){if(typeof window>"u")return!1;try{let e=window.location?.hostname??"";if(e.endsWith("claudemcpcontent.com")||/(^|\.)claude\.ai$/i.test(e)||/claude/i.test(e))return!0;let t=typeof document<"u"?document.referrer:"";if(/claude\.ai/i.test(t))return!0;let r=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(r))return!0}catch{}return!1}function W9(){let e=mp.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,r]=mp.useState(e);return mp.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),n=a=>{r(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",n),()=>{o.removeEventListener("change",n)};let i=o;return i.addListener(n),()=>{i.removeListener(n)}},[]),t}var mp,K9=$(()=>{"use strict";mp=z(X(),1)});var X9={};jt(X9,{NoCredentialsCard:()=>b3,ProtocolProbeCard:()=>x3,SYSTEM_CARD_REGISTRY:()=>Q9,SystemCardHost:()=>hoe,renderSystemCard:()=>Y9});function J9(e,t){return function(o){let n=e,i=t(o);return $s.createElement(n,i)}}function goe({kind:e,props:t}){return $s.createElement("div",{style:{padding:"16px",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)",fontFamily:"var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, sans-serif)",background:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}},$s.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),$s.createElement("div",{style:{fontSize:12,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, monospace)",opacity:.7,wordBreak:"break-all"}},JSON.stringify(t)))}function Y9(e,t){let r=Q9[e];return r?$s.createElement(r,t):$s.createElement(goe,{kind:e,props:t})}function hoe({kind:e,props:t,themeId:r}){let o=F9(),n=W9();return $s.createElement(q5,{theme:n==="dark"?L5:yg,mode:n,transparent:o,children:Y9(e,t)})}var $s,Q9,e7=$(()=>{"use strict";$s=z(X(),1);Z5();B9();G9();K9();Q9={"no-credentials":J9(b3,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",r=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...r!==void 0?{intent:r}:{}}}),"mcp-apps-probe":J9(x3,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var Pg,to,_3,k3,S3,w3,Sx,w,xt=$(()=>{"use strict";Pg={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},to={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},_3={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},k3={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},S3={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},w3={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Sx={textPrimary:to[900],textSecondary:to[600],textMuted:to[400],textInverse:"#ffffff",bgPrimary:"#ffffff",bgSecondary:to[50],bgTertiary:to[100],bgInverse:to[900],borderLight:to[200],borderDefault:to[300],borderDark:to[400],focus:Pg[500],hover:Pg[50],active:Pg[100],disabled:to[300],success:_3[500],warning:k3[500],error:S3[500],info:w3[500]},w={primary:Pg,gray:to,success:_3,warning:k3,error:S3,info:w3,semantic:Sx,white:"#ffffff",black:"#000000",transparent:"transparent"}});function p7({value:e,onChange:t,onSearch:r,placeholder:o="Search...",showButton:n=!1,buttonText:i="Search",loading:a,disabled:s,size:l="md",style:u,className:c}){let[d,f]=(0,c7.useState)(""),m=e!==void 0?e:d,g=h=>{e===void 0&&f(h),t?.(h)},v=()=>{r?.(m)},x=h=>{h.key==="Enter"&&!s&&v()},y={sm:"sm",md:"md",lg:"md"};return(0,qi.jsxs)("div",{className:c,style:{display:"flex",gap:"8px",alignItems:"flex-end",...u},children:[(0,qi.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,qi.jsx)("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:w.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:a?(0,qi.jsx)(Zt,{size:16}):(0,qi.jsx)(je,{name:"search",size:16})}),(0,qi.jsx)("input",{type:"search",value:m,onChange:h=>g(h.target.value),onKeyDown:x,placeholder:o,disabled:s||a,style:{width:"100%",padding:l==="sm"?"6px 10px 6px 36px":l==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:l==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${w.gray[300]}`,backgroundColor:s?w.gray[50]:w.white,color:w.gray[900],outline:"none",boxSizing:"border-box"}})]}),n&&(0,qi.jsx)(tt,{onClick:v,disabled:s||a,size:y[l],loading:a,children:i})]})}var qi,c7,d7=$(()=>{"use strict";qi=z(W(),1),c7=z(X(),1);Ai();Ko();$n();xt()});function f7({label:e,children:t,error:r,helperText:o,required:n,description:i,style:a,className:s}){let l=!!r;return(0,Al.jsxs)("div",{className:s,style:{display:"flex",flexDirection:"column",gap:"4px",...a},children:[(0,Al.jsxs)("label",{style:{fontSize:q.sm,fontWeight:re.medium,color:w.gray[700]},children:[e,n&&(0,Al.jsx)("span",{style:{color:w.error[500],marginLeft:"2px"},children:"*"})]}),i&&(0,Al.jsx)("span",{style:{fontSize:q.xs,color:w.gray[500],marginBottom:"4px"},children:i}),t,(r||o)&&(0,Al.jsx)("span",{style:{fontSize:q.xs,color:l?w.error[500]:w.gray[500]},children:r||o})]})}var Al,m7=$(()=>{"use strict";Al=z(W(),1);xt();Rt()});function wx({label:e,icon:t,rightElement:r,onClick:o,disabled:n,active:i,danger:a,style:s,className:l}){let u=a?w.error[600]:w.gray[700],c=a?w.error[50]:w.gray[100],d=a?w.error[100]:w.primary[50];return(0,gp.jsxs)("button",{onClick:n?void 0:o,disabled:n,className:l,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:et.md,backgroundColor:i?d:"transparent",color:n?w.gray[400]:u,fontSize:q.sm,fontWeight:i?re.medium:re.normal,textAlign:"left",cursor:n?"not-allowed":"pointer",transition:"background-color 0.15s",...s},onMouseEnter:f=>{!n&&!i&&(f.target.style.backgroundColor=c)},onMouseLeave:f=>{!n&&!i&&(f.target.style.backgroundColor="transparent")},children:[t&&(0,gp.jsx)("span",{style:{display:"flex",flexShrink:0},children:t}),(0,gp.jsx)("span",{style:{flex:1},children:e}),r&&(0,gp.jsx)("span",{style:{display:"flex",flexShrink:0,color:w.gray[400]},children:r})]})}var gp,T3=$(()=>{"use strict";gp=z(W(),1);xt();lr();Rt()});function g7({children:e,variant:t="default",size:r="md",closable:o,onClose:n,icon:i,style:a,className:s}){let l=$oe[r];return(0,Ol.jsxs)("span",{className:s,style:{display:"inline-flex",alignItems:"center",gap:l.gap,padding:l.padding,fontSize:l.fontSize,fontWeight:re.medium,borderRadius:"6px",...xoe[t],...a},children:[i&&(0,Ol.jsx)("span",{style:{display:"flex"},children:i}),e,o&&(0,Ol.jsx)("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",color:"inherit",cursor:"pointer",opacity:.7,marginLeft:"2px"},"aria-label":"Remove",children:(0,Ol.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,Ol.jsx)("path",{d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z"})})})]})}var Ol,xoe,$oe,h7=$(()=>{"use strict";Ol=z(W(),1);xt();Rt();xoe={default:{backgroundColor:w.gray[100],color:w.gray[700],border:`1px solid ${w.gray[200]}`},primary:{backgroundColor:w.primary[50],color:w.primary[700],border:`1px solid ${w.primary[200]}`},success:{backgroundColor:w.success[50],color:w.success[700],border:`1px solid ${w.success[200]}`},warning:{backgroundColor:w.warning[50],color:w.warning[700],border:`1px solid ${w.warning[200]}`},error:{backgroundColor:w.error[50],color:w.error[700],border:`1px solid ${w.error[200]}`},info:{backgroundColor:w.info[50],color:w.info[700],border:`1px solid ${w.info[200]}`}},$oe={sm:{padding:"2px 6px",fontSize:q.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:q.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:q.sm,gap:"6px"}}});function y7({trigger:e,options:t,value:r,onChange:o,placement:n="bottom-start",disabled:i,style:a,className:s}){let[l,u]=(0,Nl.useState)(!1),c=(0,Nl.useRef)(null);(0,Nl.useEffect)(()=>{let m=g=>{c.current&&!c.current.contains(g.target)&&u(!1)};if(l)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[l]),(0,Nl.useEffect)(()=>{let m=g=>{g.key==="Escape"&&u(!1)};if(l)return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]);let d=m=>{o?.(m),u(!1)},f=()=>{switch(n){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return(0,hp.jsxs)("div",{ref:c,className:s,style:{position:"relative",display:"inline-block",...a},children:[(0,hp.jsx)("div",{onClick:()=>!i&&u(!l),style:{cursor:i?"not-allowed":"pointer"},children:e}),l&&(0,hp.jsx)("div",{style:{position:"absolute",...f(),minWidth:"160px",backgroundColor:w.white,border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,boxShadow:Jt.lg,zIndex:qt.dropdown,padding:"4px"},children:t.map(m=>(0,hp.jsx)(wx,{label:m.label,icon:m.icon,onClick:()=>d(m.value),disabled:m.disabled,active:r===m.value,danger:m.danger},m.value))})]})}var hp,Nl,v7=$(()=>{"use strict";hp=z(W(),1),Nl=z(X(),1);T3();xt();lr()});function b7({value:e="",onChange:t,onSelect:r,options:o,placeholder:n,label:i,loading:a,disabled:s,error:l,noResultsText:u="No results found",style:c,className:d}){let[f,m]=(0,Zi.useState)(!1),[g,v]=(0,Zi.useState)(-1),x=(0,Zi.useRef)(null),y=(0,Zi.useMemo)(()=>{if(!e)return o;let S=e.toLowerCase();return o.filter(O=>O.label.toLowerCase().includes(S)||O.value.toLowerCase().includes(S))},[o,e]);(0,Zi.useEffect)(()=>{let S=O=>{x.current&&!x.current.contains(O.target)&&m(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]);let h=S=>{t?.(S),m(!0),v(-1)},b=S=>{t?.(S.label),r?.(S),m(!1),v(-1)},_=S=>{if(!f){(S.key==="ArrowDown"||S.key==="ArrowUp")&&m(!0);return}switch(S.key){case"ArrowDown":S.preventDefault(),v(O=>O<y.length-1?O+1:O);break;case"ArrowUp":S.preventDefault(),v(O=>O>0?O-1:O);break;case"Enter":S.preventDefault(),g>=0&&y[g]&&b(y[g]);break;case"Escape":m(!1),v(-1);break}};return(0,an.jsxs)("div",{ref:x,className:d,style:{position:"relative",...c},children:[(0,an.jsx)("div",{onKeyDown:_,children:(0,an.jsx)(lp,{label:i,value:e,onChange:h,onFocus:()=>m(!0),placeholder:n,disabled:s,error:l})}),f&&(0,an.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:w.white,border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,boxShadow:Jt.lg,zIndex:qt.dropdown,maxHeight:"240px",overflow:"auto"},children:a?(0,an.jsx)("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:(0,an.jsx)(Zt,{size:20})}):y.length===0?(0,an.jsx)("div",{style:{padding:"12px",textAlign:"center",color:w.gray[500],fontSize:q.sm},children:u}):y.map((S,O)=>(0,an.jsxs)("div",{onClick:()=>!S.disabled&&b(S),style:{padding:"8px 12px",cursor:S.disabled?"not-allowed":"pointer",backgroundColor:g===O?w.gray[100]:"transparent",color:S.disabled?w.gray[400]:w.gray[900],fontSize:q.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>v(O),children:[S.icon&&(0,an.jsx)("span",{style:{flexShrink:0},children:S.icon}),(0,an.jsxs)("div",{style:{flex:1},children:[(0,an.jsx)("div",{children:S.label}),S.description&&(0,an.jsx)("div",{style:{fontSize:q.xs,color:w.gray[500]},children:S.description})]})]},S.value))})]})}var an,Zi,x7=$(()=>{"use strict";an=z(W(),1),Zi=z(X(),1);i3();Ko();xt();lr();Rt()});function _7({items:e,separator:t="/",onItemClick:r,style:o,className:n}){return(0,Vi.jsx)("nav",{"aria-label":"Breadcrumb",className:n,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:q.sm,...o},children:e.map((i,a)=>{let s=a===e.length-1;return(0,Vi.jsxs)($7.Fragment,{children:[a>0&&(0,Vi.jsx)("span",{style:{color:w.gray[400]},children:t}),i.icon&&(0,Vi.jsx)("span",{style:{display:"flex",alignItems:"center",color:s?w.gray[900]:w.gray[500]},children:i.icon}),s?(0,Vi.jsx)("span",{style:{color:w.gray[900],fontWeight:500},"aria-current":"page",children:i.label}):i.href?(0,Vi.jsx)(yx,{href:i.href,tone:"muted",underline:"hover",onClick:l=>{r&&(l.preventDefault(),r(i,a))},children:i.label}):(0,Vi.jsx)("button",{onClick:()=>r?.(i,a),style:{background:"none",border:"none",padding:0,color:w.gray[500],cursor:"pointer",fontSize:"inherit"},children:i.label})]},a)})})}var Vi,$7,k7=$(()=>{"use strict";Vi=z(W(),1),$7=z(X(),1);p3();xt();Rt()});function S7({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:o=!0,maxVisible:n=5,size:i="md",disabled:a,style:s,className:l}){let u=()=>{let m=[];if(t<=n)for(let g=1;g<=t;g++)m.push(g);else{m.push(1);let g=Math.floor((n-3)/2),v=Math.max(2,e-g),x=Math.min(t-1,e+g);e<=g+2&&(x=Math.min(t-1,n-2)),e>=t-g-1&&(v=Math.max(2,t-n+3)),v>2&&m.push("ellipsis");for(let y=v;y<=x;y++)m.push(y);x<t-1&&m.push("ellipsis"),m.push(t)}return m},c=i==="sm"?"xs":i==="lg"?"md":"sm",d=i==="sm"?14:i==="lg"?20:16,f=({page:m,active:g})=>(0,Ar.jsx)("button",{onClick:()=>!a&&r?.(m),disabled:a,style:{minWidth:i==="sm"?"28px":i==="lg"?"40px":"32px",height:i==="sm"?"28px":i==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:g?w.primary[600]:"transparent",color:g?w.white:w.gray[700],fontSize:i==="sm"?q.xs:q.sm,fontWeight:g?re.medium:re.normal,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s"},children:m});return(0,Ar.jsxs)("nav",{"aria-label":"Pagination",className:l,style:{display:"flex",alignItems:"center",gap:"4px",...s},children:[o&&(0,Ar.jsxs)(tt,{variant:"ghost",size:c,onClick:()=>r?.(1),disabled:a||e===1,"aria-label":"First page",children:[(0,Ar.jsx)(je,{name:"chevron-left",size:d}),(0,Ar.jsx)(je,{name:"chevron-left",size:d,style:{marginLeft:"-8px"}})]}),(0,Ar.jsx)(tt,{variant:"ghost",size:c,onClick:()=>r?.(e-1),disabled:a||e===1,"aria-label":"Previous page",children:(0,Ar.jsx)(je,{name:"chevron-left",size:d})}),u().map((m,g)=>m==="ellipsis"?(0,Ar.jsx)("span",{style:{padding:"0 4px",color:w.gray[400]},children:"..."},`ellipsis-${g}`):(0,Ar.jsx)(f,{page:m,active:m===e},m)),(0,Ar.jsx)(tt,{variant:"ghost",size:c,onClick:()=>r?.(e+1),disabled:a||e===t,"aria-label":"Next page",children:(0,Ar.jsx)(je,{name:"chevron-right",size:d})}),o&&(0,Ar.jsxs)(tt,{variant:"ghost",size:c,onClick:()=>r?.(t),disabled:a||e===t,"aria-label":"Last page",children:[(0,Ar.jsx)(je,{name:"chevron-right",size:d}),(0,Ar.jsx)(je,{name:"chevron-right",size:d,style:{marginLeft:"-8px"}})]})]})}var Ar,w7=$(()=>{"use strict";Ar=z(W(),1);Ai();$n();xt();Rt()});function T7({icon:e,title:t,description:r,action:o,style:n,className:i}){let a={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...n};return(0,jl.jsxs)(Qt,{align:"center",gap:"sm",className:i,style:a,children:[e!==void 0&&(typeof e=="string"?(0,jl.jsx)(je,{name:e,size:40,tone:"subtle"}):e),(0,jl.jsx)(xn,{level:3,children:t}),r!==void 0&&(0,jl.jsx)(wt,{tone:"muted",children:r}),o!==void 0&&(0,jl.jsx)("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:o})]})}var jl,M7=$(()=>{"use strict";jl=z(W(),1);$g();$n();dx();px()});function E7({label:e,value:t,delta:r,trend:o="neutral",icon:n,style:i,className:a}){let s=o==="up"?"success":o==="down"?"error":"muted";return(0,Hi.jsxs)(Qt,{gap:"xs",className:a,style:i,children:[(0,Hi.jsxs)(Ml,{gap:"xs",align:"center",children:[n!==void 0&&(typeof n=="string"?(0,Hi.jsx)(je,{name:n,size:16,tone:"muted"}):n),(0,Hi.jsx)(wt,{variant:"overline",tone:"muted",children:e})]}),(0,Hi.jsxs)(Ml,{gap:"sm",align:"end",children:[(0,Hi.jsx)(wt,{size:"3xl",weight:"bold",children:t}),r!==void 0&&(0,Hi.jsx)(wt,{size:"sm",weight:"semibold",tone:s,children:r})]})]})}var Hi,R7=$(()=>{"use strict";Hi=z(W(),1);$g();X5();px();$n()});var C7={};jt(C7,{Autocomplete:()=>b7,Breadcrumb:()=>_7,Dropdown:()=>y7,EmptyState:()=>T7,FormField:()=>f7,MenuItem:()=>wx,Pagination:()=>S7,SearchField:()=>p7,Stat:()=>E7,Tag:()=>g7});var I7=$(()=>{"use strict";d7();m7();T3();h7();v7();x7();k7();w7();M7();R7()});function z7({logo:e,navigation:t,actions:r,sticky:o=!1,background:n,bordered:i=!0,style:a,className:s}){return(0,yp.jsxs)("header",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:n||w.white,borderBottom:i?`1px solid ${w.gray[200]}`:void 0,...o&&{position:"sticky",top:0,zIndex:qt.sticky,boxShadow:Jt.sm},...a},children:[e&&(0,yp.jsx)("div",{style:{flexShrink:0},children:e}),t&&(0,yp.jsx)("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:t}),r&&(0,yp.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:r})]})}var yp,P7=$(()=>{"use strict";yp=z(W(),1);xt();lr()});function O7({item:e,activeId:t,onItemClick:r,collapsed:o,depth:n=0}){let[i,a]=(0,A7.useState)(!1),s=e.children&&e.children.length>0,l=t===e.id;return(0,Yt.jsxs)("div",{children:[(0,Yt.jsxs)("button",{onClick:()=>{s&&!o&&a(!i),r?.(e)},disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:o?"10px":"10px 12px",paddingLeft:o?"10px":`${12+n*16}px`,border:"none",borderRadius:et.md,backgroundColor:l?w.primary[50]:"transparent",color:e.disabled?w.gray[400]:l?w.primary[700]:w.gray[700],fontSize:q.sm,fontWeight:l?re.medium:re.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:o?"center":"flex-start"},children:[e.icon&&(0,Yt.jsx)("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!o&&(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("span",{style:{flex:1},children:e.label}),e.badge&&(0,Yt.jsx)("span",{children:e.badge}),s&&(0,Yt.jsx)(je,{name:i?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),s&&i&&!o&&(0,Yt.jsx)("div",{style:{marginTop:"4px"},children:e.children.map(c=>(0,Yt.jsx)(O7,{item:c,activeId:t,onItemClick:r,collapsed:o,depth:n+1},c.id))})]})}function N7({items:e,activeId:t,onItemClick:r,collapsed:o=!1,header:n,footer:i,width:a=256,collapsedWidth:s=64,style:l,className:u}){let c=o?s:a;return(0,Yt.jsxs)("aside",{className:u,style:{width:c,minWidth:c,height:"100%",display:"flex",flexDirection:"column",backgroundColor:w.white,borderRight:`1px solid ${w.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...l},children:[n&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderBottom:`1px solid ${w.gray[200]}`},children:n}),(0,Yt.jsx)("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:(0,Yt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(d=>(0,Yt.jsx)(O7,{item:d,activeId:t,onItemClick:r,collapsed:o},d.id))})}),i&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderTop:`1px solid ${w.gray[200]}`},children:i})]})}var Yt,A7,j7=$(()=>{"use strict";Yt=z(W(),1),A7=z(X(),1);xt();lr();Rt();$n()});function U7({children:e,columns:t=3,gap:r=16,style:o,className:n}){return(0,D7.jsx)("div",{className:n,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))",gap:`${r}px`,...o},children:e})}var D7,L7=$(()=>{"use strict";D7=z(W(),1)});function q7({comment:e,onReply:t,onReaction:r,depth:o=0}){let[n,i]=(0,Tx.useState)(!1),[a,s]=(0,Tx.useState)(""),l=()=>{a.trim()&&(t?.(e.id,a),s(""),i(!1))},u=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,qe.jsxs)("div",{style:{marginLeft:o>0?"40px":0},children:[(0,qe.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,qe.jsx)(Qo,{name:e.author.name,src:e.author.avatar,size:"sm"}),(0,qe.jsxs)("div",{style:{flex:1},children:[(0,qe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,qe.jsx)("span",{style:{fontWeight:500,fontSize:q.sm},children:e.author.name}),(0,qe.jsx)("span",{style:{color:w.gray[500],fontSize:q.xs},children:u})]}),(0,qe.jsx)("p",{style:{margin:"4px 0 8px",fontSize:q.sm,color:w.gray[700]},children:e.content}),(0,qe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.reactions?.map(c=>(0,qe.jsxs)("button",{onClick:()=>r?.(e.id,c.emoji),style:{padding:"2px 8px",border:`1px solid ${w.gray[200]}`,borderRadius:"12px",backgroundColor:w.gray[50],fontSize:q.xs,cursor:"pointer"},children:[c.emoji," ",c.count]},c.emoji)),(0,qe.jsx)("button",{onClick:()=>i(!n),style:{background:"none",border:"none",color:w.gray[500],fontSize:q.xs,cursor:"pointer"},children:"Reply"})]}),n&&(0,qe.jsxs)("div",{style:{marginTop:"12px"},children:[(0,qe.jsx)(Sg,{value:a,onChange:s,placeholder:"Write a reply...",rows:2}),(0,qe.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,qe.jsx)(tt,{size:"sm",onClick:l,children:"Reply"}),(0,qe.jsx)(tt,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),e.replies?.map(c=>(0,qe.jsx)("div",{style:{marginTop:"16px"},children:(0,qe.jsx)(q7,{comment:c,onReply:t,onReaction:r,depth:o+1})},c.id))]})}function Z7({comments:e,currentUser:t,onAddComment:r,onReply:o,onReaction:n,loading:i,style:a,className:s}){let[l,u]=(0,Tx.useState)(""),c=()=>{l.trim()&&(r?.(l),u(""))};return(0,qe.jsxs)("div",{className:s,style:{...a},children:[t&&(0,qe.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[(0,qe.jsx)(Qo,{name:t.name,src:t.avatar,size:"sm"}),(0,qe.jsxs)("div",{style:{flex:1},children:[(0,qe.jsx)(Sg,{value:l,onChange:u,placeholder:"Write a comment...",rows:3}),(0,qe.jsx)("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:(0,qe.jsx)(tt,{onClick:c,disabled:!l.trim(),children:"Comment"})})]})]}),i?(0,qe.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,qe.jsx)(Zt,{size:24})}):(0,qe.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(d=>(0,qe.jsx)(q7,{comment:d,onReply:o,onReaction:n},d.id))})]})}var qe,Tx,V7=$(()=>{"use strict";qe=z(W(),1),Tx=z(X(),1);wg();Ai();a3();Ko();xt();Rt()});function H7({columns:e,data:t,rowKey:r="id",loading:o,emptyText:n="No data",onSort:i,sortKey:a,sortDirection:s,onRowClick:l,selectable:u,selectedKeys:c=[],onSelectionChange:d,style:f,className:m}){let g=(b,_)=>typeof r=="function"?r(b):String(b[r]??_),v=b=>{d?.(b?t.map((_,S)=>g(_,S)):[])},x=(b,_)=>{d?.(_?[...c,b]:c.filter(S=>S!==b))},y=t.length>0&&c.length===t.length,h=c.length>0&&c.length<t.length;return(0,At.jsx)("div",{className:m,style:{border:`1px solid ${w.gray[200]}`,borderRadius:"8px",overflow:"hidden",...f},children:(0,At.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:q.sm},children:[(0,At.jsx)("thead",{children:(0,At.jsxs)("tr",{style:{backgroundColor:w.gray[50]},children:[u&&(0,At.jsx)("th",{style:{width:"40px",padding:"12px"},children:(0,At.jsx)(Cl,{checked:y,indeterminate:h,onChange:v})}),e.map(b=>(0,At.jsx)("th",{style:{padding:"12px 16px",textAlign:b.align||"left",fontWeight:re.semibold,color:w.gray[700],borderBottom:`1px solid ${w.gray[200]}`,cursor:b.sortable?"pointer":void 0,width:b.width},onClick:()=>b.sortable&&i?.(b.key,a===b.key&&s==="asc"?"desc":"asc"),children:(0,At.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[b.header,b.sortable&&a===b.key&&(0,At.jsx)(je,{name:s==="asc"?"chevron-up":"chevron-down",size:14})]})},b.key))]})}),(0,At.jsx)("tbody",{children:o?(0,At.jsx)("tr",{children:(0,At.jsx)("td",{colSpan:e.length+(u?1:0),style:{padding:"48px",textAlign:"center"},children:(0,At.jsx)(Zt,{size:24})})}):t.length===0?(0,At.jsx)("tr",{children:(0,At.jsx)("td",{colSpan:e.length+(u?1:0),style:{padding:"48px",textAlign:"center",color:w.gray[500]},children:n})}):t.map((b,_)=>{let S=g(b,_),O=c.includes(S);return(0,At.jsxs)("tr",{onClick:()=>l?.(b,_),style:{backgroundColor:O?w.primary[50]:void 0,cursor:l?"pointer":void 0,transition:"background-color 0.15s"},children:[u&&(0,At.jsx)("td",{style:{padding:"12px"},children:(0,At.jsx)(Cl,{checked:O,onChange:k=>x(S,k)})}),e.map(k=>(0,At.jsx)("td",{style:{padding:"12px 16px",textAlign:k.align||"left",color:w.gray[900],borderBottom:`1px solid ${w.gray[100]}`},children:k.render?k.render(b[k.key],b,_):String(b[k.key]??"")},k.key))]},S)})})]})})}var At,B7=$(()=>{"use strict";At=z(W(),1);s3();Ko();$n();xt();Rt()});function G7({messages:e,currentUserId:t,onSendMessage:r,loading:o,typing:n,placeholder:i="Type a message...",header:a,style:s,className:l}){let[u,c]=(0,vp.useState)(""),d=(0,vp.useRef)(null);(0,vp.useEffect)(()=>{d.current?.scrollIntoView({behavior:"smooth"})},[e]);let f=()=>{u.trim()&&(r?.(u),c(""))},m=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),f())};return(0,Ot.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,backgroundColor:w.white,overflow:"hidden",...s},children:[a&&(0,Ot.jsx)("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${w.gray[200]}`},children:a}),(0,Ot.jsxs)("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[o?(0,Ot.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Ot.jsx)(Zt,{size:24})}):e.map(g=>{let v=g.sender.id===t,x=g.timestamp instanceof Date?g.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g.timestamp;return(0,Ot.jsxs)("div",{style:{display:"flex",flexDirection:v?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!v&&(0,Ot.jsx)(Qo,{name:g.sender.name,src:g.sender.avatar,size:"xs"}),(0,Ot.jsxs)("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:et.lg,backgroundColor:v?w.primary[600]:w.gray[100],color:v?w.white:w.gray[900]},children:[(0,Ot.jsx)("p",{style:{margin:0,fontSize:q.sm},children:g.content}),(0,Ot.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:q.xs,opacity:.7},children:[(0,Ot.jsx)("span",{children:x}),v&&g.status&&(0,Ot.jsxs)("span",{children:[g.status==="sending"&&"\u2022",g.status==="sent"&&"\u2713",g.status==="delivered"&&"\u2713\u2713",g.status==="read"&&"\u2713\u2713",g.status==="error"&&"!"]})]})]})]},g.id)}),n&&(0,Ot.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,Ot.jsxs)("span",{style:{fontSize:q.xs,color:w.gray[500]},children:[n.name," is typing..."]})}),(0,Ot.jsx)("div",{ref:d})]}),(0,Ot.jsxs)("div",{style:{padding:"12px 16px",borderTop:`1px solid ${w.gray[200]}`,display:"flex",gap:"8px"},children:[(0,Ot.jsx)("input",{type:"text",value:u,onChange:g=>c(g.target.value),onKeyDown:m,placeholder:i,style:{flex:1,padding:"10px 14px",border:`1px solid ${w.gray[300]}`,borderRadius:et.full,fontSize:q.sm,outline:"none"}}),(0,Ot.jsx)(tt,{onClick:f,disabled:!u.trim(),children:(0,Ot.jsx)(je,{name:"chevron-right",size:18})})]})]})}var Ot,vp,F7=$(()=>{"use strict";Ot=z(W(),1),vp=z(X(),1);wg();Ai();Ko();$n();xt();lr();Rt()});function W7({items:e,activeId:t,onItemClick:r,orientation:o="horizontal",variant:n="default",style:i,className:a}){let s=l=>{let u=t===l.id,c={display:"flex",alignItems:"center",gap:"8px",padding:o==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:q.sm,cursor:l.disabled?"not-allowed":"pointer",opacity:l.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},d={default:{fontWeight:u?re.medium:re.normal,color:u?w.primary[600]:w.gray[600]},pills:{borderRadius:et.full,backgroundColor:u?w.primary[100]:"transparent",color:u?w.primary[700]:w.gray[600],fontWeight:u?re.medium:re.normal},underline:{borderBottom:u?`2px solid ${w.primary[600]}`:"2px solid transparent",color:u?w.primary[600]:w.gray[600],fontWeight:u?re.medium:re.normal,borderRadius:0}},f=()=>{l.disabled||r?.(l)},m=(0,Yo.jsxs)(Yo.Fragment,{children:[l.icon&&(0,Yo.jsx)("span",{style:{display:"flex"},children:l.icon}),(0,Yo.jsx)("span",{children:l.label})]});return l.href?(0,Yo.jsx)("a",{href:l.href,onClick:g=>{g.preventDefault(),f()},style:{...c,...d[n]},children:m},l.id):(0,Yo.jsx)("button",{onClick:f,disabled:l.disabled,style:{...c,...d[n]},children:m},l.id)};return(0,Yo.jsx)("nav",{className:a,style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",gap:o==="horizontal"?"4px":"2px",...n==="underline"&&o==="horizontal"&&{borderBottom:`1px solid ${w.gray[200]}`},...i},children:e.map(s)})}var Yo,K7=$(()=>{"use strict";Yo=z(W(),1);xt();lr();Rt()});function J7(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${r[o]}`}function Q7({files:e=[],onFilesSelected:t,onFileRemove:r,accept:o,multiple:n=!0,maxSize:i,maxFiles:a,disabled:s,dragDrop:l=!0,style:u,className:c}){let[d,f]=(0,Mx.useState)(!1),m=(0,Mx.useRef)(null),g=h=>{if(!h)return;let b=Array.from(h);a&&(b=b.slice(0,a-e.length)),i&&(b=b.filter(_=>_.size<=i)),t?.(b)},v=h=>{h.preventDefault(),f(!1),!s&&l&&g(h.dataTransfer.files)},x=h=>{h.preventDefault(),!s&&l&&f(!0)},y=()=>{f(!1)};return(0,pr.jsxs)("div",{className:c,style:{...u},children:[(0,pr.jsxs)("div",{onClick:()=>!s&&m.current?.click(),onDrop:v,onDragOver:x,onDragLeave:y,style:{border:`2px dashed ${d?w.primary[400]:w.gray[300]}`,borderRadius:et.lg,padding:"32px",textAlign:"center",backgroundColor:d?w.primary[50]:w.gray[50],cursor:s?"not-allowed":"pointer",transition:"all 0.2s",opacity:s?.5:1},children:[(0,pr.jsx)("input",{ref:m,type:"file",accept:o,multiple:n,onChange:h=>g(h.target.files),disabled:s,style:{display:"none"}}),(0,pr.jsx)(je,{name:"plus",size:32,tone:"subtle"}),(0,pr.jsx)("p",{style:{margin:"12px 0 4px",color:w.gray[700],fontSize:q.sm},children:l?"Drag and drop files here, or click to browse":"Click to browse files"}),(0,pr.jsxs)("p",{style:{margin:0,color:w.gray[500],fontSize:q.xs},children:[o&&`Accepted: ${o}`,i&&` \u2022 Max size: ${J7(i)}`,a&&` \u2022 Max files: ${a}`]})]}),e.length>0&&(0,pr.jsx)("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(h=>(0,pr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${w.gray[200]}`,borderRadius:et.md,backgroundColor:w.white},children:[(0,pr.jsx)(je,{name:"menu",size:20,tone:"subtle"}),(0,pr.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,pr.jsx)("p",{style:{margin:0,fontSize:q.sm,color:w.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.name}),(0,pr.jsxs)("p",{style:{margin:"2px 0 0",fontSize:q.xs,color:w.gray[500]},children:[J7(h.size),h.error&&(0,pr.jsx)("span",{style:{color:w.error[500],marginLeft:"8px"},children:h.error})]}),h.status==="uploading"&&h.progress!==void 0&&(0,pr.jsx)(mx,{value:h.progress,size:"sm",style:{marginTop:"8px"}})]}),(0,pr.jsx)(tt,{variant:"ghost",size:"sm",onClick:()=>r?.(h.id),children:(0,pr.jsx)(je,{name:"x",size:16})})]},h.id))})]})}var pr,Mx,Y7=$(()=>{"use strict";pr=z(W(),1),Mx=z(X(),1);Ai();c3();$n();xt();lr();Rt()});function X7({name:e,subtitle:t,avatar:r,coverImage:o,bio:n,stats:i,actions:a,compact:s,style:l,className:u}){return s?(0,Nt.jsx)(Xn,{className:u,style:{padding:"16px",...l},children:(0,Nt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,Nt.jsx)(Qo,{name:e,src:r,size:"md"}),(0,Nt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.sm},children:e}),t&&(0,Nt.jsx)("p",{style:{margin:"2px 0 0",color:w.gray[500],fontSize:q.xs},children:t})]}),a]})}):(0,Nt.jsxs)(Xn,{className:u,style:{padding:0,overflow:"hidden",...l},children:[o&&(0,Nt.jsx)("div",{style:{height:"120px",backgroundImage:`url(${o})`,backgroundSize:"cover",backgroundPosition:"center"}}),(0,Nt.jsxs)("div",{style:{padding:"16px",paddingTop:o?"0":"16px",textAlign:"center"},children:[(0,Nt.jsx)("div",{style:{marginTop:o?"-40px":"0",marginBottom:"12px"},children:(0,Nt.jsx)(Qo,{name:e,src:r,size:"xl",style:{border:`4px solid ${w.white}`,margin:"0 auto"}})}),(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.lg},children:e}),t&&(0,Nt.jsx)("p",{style:{margin:"4px 0 0",color:w.gray[500],fontSize:q.sm},children:t}),n&&(0,Nt.jsx)("p",{style:{margin:"12px 0 0",color:w.gray[600],fontSize:q.sm,lineHeight:1.5},children:n}),i&&i.length>0&&(0,Nt.jsx)("div",{style:{display:"flex",justifyContent:"center",gap:"24px",marginTop:"16px",paddingTop:"16px",borderTop:`1px solid ${w.gray[200]}`},children:i.map((c,d)=>(0,Nt.jsxs)("div",{style:{textAlign:"center"},children:[(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.lg},children:c.value}),(0,Nt.jsx)("p",{style:{margin:"2px 0 0",color:w.gray[500],fontSize:q.xs},children:c.label})]},d))}),a&&(0,Nt.jsx)("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"8px"},children:a})]})]})}var Nt,eU=$(()=>{"use strict";Nt=z(W(),1);wg();Y5();xt();Rt()});function koe({notification:e,onMarkAsRead:t,onDismiss:r}){let o=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,n=_oe[e.type||"info"];return(0,rt.jsxs)("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":w.primary[50],borderRadius:et.md,transition:"background-color 0.15s"},children:[(0,rt.jsx)("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":n,flexShrink:0,marginTop:"6px"}}),(0,rt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[(0,rt.jsx)("p",{style:{margin:0,fontWeight:re.medium,color:w.gray[900],fontSize:q.sm},children:e.title}),(0,rt.jsx)("button",{onClick:()=>r?.(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:w.gray[400],flexShrink:0},children:(0,rt.jsx)(je,{name:"x",size:14})})]}),e.message&&(0,rt.jsx)("p",{style:{margin:"4px 0 0",color:w.gray[600],fontSize:q.xs},children:e.message}),(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[(0,rt.jsx)("span",{style:{color:w.gray[400],fontSize:q.xs},children:o}),!e.read&&(0,rt.jsx)("button",{onClick:()=>t?.(e.id),style:{background:"none",border:"none",padding:0,color:w.primary[600],fontSize:q.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&(0,rt.jsx)("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:w.primary[600],fontSize:q.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function tU({notifications:e,onMarkAsRead:t,onMarkAllAsRead:r,onDismiss:o,onClearAll:n,emptyText:i="No notifications",loading:a,style:s,className:l}){let u=e.filter(c=>!c.read).length;return(0,rt.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",...s},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${w.gray[200]}`},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,rt.jsx)("span",{style:{fontWeight:re.semibold,color:w.gray[900]},children:"Notifications"}),u>0&&(0,rt.jsx)("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:w.primary[100],color:w.primary[700],fontSize:q.xs,fontWeight:re.medium},children:u})]}),(0,rt.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[u>0&&(0,rt.jsx)(tt,{variant:"ghost",size:"sm",onClick:r,children:"Mark all read"}),e.length>0&&(0,rt.jsx)(tt,{variant:"ghost",size:"sm",onClick:n,children:"Clear all"})]})]}),(0,rt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,rt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,rt.jsx)(Zt,{size:24})}):e.length===0?(0,rt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:w.gray[500]},children:i}):(0,rt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(c=>(0,rt.jsx)(koe,{notification:c,onMarkAsRead:t,onDismiss:o},c.id))})})]})}var rt,_oe,rU=$(()=>{"use strict";rt=z(W(),1);Ai();Ko();$n();xt();lr();Rt();_oe={info:w.info[500],success:w.success[500],warning:w.warning[500],error:w.error[500]}});function nU({open:e,onClose:t,title:r,children:o,footer:n,size:i="md",closeOnOverlayClick:a=!0,closeOnEscape:s=!0,showCloseButton:l=!0,style:u,className:c}){let d=(0,Ex.useCallback)(g=>{g.key==="Escape"&&s&&t()},[s,t]);if((0,Ex.useEffect)(()=>{if(e)return document.addEventListener("keydown",d),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}},[e,d]),!e)return null;let f=g=>{g.target===g.currentTarget&&a&&t()},m=i==="full";return(0,To.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:qt.modal,display:"flex",alignItems:m?"stretch":"center",justifyContent:"center",padding:m?0:"24px"},children:[(0,To.jsx)("div",{onClick:f,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:ys.fadeIn}}),(0,To.jsxs)("div",{role:"dialog","aria-modal":"true",className:c,style:{position:"relative",width:Soe[i],maxWidth:m?"100%":"calc(100vw - 48px)",maxHeight:m?"100%":"calc(100vh - 48px)",backgroundColor:w.white,borderRadius:m?0:et.xl,boxShadow:Jt["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:ys.scaleIn,...u},children:[(r||l)&&(0,To.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${w.gray[200]}`},children:[r&&(0,To.jsx)(xn,{level:4,children:r}),l&&(0,To.jsx)(tt,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close modal",style:{marginLeft:"auto"},children:(0,To.jsx)(je,{name:"x",size:20})})]}),(0,To.jsx)("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:o}),n&&(0,To.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${w.gray[200]}`},children:n})]})]})}var To,Ex,Soe,oU=$(()=>{"use strict";To=z(W(),1),Ex=z(X(),1);Ai();$n();dx();xt();lr();dp();Soe={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"}});function iU({open:e,onClose:t,commands:r,onSelect:o,placeholder:n="Search commands...",recentIds:i=[],loading:a,style:s,className:l}){let[u,c]=(0,ro.useState)(""),[d,f]=(0,ro.useState)(0),m=(0,ro.useMemo)(()=>{let y=u?r.filter(b=>b.label.toLowerCase().includes(u.toLowerCase())||b.description?.toLowerCase().includes(u.toLowerCase())):r,h=new Map;if(!u&&i.length>0){let b=i.map(_=>r.find(S=>S.id===_)).filter(Boolean);b.length>0&&h.set("Recent",b)}return y.forEach(b=>{let _=b.group||"Commands";h.has(_)||h.set(_,[]),!(!u&&i.includes(b.id)&&h.has("Recent"))&&h.get(_).push(b)}),h},[r,u,i]),g=(0,ro.useMemo)(()=>{let y=[];return m.forEach(h=>y.push(...h)),y},[m]);(0,ro.useEffect)(()=>{f(0)},[u]),(0,ro.useEffect)(()=>{e&&(c(""),f(0))},[e]);let v=(0,ro.useCallback)(y=>{if(y.key==="Escape"){t();return}if(y.key==="ArrowDown")y.preventDefault(),f(h=>Math.min(h+1,g.length-1));else if(y.key==="ArrowUp")y.preventDefault(),f(h=>Math.max(h-1,0));else if(y.key==="Enter"){y.preventDefault();let h=g[d];h&&!h.disabled&&(o(h),t())}},[g,d,o,t]);if((0,ro.useEffect)(()=>{if(e)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e,v]),!e)return null;let x=0;return(0,ht.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:qt.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[(0,ht.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,ht.jsxs)("div",{role:"dialog",className:l,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:w.white,borderRadius:et.xl,boxShadow:Jt["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...s},children:[(0,ht.jsx)("div",{style:{padding:"12px",borderBottom:`1px solid ${w.gray[200]}`},children:(0,ht.jsxs)("div",{style:{position:"relative"},children:[(0,ht.jsx)(je,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),(0,ht.jsx)("input",{type:"text",value:u,onChange:y=>c(y.target.value),placeholder:n,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:q.base,outline:"none",backgroundColor:"transparent"}})]})}),(0,ht.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,ht.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,ht.jsx)(Zt,{size:24})}):g.length===0?(0,ht.jsx)("div",{style:{textAlign:"center",padding:"32px",color:w.gray[500]},children:"No commands found"}):Array.from(m.entries()).map(([y,h])=>(0,ht.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,ht.jsx)("div",{style:{padding:"8px 12px",fontSize:q.xs,fontWeight:re.semibold,color:w.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:y}),h.map(b=>{let S=x++===d;return(0,ht.jsxs)("button",{onClick:()=>{b.disabled||(o(b),t())},disabled:b.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:et.md,backgroundColor:S?w.gray[100]:"transparent",color:b.disabled?w.gray[400]:w.gray[900],textAlign:"left",cursor:b.disabled?"not-allowed":"pointer"},children:[b.icon&&(0,ht.jsx)("span",{style:{display:"flex",color:w.gray[500]},children:b.icon}),(0,ht.jsxs)("div",{style:{flex:1},children:[(0,ht.jsx)("div",{style:{fontSize:q.sm},children:b.label}),b.description&&(0,ht.jsx)("div",{style:{fontSize:q.xs,color:w.gray[500]},children:b.description})]}),b.shortcut&&(0,ht.jsx)("kbd",{style:{padding:"2px 6px",backgroundColor:w.gray[100],borderRadius:et.sm,fontSize:q.xs,color:w.gray[500],fontFamily:"inherit"},children:b.shortcut})]},b.id)})]},y))}),(0,ht.jsxs)("div",{style:{padding:"8px 12px",borderTop:`1px solid ${w.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:q.xs,color:w.gray[500]},children:[(0,ht.jsx)("span",{children:"\u2191\u2193 Navigate"}),(0,ht.jsx)("span",{children:"\u21B5 Select"}),(0,ht.jsx)("span",{children:"Esc Close"})]})]})]})}var ht,ro,aU=$(()=>{"use strict";ht=z(W(),1),ro=z(X(),1);Ko();$n();xt();lr();Rt()});function sU({brand:e,columns:t,socialLinks:r,bottomText:o,bottomLinks:n,background:i,bordered:a=!0,style:s,className:l}){return(0,Fr.jsxs)("footer",{className:l,role:"contentinfo",style:{backgroundColor:i||w.gray[50],borderTop:a?`1px solid ${w.gray[200]}`:void 0,...s},children:[(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&(0,Fr.jsx)("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),t?.map((u,c)=>(0,Fr.jsxs)("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[u.title&&(0,Fr.jsx)("h4",{style:{fontSize:q.sm,fontWeight:re.semibold,color:w.gray[900],lineHeight:gt.normal,margin:"0 0 16px 0",padding:0},children:u.title}),(0,Fr.jsx)("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:u.links.map((d,f)=>(0,Fr.jsx)("li",{children:(0,Fr.jsx)("a",{href:d.href,onClick:d.onClick?m=>{m.preventDefault(),d.onClick?.()}:void 0,style:{fontSize:q.sm,color:w.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:gt.normal},"aria-label":d.label,children:d.label})},f))})]},c))]}),(o||n||r)&&(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${w.gray[200]}`},children:[o&&(0,Fr.jsx)("span",{style:{fontSize:q.sm,color:w.gray[500],lineHeight:gt.normal},children:o}),(0,Fr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[r?.map((u,c)=>(0,Fr.jsx)("a",{href:u.href,"aria-label":u.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:w.gray[500],transition:"color 0.15s"},children:u.icon},c)),n?.map((u,c)=>(0,Fr.jsx)("a",{href:u.href,onClick:u.onClick?d=>{d.preventDefault(),u.onClick?.()}:void 0,style:{fontSize:q.sm,color:w.gray[500],textDecoration:"none",transition:"color 0.15s"},children:u.label},c))]})]})]})}var Fr,lU=$(()=>{"use strict";Fr=z(W(),1);xt();Rt()});function uU({heading:e,description:t,primaryAction:r,secondaryAction:o,media:n,align:i="center",size:a="md",background:s,backgroundImage:l,overlay:u=!1,style:c,className:d}){let f={sm:{padding:"48px 24px",headingSize:q["3xl"],descSize:q.lg},md:{padding:"80px 24px",headingSize:q["4xl"],descSize:q.xl},lg:{padding:"120px 24px",headingSize:q["5xl"],descSize:q.xl}},m=f[a]||f.md,g=!!l,v=g&&u;return(0,no.jsxs)("section",{className:d,style:{position:"relative",backgroundColor:s||(g?void 0:w.white),...g&&{backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...c},children:[v&&(0,no.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,no.jsxs)("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:m.padding,display:"flex",flexDirection:i==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:i==="center"?"center":"left"},children:[(0,no.jsxs)("div",{style:{flex:i==="left"&&n?"1 1 50%":void 0,maxWidth:i==="center"?"800px":void 0},children:[e&&(0,no.jsx)("h1",{style:{fontSize:m.headingSize,fontWeight:re.bold,lineHeight:gt.tight,letterSpacing:_o.tight,color:v?w.white:w.gray[900],margin:"0 0 16px 0",padding:0},children:e}),t&&(0,no.jsx)("p",{style:{fontSize:m.descSize,lineHeight:gt.relaxed,color:v?"rgba(255,255,255,0.9)":w.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:i==="center"?"640px":void 0,...i==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:t}),(r||o)&&(0,no.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:i==="center"?"center":"flex-start"},children:[r&&(0,no.jsx)("button",{onClick:r.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:re.semibold,color:w.white,backgroundColor:w.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:gt.normal},children:r.label}),o&&(0,no.jsx)("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:re.semibold,color:v?w.white:w.gray[700],backgroundColor:"transparent",border:`1px solid ${v?"rgba(255,255,255,0.3)":w.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:gt.normal},children:o.label})]})]}),n&&(0,no.jsx)("div",{style:{flex:i==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...i==="center"&&{marginTop:"16px"}},children:n})]})]})}var no,cU=$(()=>{"use strict";no=z(W(),1);xt();Rt()});function pU(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function M3(e){return e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function woe(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function Toe(e){return e.some(t=>t.severity==="critical")?"critical":e.some(t=>t.severity==="major")?"major":e.some(t=>t.severity==="minor")?"minor":null}function dU({severity:e}){let r={width:"12px",height:"12px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:e?mU[e].dot:"var(--ggui-color-success-500, #22c55e)",flexShrink:0};return(0,_e.jsx)("div",{style:r})}function Moe({severity:e}){let t=mU[e],r={display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,padding:"2px 8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:t.bg,color:t.text,textTransform:"capitalize"};return(0,_e.jsx)("span",{style:r,children:e})}function Eoe({status:e}){let t=e==="resolved";return(0,_e.jsx)("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:t?"var(--ggui-color-success-600, #16a34a)":"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:t?500:400},children:gU[e]})}function Roe({incident:e,compact:t}){let[r,o]=(0,fU.useState)(!1),n={border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",backgroundColor:"var(--ggui-color-surface, #ffffff)"},i={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:t?"default":"pointer",gap:"8px"},a={fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)",margin:0,flex:1,minWidth:0};return(0,_e.jsxs)("div",{style:n,children:[(0,_e.jsxs)("div",{style:i,onClick:t?void 0:()=>o(!r),role:t?void 0:"button",tabIndex:t?void 0:0,onKeyDown:t?void 0:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o(!r))},children:[(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:[(0,_e.jsx)(Moe,{severity:e.severity}),(0,_e.jsx)("p",{style:a,children:e.title})]}),(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[(0,_e.jsx)(Eoe,{status:e.status}),!t&&(0,_e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ggui-color-outline, #d4d4d8)",strokeWidth:"2",style:{transform:r?"rotate(180deg)":"none",transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,_e.jsx)("path",{d:"M6 9l6 6 6-6"})})]})]}),e.affectedServices&&e.affectedServices.length>0&&(0,_e.jsx)("div",{style:{padding:"0 16px 8px",display:"flex",gap:"4px",flexWrap:"wrap"},children:e.affectedServices.map(s=>(0,_e.jsx)("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:s},s))}),!t&&r&&e.updates.length>0&&(0,_e.jsx)("div",{style:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",padding:"12px 16px"},children:(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.updates.map(s=>(0,_e.jsxs)("div",{style:{display:"flex",gap:"8px",fontSize:"12px"},children:[(0,_e.jsx)("span",{style:{color:"var(--ggui-color-outline, #d4d4d8)",flexShrink:0,fontVariantNumeric:"tabular-nums"},children:woe(s.timestamp)}),(0,_e.jsx)("span",{style:{fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",flexShrink:0,textTransform:"capitalize"},children:gU[s.status]}),(0,_e.jsx)("span",{style:{color:"var(--ggui-color-onSurface, #18181b)"},children:s.message})]},s.id))})})]})}function hU({incidents:e,days:t=14,emptyText:r="All systems operational",compact:o=!1,style:n,className:i}){let a=new Date,s=[];for(let c=0;c<t;c++){let d=new Date(a);d.setDate(d.getDate()-c);let f=pU(d),m=e.filter(g=>{let v=new Date(g.createdAt);return pU(v)===f});s.push({date:d,key:f,incidents:m})}let l=e.length>0,u={fontFamily:"var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",...n};return(0,_e.jsxs)("div",{style:u,className:i,children:[(0,_e.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[(0,_e.jsxs)("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)"},children:[t,"-Day History"]}),!l&&(0,_e.jsxs)("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-success-600, #16a34a)",display:"flex",alignItems:"center",gap:"4px"},children:[(0,_e.jsx)(dU,{severity:null}),r]})]}),(0,_e.jsx)("div",{style:{display:"flex",gap:"3px",flexDirection:"row-reverse",justifyContent:"flex-end"},children:s.map(c=>{let d=Toe(c.incidents);return(0,_e.jsx)("div",{title:`${M3(c.date)}: ${c.incidents.length===0?"No incidents":`${c.incidents.length} incident(s)`}`,children:(0,_e.jsx)(dU,{severity:d})},c.key)})}),(0,_e.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"4px",fontSize:"10px",color:"var(--ggui-color-outline, #d4d4d8)"},children:[(0,_e.jsx)("span",{children:M3(s[s.length-1]?.date??a)}),(0,_e.jsx)("span",{children:"Today"})]})]}),l&&(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:s.filter(c=>c.incidents.length>0).map(c=>(0,_e.jsxs)("div",{children:[(0,_e.jsx)("div",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},children:M3(c.date)}),(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:c.incidents.map(d=>(0,_e.jsx)(Roe,{incident:d,compact:o},d.id))})]},c.key))})]})}var _e,fU,mU,gU,yU=$(()=>{"use strict";_e=z(W(),1),fU=z(X(),1),mU={minor:{bg:"var(--ggui-color-warning-50, #fffbeb)",text:"var(--ggui-color-warning-700, #b45309)",dot:"var(--ggui-color-warning-500, #f59e0b)"},major:{bg:"var(--ggui-color-error-50, #fef2f2)",text:"var(--ggui-color-error-700, #b91c1c)",dot:"var(--ggui-color-error-500, #ef4444)"},critical:{bg:"var(--ggui-color-error-100, #fee2e2)",text:"var(--ggui-color-error-800, #991b1b)",dot:"var(--ggui-color-error-700, #b91c1c)"}},gU={investigating:"Investigating",identified:"Identified",monitoring:"Monitoring",resolved:"Resolved"}});function vU({chat:e,canvas:t,chatWidth:r="400px",style:o,className:n}){return(0,Ag.jsxs)("div",{className:n,style:{display:"flex",height:"100%",minHeight:0,...o},children:[(0,Ag.jsx)("div",{style:{width:r,minWidth:"320px",maxWidth:"50%",flexShrink:0,borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",display:"flex",flexDirection:"column",overflow:"hidden"},children:e}),(0,Ag.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:t})]})}var Ag,bU=$(()=>{"use strict";Ag=z(W(),1)});function $U({headline:e,subheadline:t,primaryAction:r,secondaryAction:o,variant:n="default",media:i,style:a,className:s}){let l={default:{backgroundColor:"var(--ggui-color-surface, #ffffff)"},gradient:{background:"linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"},pattern:{backgroundColor:"var(--ggui-color-primary-900, #0c4a6e)",backgroundImage:"radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%)"}},u=n==="pattern";return(0,kn.jsx)("section",{className:s,style:{position:"relative",overflow:"hidden",...l[n],...a},children:(0,kn.jsxs)("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"96px 24px",display:"flex",alignItems:"center",gap:"64px",flexWrap:"wrap"},children:[(0,kn.jsxs)("div",{style:{flex:"1 1 480px",minWidth:0},children:[(0,kn.jsx)("h1",{style:{fontSize:"var(--ggui-font-size-5xl, 48px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.1,letterSpacing:"-0.025em",color:u?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 24px 0"},children:e}),t&&(0,kn.jsx)("p",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",lineHeight:1.6,color:u?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 40px 0",maxWidth:"560px"},children:t}),(r||o)&&(0,kn.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px"},children:[r&&(0,kn.jsx)(xU,{action:r,variant:"primary",dark:u}),o&&(0,kn.jsx)(xU,{action:o,variant:"secondary",dark:u})]})]}),i&&(0,kn.jsx)("div",{style:{flex:"1 1 400px",display:"flex",justifyContent:"center",alignItems:"center",minWidth:0},children:i})]})})}function xU({action:e,variant:t,dark:r}){let s={...{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 32px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5"},...t==="primary"?r?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-900, #0c4a6e)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}:r?{backgroundColor:"transparent",color:"#ffffff",border:"2px solid rgba(255, 255, 255, 0.3)"}:{backgroundColor:"transparent",color:"var(--ggui-color-onSurface, #18181b)",border:"2px solid var(--ggui-color-outline, #d4d4d8)"}};return e.href?(0,kn.jsx)("a",{href:e.href,onClick:e.onClick,style:s,role:"button",children:e.label}):(0,kn.jsx)("button",{type:"button",onClick:e.onClick,style:s,children:e.label})}var kn,_U=$(()=>{"use strict";kn=z(W(),1)});function kU({heading:e,subheading:t,features:r,columns:o=3,style:n,className:i}){return(0,sn.jsxs)("section",{className:i,style:{backgroundColor:"var(--ggui-color-surface, #ffffff)",...n},children:[(0,sn.jsxs)("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"80px 24px"},children:[(e||t)&&(0,sn.jsxs)("div",{style:{textAlign:"center",marginBottom:"64px"},children:[e&&(0,sn.jsx)("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),t&&(0,sn.jsx)("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0,maxWidth:"640px",marginLeft:"auto",marginRight:"auto"},children:t})]}),(0,sn.jsx)("div",{className:"ggui-features-grid",style:{display:"grid",gridTemplateColumns:`repeat(${o}, 1fr)`,gap:"32px"},children:r.map((a,s)=>(0,sn.jsx)(Coe,{feature:a},s))})]}),(0,sn.jsx)("style",{children:`
163
+ `}return We.substring(0,We.length-1)},c.renderTo2dContext=function(k,M){M=M||2;let E=c.getModuleCount();for(let R=0;R<E;R++)for(let P=0;P<E;P++)k.fillStyle=c.isDark(R,P)?"black":"white",k.fillRect(P*M,R*M,M,M)},c};fp.stringToBytes=function(e){let t=[];for(let r=0;r<e.length;r+=1){let o=e.charCodeAt(r);t.push(o&255)}return t};fp.createStringToBytes=function(e,t){let r=(function(){let n=noe(e),i=function(){let l=n.read();if(l==-1)throw"eof";return l},a=0,s={};for(;;){let l=n.read();if(l==-1)break;let u=i(),c=i(),d=i(),f=String.fromCharCode(l<<8|u),m=c<<8|d;s[f]=m,a+=1}if(a!=t)throw a+" != "+t;return s})(),o=63;return function(n){let i=[];for(let a=0;a<n.length;a+=1){let s=n.charCodeAt(a);if(s<128)i.push(s);else{let l=r[n.charAt(a)];typeof l=="number"?(l&255)==l?i.push(l):(i.push(l>>>8),i.push(l&255)):i.push(o)}}return i}};Pr={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Rg={L:1,M:0,Q:3,H:2},vs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},bs=(function(){let e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],t=1335,r=7973,o=21522,n={},i=function(a){let s=0;for(;a!=0;)s+=1,a>>>=1;return s};return n.getBCHTypeInfo=function(a){let s=a<<10;for(;i(s)-i(t)>=0;)s^=t<<i(s)-i(t);return(a<<10|s)^o},n.getBCHTypeNumber=function(a){let s=a<<12;for(;i(s)-i(r)>=0;)s^=r<<i(s)-i(r);return a<<12|s},n.getPatternPosition=function(a){return e[a-1]},n.getMaskFunction=function(a){switch(a){case vs.PATTERN000:return function(s,l){return(s+l)%2==0};case vs.PATTERN001:return function(s,l){return s%2==0};case vs.PATTERN010:return function(s,l){return l%3==0};case vs.PATTERN011:return function(s,l){return(s+l)%3==0};case vs.PATTERN100:return function(s,l){return(Math.floor(s/2)+Math.floor(l/3))%2==0};case vs.PATTERN101:return function(s,l){return s*l%2+s*l%3==0};case vs.PATTERN110:return function(s,l){return(s*l%2+s*l%3)%2==0};case vs.PATTERN111:return function(s,l){return(s*l%3+(s+l)%2)%2==0};default:throw"bad maskPattern:"+a}},n.getErrorCorrectPolynomial=function(a){let s=Cg([1],0);for(let l=0;l<a;l+=1)s=s.multiply(Cg([1,xs.gexp(l)],0));return s},n.getLengthInBits=function(a,s){if(1<=s&&s<10)switch(a){case Pr.MODE_NUMBER:return 10;case Pr.MODE_ALPHA_NUM:return 9;case Pr.MODE_8BIT_BYTE:return 8;case Pr.MODE_KANJI:return 8;default:throw"mode:"+a}else if(s<27)switch(a){case Pr.MODE_NUMBER:return 12;case Pr.MODE_ALPHA_NUM:return 11;case Pr.MODE_8BIT_BYTE:return 16;case Pr.MODE_KANJI:return 10;default:throw"mode:"+a}else if(s<41)switch(a){case Pr.MODE_NUMBER:return 14;case Pr.MODE_ALPHA_NUM:return 13;case Pr.MODE_8BIT_BYTE:return 16;case Pr.MODE_KANJI:return 12;default:throw"mode:"+a}else throw"type:"+s},n.getLostPoint=function(a){let s=a.getModuleCount(),l=0;for(let d=0;d<s;d+=1)for(let f=0;f<s;f+=1){let m=0,g=a.isDark(d,f);for(let v=-1;v<=1;v+=1)if(!(d+v<0||s<=d+v))for(let x=-1;x<=1;x+=1)f+x<0||s<=f+x||v==0&&x==0||g==a.isDark(d+v,f+x)&&(m+=1);m>5&&(l+=3+m-5)}for(let d=0;d<s-1;d+=1)for(let f=0;f<s-1;f+=1){let m=0;a.isDark(d,f)&&(m+=1),a.isDark(d+1,f)&&(m+=1),a.isDark(d,f+1)&&(m+=1),a.isDark(d+1,f+1)&&(m+=1),(m==0||m==4)&&(l+=3)}for(let d=0;d<s;d+=1)for(let f=0;f<s-6;f+=1)a.isDark(d,f)&&!a.isDark(d,f+1)&&a.isDark(d,f+2)&&a.isDark(d,f+3)&&a.isDark(d,f+4)&&!a.isDark(d,f+5)&&a.isDark(d,f+6)&&(l+=40);for(let d=0;d<s;d+=1)for(let f=0;f<s-6;f+=1)a.isDark(f,d)&&!a.isDark(f+1,d)&&a.isDark(f+2,d)&&a.isDark(f+3,d)&&a.isDark(f+4,d)&&!a.isDark(f+5,d)&&a.isDark(f+6,d)&&(l+=40);let u=0;for(let d=0;d<s;d+=1)for(let f=0;f<s;f+=1)a.isDark(f,d)&&(u+=1);let c=Math.abs(100*u/s/s-50)/5;return l+=c*10,l},n})(),xs=(function(){let e=new Array(256),t=new Array(256);for(let o=0;o<8;o+=1)e[o]=1<<o;for(let o=8;o<256;o+=1)e[o]=e[o-4]^e[o-5]^e[o-6]^e[o-8];for(let o=0;o<255;o+=1)t[e[o]]=o;let r={};return r.glog=function(o){if(o<1)throw"glog("+o+")";return t[o]},r.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return e[o]},r})(),Cg=function(e,t){if(typeof e.length>"u")throw e.length+"/"+t;let r=(function(){let n=0;for(;n<e.length&&e[n]==0;)n+=1;let i=new Array(e.length-n+t);for(let a=0;a<e.length-n;a+=1)i[a]=e[a+n];return i})(),o={};return o.getAt=function(n){return r[n]},o.getLength=function(){return r.length},o.multiply=function(n){let i=new Array(o.getLength()+n.getLength()-1);for(let a=0;a<o.getLength();a+=1)for(let s=0;s<n.getLength();s+=1)i[a+s]^=xs.gexp(xs.glog(o.getAt(a))+xs.glog(n.getAt(s)));return Cg(i,0)},o.mod=function(n){if(o.getLength()-n.getLength()<0)return o;let i=xs.glog(o.getAt(0))-xs.glog(n.getAt(0)),a=new Array(o.getLength());for(let s=0;s<o.getLength();s+=1)a[s]=o.getAt(s);for(let s=0;s<n.getLength();s+=1)a[s]^=xs.gexp(xs.glog(n.getAt(s))+i);return Cg(a,0).mod(n)},o},j9=(function(){let e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(n,i){let a={};return a.totalCount=n,a.dataCount=i,a},r={},o=function(n,i){switch(i){case Rg.L:return e[(n-1)*4+0];case Rg.M:return e[(n-1)*4+1];case Rg.Q:return e[(n-1)*4+2];case Rg.H:return e[(n-1)*4+3];default:return}};return r.getRSBlocks=function(n,i){let a=o(n,i);if(typeof a>"u")throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;let s=a.length/3,l=[];for(let u=0;u<s;u+=1){let c=a[u*3+0],d=a[u*3+1],f=a[u*3+2];for(let m=0;m<c;m+=1)l.push(t(d,f))}return l},r})(),D9=function(){let e=[],t=0,r={};return r.getBuffer=function(){return e},r.getAt=function(o){let n=Math.floor(o/8);return(e[n]>>>7-o%8&1)==1},r.put=function(o,n){for(let i=0;i<n;i+=1)r.putBit((o>>>n-i-1&1)==1)},r.getLengthInBits=function(){return t},r.putBit=function(o){let n=Math.floor(t/8);e.length<=n&&e.push(0),o&&(e[n]|=128>>>t%8),t+=1},r},Yne=function(e){let t=Pr.MODE_NUMBER,r=e,o={};o.getMode=function(){return t},o.getLength=function(a){return r.length},o.write=function(a){let s=r,l=0;for(;l+2<s.length;)a.put(n(s.substring(l,l+3)),10),l+=3;l<s.length&&(s.length-l==1?a.put(n(s.substring(l,l+1)),4):s.length-l==2&&a.put(n(s.substring(l,l+2)),7))};let n=function(a){let s=0;for(let l=0;l<a.length;l+=1)s=s*10+i(a.charAt(l));return s},i=function(a){if("0"<=a&&a<="9")return a.charCodeAt(0)-48;throw"illegal char :"+a};return o},Xne=function(e){let t=Pr.MODE_ALPHA_NUM,r=e,o={};o.getMode=function(){return t},o.getLength=function(i){return r.length},o.write=function(i){let a=r,s=0;for(;s+1<a.length;)i.put(n(a.charAt(s))*45+n(a.charAt(s+1)),11),s+=2;s<a.length&&i.put(n(a.charAt(s)),6)};let n=function(i){if("0"<=i&&i<="9")return i.charCodeAt(0)-48;if("A"<=i&&i<="Z")return i.charCodeAt(0)-65+10;switch(i){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+i}};return o},eoe=function(e){let t=Pr.MODE_8BIT_BYTE,r=e,o=fp.stringToBytes(e),n={};return n.getMode=function(){return t},n.getLength=function(i){return o.length},n.write=function(i){for(let a=0;a<o.length;a+=1)i.put(o[a],8)},n},toe=function(e){let t=Pr.MODE_KANJI,r=e,o=fp.stringToBytes;(function(a,s){let l=o(a);if(l.length!=2||(l[0]<<8|l[1])!=s)throw"sjis not supported."})("\u53CB",38726);let n=o(e),i={};return i.getMode=function(){return t},i.getLength=function(a){return~~(n.length/2)},i.write=function(a){let s=n,l=0;for(;l+1<s.length;){let u=(255&s[l])<<8|255&s[l+1];if(33088<=u&&u<=40956)u-=33088;else if(57408<=u&&u<=60351)u-=49472;else throw"illegal char at "+(l+1)+"/"+u;u=(u>>>8&255)*192+(u&255),a.put(u,13),l+=2}if(l<s.length)throw"illegal char at "+(l+1)},i},U9=function(){let e=[],t={};return t.writeByte=function(r){e.push(r&255)},t.writeShort=function(r){t.writeByte(r),t.writeByte(r>>>8)},t.writeBytes=function(r,o,n){o=o||0,n=n||r.length;for(let i=0;i<n;i+=1)t.writeByte(r[i+o])},t.writeString=function(r){for(let o=0;o<r.length;o+=1)t.writeByte(r.charCodeAt(o))},t.toByteArray=function(){return e},t.toString=function(){let r="";r+="[";for(let o=0;o<e.length;o+=1)o>0&&(r+=","),r+=e[o];return r+="]",r},t},roe=function(){let e=0,t=0,r=0,o="",n={},i=function(s){o+=String.fromCharCode(a(s&63))},a=function(s){if(s<0)throw"n:"+s;if(s<26)return 65+s;if(s<52)return 97+(s-26);if(s<62)return 48+(s-52);if(s==62)return 43;if(s==63)return 47;throw"n:"+s};return n.writeByte=function(s){for(e=e<<8|s&255,t+=8,r+=1;t>=6;)i(e>>>t-6),t-=6},n.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),r%3!=0){let s=3-r%3;for(let l=0;l<s;l+=1)o+="="}},n.toString=function(){return o},n},noe=function(e){let t=e,r=0,o=0,n=0,i={};i.read=function(){for(;n<8;){if(r>=t.length){if(n==0)return-1;throw"unexpected end of file./"+n}let l=t.charAt(r);if(r+=1,l=="=")return n=0,-1;if(l.match(/^\s$/))continue;o=o<<6|a(l.charCodeAt(0)),n+=6}let s=o>>>n-8&255;return n-=8,s};let a=function(s){if(65<=s&&s<=90)return s-65;if(97<=s&&s<=122)return s-97+26;if(48<=s&&s<=57)return s-48+52;if(s==43)return 62;if(s==47)return 63;throw"c:"+s};return i},ooe=function(e,t){let r=e,o=t,n=new Array(e*t),i={};i.setPixel=function(u,c,d){n[c*r+u]=d},i.write=function(u){u.writeString("GIF87a"),u.writeShort(r),u.writeShort(o),u.writeByte(128),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(0),u.writeByte(255),u.writeByte(255),u.writeByte(255),u.writeString(","),u.writeShort(0),u.writeShort(0),u.writeShort(r),u.writeShort(o),u.writeByte(0);let c=2,d=s(c);u.writeByte(c);let f=0;for(;d.length-f>255;)u.writeByte(255),u.writeBytes(d,f,255),f+=255;u.writeByte(d.length-f),u.writeBytes(d,f,d.length-f),u.writeByte(0),u.writeString(";")};let a=function(u){let c=u,d=0,f=0,m={};return m.write=function(g,v){if(g>>>v)throw"length over";for(;d+v>=8;)c.writeByte(255&(g<<d|f)),v-=8-d,g>>>=8-d,f=0,d=0;f=g<<d|f,d=d+v},m.flush=function(){d>0&&c.writeByte(f)},m},s=function(u){let c=1<<u,d=(1<<u)+1,f=u+1,m=l();for(let h=0;h<c;h+=1)m.add(String.fromCharCode(h));m.add(String.fromCharCode(c)),m.add(String.fromCharCode(d));let g=U9(),v=a(g);v.write(c,f);let x=0,y=String.fromCharCode(n[x]);for(x+=1;x<n.length;){let h=String.fromCharCode(n[x]);x+=1,m.contains(y+h)?y=y+h:(v.write(m.indexOf(y),f),m.size()<4095&&(m.size()==1<<f&&(f+=1),m.add(y+h)),y=h)}return v.write(m.indexOf(y),f),v.write(d,f),v.flush(),g.toByteArray()},l=function(){let u={},c=0,d={};return d.add=function(f){if(d.contains(f))throw"dup key:"+f;u[f]=c,c+=1},d.size=function(){return c},d.indexOf=function(f){return u[f]},d.contains=function(f){return typeof u[f]<"u"},d};return i},ioe=function(e,t,r){let o=ooe(e,t);for(let s=0;s<t;s+=1)for(let l=0;l<e;l+=1)o.setPixel(l,s,r(l,s));let n=U9();o.write(n);let i=roe(),a=n.toByteArray();for(let s=0;s<a.length;s+=1)i.writeByte(a[s]);return i.flush(),"data:image/gif;base64,"+i},L9=fp,o_e=fp.stringToBytes});function V9({value:e,size:t=128,errorCorrection:r="M",foreground:o="var(--ggui-color-onSurface, #18181b)",background:n="var(--ggui-color-surface, #ffffff)",ariaLabel:i}){let a=Z9.useMemo(()=>{try{let l=L9(0,r);l.addData(e),l.make();let u=l.getModuleCount(),c=[];for(let d=0;d<u;d+=1){let f=[];for(let m=0;m<u;m+=1)f.push(l.isDark(d,m));c.push(f)}return c}catch{return null}},[e,r]);if(a===null)return null;let s=a.length;return(0,Ig.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${s} ${s}`,width:t,height:t,role:"img","aria-label":i??`QR code for ${e}`,shapeRendering:"crispEdges",style:{display:"block",flexShrink:0},children:[(0,Ig.jsx)("rect",{width:s,height:s,fill:n}),a.flatMap((l,u)=>l.map((c,d)=>c?(0,Ig.jsx)("rect",{x:d,y:u,width:1,height:1,fill:o},`${d}-${u}`):null))]})}var Z9,Ig,H9=$(()=>{"use strict";Z9=z(X(),1);q9();Ig=z(W(),1)});function soe(){let e="var(--ggui-color-onSurface, #292929)",t="var(--ggui-color-neutral-300, #d1d5db)";return(0,Le.jsxs)("svg",{viewBox:"0 0 224 50",width:"72",height:"16",role:"img","aria-label":"ggui",style:{display:"block",flexShrink:0},children:[(0,Le.jsx)("path",{d:"M 0 0 H 50 V 25 H 25 V 50 H 0 Z",fill:t}),(0,Le.jsx)("rect",{x:"33",y:"33",width:"17",height:"17",fill:e}),(0,Le.jsx)("path",{d:"M 58 0 H 108 V 25 H 83 V 50 H 58 Z",fill:e}),(0,Le.jsx)("rect",{x:"91",y:"33",width:"17",height:"17",fill:t}),(0,Le.jsx)("path",{d:"M 141 50 C 154.807 50 166 38.8071 166 25 V 0 H 116 V 25 C 116 38.8071 127.193 50 141 50 Z",fill:e}),(0,Le.jsx)("rect",{x:"174",y:"0",width:"50",height:"50",fill:t})]})}function b3({settingsUrl:e,intent:t}){let[r,o]=_x.useState("idle"),n=_x.useCallback(()=>{typeof console<"u"&&console.log("[ggui:no-creds-card] click \u2192 settingsUrl =",e),o("working"),O9(e).then(s=>{typeof console<"u"&&console.log("[ggui:no-creds-card] requestOpenUrl resolved \u2192",s);let l=s.outcome==="opened"?"opened":s.outcome==="copied"?"copied":"manual";o(l),typeof window<"u"&&window.setTimeout(()=>o("idle"),loe)})},[e]);return(0,Le.jsx)(Xn,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,Le.jsxs)(Qt,{gap:"lg",children:[(0,Le.jsxs)(Qt,{gap:"md",children:[(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,Le.jsx)(soe,{}),(0,Le.jsx)(Jo,{variant:"info",children:"Setup needed"})]}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Le.jsx)(xn,{level:3,children:"Connect an LLM provider"}),(0,Le.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:"var(--ggui-color-onSurfaceVariant, #71717a)",opacity:.7,userSelect:"all"},title:"iframe-runtime build identifier \u2014 useful for diagnosing stale caches",children:aoe})]}),(0,Le.jsx)(wt,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:"ggui needs an LLM key to render UIs. Open this server\u2019s settings page to paste an Anthropic, OpenAI, Google, or OpenRouter API key."})]}),(0,Le.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-3, 12px)",padding:"var(--ggui-spacing-4, 16px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:(0,Le.jsxs)("div",{style:{display:"flex",gap:"var(--ggui-spacing-4, 16px)",alignItems:"flex-start",flexWrap:"wrap"},children:[(0,Le.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"var(--ggui-spacing-2, 8px)"},children:[(0,Le.jsx)("div",{style:{padding:"var(--ggui-spacing-2, 8px)",background:"#ffffff",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:0},children:(0,Le.jsx)(V9,{value:e,size:120,foreground:"#000000",background:"#ffffff"})}),(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)",textAlign:"center"},children:"Scan with your phone"})]}),(0,Le.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",flex:"1 1 240px",minWidth:"200px"},children:[(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:"var(--ggui-font-weight-semibold, 600)",textTransform:"uppercase",letterSpacing:"0.06em",fontSize:"var(--ggui-font-size-xs, 11px)"},children:"Or open this URL in your browser"}),(0,Le.jsx)("div",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",wordBreak:"break-all",userSelect:"all",padding:"var(--ggui-spacing-3, 12px)",background:"var(--ggui-color-surface, #fff)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",lineHeight:"1.45"},children:e}),(0,Le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,Le.jsx)(tt,{variant:"primary",size:"md",onClick:n,disabled:r==="working",children:r==="working"?"Opening\u2026":r==="opened"?"Opened in browser \u2713":r==="copied"?"URL copied \u2014 paste in your browser":r==="manual"?"Tap the URL above to copy":"Open settings"}),r==="idle"||r==="working"?(0,Le.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.85},children:"or tap-and-hold the URL above to copy"}):null]})]})]})}),t?(0,Le.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Pending prompt: ",t]}):null]})})}var _x,Le,aoe,loe,B9=$(()=>{"use strict";_x=z(X(),1);Mg();N9();H9();Le=z(W(),1),aoe="0.2.0-alpha.3+035a63f1";loe=4e3});function coe(){let e=_n.useRef(1e4),t=_n.useRef(new Map);return _n.useEffect(()=>{let r=o=>{let n=o.data;if(n===null||typeof n!="object")return;let i=n.id;if(typeof i!="number")return;let a=t.current.get(i);a!==void 0&&(t.current.delete(i),a(n))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[]),_n.useCallback((r,o)=>new Promise(n=>{let i=e.current;e.current+=1,t.current.set(i,n);try{window.parent.postMessage({jsonrpc:"2.0",id:i,method:r,params:o??{}},"*")}catch(a){t.current.delete(i),n({error:{code:-32099,message:a instanceof Error?a.message:String(a)}})}window.setTimeout(()=>{t.current.delete(i)&&n({error:{code:-32001,message:"TIMEOUT"}})},uoe)}),[])}function poe(){let[e,t]=_n.useState([]),r=_n.useRef(0);return _n.useEffect(()=>{let o=n=>{let i=n.data;if(i===null||typeof i!="object")return;let a=i;if(a.jsonrpc!=="2.0"||typeof a.method!="string"||typeof a.id=="number"&&a.id>=1e4&&(a.method==="ui/message"||a.method==="ui/update-model-context"||a.method==="ui/open-link"||a.method==="ui/request-display-mode"||a.method==="tools/call"))return;r.current+=1;let l={id:r.current,tsIso:new Date().toISOString(),method:a.method,params:a.params};t(u=>[l,...u].slice(0,50))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[]),e}function doe(e){switch(e){case"ui/message":return{role:"user",content:[{type:"text",text:"[ggui:probe] hello from the protocol probe card"}]};case"ui/update-model-context":return{content:[{type:"text",text:"[ggui:probe] this user prefers concise replies"}]};case"ui/open-link":return{url:"https://ggui.ai"};case"ui/request-display-mode":return{mode:"fullscreen"};case"tools/call":return{name:"ggui_runtime_submit_action",arguments:{kind:"dispatch",payload:{intent:"probe-click",data:{note:"hello from the protocol probe"}},renderId:"probe-render",appId:"probe-app",actionId:"00000000",firedAt:new Date().toISOString()}}}}function foe(e){let t=2166136261;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}function moe(e){if(e==null||typeof e!="object"||Array.isArray(e))return"";let t=Object.entries(e);return t.length===0?"":t.map(([o,n])=>{if(n===null)return`${o}: null`;if(typeof n=="string")return`${o}: ${n}`;if(typeof n=="number"||typeof n=="boolean")return`${o}: ${n}`;let i=JSON.stringify(n);return`${o}: ${i.length>40?`${i.slice(0,37)}\u2026`:i}`}).join(", ")}function zg({method:e,description:t,call:r}){let[o,n]=_n.useState({state:"idle"}),i=_n.useCallback(()=>{let l=Date.now();n({state:"pending",startedAtMs:l});let u=doe(e);r(e,u).then(c=>{if(c.error){n({state:"error",code:c.error.code??"?",message:c.error.message??"(no message)"});return}if(n({state:"success",result:c.result??{}}),e==="tools/call"){let f=(u.arguments??{}).payload??{},m=String(f.intent??"?"),g=f.data,v=moe(g),x=v===""?"":` (${v})`,y=new Date().toISOString(),h=foe(`${m}|${JSON.stringify(g??null)}|${y}`);r("ui/update-model-context",{content:[{type:"text",text:`[ggui:pending-action] ${JSON.stringify({actionId:h,intent:m,data:g??null,firedAt:y})}`}]}),r("ui/message",{role:"user",content:[{type:"text",text:`Please proceed with **${m}**${x}. [id: \`${h}\`]`}]})}})},[r,e]),a=o.state==="pending"?"Sending\u2026":o.state==="success"?"Send again \u2713":o.state==="error"?"Retry":"Send",s=o.state==="idle"?(0,ve.jsx)(Jo,{variant:"default",children:"idle"}):o.state==="pending"?(0,ve.jsx)(Jo,{variant:"info",children:"pending"}):o.state==="success"?(0,ve.jsx)(Jo,{variant:"success",children:"success"}):(0,ve.jsx)(Jo,{variant:"warning",children:"error"});return(0,ve.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-2, 8px)",padding:"var(--ggui-spacing-3, 12px)",borderRadius:"var(--ggui-shape-radius-md, 10px)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",background:"var(--ggui-color-surface, #fff)"},children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)("code",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-sm, 13px)",color:"var(--ggui-color-onSurface, #111)",fontWeight:"var(--ggui-font-weight-semibold, 600)"},children:e}),s]}),(0,ve.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:t}),(0,ve.jsx)("div",{style:{display:"flex",gap:"var(--ggui-spacing-2, 8px)"},children:(0,ve.jsx)(tt,{variant:"primary",size:"sm",onClick:i,disabled:o.state==="pending",children:a})}),o.state==="success"||o.state==="error"?(0,ve.jsx)("pre",{style:{margin:0,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)",color:o.state==="error"?"var(--ggui-color-warning, #b45309)":"var(--ggui-color-onSurfaceVariant, #52525b)",background:"var(--ggui-color-neutral-100, #f4f4f5)",padding:"var(--ggui-spacing-2, 8px)",borderRadius:"var(--ggui-shape-radius-sm, 6px)",overflow:"auto",maxHeight:"120px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.state==="error"?`${o.code}: ${o.message}`:JSON.stringify(o.result,null,2)}):null]})}function x3({intent:e}){let t=coe(),r=poe();return(0,ve.jsx)(Xn,{padding:"lg",border:!1,shadow:"none",style:{backgroundColor:"transparent"},children:(0,ve.jsxs)(Qt,{gap:"lg",children:[(0,ve.jsxs)(Qt,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"var(--ggui-spacing-3, 12px)",flexWrap:"wrap"},children:[(0,ve.jsx)(xn,{level:3,children:"MCP Apps protocol probe"}),(0,ve.jsx)(Jo,{variant:"info",children:"diagnostic"})]}),(0,ve.jsxs)(wt,{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",lineHeight:"1.55"},children:["One button per primary host effect emitted by the iframe runtime's gesture surfaces (Pattern \u03B1 / Pattern \u03B2 / native- idiom interceptors). Click each to verify which methods this host honors. The",(0,ve.jsx)("code",{children:"tools/call"})," row chains the full Pattern \u03B2 bridge (audit + context + consent), reproducing the production",(0,ve.jsx)("code",{children:"dispatchWiredAction"})," envelope shape verbatim. The receive log below captures every notification the host emits while this card is mounted."]})]}),(0,ve.jsxs)(Qt,{gap:"md",children:[(0,ve.jsx)(zg,{method:"ui/message",description:"Pattern \u03B2 step 3 \u2014 consent-gated user authorization. Host pre-fills + waits for user confirm before the LLM acts on the paired pending-action context.",call:t}),(0,ve.jsx)(zg,{method:"ui/update-model-context",description:"Pattern \u03B2 step 2 \u2014 silent structured `[ggui:pending-action]` context drop. LLM honors on next turn. No immediate UI.",call:t}),(0,ve.jsx)(zg,{method:"ui/open-link",description:"Native-idiom anchor click interceptor primary effect. Opens ggui.ai in the host's browser / new tab. Real iframe code triggers via `<a href target='_blank'>` or cross-origin href.",call:t}),(0,ve.jsx)(zg,{method:"ui/request-display-mode",description:"Native-idiom fullscreen interceptor primary effect. Request fullscreen \u2014 real iframe code calls `el.requestFullscreen()`; the runtime overrides the prototype to route through here.",call:t}),(0,ve.jsx)(zg,{method:"tools/call",description:"Pattern \u03B2 full bridge: `tools/call ggui_runtime_submit_action` (audit, kind:'dispatch') + `ui/update-model-context` + `ui/message`. Spec \xA7401 requires `_meta.ui.visibility:['app']` on the receiving tool. Pattern \u03B1 (direct fire to a same-server app-visible target) would skip steps 2+3 and add a second `tools/call` to the target tool instead.",call:t})]}),(0,ve.jsxs)(Qt,{gap:"sm",children:[(0,ve.jsxs)("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:"var(--ggui-spacing-3, 12px)"},children:[(0,ve.jsx)(xn,{level:4,children:"Receive log"}),(0,ve.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[r.length," ",r.length===1?"event":"events"]})]}),r.length===0?(0,ve.jsx)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",fontStyle:"italic"},children:"No host notifications observed yet. Click a probe button or wait for the host to emit one."}):(0,ve.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"var(--ggui-spacing-1, 4px)",maxHeight:"320px",overflow:"auto",padding:"var(--ggui-spacing-2, 8px)",background:"var(--ggui-color-neutral-100, #f4f4f5)",border:"1px solid var(--ggui-color-neutral-200, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)"},children:r.map(o=>(0,ve.jsxs)("details",{style:{fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace)",fontSize:"var(--ggui-font-size-xs, 11px)"},children:[(0,ve.jsxs)("summary",{style:{cursor:"pointer",padding:"var(--ggui-spacing-1, 4px) 0",color:"var(--ggui-color-onSurface, #111)"},children:[(0,ve.jsx)("span",{style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginRight:"8px"},children:o.tsIso.slice(11,19)}),(0,ve.jsx)("span",{style:{fontWeight:600},children:o.method})]}),(0,ve.jsx)("pre",{style:{margin:"4px 0 0 16px",whiteSpace:"pre-wrap",wordBreak:"break-word",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:JSON.stringify(o.params,null,2)})]},o.id))})]}),e?(0,ve.jsxs)(wt,{variant:"caption",style:{color:"var(--ggui-color-onSurfaceVariant, #52525b)",opacity:.7},children:["Triggered by: ",e]}):null]})})}var _n,ve,uoe,G9=$(()=>{"use strict";_n=z(X(),1);Mg();ve=z(W(),1),uoe=5e3});function F9(){if(typeof window>"u")return!1;try{let e=window.location?.hostname??"";if(e.endsWith("claudemcpcontent.com")||/(^|\.)claude\.ai$/i.test(e)||/claude/i.test(e))return!0;let t=typeof document<"u"?document.referrer:"";if(/claude\.ai/i.test(t))return!0;let r=typeof navigator<"u"?navigator.userAgent:"";if(/Claude/.test(r))return!0}catch{}return!1}function W9(){let e=mp.useCallback(()=>typeof window>"u"||typeof window.matchMedia!="function"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",[]),[t,r]=mp.useState(e);return mp.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),n=a=>{r(a.matches?"dark":"light")};if(typeof o.addEventListener=="function")return o.addEventListener("change",n),()=>{o.removeEventListener("change",n)};let i=o;return i.addListener(n),()=>{i.removeListener(n)}},[]),t}var mp,K9=$(()=>{"use strict";mp=z(X(),1)});var X9={};jt(X9,{NoCredentialsCard:()=>b3,ProtocolProbeCard:()=>x3,SYSTEM_CARD_REGISTRY:()=>Q9,SystemCardHost:()=>hoe,renderSystemCard:()=>Y9});function J9(e,t){return function(o){let n=e,i=t(o);return $s.createElement(n,i)}}function goe({kind:e,props:t}){return $s.createElement("div",{style:{padding:"16px",border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 10px)",fontFamily:"var(--ggui-font-family-sans, -apple-system, BlinkMacSystemFont, sans-serif)",background:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"}},$s.createElement("div",{style:{fontWeight:600,marginBottom:8}},`Unknown system card: ${e}`),$s.createElement("div",{style:{fontSize:12,fontFamily:"var(--ggui-font-family-mono, ui-monospace, SFMono-Regular, monospace)",opacity:.7,wordBreak:"break-all"}},JSON.stringify(t)))}function Y9(e,t){let r=Q9[e];return r?$s.createElement(r,t):$s.createElement(goe,{kind:e,props:t})}function hoe({kind:e,props:t,themeId:r}){let o=F9(),n=W9();return $s.createElement(q5,{theme:n==="dark"?L5:yg,mode:n,transparent:o,children:Y9(e,t)})}var $s,Q9,e7=$(()=>{"use strict";$s=z(X(),1);Z5();B9();G9();K9();Q9={"no-credentials":J9(b3,e=>{let t=typeof e.settingsUrl=="string"?e.settingsUrl:"",r=typeof e.intent=="string"?e.intent:void 0;return{settingsUrl:t,...r!==void 0?{intent:r}:{}}}),"mcp-apps-probe":J9(x3,e=>{let t=typeof e.intent=="string"?e.intent:void 0;return{...t!==void 0?{intent:t}:{}}})}});var Pg,to,_3,k3,S3,w3,Sx,w,xt=$(()=>{"use strict";Pg={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},to={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},_3={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},k3={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},S3={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},w3={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},Sx={textPrimary:to[900],textSecondary:to[600],textMuted:to[400],textInverse:"#ffffff",bgPrimary:"#ffffff",bgSecondary:to[50],bgTertiary:to[100],bgInverse:to[900],borderLight:to[200],borderDefault:to[300],borderDark:to[400],focus:Pg[500],hover:Pg[50],active:Pg[100],disabled:to[300],success:_3[500],warning:k3[500],error:S3[500],info:w3[500]},w={primary:Pg,gray:to,success:_3,warning:k3,error:S3,info:w3,semantic:Sx,white:"#ffffff",black:"#000000",transparent:"transparent"}});function p7({value:e,onChange:t,onSearch:r,placeholder:o="Search...",showButton:n=!1,buttonText:i="Search",loading:a,disabled:s,size:l="md",style:u,className:c}){let[d,f]=(0,c7.useState)(""),m=e!==void 0?e:d,g=h=>{e===void 0&&f(h),t?.(h)},v=()=>{r?.(m)},x=h=>{h.key==="Enter"&&!s&&v()},y={sm:"sm",md:"md",lg:"md"};return(0,qi.jsxs)("div",{className:c,style:{display:"flex",gap:"8px",alignItems:"flex-end",...u},children:[(0,qi.jsxs)("div",{style:{position:"relative",flex:1},children:[(0,qi.jsx)("div",{style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:w.gray[400],pointerEvents:"none",display:"flex",alignItems:"center"},children:a?(0,qi.jsx)(Zt,{size:16}):(0,qi.jsx)(je,{name:"search",size:16})}),(0,qi.jsx)("input",{type:"search",value:m,onChange:h=>g(h.target.value),onKeyDown:x,placeholder:o,disabled:s||a,style:{width:"100%",padding:l==="sm"?"6px 10px 6px 36px":l==="lg"?"12px 14px 12px 40px":"10px 12px 10px 38px",paddingLeft:"36px",fontSize:l==="lg"?"16px":"14px",borderRadius:"6px",border:`1px solid ${w.gray[300]}`,backgroundColor:s?w.gray[50]:w.white,color:w.gray[900],outline:"none",boxSizing:"border-box"}})]}),n&&(0,qi.jsx)(tt,{onClick:v,disabled:s||a,size:y[l],loading:a,children:i})]})}var qi,c7,d7=$(()=>{"use strict";qi=z(W(),1),c7=z(X(),1);Ai();Ko();$n();xt()});function f7({label:e,children:t,error:r,helperText:o,required:n,description:i,style:a,className:s}){let l=!!r;return(0,Al.jsxs)("div",{className:s,style:{display:"flex",flexDirection:"column",gap:"4px",...a},children:[(0,Al.jsxs)("label",{style:{fontSize:q.sm,fontWeight:re.medium,color:w.gray[700]},children:[e,n&&(0,Al.jsx)("span",{style:{color:w.error[500],marginLeft:"2px"},children:"*"})]}),i&&(0,Al.jsx)("span",{style:{fontSize:q.xs,color:w.gray[500],marginBottom:"4px"},children:i}),t,(r||o)&&(0,Al.jsx)("span",{style:{fontSize:q.xs,color:l?w.error[500]:w.gray[500]},children:r||o})]})}var Al,m7=$(()=>{"use strict";Al=z(W(),1);xt();Rt()});function wx({label:e,icon:t,rightElement:r,onClick:o,disabled:n,active:i,danger:a,style:s,className:l}){let u=a?w.error[600]:w.gray[700],c=a?w.error[50]:w.gray[100],d=a?w.error[100]:w.primary[50];return(0,gp.jsxs)("button",{onClick:n?void 0:o,disabled:n,className:l,style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",borderRadius:et.md,backgroundColor:i?d:"transparent",color:n?w.gray[400]:u,fontSize:q.sm,fontWeight:i?re.medium:re.normal,textAlign:"left",cursor:n?"not-allowed":"pointer",transition:"background-color 0.15s",...s},onMouseEnter:f=>{!n&&!i&&(f.target.style.backgroundColor=c)},onMouseLeave:f=>{!n&&!i&&(f.target.style.backgroundColor="transparent")},children:[t&&(0,gp.jsx)("span",{style:{display:"flex",flexShrink:0},children:t}),(0,gp.jsx)("span",{style:{flex:1},children:e}),r&&(0,gp.jsx)("span",{style:{display:"flex",flexShrink:0,color:w.gray[400]},children:r})]})}var gp,T3=$(()=>{"use strict";gp=z(W(),1);xt();lr();Rt()});function g7({children:e,variant:t="default",size:r="md",closable:o,onClose:n,icon:i,style:a,className:s}){let l=$oe[r];return(0,Ol.jsxs)("span",{className:s,style:{display:"inline-flex",alignItems:"center",gap:l.gap,padding:l.padding,fontSize:l.fontSize,fontWeight:re.medium,borderRadius:"6px",...xoe[t],...a},children:[i&&(0,Ol.jsx)("span",{style:{display:"flex"},children:i}),e,o&&(0,Ol.jsx)("button",{onClick:n,style:{display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",background:"none",color:"inherit",cursor:"pointer",opacity:.7,marginLeft:"2px"},"aria-label":"Remove",children:(0,Ol.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,Ol.jsx)("path",{d:"M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6 9.5 3.205z"})})})]})}var Ol,xoe,$oe,h7=$(()=>{"use strict";Ol=z(W(),1);xt();Rt();xoe={default:{backgroundColor:w.gray[100],color:w.gray[700],border:`1px solid ${w.gray[200]}`},primary:{backgroundColor:w.primary[50],color:w.primary[700],border:`1px solid ${w.primary[200]}`},success:{backgroundColor:w.success[50],color:w.success[700],border:`1px solid ${w.success[200]}`},warning:{backgroundColor:w.warning[50],color:w.warning[700],border:`1px solid ${w.warning[200]}`},error:{backgroundColor:w.error[50],color:w.error[700],border:`1px solid ${w.error[200]}`},info:{backgroundColor:w.info[50],color:w.info[700],border:`1px solid ${w.info[200]}`}},$oe={sm:{padding:"2px 6px",fontSize:q.xs,gap:"4px"},md:{padding:"4px 8px",fontSize:q.xs,gap:"6px"},lg:{padding:"6px 10px",fontSize:q.sm,gap:"6px"}}});function y7({trigger:e,options:t,value:r,onChange:o,placement:n="bottom-start",disabled:i,style:a,className:s}){let[l,u]=(0,Nl.useState)(!1),c=(0,Nl.useRef)(null);(0,Nl.useEffect)(()=>{let m=g=>{c.current&&!c.current.contains(g.target)&&u(!1)};if(l)return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[l]),(0,Nl.useEffect)(()=>{let m=g=>{g.key==="Escape"&&u(!1)};if(l)return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[l]);let d=m=>{o?.(m),u(!1)},f=()=>{switch(n){case"bottom-start":return{top:"100%",left:0,marginTop:"4px"};case"bottom-end":return{top:"100%",right:0,marginTop:"4px"};case"top-start":return{bottom:"100%",left:0,marginBottom:"4px"};case"top-end":return{bottom:"100%",right:0,marginBottom:"4px"};default:return{top:"100%",left:0,marginTop:"4px"}}};return(0,hp.jsxs)("div",{ref:c,className:s,style:{position:"relative",display:"inline-block",...a},children:[(0,hp.jsx)("div",{onClick:()=>!i&&u(!l),style:{cursor:i?"not-allowed":"pointer"},children:e}),l&&(0,hp.jsx)("div",{style:{position:"absolute",...f(),minWidth:"160px",backgroundColor:w.white,border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,boxShadow:Jt.lg,zIndex:qt.dropdown,padding:"4px"},children:t.map(m=>(0,hp.jsx)(wx,{label:m.label,icon:m.icon,onClick:()=>d(m.value),disabled:m.disabled,active:r===m.value,danger:m.danger},m.value))})]})}var hp,Nl,v7=$(()=>{"use strict";hp=z(W(),1),Nl=z(X(),1);T3();xt();lr()});function b7({value:e="",onChange:t,onSelect:r,options:o,placeholder:n,label:i,loading:a,disabled:s,error:l,noResultsText:u="No results found",style:c,className:d}){let[f,m]=(0,Zi.useState)(!1),[g,v]=(0,Zi.useState)(-1),x=(0,Zi.useRef)(null),y=(0,Zi.useMemo)(()=>{if(!e)return o;let S=e.toLowerCase();return o.filter(O=>O.label.toLowerCase().includes(S)||O.value.toLowerCase().includes(S))},[o,e]);(0,Zi.useEffect)(()=>{let S=O=>{x.current&&!x.current.contains(O.target)&&m(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]);let h=S=>{t?.(S),m(!0),v(-1)},b=S=>{t?.(S.label),r?.(S),m(!1),v(-1)},_=S=>{if(!f){(S.key==="ArrowDown"||S.key==="ArrowUp")&&m(!0);return}switch(S.key){case"ArrowDown":S.preventDefault(),v(O=>O<y.length-1?O+1:O);break;case"ArrowUp":S.preventDefault(),v(O=>O>0?O-1:O);break;case"Enter":S.preventDefault(),g>=0&&y[g]&&b(y[g]);break;case"Escape":m(!1),v(-1);break}};return(0,an.jsxs)("div",{ref:x,className:d,style:{position:"relative",...c},children:[(0,an.jsx)("div",{onKeyDown:_,children:(0,an.jsx)(lp,{label:i,value:e,onChange:h,onFocus:()=>m(!0),placeholder:n,disabled:s,error:l})}),f&&(0,an.jsx)("div",{style:{position:"absolute",top:"100%",left:0,right:0,marginTop:"4px",backgroundColor:w.white,border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,boxShadow:Jt.lg,zIndex:qt.dropdown,maxHeight:"240px",overflow:"auto"},children:a?(0,an.jsx)("div",{style:{padding:"12px",display:"flex",justifyContent:"center"},children:(0,an.jsx)(Zt,{size:20})}):y.length===0?(0,an.jsx)("div",{style:{padding:"12px",textAlign:"center",color:w.gray[500],fontSize:q.sm},children:u}):y.map((S,O)=>(0,an.jsxs)("div",{onClick:()=>!S.disabled&&b(S),style:{padding:"8px 12px",cursor:S.disabled?"not-allowed":"pointer",backgroundColor:g===O?w.gray[100]:"transparent",color:S.disabled?w.gray[400]:w.gray[900],fontSize:q.sm,display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>v(O),children:[S.icon&&(0,an.jsx)("span",{style:{flexShrink:0},children:S.icon}),(0,an.jsxs)("div",{style:{flex:1},children:[(0,an.jsx)("div",{children:S.label}),S.description&&(0,an.jsx)("div",{style:{fontSize:q.xs,color:w.gray[500]},children:S.description})]})]},S.value))})]})}var an,Zi,x7=$(()=>{"use strict";an=z(W(),1),Zi=z(X(),1);i3();Ko();xt();lr();Rt()});function _7({items:e,separator:t="/",onItemClick:r,style:o,className:n}){return(0,Vi.jsx)("nav",{"aria-label":"Breadcrumb",className:n,style:{display:"flex",alignItems:"center",gap:"8px",fontSize:q.sm,...o},children:e.map((i,a)=>{let s=a===e.length-1;return(0,Vi.jsxs)($7.Fragment,{children:[a>0&&(0,Vi.jsx)("span",{style:{color:w.gray[400]},children:t}),i.icon&&(0,Vi.jsx)("span",{style:{display:"flex",alignItems:"center",color:s?w.gray[900]:w.gray[500]},children:i.icon}),s?(0,Vi.jsx)("span",{style:{color:w.gray[900],fontWeight:500},"aria-current":"page",children:i.label}):i.href?(0,Vi.jsx)(yx,{href:i.href,tone:"muted",underline:"hover",onClick:l=>{r&&(l.preventDefault(),r(i,a))},children:i.label}):(0,Vi.jsx)("button",{onClick:()=>r?.(i,a),style:{background:"none",border:"none",padding:0,color:w.gray[500],cursor:"pointer",fontSize:"inherit"},children:i.label})]},a)})})}var Vi,$7,k7=$(()=>{"use strict";Vi=z(W(),1),$7=z(X(),1);p3();xt();Rt()});function S7({currentPage:e,totalPages:t,onPageChange:r,showFirstLast:o=!0,maxVisible:n=5,size:i="md",disabled:a,style:s,className:l}){let u=()=>{let m=[];if(t<=n)for(let g=1;g<=t;g++)m.push(g);else{m.push(1);let g=Math.floor((n-3)/2),v=Math.max(2,e-g),x=Math.min(t-1,e+g);e<=g+2&&(x=Math.min(t-1,n-2)),e>=t-g-1&&(v=Math.max(2,t-n+3)),v>2&&m.push("ellipsis");for(let y=v;y<=x;y++)m.push(y);x<t-1&&m.push("ellipsis"),m.push(t)}return m},c=i==="sm"?"xs":i==="lg"?"md":"sm",d=i==="sm"?14:i==="lg"?20:16,f=({page:m,active:g})=>(0,Ar.jsx)("button",{onClick:()=>!a&&r?.(m),disabled:a,style:{minWidth:i==="sm"?"28px":i==="lg"?"40px":"32px",height:i==="sm"?"28px":i==="lg"?"40px":"32px",padding:"0 8px",border:"none",borderRadius:"6px",backgroundColor:g?w.primary[600]:"transparent",color:g?w.white:w.gray[700],fontSize:i==="sm"?q.xs:q.sm,fontWeight:g?re.medium:re.normal,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,transition:"all 0.15s"},children:m});return(0,Ar.jsxs)("nav",{"aria-label":"Pagination",className:l,style:{display:"flex",alignItems:"center",gap:"4px",...s},children:[o&&(0,Ar.jsxs)(tt,{variant:"ghost",size:c,onClick:()=>r?.(1),disabled:a||e===1,"aria-label":"First page",children:[(0,Ar.jsx)(je,{name:"chevron-left",size:d}),(0,Ar.jsx)(je,{name:"chevron-left",size:d,style:{marginLeft:"-8px"}})]}),(0,Ar.jsx)(tt,{variant:"ghost",size:c,onClick:()=>r?.(e-1),disabled:a||e===1,"aria-label":"Previous page",children:(0,Ar.jsx)(je,{name:"chevron-left",size:d})}),u().map((m,g)=>m==="ellipsis"?(0,Ar.jsx)("span",{style:{padding:"0 4px",color:w.gray[400]},children:"..."},`ellipsis-${g}`):(0,Ar.jsx)(f,{page:m,active:m===e},m)),(0,Ar.jsx)(tt,{variant:"ghost",size:c,onClick:()=>r?.(e+1),disabled:a||e===t,"aria-label":"Next page",children:(0,Ar.jsx)(je,{name:"chevron-right",size:d})}),o&&(0,Ar.jsxs)(tt,{variant:"ghost",size:c,onClick:()=>r?.(t),disabled:a||e===t,"aria-label":"Last page",children:[(0,Ar.jsx)(je,{name:"chevron-right",size:d}),(0,Ar.jsx)(je,{name:"chevron-right",size:d,style:{marginLeft:"-8px"}})]})]})}var Ar,w7=$(()=>{"use strict";Ar=z(W(),1);Ai();$n();xt();Rt()});function T7({icon:e,title:t,description:r,action:o,style:n,className:i}){let a={textAlign:"center",padding:"var(--ggui-spacing-xl, 32px)",...n};return(0,jl.jsxs)(Qt,{align:"center",gap:"sm",className:i,style:a,children:[e!==void 0&&(typeof e=="string"?(0,jl.jsx)(je,{name:e,size:40,tone:"subtle"}):e),(0,jl.jsx)(xn,{level:3,children:t}),r!==void 0&&(0,jl.jsx)(wt,{tone:"muted",children:r}),o!==void 0&&(0,jl.jsx)("div",{style:{marginTop:"var(--ggui-spacing-sm, 8px)"},children:o})]})}var jl,M7=$(()=>{"use strict";jl=z(W(),1);$g();$n();dx();px()});function E7({label:e,value:t,delta:r,trend:o="neutral",icon:n,style:i,className:a}){let s=o==="up"?"success":o==="down"?"error":"muted";return(0,Hi.jsxs)(Qt,{gap:"xs",className:a,style:i,children:[(0,Hi.jsxs)(Ml,{gap:"xs",align:"center",children:[n!==void 0&&(typeof n=="string"?(0,Hi.jsx)(je,{name:n,size:16,tone:"muted"}):n),(0,Hi.jsx)(wt,{variant:"overline",tone:"muted",children:e})]}),(0,Hi.jsxs)(Ml,{gap:"sm",align:"end",children:[(0,Hi.jsx)(wt,{size:"3xl",weight:"bold",children:t}),r!==void 0&&(0,Hi.jsx)(wt,{size:"sm",weight:"semibold",tone:s,children:r})]})]})}var Hi,R7=$(()=>{"use strict";Hi=z(W(),1);$g();X5();px();$n()});var C7={};jt(C7,{Autocomplete:()=>b7,Breadcrumb:()=>_7,Dropdown:()=>y7,EmptyState:()=>T7,FormField:()=>f7,MenuItem:()=>wx,Pagination:()=>S7,SearchField:()=>p7,Stat:()=>E7,Tag:()=>g7});var I7=$(()=>{"use strict";d7();m7();T3();h7();v7();x7();k7();w7();M7();R7()});function z7({logo:e,navigation:t,actions:r,sticky:o=!1,background:n,bordered:i=!0,style:a,className:s}){return(0,yp.jsxs)("header",{className:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 24px",backgroundColor:n||w.white,borderBottom:i?`1px solid ${w.gray[200]}`:void 0,...o&&{position:"sticky",top:0,zIndex:qt.sticky,boxShadow:Jt.sm},...a},children:[e&&(0,yp.jsx)("div",{style:{flexShrink:0},children:e}),t&&(0,yp.jsx)("nav",{style:{display:"flex",alignItems:"center",flex:1,marginLeft:"32px"},children:t}),r&&(0,yp.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"12px",flexShrink:0},children:r})]})}var yp,P7=$(()=>{"use strict";yp=z(W(),1);xt();lr()});function O7({item:e,activeId:t,onItemClick:r,collapsed:o,depth:n=0}){let[i,a]=(0,A7.useState)(!1),s=e.children&&e.children.length>0,l=t===e.id;return(0,Yt.jsxs)("div",{children:[(0,Yt.jsxs)("button",{onClick:()=>{s&&!o&&a(!i),r?.(e)},disabled:e.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:o?"10px":"10px 12px",paddingLeft:o?"10px":`${12+n*16}px`,border:"none",borderRadius:et.md,backgroundColor:l?w.primary[50]:"transparent",color:e.disabled?w.gray[400]:l?w.primary[700]:w.gray[700],fontSize:q.sm,fontWeight:l?re.medium:re.normal,textAlign:"left",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.15s",justifyContent:o?"center":"flex-start"},children:[e.icon&&(0,Yt.jsx)("span",{style:{display:"flex",flexShrink:0},children:e.icon}),!o&&(0,Yt.jsxs)(Yt.Fragment,{children:[(0,Yt.jsx)("span",{style:{flex:1},children:e.label}),e.badge&&(0,Yt.jsx)("span",{children:e.badge}),s&&(0,Yt.jsx)(je,{name:i?"chevron-down":"chevron-right",size:14,tone:"subtle"})]})]}),s&&i&&!o&&(0,Yt.jsx)("div",{style:{marginTop:"4px"},children:e.children.map(c=>(0,Yt.jsx)(O7,{item:c,activeId:t,onItemClick:r,collapsed:o,depth:n+1},c.id))})]})}function N7({items:e,activeId:t,onItemClick:r,collapsed:o=!1,header:n,footer:i,width:a=256,collapsedWidth:s=64,style:l,className:u}){let c=o?s:a;return(0,Yt.jsxs)("aside",{className:u,style:{width:c,minWidth:c,height:"100%",display:"flex",flexDirection:"column",backgroundColor:w.white,borderRight:`1px solid ${w.gray[200]}`,transition:"width 0.2s",overflow:"hidden",...l},children:[n&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderBottom:`1px solid ${w.gray[200]}`},children:n}),(0,Yt.jsx)("nav",{style:{flex:1,padding:"8px",overflowY:"auto",overflowX:"hidden"},children:(0,Yt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:e.map(d=>(0,Yt.jsx)(O7,{item:d,activeId:t,onItemClick:r,collapsed:o},d.id))})}),i&&(0,Yt.jsx)("div",{style:{padding:o?"16px 8px":"16px",borderTop:`1px solid ${w.gray[200]}`},children:i})]})}var Yt,A7,j7=$(()=>{"use strict";Yt=z(W(),1),A7=z(X(),1);xt();lr();Rt();$n()});function U7({children:e,columns:t=3,gap:r=16,style:o,className:n}){return(0,D7.jsx)("div",{className:n,style:{display:"grid",gridTemplateColumns:typeof t=="number"?`repeat(${t}, 1fr)`:"repeat(auto-fit, minmax(280px, 1fr))",gap:`${r}px`,...o},children:e})}var D7,L7=$(()=>{"use strict";D7=z(W(),1)});function q7({comment:e,onReply:t,onReaction:r,depth:o=0}){let[n,i]=(0,Tx.useState)(!1),[a,s]=(0,Tx.useState)(""),l=()=>{a.trim()&&(t?.(e.id,a),s(""),i(!1))},u=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp;return(0,qe.jsxs)("div",{style:{marginLeft:o>0?"40px":0},children:[(0,qe.jsxs)("div",{style:{display:"flex",gap:"12px"},children:[(0,qe.jsx)(Qo,{name:e.author.name,src:e.author.avatar,size:"sm"}),(0,qe.jsxs)("div",{style:{flex:1},children:[(0,qe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,qe.jsx)("span",{style:{fontWeight:500,fontSize:q.sm},children:e.author.name}),(0,qe.jsx)("span",{style:{color:w.gray[500],fontSize:q.xs},children:u})]}),(0,qe.jsx)("p",{style:{margin:"4px 0 8px",fontSize:q.sm,color:w.gray[700]},children:e.content}),(0,qe.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[e.reactions?.map(c=>(0,qe.jsxs)("button",{onClick:()=>r?.(e.id,c.emoji),style:{padding:"2px 8px",border:`1px solid ${w.gray[200]}`,borderRadius:"12px",backgroundColor:w.gray[50],fontSize:q.xs,cursor:"pointer"},children:[c.emoji," ",c.count]},c.emoji)),(0,qe.jsx)("button",{onClick:()=>i(!n),style:{background:"none",border:"none",color:w.gray[500],fontSize:q.xs,cursor:"pointer"},children:"Reply"})]}),n&&(0,qe.jsxs)("div",{style:{marginTop:"12px"},children:[(0,qe.jsx)(Sg,{value:a,onChange:s,placeholder:"Write a reply...",rows:2}),(0,qe.jsxs)("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[(0,qe.jsx)(tt,{size:"sm",onClick:l,children:"Reply"}),(0,qe.jsx)(tt,{size:"sm",variant:"ghost",onClick:()=>i(!1),children:"Cancel"})]})]})]})]}),e.replies?.map(c=>(0,qe.jsx)("div",{style:{marginTop:"16px"},children:(0,qe.jsx)(q7,{comment:c,onReply:t,onReaction:r,depth:o+1})},c.id))]})}function Z7({comments:e,currentUser:t,onAddComment:r,onReply:o,onReaction:n,loading:i,style:a,className:s}){let[l,u]=(0,Tx.useState)(""),c=()=>{l.trim()&&(r?.(l),u(""))};return(0,qe.jsxs)("div",{className:s,style:{...a},children:[t&&(0,qe.jsxs)("div",{style:{display:"flex",gap:"12px",marginBottom:"24px"},children:[(0,qe.jsx)(Qo,{name:t.name,src:t.avatar,size:"sm"}),(0,qe.jsxs)("div",{style:{flex:1},children:[(0,qe.jsx)(Sg,{value:l,onChange:u,placeholder:"Write a comment...",rows:3}),(0,qe.jsx)("div",{style:{marginTop:"8px",display:"flex",justifyContent:"flex-end"},children:(0,qe.jsx)(tt,{onClick:c,disabled:!l.trim(),children:"Comment"})})]})]}),i?(0,qe.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,qe.jsx)(Zt,{size:24})}):(0,qe.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map(d=>(0,qe.jsx)(q7,{comment:d,onReply:o,onReaction:n},d.id))})]})}var qe,Tx,V7=$(()=>{"use strict";qe=z(W(),1),Tx=z(X(),1);wg();Ai();a3();Ko();xt();Rt()});function H7({columns:e,data:t,rowKey:r="id",loading:o,emptyText:n="No data",onSort:i,sortKey:a,sortDirection:s,onRowClick:l,selectable:u,selectedKeys:c=[],onSelectionChange:d,style:f,className:m}){let g=(b,_)=>typeof r=="function"?r(b):String(b[r]??_),v=b=>{d?.(b?t.map((_,S)=>g(_,S)):[])},x=(b,_)=>{d?.(_?[...c,b]:c.filter(S=>S!==b))},y=t.length>0&&c.length===t.length,h=c.length>0&&c.length<t.length;return(0,At.jsx)("div",{className:m,style:{border:`1px solid ${w.gray[200]}`,borderRadius:"8px",overflow:"hidden",...f},children:(0,At.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:q.sm},children:[(0,At.jsx)("thead",{children:(0,At.jsxs)("tr",{style:{backgroundColor:w.gray[50]},children:[u&&(0,At.jsx)("th",{style:{width:"40px",padding:"12px"},children:(0,At.jsx)(Cl,{checked:y,indeterminate:h,onChange:v})}),e.map(b=>(0,At.jsx)("th",{style:{padding:"12px 16px",textAlign:b.align||"left",fontWeight:re.semibold,color:w.gray[700],borderBottom:`1px solid ${w.gray[200]}`,cursor:b.sortable?"pointer":void 0,width:b.width},onClick:()=>b.sortable&&i?.(b.key,a===b.key&&s==="asc"?"desc":"asc"),children:(0,At.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[b.header,b.sortable&&a===b.key&&(0,At.jsx)(je,{name:s==="asc"?"chevron-up":"chevron-down",size:14})]})},b.key))]})}),(0,At.jsx)("tbody",{children:o?(0,At.jsx)("tr",{children:(0,At.jsx)("td",{colSpan:e.length+(u?1:0),style:{padding:"48px",textAlign:"center"},children:(0,At.jsx)(Zt,{size:24})})}):t.length===0?(0,At.jsx)("tr",{children:(0,At.jsx)("td",{colSpan:e.length+(u?1:0),style:{padding:"48px",textAlign:"center",color:w.gray[500]},children:n})}):t.map((b,_)=>{let S=g(b,_),O=c.includes(S);return(0,At.jsxs)("tr",{onClick:()=>l?.(b,_),style:{backgroundColor:O?w.primary[50]:void 0,cursor:l?"pointer":void 0,transition:"background-color 0.15s"},children:[u&&(0,At.jsx)("td",{style:{padding:"12px"},children:(0,At.jsx)(Cl,{checked:O,onChange:k=>x(S,k)})}),e.map(k=>(0,At.jsx)("td",{style:{padding:"12px 16px",textAlign:k.align||"left",color:w.gray[900],borderBottom:`1px solid ${w.gray[100]}`},children:k.render?k.render(b[k.key],b,_):String(b[k.key]??"")},k.key))]},S)})})]})})}var At,B7=$(()=>{"use strict";At=z(W(),1);s3();Ko();$n();xt();Rt()});function G7({messages:e,currentUserId:t,onSendMessage:r,loading:o,typing:n,placeholder:i="Type a message...",header:a,style:s,className:l}){let[u,c]=(0,vp.useState)(""),d=(0,vp.useRef)(null);(0,vp.useEffect)(()=>{d.current?.scrollIntoView({behavior:"smooth"})},[e]);let f=()=>{u.trim()&&(r?.(u),c(""))},m=g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),f())};return(0,Ot.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",height:"100%",border:`1px solid ${w.gray[200]}`,borderRadius:et.lg,backgroundColor:w.white,overflow:"hidden",...s},children:[a&&(0,Ot.jsx)("div",{style:{padding:"12px 16px",borderBottom:`1px solid ${w.gray[200]}`},children:a}),(0,Ot.jsxs)("div",{style:{flex:1,padding:"16px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px"},children:[o?(0,Ot.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"24px"},children:(0,Ot.jsx)(Zt,{size:24})}):e.map(g=>{let v=g.sender.id===t,x=g.timestamp instanceof Date?g.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):g.timestamp;return(0,Ot.jsxs)("div",{style:{display:"flex",flexDirection:v?"row-reverse":"row",alignItems:"flex-end",gap:"8px"},children:[!v&&(0,Ot.jsx)(Qo,{name:g.sender.name,src:g.sender.avatar,size:"xs"}),(0,Ot.jsxs)("div",{style:{maxWidth:"70%",padding:"10px 14px",borderRadius:et.lg,backgroundColor:v?w.primary[600]:w.gray[100],color:v?w.white:w.gray[900]},children:[(0,Ot.jsx)("p",{style:{margin:0,fontSize:q.sm},children:g.content}),(0,Ot.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",marginTop:"4px",fontSize:q.xs,opacity:.7},children:[(0,Ot.jsx)("span",{children:x}),v&&g.status&&(0,Ot.jsxs)("span",{children:[g.status==="sending"&&"\u2022",g.status==="sent"&&"\u2713",g.status==="delivered"&&"\u2713\u2713",g.status==="read"&&"\u2713\u2713",g.status==="error"&&"!"]})]})]})]},g.id)}),n&&(0,Ot.jsx)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:(0,Ot.jsxs)("span",{style:{fontSize:q.xs,color:w.gray[500]},children:[n.name," is typing..."]})}),(0,Ot.jsx)("div",{ref:d})]}),(0,Ot.jsxs)("div",{style:{padding:"12px 16px",borderTop:`1px solid ${w.gray[200]}`,display:"flex",gap:"8px"},children:[(0,Ot.jsx)("input",{type:"text",value:u,onChange:g=>c(g.target.value),onKeyDown:m,placeholder:i,style:{flex:1,padding:"10px 14px",border:`1px solid ${w.gray[300]}`,borderRadius:et.full,fontSize:q.sm,outline:"none"}}),(0,Ot.jsx)(tt,{onClick:f,disabled:!u.trim(),children:(0,Ot.jsx)(je,{name:"chevron-right",size:18})})]})]})}var Ot,vp,F7=$(()=>{"use strict";Ot=z(W(),1),vp=z(X(),1);wg();Ai();Ko();$n();xt();lr();Rt()});function W7({items:e,activeId:t,onItemClick:r,orientation:o="horizontal",variant:n="default",style:i,className:a}){let s=l=>{let u=t===l.id,c={display:"flex",alignItems:"center",gap:"8px",padding:o==="horizontal"?"8px 16px":"10px 16px",border:"none",background:"none",fontSize:q.sm,cursor:l.disabled?"not-allowed":"pointer",opacity:l.disabled?.5:1,transition:"all 0.15s",textDecoration:"none",color:"inherit"},d={default:{fontWeight:u?re.medium:re.normal,color:u?w.primary[600]:w.gray[600]},pills:{borderRadius:et.full,backgroundColor:u?w.primary[100]:"transparent",color:u?w.primary[700]:w.gray[600],fontWeight:u?re.medium:re.normal},underline:{borderBottom:u?`2px solid ${w.primary[600]}`:"2px solid transparent",color:u?w.primary[600]:w.gray[600],fontWeight:u?re.medium:re.normal,borderRadius:0}},f=()=>{l.disabled||r?.(l)},m=(0,Yo.jsxs)(Yo.Fragment,{children:[l.icon&&(0,Yo.jsx)("span",{style:{display:"flex"},children:l.icon}),(0,Yo.jsx)("span",{children:l.label})]});return l.href?(0,Yo.jsx)("a",{href:l.href,onClick:g=>{g.preventDefault(),f()},style:{...c,...d[n]},children:m},l.id):(0,Yo.jsx)("button",{onClick:f,disabled:l.disabled,style:{...c,...d[n]},children:m},l.id)};return(0,Yo.jsx)("nav",{className:a,style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",gap:o==="horizontal"?"4px":"2px",...n==="underline"&&o==="horizontal"&&{borderBottom:`1px solid ${w.gray[200]}`},...i},children:e.map(s)})}var Yo,K7=$(()=>{"use strict";Yo=z(W(),1);xt();lr();Rt()});function J7(e){if(e===0)return"0 B";let t=1024,r=["B","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${r[o]}`}function Q7({files:e=[],onFilesSelected:t,onFileRemove:r,accept:o,multiple:n=!0,maxSize:i,maxFiles:a,disabled:s,dragDrop:l=!0,style:u,className:c}){let[d,f]=(0,Mx.useState)(!1),m=(0,Mx.useRef)(null),g=h=>{if(!h)return;let b=Array.from(h);a&&(b=b.slice(0,a-e.length)),i&&(b=b.filter(_=>_.size<=i)),t?.(b)},v=h=>{h.preventDefault(),f(!1),!s&&l&&g(h.dataTransfer.files)},x=h=>{h.preventDefault(),!s&&l&&f(!0)},y=()=>{f(!1)};return(0,pr.jsxs)("div",{className:c,style:{...u},children:[(0,pr.jsxs)("div",{onClick:()=>!s&&m.current?.click(),onDrop:v,onDragOver:x,onDragLeave:y,style:{border:`2px dashed ${d?w.primary[400]:w.gray[300]}`,borderRadius:et.lg,padding:"32px",textAlign:"center",backgroundColor:d?w.primary[50]:w.gray[50],cursor:s?"not-allowed":"pointer",transition:"all 0.2s",opacity:s?.5:1},children:[(0,pr.jsx)("input",{ref:m,type:"file",accept:o,multiple:n,onChange:h=>g(h.target.files),disabled:s,style:{display:"none"}}),(0,pr.jsx)(je,{name:"plus",size:32,tone:"subtle"}),(0,pr.jsx)("p",{style:{margin:"12px 0 4px",color:w.gray[700],fontSize:q.sm},children:l?"Drag and drop files here, or click to browse":"Click to browse files"}),(0,pr.jsxs)("p",{style:{margin:0,color:w.gray[500],fontSize:q.xs},children:[o&&`Accepted: ${o}`,i&&` \u2022 Max size: ${J7(i)}`,a&&` \u2022 Max files: ${a}`]})]}),e.length>0&&(0,pr.jsx)("div",{style:{marginTop:"16px",display:"flex",flexDirection:"column",gap:"8px"},children:e.map(h=>(0,pr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",border:`1px solid ${w.gray[200]}`,borderRadius:et.md,backgroundColor:w.white},children:[(0,pr.jsx)(je,{name:"menu",size:20,tone:"subtle"}),(0,pr.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,pr.jsx)("p",{style:{margin:0,fontSize:q.sm,color:w.gray[900],whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:h.name}),(0,pr.jsxs)("p",{style:{margin:"2px 0 0",fontSize:q.xs,color:w.gray[500]},children:[J7(h.size),h.error&&(0,pr.jsx)("span",{style:{color:w.error[500],marginLeft:"8px"},children:h.error})]}),h.status==="uploading"&&h.progress!==void 0&&(0,pr.jsx)(mx,{value:h.progress,size:"sm",style:{marginTop:"8px"}})]}),(0,pr.jsx)(tt,{variant:"ghost",size:"sm",onClick:()=>r?.(h.id),children:(0,pr.jsx)(je,{name:"x",size:16})})]},h.id))})]})}var pr,Mx,Y7=$(()=>{"use strict";pr=z(W(),1),Mx=z(X(),1);Ai();c3();$n();xt();lr();Rt()});function X7({name:e,subtitle:t,avatar:r,coverImage:o,bio:n,stats:i,actions:a,compact:s,style:l,className:u}){return s?(0,Nt.jsx)(Xn,{className:u,style:{padding:"16px",...l},children:(0,Nt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[(0,Nt.jsx)(Qo,{name:e,src:r,size:"md"}),(0,Nt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.sm},children:e}),t&&(0,Nt.jsx)("p",{style:{margin:"2px 0 0",color:w.gray[500],fontSize:q.xs},children:t})]}),a]})}):(0,Nt.jsxs)(Xn,{className:u,style:{padding:0,overflow:"hidden",...l},children:[o&&(0,Nt.jsx)("div",{style:{height:"120px",backgroundImage:`url(${o})`,backgroundSize:"cover",backgroundPosition:"center"}}),(0,Nt.jsxs)("div",{style:{padding:"16px",paddingTop:o?"0":"16px",textAlign:"center"},children:[(0,Nt.jsx)("div",{style:{marginTop:o?"-40px":"0",marginBottom:"12px"},children:(0,Nt.jsx)(Qo,{name:e,src:r,size:"xl",style:{border:`4px solid ${w.white}`,margin:"0 auto"}})}),(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.lg},children:e}),t&&(0,Nt.jsx)("p",{style:{margin:"4px 0 0",color:w.gray[500],fontSize:q.sm},children:t}),n&&(0,Nt.jsx)("p",{style:{margin:"12px 0 0",color:w.gray[600],fontSize:q.sm,lineHeight:1.5},children:n}),i&&i.length>0&&(0,Nt.jsx)("div",{style:{display:"flex",justifyContent:"center",gap:"24px",marginTop:"16px",paddingTop:"16px",borderTop:`1px solid ${w.gray[200]}`},children:i.map((c,d)=>(0,Nt.jsxs)("div",{style:{textAlign:"center"},children:[(0,Nt.jsx)("p",{style:{margin:0,fontWeight:re.semibold,color:w.gray[900],fontSize:q.lg},children:c.value}),(0,Nt.jsx)("p",{style:{margin:"2px 0 0",color:w.gray[500],fontSize:q.xs},children:c.label})]},d))}),a&&(0,Nt.jsx)("div",{style:{marginTop:"16px",display:"flex",justifyContent:"center",gap:"8px"},children:a})]})]})}var Nt,eU=$(()=>{"use strict";Nt=z(W(),1);wg();Y5();xt();Rt()});function koe({notification:e,onMarkAsRead:t,onDismiss:r}){let o=e.timestamp instanceof Date?e.timestamp.toLocaleString():e.timestamp,n=_oe[e.type||"info"];return(0,rt.jsxs)("div",{style:{display:"flex",gap:"12px",padding:"12px",backgroundColor:e.read?"transparent":w.primary[50],borderRadius:et.md,transition:"background-color 0.15s"},children:[(0,rt.jsx)("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e.read?"transparent":n,flexShrink:0,marginTop:"6px"}}),(0,rt.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"8px"},children:[(0,rt.jsx)("p",{style:{margin:0,fontWeight:re.medium,color:w.gray[900],fontSize:q.sm},children:e.title}),(0,rt.jsx)("button",{onClick:()=>r?.(e.id),style:{background:"none",border:"none",padding:"2px",cursor:"pointer",color:w.gray[400],flexShrink:0},children:(0,rt.jsx)(je,{name:"x",size:14})})]}),e.message&&(0,rt.jsx)("p",{style:{margin:"4px 0 0",color:w.gray[600],fontSize:q.xs},children:e.message}),(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginTop:"8px"},children:[(0,rt.jsx)("span",{style:{color:w.gray[400],fontSize:q.xs},children:o}),!e.read&&(0,rt.jsx)("button",{onClick:()=>t?.(e.id),style:{background:"none",border:"none",padding:0,color:w.primary[600],fontSize:q.xs,cursor:"pointer"},children:"Mark as read"}),e.action&&(0,rt.jsx)("button",{onClick:e.action.onClick,style:{background:"none",border:"none",padding:0,color:w.primary[600],fontSize:q.xs,cursor:"pointer"},children:e.action.label})]})]})]})}function tU({notifications:e,onMarkAsRead:t,onMarkAllAsRead:r,onDismiss:o,onClearAll:n,emptyText:i="No notifications",loading:a,style:s,className:l}){let u=e.filter(c=>!c.read).length;return(0,rt.jsxs)("div",{className:l,style:{display:"flex",flexDirection:"column",...s},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",borderBottom:`1px solid ${w.gray[200]}`},children:[(0,rt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,rt.jsx)("span",{style:{fontWeight:re.semibold,color:w.gray[900]},children:"Notifications"}),u>0&&(0,rt.jsx)("span",{style:{padding:"2px 8px",borderRadius:"12px",backgroundColor:w.primary[100],color:w.primary[700],fontSize:q.xs,fontWeight:re.medium},children:u})]}),(0,rt.jsxs)("div",{style:{display:"flex",gap:"8px"},children:[u>0&&(0,rt.jsx)(tt,{variant:"ghost",size:"sm",onClick:r,children:"Mark all read"}),e.length>0&&(0,rt.jsx)(tt,{variant:"ghost",size:"sm",onClick:n,children:"Clear all"})]})]}),(0,rt.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,rt.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,rt.jsx)(Zt,{size:24})}):e.length===0?(0,rt.jsx)("div",{style:{textAlign:"center",padding:"32px",color:w.gray[500]},children:i}):(0,rt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:e.map(c=>(0,rt.jsx)(koe,{notification:c,onMarkAsRead:t,onDismiss:o},c.id))})})]})}var rt,_oe,rU=$(()=>{"use strict";rt=z(W(),1);Ai();Ko();$n();xt();lr();Rt();_oe={info:w.info[500],success:w.success[500],warning:w.warning[500],error:w.error[500]}});function nU({open:e,onClose:t,title:r,children:o,footer:n,size:i="md",closeOnOverlayClick:a=!0,closeOnEscape:s=!0,showCloseButton:l=!0,style:u,className:c}){let d=(0,Ex.useCallback)(g=>{g.key==="Escape"&&s&&t()},[s,t]);if((0,Ex.useEffect)(()=>{if(e)return document.addEventListener("keydown",d),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",d),document.body.style.overflow=""}},[e,d]),!e)return null;let f=g=>{g.target===g.currentTarget&&a&&t()},m=i==="full";return(0,To.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:qt.modal,display:"flex",alignItems:m?"stretch":"center",justifyContent:"center",padding:m?0:"24px"},children:[(0,To.jsx)("div",{onClick:f,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",animation:ys.fadeIn}}),(0,To.jsxs)("div",{role:"dialog","aria-modal":"true",className:c,style:{position:"relative",width:Soe[i],maxWidth:m?"100%":"calc(100vw - 48px)",maxHeight:m?"100%":"calc(100vh - 48px)",backgroundColor:w.white,borderRadius:m?0:et.xl,boxShadow:Jt["2xl"],display:"flex",flexDirection:"column",overflow:"hidden",animation:ys.scaleIn,...u},children:[(r||l)&&(0,To.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${w.gray[200]}`},children:[r&&(0,To.jsx)(xn,{level:4,children:r}),l&&(0,To.jsx)(tt,{variant:"ghost",size:"sm",onClick:t,"aria-label":"Close modal",style:{marginLeft:"auto"},children:(0,To.jsx)(je,{name:"x",size:20})})]}),(0,To.jsx)("div",{style:{flex:1,padding:"20px",overflowY:"auto"},children:o}),n&&(0,To.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"8px",padding:"16px 20px",borderTop:`1px solid ${w.gray[200]}`},children:n})]})]})}var To,Ex,Soe,oU=$(()=>{"use strict";To=z(W(),1),Ex=z(X(),1);Ai();$n();dx();xt();lr();dp();Soe={sm:"400px",md:"500px",lg:"640px",xl:"800px",full:"100vw"}});function iU({open:e,onClose:t,commands:r,onSelect:o,placeholder:n="Search commands...",recentIds:i=[],loading:a,style:s,className:l}){let[u,c]=(0,ro.useState)(""),[d,f]=(0,ro.useState)(0),m=(0,ro.useMemo)(()=>{let y=u?r.filter(b=>b.label.toLowerCase().includes(u.toLowerCase())||b.description?.toLowerCase().includes(u.toLowerCase())):r,h=new Map;if(!u&&i.length>0){let b=i.map(_=>r.find(S=>S.id===_)).filter(Boolean);b.length>0&&h.set("Recent",b)}return y.forEach(b=>{let _=b.group||"Commands";h.has(_)||h.set(_,[]),!(!u&&i.includes(b.id)&&h.has("Recent"))&&h.get(_).push(b)}),h},[r,u,i]),g=(0,ro.useMemo)(()=>{let y=[];return m.forEach(h=>y.push(...h)),y},[m]);(0,ro.useEffect)(()=>{f(0)},[u]),(0,ro.useEffect)(()=>{e&&(c(""),f(0))},[e]);let v=(0,ro.useCallback)(y=>{if(y.key==="Escape"){t();return}if(y.key==="ArrowDown")y.preventDefault(),f(h=>Math.min(h+1,g.length-1));else if(y.key==="ArrowUp")y.preventDefault(),f(h=>Math.max(h-1,0));else if(y.key==="Enter"){y.preventDefault();let h=g[d];h&&!h.disabled&&(o(h),t())}},[g,d,o,t]);if((0,ro.useEffect)(()=>{if(e)return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[e,v]),!e)return null;let x=0;return(0,ht.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:qt.modal,display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"15vh"},children:[(0,ht.jsx)("div",{onClick:t,style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,ht.jsxs)("div",{role:"dialog",className:l,style:{position:"relative",width:"560px",maxWidth:"calc(100vw - 48px)",maxHeight:"60vh",backgroundColor:w.white,borderRadius:et.xl,boxShadow:Jt["2xl"],overflow:"hidden",display:"flex",flexDirection:"column",...s},children:[(0,ht.jsx)("div",{style:{padding:"12px",borderBottom:`1px solid ${w.gray[200]}`},children:(0,ht.jsxs)("div",{style:{position:"relative"},children:[(0,ht.jsx)(je,{name:"search",size:18,tone:"subtle",style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)"}}),(0,ht.jsx)("input",{type:"text",value:u,onChange:y=>c(y.target.value),placeholder:n,autoFocus:!0,style:{width:"100%",padding:"12px 12px 12px 42px",border:"none",fontSize:q.base,outline:"none",backgroundColor:"transparent"}})]})}),(0,ht.jsx)("div",{style:{flex:1,overflowY:"auto",padding:"8px"},children:a?(0,ht.jsx)("div",{style:{display:"flex",justifyContent:"center",padding:"32px"},children:(0,ht.jsx)(Zt,{size:24})}):g.length===0?(0,ht.jsx)("div",{style:{textAlign:"center",padding:"32px",color:w.gray[500]},children:"No commands found"}):Array.from(m.entries()).map(([y,h])=>(0,ht.jsxs)("div",{style:{marginBottom:"8px"},children:[(0,ht.jsx)("div",{style:{padding:"8px 12px",fontSize:q.xs,fontWeight:re.semibold,color:w.gray[500],textTransform:"uppercase",letterSpacing:"0.05em"},children:y}),h.map(b=>{let S=x++===d;return(0,ht.jsxs)("button",{onClick:()=>{b.disabled||(o(b),t())},disabled:b.disabled,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"10px 12px",border:"none",borderRadius:et.md,backgroundColor:S?w.gray[100]:"transparent",color:b.disabled?w.gray[400]:w.gray[900],textAlign:"left",cursor:b.disabled?"not-allowed":"pointer"},children:[b.icon&&(0,ht.jsx)("span",{style:{display:"flex",color:w.gray[500]},children:b.icon}),(0,ht.jsxs)("div",{style:{flex:1},children:[(0,ht.jsx)("div",{style:{fontSize:q.sm},children:b.label}),b.description&&(0,ht.jsx)("div",{style:{fontSize:q.xs,color:w.gray[500]},children:b.description})]}),b.shortcut&&(0,ht.jsx)("kbd",{style:{padding:"2px 6px",backgroundColor:w.gray[100],borderRadius:et.sm,fontSize:q.xs,color:w.gray[500],fontFamily:"inherit"},children:b.shortcut})]},b.id)})]},y))}),(0,ht.jsxs)("div",{style:{padding:"8px 12px",borderTop:`1px solid ${w.gray[200]}`,display:"flex",alignItems:"center",gap:"16px",fontSize:q.xs,color:w.gray[500]},children:[(0,ht.jsx)("span",{children:"\u2191\u2193 Navigate"}),(0,ht.jsx)("span",{children:"\u21B5 Select"}),(0,ht.jsx)("span",{children:"Esc Close"})]})]})]})}var ht,ro,aU=$(()=>{"use strict";ht=z(W(),1),ro=z(X(),1);Ko();$n();xt();lr();Rt()});function sU({brand:e,columns:t,socialLinks:r,bottomText:o,bottomLinks:n,background:i,bordered:a=!0,style:s,className:l}){return(0,Fr.jsxs)("footer",{className:l,role:"contentinfo",style:{backgroundColor:i||w.gray[50],borderTop:a?`1px solid ${w.gray[200]}`:void 0,...s},children:[(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"48px",padding:"48px 24px",maxWidth:"1280px",margin:"0 auto"},children:[e&&(0,Fr.jsx)("div",{style:{flex:"1 1 280px",minWidth:"200px"},children:e}),t?.map((u,c)=>(0,Fr.jsxs)("div",{style:{flex:"0 1 180px",minWidth:"140px"},children:[u.title&&(0,Fr.jsx)("h4",{style:{fontSize:q.sm,fontWeight:re.semibold,color:w.gray[900],lineHeight:gt.normal,margin:"0 0 16px 0",padding:0},children:u.title}),(0,Fr.jsx)("ul",{style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:"10px"},children:u.links.map((d,f)=>(0,Fr.jsx)("li",{children:(0,Fr.jsx)("a",{href:d.href,onClick:d.onClick?m=>{m.preventDefault(),d.onClick?.()}:void 0,style:{fontSize:q.sm,color:w.gray[600],textDecoration:"none",transition:"color 0.15s",lineHeight:gt.normal},"aria-label":d.label,children:d.label})},f))})]},c))]}),(o||n||r)&&(0,Fr.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"space-between",gap:"16px",padding:"20px 24px",maxWidth:"1280px",margin:"0 auto",borderTop:`1px solid ${w.gray[200]}`},children:[o&&(0,Fr.jsx)("span",{style:{fontSize:q.sm,color:w.gray[500],lineHeight:gt.normal},children:o}),(0,Fr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"20px"},children:[r?.map((u,c)=>(0,Fr.jsx)("a",{href:u.href,"aria-label":u.label,style:{display:"flex",alignItems:"center",justifyContent:"center",color:w.gray[500],transition:"color 0.15s"},children:u.icon},c)),n?.map((u,c)=>(0,Fr.jsx)("a",{href:u.href,onClick:u.onClick?d=>{d.preventDefault(),u.onClick?.()}:void 0,style:{fontSize:q.sm,color:w.gray[500],textDecoration:"none",transition:"color 0.15s"},children:u.label},c))]})]})]})}var Fr,lU=$(()=>{"use strict";Fr=z(W(),1);xt();Rt()});function uU({heading:e,description:t,primaryAction:r,secondaryAction:o,media:n,align:i="center",size:a="md",background:s,backgroundImage:l,overlay:u=!1,style:c,className:d}){let f={sm:{padding:"48px 24px",headingSize:q["3xl"],descSize:q.lg},md:{padding:"80px 24px",headingSize:q["4xl"],descSize:q.xl},lg:{padding:"120px 24px",headingSize:q["5xl"],descSize:q.xl}},m=f[a]||f.md,g=!!l,v=g&&u;return(0,no.jsxs)("section",{className:d,style:{position:"relative",backgroundColor:s||(g?void 0:w.white),...g&&{backgroundImage:`url(${l})`,backgroundSize:"cover",backgroundPosition:"center"},overflow:"hidden",...c},children:[v&&(0,no.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)"}}),(0,no.jsxs)("div",{style:{position:"relative",maxWidth:"1280px",margin:"0 auto",padding:m.padding,display:"flex",flexDirection:i==="center"?"column":"row",alignItems:"center",gap:"48px",textAlign:i==="center"?"center":"left"},children:[(0,no.jsxs)("div",{style:{flex:i==="left"&&n?"1 1 50%":void 0,maxWidth:i==="center"?"800px":void 0},children:[e&&(0,no.jsx)("h1",{style:{fontSize:m.headingSize,fontWeight:re.bold,lineHeight:gt.tight,letterSpacing:_o.tight,color:v?w.white:w.gray[900],margin:"0 0 16px 0",padding:0},children:e}),t&&(0,no.jsx)("p",{style:{fontSize:m.descSize,lineHeight:gt.relaxed,color:v?"rgba(255,255,255,0.9)":w.gray[600],margin:"0 0 32px 0",padding:0,maxWidth:i==="center"?"640px":void 0,...i==="center"&&{marginLeft:"auto",marginRight:"auto"}},children:t}),(r||o)&&(0,no.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:i==="center"?"center":"flex-start"},children:[r&&(0,no.jsx)("button",{onClick:r.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:re.semibold,color:w.white,backgroundColor:w.primary[600],border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s",lineHeight:gt.normal},children:r.label}),o&&(0,no.jsx)("button",{onClick:o.onClick,style:{padding:"12px 28px",fontSize:q.base,fontWeight:re.semibold,color:v?w.white:w.gray[700],backgroundColor:"transparent",border:`1px solid ${v?"rgba(255,255,255,0.3)":w.gray[300]}`,borderRadius:"8px",cursor:"pointer",transition:"all 0.15s",lineHeight:gt.normal},children:o.label})]})]}),n&&(0,no.jsx)("div",{style:{flex:i==="left"?"1 1 50%":void 0,display:"flex",justifyContent:"center",alignItems:"center",...i==="center"&&{marginTop:"16px"}},children:n})]})]})}var no,cU=$(()=>{"use strict";no=z(W(),1);xt();Rt()});function pU(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function M3(e){return e.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function woe(e){return new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})}function Toe(e){return e.some(t=>t.severity==="critical")?"critical":e.some(t=>t.severity==="major")?"major":e.some(t=>t.severity==="minor")?"minor":null}function dU({severity:e}){let r={width:"12px",height:"12px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:e?mU[e].dot:"var(--ggui-color-success-500, #22c55e)",flexShrink:0};return(0,_e.jsx)("div",{style:r})}function Moe({severity:e}){let t=mU[e],r={display:"inline-flex",alignItems:"center",gap:"4px",fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,padding:"2px 8px",borderRadius:"var(--ggui-shape-radius-full, 9999px)",backgroundColor:t.bg,color:t.text,textTransform:"capitalize"};return(0,_e.jsx)("span",{style:r,children:e})}function Eoe({status:e}){let t=e==="resolved";return(0,_e.jsx)("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:t?"var(--ggui-color-success-600, #16a34a)":"var(--ggui-color-onSurfaceVariant, #52525b)",fontWeight:t?500:400},children:gU[e]})}function Roe({incident:e,compact:t}){let[r,o]=(0,fU.useState)(!1),n={border:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",borderRadius:"var(--ggui-shape-radius-md, 8px)",overflow:"hidden",backgroundColor:"var(--ggui-color-surface, #ffffff)"},i={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",cursor:t?"default":"pointer",gap:"8px"},a={fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)",margin:0,flex:1,minWidth:0};return(0,_e.jsxs)("div",{style:n,children:[(0,_e.jsxs)("div",{style:i,onClick:t?void 0:()=>o(!r),role:t?void 0:"button",tabIndex:t?void 0:0,onKeyDown:t?void 0:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),o(!r))},children:[(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},children:[(0,_e.jsx)(Moe,{severity:e.severity}),(0,_e.jsx)("p",{style:a,children:e.title})]}),(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0},children:[(0,_e.jsx)(Eoe,{status:e.status}),!t&&(0,_e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--ggui-color-outline, #d4d4d8)",strokeWidth:"2",style:{transform:r?"rotate(180deg)":"none",transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,_e.jsx)("path",{d:"M6 9l6 6 6-6"})})]})]}),e.affectedServices&&e.affectedServices.length>0&&(0,_e.jsx)("div",{style:{padding:"0 16px 8px",display:"flex",gap:"4px",flexWrap:"wrap"},children:e.affectedServices.map(s=>(0,_e.jsx)("span",{style:{fontSize:"11px",padding:"1px 6px",borderRadius:"var(--ggui-shape-radius-sm, 4px)",backgroundColor:"var(--ggui-color-surfaceVariant, #f4f4f5)",color:"var(--ggui-color-onSurfaceVariant, #52525b)"},children:s},s))}),!t&&r&&e.updates.length>0&&(0,_e.jsx)("div",{style:{borderTop:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",padding:"12px 16px"},children:(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:e.updates.map(s=>(0,_e.jsxs)("div",{style:{display:"flex",gap:"8px",fontSize:"12px"},children:[(0,_e.jsx)("span",{style:{color:"var(--ggui-color-outline, #d4d4d8)",flexShrink:0,fontVariantNumeric:"tabular-nums"},children:woe(s.timestamp)}),(0,_e.jsx)("span",{style:{fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",flexShrink:0,textTransform:"capitalize"},children:gU[s.status]}),(0,_e.jsx)("span",{style:{color:"var(--ggui-color-onSurface, #18181b)"},children:s.message})]},s.id))})})]})}function hU({incidents:e,days:t=14,emptyText:r="All systems operational",compact:o=!1,style:n,className:i}){let a=new Date,s=[];for(let c=0;c<t;c++){let d=new Date(a);d.setDate(d.getDate()-c);let f=pU(d),m=e.filter(g=>{let v=new Date(g.createdAt);return pU(v)===f});s.push({date:d,key:f,incidents:m})}let l=e.length>0,u={fontFamily:"var(--ggui-font-family-sans, Inter, system-ui, sans-serif)",...n};return(0,_e.jsxs)("div",{style:u,className:i,children:[(0,_e.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,_e.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"8px"},children:[(0,_e.jsxs)("span",{style:{fontSize:"var(--ggui-font-size-sm, 14px)",fontWeight:500,color:"var(--ggui-color-onSurface, #18181b)"},children:[t,"-Day History"]}),!l&&(0,_e.jsxs)("span",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",color:"var(--ggui-color-success-600, #16a34a)",display:"flex",alignItems:"center",gap:"4px"},children:[(0,_e.jsx)(dU,{severity:null}),r]})]}),(0,_e.jsx)("div",{style:{display:"flex",gap:"3px",flexDirection:"row-reverse",justifyContent:"flex-end"},children:s.map(c=>{let d=Toe(c.incidents);return(0,_e.jsx)("div",{title:`${M3(c.date)}: ${c.incidents.length===0?"No incidents":`${c.incidents.length} incident(s)`}`,children:(0,_e.jsx)(dU,{severity:d})},c.key)})}),(0,_e.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"4px",fontSize:"10px",color:"var(--ggui-color-outline, #d4d4d8)"},children:[(0,_e.jsx)("span",{children:M3(s[s.length-1]?.date??a)}),(0,_e.jsx)("span",{children:"Today"})]})]}),l&&(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:s.filter(c=>c.incidents.length>0).map(c=>(0,_e.jsxs)("div",{children:[(0,_e.jsx)("div",{style:{fontSize:"var(--ggui-font-size-xs, 12px)",fontWeight:500,color:"var(--ggui-color-onSurfaceVariant, #52525b)",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.05em"},children:M3(c.date)}),(0,_e.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:c.incidents.map(d=>(0,_e.jsx)(Roe,{incident:d,compact:o},d.id))})]},c.key))})]})}var _e,fU,mU,gU,yU=$(()=>{"use strict";_e=z(W(),1),fU=z(X(),1),mU={minor:{bg:"var(--ggui-color-warning-50, #fffbeb)",text:"var(--ggui-color-warning-700, #b45309)",dot:"var(--ggui-color-warning-500, #f59e0b)"},major:{bg:"var(--ggui-color-error-50, #fef2f2)",text:"var(--ggui-color-error-700, #b91c1c)",dot:"var(--ggui-color-error-500, #ef4444)"},critical:{bg:"var(--ggui-color-error-100, #fee2e2)",text:"var(--ggui-color-error-800, #991b1b)",dot:"var(--ggui-color-error-700, #b91c1c)"}},gU={investigating:"Investigating",identified:"Identified",monitoring:"Monitoring",resolved:"Resolved"}});function vU({chat:e,canvas:t,chatWidth:r="400px",style:o,className:n}){return(0,Ag.jsxs)("div",{className:n,style:{display:"flex",height:"100%",minHeight:0,...o},children:[(0,Ag.jsx)("div",{style:{width:r,minWidth:"320px",maxWidth:"50%",flexShrink:0,borderRight:"1px solid var(--ggui-color-outlineVariant, #e4e4e7)",display:"flex",flexDirection:"column",overflow:"hidden"},children:e}),(0,Ag.jsx)("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:t})]})}var Ag,bU=$(()=>{"use strict";Ag=z(W(),1)});function $U({headline:e,subheadline:t,primaryAction:r,secondaryAction:o,variant:n="default",media:i,style:a,className:s}){let l={default:{backgroundColor:"var(--ggui-color-surface, #ffffff)"},gradient:{background:"linear-gradient(135deg, var(--ggui-color-primary-50, #f0f9ff) 0%, var(--ggui-color-surface, #ffffff) 50%, var(--ggui-color-primary-100, #e0f2fe) 100%)"},pattern:{backgroundColor:"var(--ggui-color-primary-900, #0c4a6e)",backgroundImage:"radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%)"}},u=n==="pattern";return(0,kn.jsx)("section",{className:s,style:{position:"relative",overflow:"hidden",...l[n],...a},children:(0,kn.jsxs)("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"96px 24px",display:"flex",alignItems:"center",gap:"64px",flexWrap:"wrap"},children:[(0,kn.jsxs)("div",{style:{flex:"1 1 480px",minWidth:0},children:[(0,kn.jsx)("h1",{style:{fontSize:"var(--ggui-font-size-5xl, 48px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.1,letterSpacing:"-0.025em",color:u?"#ffffff":"var(--ggui-color-onSurface, #18181b)",margin:"0 0 24px 0"},children:e}),t&&(0,kn.jsx)("p",{style:{fontSize:"var(--ggui-font-size-xl, 20px)",lineHeight:1.6,color:u?"rgba(255, 255, 255, 0.85)":"var(--ggui-color-onSurfaceVariant, #52525b)",margin:"0 0 40px 0",maxWidth:"560px"},children:t}),(r||o)&&(0,kn.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:"16px"},children:[r&&(0,kn.jsx)(xU,{action:r,variant:"primary",dark:u}),o&&(0,kn.jsx)(xU,{action:o,variant:"secondary",dark:u})]})]}),i&&(0,kn.jsx)("div",{style:{flex:"1 1 400px",display:"flex",justifyContent:"center",alignItems:"center",minWidth:0},children:i})]})})}function xU({action:e,variant:t,dark:r}){let s={...{display:"inline-flex",alignItems:"center",justifyContent:"center",padding:"14px 32px",fontSize:"var(--ggui-font-size-lg, 18px)",fontWeight:600,borderRadius:"var(--ggui-shape-radius-lg, 12px)",cursor:"pointer",transition:"all 0.2s ease",textDecoration:"none",border:"none",lineHeight:"1.5"},...t==="primary"?r?{backgroundColor:"#ffffff",color:"var(--ggui-color-primary-900, #0c4a6e)"}:{backgroundColor:"var(--ggui-color-primary-600, #0284c7)",color:"#ffffff"}:r?{backgroundColor:"transparent",color:"#ffffff",border:"2px solid rgba(255, 255, 255, 0.3)"}:{backgroundColor:"transparent",color:"var(--ggui-color-onSurface, #18181b)",border:"2px solid var(--ggui-color-outline, #d4d4d8)"}};return e.href?(0,kn.jsx)("a",{href:e.href,onClick:e.onClick,style:s,role:"button",children:e.label}):(0,kn.jsx)("button",{type:"button",onClick:e.onClick,style:s,children:e.label})}var kn,_U=$(()=>{"use strict";kn=z(W(),1)});function kU({heading:e,subheading:t,features:r,columns:o=3,style:n,className:i}){return(0,sn.jsxs)("section",{className:i,style:{backgroundColor:"var(--ggui-color-surface, #ffffff)",...n},children:[(0,sn.jsxs)("div",{style:{maxWidth:"1280px",margin:"0 auto",padding:"80px 24px"},children:[(e||t)&&(0,sn.jsxs)("div",{style:{textAlign:"center",marginBottom:"64px"},children:[e&&(0,sn.jsx)("h2",{style:{fontSize:"var(--ggui-font-size-3xl, 30px)",fontWeight:"var(--ggui-font-weight-bold, 700)",lineHeight:1.2,color:"var(--ggui-color-onSurface, #18181b)",margin:"0 0 16px 0"},children:e}),t&&(0,sn.jsx)("p",{style:{fontSize:"var(--ggui-font-size-lg, 18px)",lineHeight:1.6,color:"var(--ggui-color-onSurfaceVariant, #52525b)",margin:0,maxWidth:"640px",marginLeft:"auto",marginRight:"auto"},children:t})]}),(0,sn.jsx)("div",{className:"ggui-features-grid",style:{display:"grid",gridTemplateColumns:`repeat(${o}, 1fr)`,gap:"32px"},children:r.map((a,s)=>(0,sn.jsx)(Coe,{feature:a},s))})]}),(0,sn.jsx)("style",{children:`
164
164
  @media (max-width: 768px) {
165
165
  .ggui-features-grid {
166
166
  grid-template-columns: 1fr !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ggui-ai/iframe-runtime",
3
- "version": "0.2.0-alpha.1",
3
+ "version": "0.2.0-alpha.3",
4
4
  "description": "The iframe-local ggui runtime: a self-contained ESM bundle that boots inside an MCP Apps host iframe, runs the protocol-version handshake, opens the live-channel WebSocket, and mounts the rendered UI. Bundles React, ReactDOM, and the ggui design system so generated component code has a single seam to read from.",
5
5
  "keywords": [
6
6
  "ggui",
@@ -38,12 +38,12 @@
38
38
  "qrcode-generator": "^2.0.4",
39
39
  "react": "^19.0.0",
40
40
  "react-dom": "^19.0.0",
41
- "@ggui-ai/gadgets": "0.2.0-alpha.1",
42
- "@ggui-ai/preview-a2ui": "0.2.0-alpha.1",
43
- "@ggui-ai/protocol": "0.2.0-alpha.1",
44
- "@ggui-ai/design": "0.2.0-alpha.1",
45
- "@ggui-ai/live-channel": "0.2.0-alpha.1",
46
- "@ggui-ai/wire": "0.2.0-alpha.1"
41
+ "@ggui-ai/live-channel": "0.2.0-alpha.3",
42
+ "@ggui-ai/gadgets": "0.2.0-alpha.3",
43
+ "@ggui-ai/design": "0.2.0-alpha.3",
44
+ "@ggui-ai/preview-a2ui": "0.2.0-alpha.3",
45
+ "@ggui-ai/protocol": "0.2.0-alpha.3",
46
+ "@ggui-ai/wire": "0.2.0-alpha.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@testing-library/react": "^16.0.0",