import{S as w,i as x,s as N,O as g,P as p,a as h,d as m,b as l,g as C,F as b,L as y,e as _,k as D,t as S,c as v,m as I,h as q,f as T,j as O,w as V,x as H,y as k,Q as R,q as B,o as A,B as M,T as Z}from"./vendor-4833417e.js";function j(n){const e=document.createElement("textarea");document.body.appendChild(e),e.value=n,e.select(),document.execCommand("copy"),document.body.removeChild(e)}function F(n){let e,t,r,s;return{c(){e=g("svg"),t=g("path"),r=g("path"),s=g("rect"),this.h()},l(i){e=p(i,"svg",{class:!0,xmlns:!0,"aria-hidden":!0,fill:!0,focusable:!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var a=h(e);t=p(a,"path",{d:!0,transform:!0}),h(t).forEach(m),r=p(a,"path",{d:!0,transform:!0}),h(r).forEach(m),s=p(a,"rect",{fill:!0,width:!0,height:!0}),h(s).forEach(m),a.forEach(m),this.h()},h(){l(t,"d","M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z"),l(t,"transform","translate(0)"),l(r,"d","M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z"),l(r,"transform","translate(0)"),l(s,"fill","none"),l(s,"width","32"),l(s,"height","32"),l(e,"class",n[0]),l(e,"xmlns","http://www.w3.org/2000/svg"),l(e,"aria-hidden","true"),l(e,"fill","currentColor"),l(e,"focusable","false"),l(e,"role","img"),l(e,"width","1em"),l(e,"height","1em"),l(e,"preserveAspectRatio","xMidYMid meet"),l(e,"viewBox","0 0 32 32")},m(i,a){C(i,e,a),b(e,t),b(e,r),b(e,s)},p(i,[a]){a&1&&l(e,"class",i[0])},i:y,o:y,d(i){i&&m(e)}}}function L(n,e,t){let{classNames:r=""}=e;return n.$$set=s=>{"classNames"in s&&t(0,r=s.classNames)},[r]}class P extends w{constructor(e){super();x(this,e,L,F,N,{classNames:0})}}function Q(n){let e,t,r,s,i;return{c(){e=_("div"),t=_("div"),r=D(),s=S(n[1]),this.h()},l(a){e=v(a,"DIV",{class:!0});var c=h(e);t=v(c,"DIV",{class:!0,style:!0}),h(t).forEach(m),r=I(c),s=q(c,n[1]),c.forEach(m),this.h()},h(){l(t,"class","absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0"),T(t,"border-left-color","transparent"),T(t,"border-right-color","transparent"),l(e,"class",i="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow "+n[2]+" "+n[0])},m(a,c){C(a,e,c),b(e,t),b(e,r),b(e,s)},p(a,[c]){c&2&&O(s,a[1]),c&5&&i!==(i="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow "+a[2]+" "+a[0])&&l(e,"class",i)},i:y,o:y,d(a){a&&m(e)}}}function U(n,e,t){let{classNames:r=""}=e,{label:s="Copied"}=e,{position:i="left-1/2 top-full transform -translate-x-1/2 translate-y-2"}=e;return n.$$set=a=>{"classNames"in a&&t(0,r=a.classNames),"label"in a&&t(1,s=a.label),"position"in a&&t(2,i=a.position)},[r,s,i]}class Y extends w{constructor(e){super();x(this,e,U,Q,N,{classNames:0,label:1,position:2})}}function z(n){let e,t,r,s,i,a,c,d,f;return t=new P({}),s=new Y({props:{classNames:n[4]?"opacity-100":"opacity-0"}}),{c(){e=_("button"),V(t.$$.fragment),r=D(),V(s.$$.fragment),this.h()},l(o){e=v(o,"BUTTON",{class:!0,title:!0,type:!0});var u=h(e);H(t.$$.fragment,u),r=I(u),H(s.$$.fragment,u),u.forEach(m),this.h()},h(){l(e,"class",i="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none "+n[0]+" "+(n[2]==="text"?"mx-0.5":"")+" "+(n[2]==="button"?"btn":"")+" "+(n[2]==="button-clear"?"py-1 px-2 border rounded-lg shadow-sm":"")+" "+(!n[4]&&["button-clear","text"].includes(n[2])?"text-gray-600":"")+" "+(n[4]?"text-green-500":"")),l(e,"title",a=n[3]||n[1]||"Copy to clipboard"),l(e,"type","button")},m(o,u){C(o,e,u),k(t,e,null),b(e,r),k(s,e,null),c=!0,d||(f=R(e,"click",n[5]),d=!0)},p(o,[u]){const E={};u&16&&(E.classNames=o[4]?"opacity-100":"opacity-0"),s.$set(E),(!c||u&21&&i!==(i="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none "+o[0]+" "+(o[2]==="text"?"mx-0.5":"")+" "+(o[2]==="button"?"btn":"")+" "+(o[2]==="button-clear"?"py-1 px-2 border rounded-lg shadow-sm":"")+" "+(!o[4]&&["button-clear","text"].includes(o[2])?"text-gray-600":"")+" "+(o[4]?"text-green-500":"")))&&l(e,"class",i),(!c||u&10&&a!==(a=o[3]||o[1]||"Copy to clipboard"))&&l(e,"title",a)},i(o){c||(B(t.$$.fragment,o),B(s.$$.fragment,o),c=!0)},o(o){A(t.$$.fragment,o),A(s.$$.fragment,o),c=!1},d(o){o&&m(e),M(t),M(s),d=!1,f()}}}function G(n,e,t){let{classNames:r=""}=e,{label:s=""}=e,{style:i="text"}=e,{title:a=""}=e,{value:c}=e,d=!1,f;Z(()=>{f&&clearTimeout(f)});function o(){j(c),t(4,d=!0),f&&clearTimeout(f),f=setTimeout(()=>{t(4,d=!1)},1e3)}return n.$$set=u=>{"classNames"in u&&t(0,r=u.classNames),"label"in u&&t(1,s=u.label),"style"in u&&t(2,i=u.style),"title"in u&&t(3,a=u.title),"value"in u&&t(6,c=u.value)},[r,s,i,a,d,o,c]}class K extends w{constructor(e){super();x(this,e,G,z,N,{classNames:0,label:1,style:2,title:3,value:6})}}export{K as C};
