@upstep/js 0.6.1 → 0.7.0

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.
package/dist/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),A=require("./api-BuSqdsZp.js"),D="#D97757",H={bg:"#ffffff",bgSoft:"#f6f5f2",bgHover:"#efede8",text:"#1a1915",textSoft:"#56544d",textFaint:"#9b9890",border:"#e8e6df",overlay:"rgba(26,25,21,.45)"},N={bg:"#000000",bgSoft:"#262522",bgHover:"#302e2a",text:"#f5f4f0",textSoft:"#b4b1a8",textFaint:"#7d7a72",border:"#33312c",overlay:"rgba(0,0,0,.6)"};function z(){if(typeof document>"u")return!1;const o=document.documentElement;return o.classList.contains("dark")||o.getAttribute("data-theme")==="dark"}function $(o){const[n,t]=i.useState(()=>o==="dark");return i.useEffect(()=>{if(o!=="auto"){t(o==="dark");return}if(t(z()),typeof MutationObserver>"u")return;const x=new MutationObserver(()=>t(z()));return x.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),()=>x.disconnect()},[o]),n?N:H}const B=i.createContext(null);function G({children:o,...n}){const[t]=i.useState(()=>new A.UpstepApiClient(n)),[x,f]=i.useState([]),[s,r]=i.useState(!1),[l,m]=i.useState(!0);i.useEffect(()=>{t.setUserId(n.userId)},[t,n.userId]),i.useEffect(()=>{t.supportIdentityToken=n.supportIdentityToken,document.querySelectorAll("iframe[data-upstep-support]").forEach(c=>{var b;return(b=c.contentWindow)==null?void 0:b.postMessage({type:"upstep:support:identity",token:n.supportIdentityToken},new URL(t.baseUrl).origin)})},[t,n.supportIdentityToken]);const d=i.useCallback(async()=>{try{const c=await t.listFeedback({sort:"votes",limit:20});f(c.items),m(c.showBranding??!0)}catch{}},[t]);i.useEffect(()=>{d()},[d]);const j=i.useCallback(async(c,b,S)=>{const p={content:b};c.trim()&&(p.title=c.trim()),S!==void 0&&(p.type=S),await t.submitFeedback(p),await d()},[t,d]),h=i.useCallback(async(c,b)=>{try{await t.vote(c,b),await d()}catch{}},[t,d]),a=i.useCallback(c=>t.getItem(c),[t]),g=i.useCallback(()=>r(!0),[]),y=i.useCallback(()=>r(!1),[]),k=i.useCallback(c=>t.setUserId(c),[t]);return e.jsx(B.Provider,{value:{client:t,feedItems:x,loadFeed:d,submit:j,vote:h,getItem:a,isOpen:s,open:g,close:y,identify:k,accentColor:n.accentColor??D,theme:n.theme??"auto",showBranding:l,chat:n.chat!==!1},children:o})}function w(){const o=i.useContext(B);if(!o)throw new Error("useUpstep must be used inside <UpstepProvider>");return o}function O({position:o="bottom-right",accentColor:n,theme:t,hideLauncher:x=!1,chat:f=!0}){const s=w(),r=n??s.accentColor,l=$(t??s.theme),{isOpen:m,open:d,close:j,showBranding:h}=s,[a,g]=i.useState("list"),[y,k]=i.useState(!1);i.useEffect(()=>{let u=!0;if(s.client.chat=s.chat,!s.chat||!f){k(!1);return}return s.client.supportEnabled().then(v=>{u&&k(v)}),()=>{u=!1}},[s.client,s.chat,f]),i.useEffect(()=>{(!s.chat||!f)&&a==="support"&&g("list")},[s.chat,f,a]);const[c,b]=i.useState(null),[S,p]=i.useState(!1);i.useEffect(()=>{const u=window.matchMedia("(max-width: 639px)");p(u.matches);const v=P=>p(P.matches);return u.addEventListener("change",v),()=>u.removeEventListener("change",v)},[]);const L=o==="bottom-left"?{position:"fixed",bottom:24,left:24}:{position:"fixed",bottom:24,right:24},C='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';function F(){j(),setTimeout(()=>{g("list"),b(null)},300)}function M(u){b(u),g("detail")}return e.jsxs(e.Fragment,{children:[!x&&e.jsxs("button",{onClick:d,style:{...L,zIndex:9998,display:"inline-flex",alignItems:"center",gap:7,background:r,color:"#fff",border:"none",borderRadius:9999,padding:S?"12px":"12px 18px",fontSize:14,fontWeight:600,cursor:"pointer",fontFamily:C,boxShadow:"0 6px 20px rgba(26,25,21,.18)"},children:[e.jsx(Z,{size:16}),!S&&(y&&f&&s.chat?"Help & feedback":"Feedback")]}),m&&e.jsx("div",{onClick:u=>u.target===u.currentTarget&&F(),style:{position:"fixed",inset:0,background:l.overlay,backdropFilter:"blur(3px)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",padding:16,fontFamily:C},children:e.jsxs("div",{style:{background:l.bg,border:`1px solid ${l.border}`,borderRadius:20,width:"100%",maxWidth:y&&f&&s.chat?460:440,maxHeight:"88vh",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 24px 64px rgba(0,0,0,.28)"},children:[y&&f&&s.chat?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 14px",borderBottom:`1px solid ${l.border}`,flexShrink:0},children:[e.jsx("div",{style:{display:"flex",flex:1,gap:4},children:[["support","Support"],["list","Feedback"]].map(([u,v])=>e.jsx("button",{onClick:()=>g(u),style:{flex:1,border:0,borderRadius:8,padding:"9px 12px",background:(a==="support"?u==="support":u==="list")?l.bgSoft:"transparent",color:(a==="support"?u==="support":u==="list")?l.text:l.textSoft,fontSize:12,fontWeight:600,cursor:"pointer"},children:v},u))}),e.jsx("button",{"aria-label":"Close",onClick:F,style:{border:0,background:"transparent",color:l.textSoft,padding:6,cursor:"pointer",fontSize:14},children:"✕"})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${l.border}`,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[a!=="list"&&e.jsx("button",{onClick:()=>g("list"),style:{background:"none",border:"none",cursor:"pointer",color:r,fontSize:13,fontWeight:600,padding:0},children:"← Back"}),a==="list"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:l.text,letterSpacing:"-.01em"},children:"Feedback"}),a==="create"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:l.text,letterSpacing:"-.01em"},children:"New feedback"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[a==="list"&&e.jsx("button",{onClick:()=>g("create"),style:{background:r,color:"#fff",border:"none",borderRadius:20,padding:"6px 14px",fontSize:13,fontWeight:700,cursor:"pointer"},children:"+ New"}),e.jsx("button",{onClick:F,style:{background:l.bgSoft,border:"none",width:28,height:28,borderRadius:8,fontSize:14,cursor:"pointer",color:l.textSoft,display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]})]}),e.jsxs("div",{style:{flex:1,overflowY:"auto",padding:a==="support"?0:"16px 20px 24px"},children:[a==="support"&&f&&s.chat&&e.jsx(V,{client:s.client,theme:l.bg==="#000000"?"dark":"light"}),y&&f&&s.chat&&a!=="support"&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:a==="list"?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:l.text},children:"Feedback & ideas"}),e.jsx("button",{onClick:()=>g("create"),style:{border:0,borderRadius:8,background:r,color:"white",fontSize:12,padding:"7px 10px",cursor:"pointer"},children:"+ New"})]}):e.jsx("button",{onClick:()=>g("list"),style:{border:0,background:"none",padding:0,color:l.textSoft,fontSize:12,cursor:"pointer"},children:"← Back to feedback"})}),a==="list"&&e.jsx(_,{onSelect:M,accent:r,p:l}),a==="detail"&&c&&e.jsx(q,{feedbackId:c,accent:r,p:l,font:C}),a==="create"&&e.jsx(K,{accent:r,p:l,font:C,onDone:()=>g("list")})]}),h&&a!=="support"&&e.jsxs("a",{href:"https://upstep.dev",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:"8px 0",borderTop:`1px solid ${l.border}`,fontSize:11,color:l.textFaint,textDecoration:"none",flexShrink:0},children:["Powered by ",e.jsx("strong",{style:{fontWeight:700},children:"Upstep.dev"})]})]})})]})}function V({client:o,theme:n}){const t=i.useRef(null);return i.useEffect(()=>{if(t.current)return o.connectSupportFrame(t.current)},[o]),e.jsx("iframe",{ref:t,"data-upstep-support":!0,title:"Customer support",src:o.supportFrameUrl(n),style:{width:"100%",height:"min(560px, calc(88dvh - 56px))",minHeight:300,border:0,display:"block"}})}function _({onSelect:o,accent:n,p:t}){const{feedItems:x,vote:f}=w(),s=x.filter(r=>r.status!=="CLOSED");return s.length?e.jsx(e.Fragment,{children:s.map(r=>{const l=r.userVote==="UP",m=r.title??r.content;return e.jsxs("div",{onClick:()=>o(r.id),style:{display:"flex",gap:12,padding:14,border:`1px solid ${t.border}`,borderRadius:14,marginBottom:10,background:t.bg,cursor:"pointer"},children:[e.jsxs("button",{onClick:d=>{d.stopPropagation(),f(r.id,"UP")},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minWidth:46,padding:"7px 0",borderRadius:11,cursor:"pointer",flexShrink:0,border:`1px solid ${l?n:t.border}`,background:l?`${n}1a`:t.bgSoft},children:[e.jsx(U,{color:n}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:t.text,lineHeight:1.1},children:r.upvotes})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("p",{style:{fontSize:13.5,fontWeight:600,lineHeight:1.4,color:t.text,margin:"0 0 6px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:m}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[e.jsx(I,{type:r.type,p:t}),r.status==="PENDING"?e.jsx(W,{}):e.jsx(T,{status:r.status,boardStatus:r.boardStatus,p:t}),e.jsx("span",{style:{fontSize:11,color:t.textFaint},children:R(r.createdAt)})]})]}),e.jsx("span",{style:{color:t.textFaint,fontSize:18,alignSelf:"center",flexShrink:0},children:"›"})]},r.id)})}):e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx("div",{style:{color:t.textSoft,fontSize:15,fontWeight:600,marginBottom:4},children:"No open feedback yet"}),e.jsx("div",{style:{color:t.textFaint,fontSize:14},children:"Be the first to share one."})]})}function q({feedbackId:o,accent:n,p:t,font:x}){const{vote:f,getItem:s}=w(),[r,l]=i.useState(null),[m,d]=i.useState(!1);i.useEffect(()=>{let a=!1;return s(o).then(g=>{a||l(g)}).catch(()=>{}),()=>{a=!0}},[o,s]);async function j(){if(!(!r||m)){d(!0);try{await f(r.id,"UP");const a=await s(o);l(a)}catch{}finally{d(!1)}}}if(!r)return e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:t.textFaint,fontSize:14},children:"Loading…"});const h=r.title;return e.jsxs("div",{children:[h&&e.jsx("div",{style:{fontSize:20,fontWeight:700,color:t.text,letterSpacing:"-.02em",marginBottom:10,lineHeight:1.3},children:h}),e.jsxs("div",{style:{display:"flex",gap:6,marginBottom:14,flexWrap:"wrap"},children:[e.jsx(I,{type:r.type,p:t}),r.status==="PENDING"?e.jsx(W,{}):e.jsx(T,{status:r.status,boardStatus:r.boardStatus,p:t})]}),e.jsx("p",{style:{fontSize:15,lineHeight:1.6,color:t.textSoft,marginBottom:20},children:r.content}),e.jsxs("button",{onClick:j,disabled:m,style:{display:"inline-flex",alignItems:"center",gap:8,border:`1px solid ${r.userVote==="UP"?n:t.border}`,background:r.userVote==="UP"?`${n}15`:t.bgSoft,borderRadius:12,padding:"10px 16px",cursor:"pointer",fontFamily:x},children:[e.jsx(U,{color:n,size:13}),e.jsx("span",{style:{fontSize:18,fontWeight:700,color:t.text},children:r.upvotes}),e.jsx("span",{style:{fontSize:13,color:t.textFaint},children:r.userVote==="UP"?"Upvoted":"Upvote"})]}),r.comments.length>0&&e.jsxs("div",{style:{marginTop:28,borderTop:`1px solid ${t.border}`,paddingTop:20},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:12,textTransform:"uppercase"},children:"Comments"}),r.comments.map(a=>e.jsx(Y,{comment:a,p:t,accent:n},a.id))]})]})}function Y({comment:o,p:n,accent:t}){var x;return e.jsxs("div",{style:{background:n.bgSoft,border:`1px solid ${n.border}`,borderRadius:12,padding:14,marginBottom:10},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[e.jsx("span",{style:{background:`${t}20`,color:t,fontSize:11,fontWeight:700,borderRadius:20,padding:"2px 8px"},children:((x=o.authorName)==null?void 0:x.trim())||"UpStep Team"}),e.jsx("span",{style:{fontSize:11,color:n.textFaint},children:R(o.createdAt)})]}),e.jsx("p",{style:{fontSize:14,lineHeight:1.5,color:n.textSoft,margin:0},children:o.content})]})}function K({accent:o,p:n,font:t,onDone:x}){const{submit:f}=w(),[s,r]=i.useState(""),[l,m]=i.useState(""),[d,j]=i.useState("GENERAL"),[h,a]=i.useState(!1),[g,y]=i.useState(!1),[k,c]=i.useState("");async function b(){if(!(!s.trim()||h)){a(!0),c("");try{await f(s.trim(),l.trim()||s.trim(),d),y(!0),setTimeout(x,1200)}catch{c("Something went wrong. Please try again.")}finally{a(!1)}}}if(g)return e.jsxs("div",{style:{textAlign:"center",paddingTop:40},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,color:n.text,marginBottom:6},children:"Submitted"}),e.jsx("div",{style:{fontSize:14,color:n.textFaint},children:"Feedback received. Thank you."})]});const S={width:"100%",border:`1px solid ${n.border}`,borderRadius:12,padding:"10px 12px",fontSize:14,lineHeight:1.5,outline:"none",background:n.bgSoft,color:n.text,fontFamily:t,boxSizing:"border-box"};return e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Type"}),e.jsx("div",{style:{display:"flex",gap:7,marginBottom:16},children:["BUG","FEATURE","GENERAL"].map(p=>e.jsxs("button",{onClick:()=>j(p),style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,padding:"8px 10px",borderRadius:9,fontSize:12.5,fontWeight:600,cursor:"pointer",background:d===p?o:n.bg,color:d===p?"#fff":n.textSoft,border:`1px solid ${d===p?o:n.border}`,fontFamily:t},children:[E[p].icon,E[p].label]},p))}),e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Title"}),e.jsx("input",{value:s,onChange:p=>r(p.target.value),placeholder:"Short summary of the issue or idea",maxLength:200,style:{...S,marginBottom:16,display:"block"}}),e.jsxs("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:["Description ",e.jsx("span",{style:{fontWeight:400,textTransform:"none",letterSpacing:0},children:"(optional)"})]}),e.jsx("textarea",{value:l,onChange:p=>m(p.target.value),placeholder:"Steps to reproduce, expected behaviour, or more context",maxLength:2e3,rows:4,style:{...S,resize:"vertical",marginBottom:16}}),k&&e.jsx("p",{style:{fontSize:13,color:"#d6453d",marginBottom:12},children:k}),e.jsx("button",{onClick:b,disabled:h||!s.trim(),style:{width:"100%",padding:12,background:o,color:"#fff",border:"none",borderRadius:11,fontSize:14,fontWeight:600,cursor:"pointer",opacity:h||!s.trim()?.5:1,fontFamily:t},children:h?"Submitting…":"Submit feedback"})]})}const E={BUG:{label:"Bug",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("ellipse",{cx:"8",cy:"10",rx:"3.5",ry:"4.5"}),e.jsx("path",{d:"M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10"})]})},FEATURE:{label:"Feature",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1"}),e.jsx("circle",{cx:"8",cy:"8",r:"2.5"})]})},GENERAL:{label:"General",icon:e.jsx("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z"})})}},J={BUG:"#fdecec",FEATURE:"#e9f0fd"},Q={BUG:"#d6453d",FEATURE:"#3b76d6"};function I({type:o,p:n}){return e.jsx("span",{style:{padding:"2px 8px",borderRadius:9999,fontSize:10.5,fontWeight:700,letterSpacing:".02em",background:J[o]??n.bgSoft,color:Q[o]??n.textSoft},children:o})}const X={OPEN:"#b45309",IN_PROGRESS:"#1d4ed8",DONE:"#15803d",CLOSED:"#6b7280"};function W(){return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"#fff7ed",border:"1px solid #fed7aa",borderRadius:6,padding:"1px 6px",fontSize:10,fontWeight:700,color:"#ea580c"},children:[e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#ea580c",display:"inline-block"}}),"Pending review"]})}function T({status:o,boardStatus:n,p:t}){const x=(n==null?void 0:n.color)??X[o]??"#9ca3af";return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,background:t.bgSoft,border:`1px solid ${t.border}`,borderRadius:6,padding:"2px 8px",fontSize:10,fontWeight:600,color:t.textSoft},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:x,display:"inline-block",flexShrink:0}}),(n==null?void 0:n.name)??o.replace("_"," ")]})}function Z({size:o=16,color:n="currentColor"}){return e.jsx("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function U({color:o="currentColor",size:n=11}){return e.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"none",stroke:o,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M8 13V3M3 8l5-5 5 5"})})}function R(o){return new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"})}exports.FeedbackWidget=O;exports.UpstepProvider=G;exports.useUpstep=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),A=require("./api-BuSqdsZp.js"),D="#5B7168",H={bg:"#ffffff",bgSoft:"#f4f6f4",bgHover:"#eaf0eb",text:"#1a1915",textSoft:"#56544d",textFaint:"#9b9890",border:"#e8e6df",overlay:"rgba(26,25,21,.45)"},N={bg:"#000000",bgSoft:"#191d1b",bgHover:"#252d28",text:"#f5f4f0",textSoft:"#b4b1a8",textFaint:"#7d7a72",border:"#33312c",overlay:"rgba(0,0,0,.6)"};function z(){if(typeof document>"u")return!1;const o=document.documentElement;return o.classList.contains("dark")||o.getAttribute("data-theme")==="dark"}function O(o){const[n,t]=i.useState(()=>o==="dark");return i.useEffect(()=>{if(o!=="auto"){t(o==="dark");return}if(t(z()),typeof MutationObserver>"u")return;const f=new MutationObserver(()=>t(z()));return f.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),()=>f.disconnect()},[o]),n?N:H}const B=i.createContext(null);function $({children:o,...n}){const[t]=i.useState(()=>new A.UpstepApiClient(n)),[f,d]=i.useState([]),[s,r]=i.useState(!1),[l,h]=i.useState(!0);i.useEffect(()=>{t.setUserId(n.userId)},[t,n.userId]),i.useEffect(()=>{t.supportIdentityToken=n.supportIdentityToken,document.querySelectorAll("iframe[data-upstep-support]").forEach(p=>{var m;return(m=p.contentWindow)==null?void 0:m.postMessage({type:"upstep:support:identity",token:n.supportIdentityToken},new URL(t.baseUrl).origin)})},[t,n.supportIdentityToken]);const c=i.useCallback(async()=>{try{const p=await t.listFeedback({sort:"votes",limit:20});d(p.items),h(p.showBranding??!0)}catch{}},[t]);i.useEffect(()=>{c()},[c]);const j=i.useCallback(async(p,m,S)=>{const u={content:m};p.trim()&&(u.title=p.trim()),S!==void 0&&(u.type=S),await t.submitFeedback(u),await c()},[t,c]),b=i.useCallback(async(p,m)=>{try{await t.vote(p,m),await c()}catch{}},[t,c]),a=i.useCallback(p=>t.getItem(p),[t]),g=i.useCallback(()=>r(!0),[]),y=i.useCallback(()=>r(!1),[]),k=i.useCallback(p=>t.setUserId(p),[t]);return e.jsx(B.Provider,{value:{client:t,feedItems:f,loadFeed:c,submit:j,vote:b,getItem:a,isOpen:s,open:g,close:y,identify:k,accentColor:n.accentColor??D,theme:n.theme??"auto",showBranding:l,chat:n.chat!==!1},children:o})}function w(){const o=i.useContext(B);if(!o)throw new Error("useUpstep must be used inside <UpstepProvider>");return o}function G({position:o="bottom-right",accentColor:n,theme:t,hideLauncher:f=!1,chat:d=!0}){const s=w(),r=n??s.accentColor,l=O(t??s.theme),{isOpen:h,open:c,close:j,showBranding:b}=s,[a,g]=i.useState("list"),[y,k]=i.useState(!1);i.useEffect(()=>{let x=!0;if(s.client.chat=s.chat,!s.chat||!d){k(!1);return}return s.client.supportEnabled().then(v=>{x&&k(v)}),()=>{x=!1}},[s.client,s.chat,d]),i.useEffect(()=>{(!s.chat||!d)&&a==="support"&&g("list")},[s.chat,d,a]),i.useEffect(()=>{h&&g(y&&d&&s.chat?"support":"list")},[h,y,d,s.chat]);const[p,m]=i.useState(null),[S,u]=i.useState(!1);i.useEffect(()=>{const x=window.matchMedia("(max-width: 639px)");u(x.matches);const v=P=>u(P.matches);return x.addEventListener("change",v),()=>x.removeEventListener("change",v)},[]);const L={position:"fixed",bottom:24,right:24},C='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';function F(){j(),m(null)}function M(x){m(x),g("detail")}return e.jsxs(e.Fragment,{children:[!f&&e.jsxs("button",{"aria-label":"Open help and feedback",onClick:c,style:{...L,zIndex:9998,display:"inline-flex",alignItems:"center",gap:7,background:r,color:"#fff",border:"none",borderRadius:9999,padding:S?"12px":"12px 18px",fontSize:14,fontWeight:600,cursor:"pointer",fontFamily:C,boxShadow:"0 6px 20px rgba(26,25,21,.18)"},children:[e.jsx(Z,{size:16}),!S&&(y&&d&&s.chat?"Help & feedback":"Feedback")]}),h&&e.jsx("div",{onClick:x=>x.target===x.currentTarget&&F(),style:{position:"fixed",inset:0,background:"transparent",zIndex:9999,display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:S?"0 12px 80px":"0 24px 88px",fontFamily:C},children:e.jsxs("div",{style:{background:l.bg,border:`1px solid ${l.border}`,borderRadius:20,width:"100%",maxWidth:y&&d&&s.chat?460:440,maxHeight:"calc(100dvh - 112px)",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 24px 64px rgba(0,0,0,.28)"},children:[y&&d&&s.chat?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 14px",borderBottom:`1px solid ${l.border}`,flexShrink:0},children:[e.jsx("div",{style:{display:"flex",flex:1,gap:4},children:[["support","Support"],["list","Feedback"]].map(([x,v])=>e.jsx("button",{onClick:()=>g(x),style:{flex:1,border:0,borderRadius:8,padding:"9px 12px",background:(a==="support"?x==="support":x==="list")?l.bgSoft:"transparent",color:(a==="support"?x==="support":x==="list")?l.text:l.textSoft,fontSize:14,fontWeight:600,cursor:"pointer"},children:v},x))}),e.jsx("button",{"aria-label":"Close",onClick:F,style:{border:0,background:"transparent",color:l.textSoft,padding:6,cursor:"pointer",fontSize:14},children:"✕"})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${l.border}`,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[a!=="list"&&e.jsx("button",{onClick:()=>g("list"),style:{background:"none",border:"none",cursor:"pointer",color:r,fontSize:14,fontWeight:600,padding:0},children:"← Back"}),a==="list"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:l.text,letterSpacing:"-.01em"},children:"Feedback"}),a==="create"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:l.text,letterSpacing:"-.01em"},children:"New feedback"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[a==="list"&&e.jsx("button",{onClick:()=>g("create"),style:{background:r,color:"#fff",border:"none",borderRadius:20,padding:"6px 14px",fontSize:14,fontWeight:700,cursor:"pointer"},children:"+ New"}),e.jsx("button",{onClick:F,style:{background:l.bgSoft,border:"none",width:28,height:28,borderRadius:8,fontSize:14,cursor:"pointer",color:l.textSoft,display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]})]}),e.jsxs("div",{style:{flex:1,overflowY:"auto",padding:a==="support"?0:"16px 20px 24px"},children:[a==="support"&&d&&s.chat&&e.jsx(V,{client:s.client,theme:l.bg==="#000000"?"dark":"light"}),y&&d&&s.chat&&a!=="support"&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:a==="list"?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:l.text},children:"Feedback & ideas"}),e.jsx("button",{onClick:()=>g("create"),style:{border:0,borderRadius:8,background:r,color:"white",fontSize:14,padding:"7px 10px",cursor:"pointer"},children:"+ New"})]}):e.jsx("button",{onClick:()=>g("list"),style:{border:0,background:"none",padding:0,color:l.textSoft,fontSize:14,cursor:"pointer"},children:"← Back to feedback"})}),a==="list"&&e.jsx(_,{onSelect:M,accent:r,p:l}),a==="detail"&&p&&e.jsx(q,{feedbackId:p,accent:r,p:l,font:C}),a==="create"&&e.jsx(K,{accent:r,p:l,font:C,onDone:()=>g("list")})]}),b&&a!=="support"&&e.jsxs("a",{href:"https://upstep.dev",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:"8px 0",borderTop:`1px solid ${l.border}`,fontSize:11,color:l.textFaint,textDecoration:"none",flexShrink:0},children:["Powered by"," ",e.jsx("strong",{style:{fontWeight:700},children:"Upstep.dev"})]})]})})]})}function V({client:o,theme:n}){const t=i.useRef(null);return i.useEffect(()=>{if(t.current)return o.connectSupportFrame(t.current)},[o]),e.jsx("iframe",{ref:t,"data-upstep-support":!0,title:"Customer support",src:o.supportFrameUrl(n),style:{width:"100%",height:"min(560px, calc(100dvh - 168px))",minHeight:300,border:0,display:"block"}})}function _({onSelect:o,accent:n,p:t}){const{feedItems:f,vote:d}=w(),s=f.filter(r=>r.status!=="CLOSED");return s.length?e.jsx(e.Fragment,{children:s.map(r=>{const l=r.userVote==="UP",h=r.title??r.content;return e.jsxs("div",{onClick:()=>o(r.id),style:{display:"flex",gap:12,padding:14,border:`1px solid ${t.border}`,borderRadius:14,marginBottom:10,background:t.bg,cursor:"pointer"},children:[e.jsxs("button",{onClick:c=>{c.stopPropagation(),d(r.id,"UP")},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minWidth:46,padding:"7px 0",borderRadius:11,cursor:"pointer",flexShrink:0,border:`1px solid ${l?n:t.border}`,background:l?`${n}1a`:t.bgSoft},children:[e.jsx(U,{color:n}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:t.text,lineHeight:1.1},children:r.upvotes})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("p",{style:{fontSize:14,fontWeight:600,lineHeight:1.4,color:t.text,margin:"0 0 6px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:h}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[e.jsx(I,{type:r.type,p:t}),r.status==="PENDING"?e.jsx(W,{}):e.jsx(T,{status:r.status,boardStatus:r.boardStatus,p:t}),e.jsx("span",{style:{fontSize:11,color:t.textFaint},children:R(r.createdAt)})]})]}),e.jsx("span",{style:{color:t.textFaint,fontSize:18,alignSelf:"center",flexShrink:0},children:"›"})]},r.id)})}):e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx("div",{style:{color:t.textSoft,fontSize:15,fontWeight:600,marginBottom:4},children:"No open feedback yet"}),e.jsx("div",{style:{color:t.textFaint,fontSize:14},children:"Be the first to share one."})]})}function q({feedbackId:o,accent:n,p:t,font:f}){const{vote:d,getItem:s}=w(),[r,l]=i.useState(null),[h,c]=i.useState(!1);i.useEffect(()=>{let a=!1;return s(o).then(g=>{a||l(g)}).catch(()=>{}),()=>{a=!0}},[o,s]);async function j(){if(!(!r||h)){c(!0);try{await d(r.id,"UP");const a=await s(o);l(a)}catch{}finally{c(!1)}}}if(!r)return e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:t.textFaint,fontSize:14},children:"Loading…"});const b=r.title;return e.jsxs("div",{children:[b&&e.jsx("div",{style:{fontSize:20,fontWeight:700,color:t.text,letterSpacing:"-.02em",marginBottom:10,lineHeight:1.3},children:b}),e.jsxs("div",{style:{display:"flex",gap:6,marginBottom:14,flexWrap:"wrap"},children:[e.jsx(I,{type:r.type,p:t}),r.status==="PENDING"?e.jsx(W,{}):e.jsx(T,{status:r.status,boardStatus:r.boardStatus,p:t})]}),e.jsx("p",{style:{fontSize:15,lineHeight:1.6,color:t.textSoft,marginBottom:20},children:r.content}),e.jsxs("button",{onClick:j,disabled:h,style:{display:"inline-flex",alignItems:"center",gap:8,border:`1px solid ${r.userVote==="UP"?n:t.border}`,background:r.userVote==="UP"?`${n}15`:t.bgSoft,borderRadius:12,padding:"10px 16px",cursor:"pointer",fontFamily:f},children:[e.jsx(U,{color:n,size:13}),e.jsx("span",{style:{fontSize:18,fontWeight:700,color:t.text},children:r.upvotes}),e.jsx("span",{style:{fontSize:14,color:t.textFaint},children:r.userVote==="UP"?"Upvoted":"Upvote"})]}),r.comments.length>0&&e.jsxs("div",{style:{marginTop:28,borderTop:`1px solid ${t.border}`,paddingTop:20},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:12,textTransform:"uppercase"},children:"Comments"}),r.comments.map(a=>e.jsx(Y,{comment:a,p:t,accent:n},a.id))]})]})}function Y({comment:o,p:n,accent:t}){var f;return e.jsxs("div",{style:{background:n.bgSoft,border:`1px solid ${n.border}`,borderRadius:12,padding:14,marginBottom:10},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[e.jsx("span",{style:{background:`${t}20`,color:t,fontSize:11,fontWeight:700,borderRadius:20,padding:"2px 8px"},children:((f=o.authorName)==null?void 0:f.trim())||"UpStep Team"}),e.jsx("span",{style:{fontSize:11,color:n.textFaint},children:R(o.createdAt)})]}),e.jsx("p",{style:{fontSize:16,lineHeight:1.6,color:n.textSoft,margin:0},children:o.content})]})}function K({accent:o,p:n,font:t,onDone:f}){const{submit:d}=w(),[s,r]=i.useState(""),[l,h]=i.useState(""),[c,j]=i.useState("GENERAL"),[b,a]=i.useState(!1),[g,y]=i.useState(!1),[k,p]=i.useState("");async function m(){if(!(!s.trim()||b)){a(!0),p("");try{await d(s.trim(),l.trim()||s.trim(),c),y(!0),setTimeout(f,1200)}catch{p("Something went wrong. Please try again.")}finally{a(!1)}}}if(g)return e.jsxs("div",{style:{textAlign:"center",paddingTop:40},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,color:n.text,marginBottom:6},children:"Submitted"}),e.jsx("div",{style:{fontSize:14,color:n.textFaint},children:"Feedback received. Thank you."})]});const S={width:"100%",border:`1px solid ${n.border}`,borderRadius:12,padding:"10px 12px",fontSize:16,lineHeight:1.6,outline:"none",background:n.bgSoft,color:n.text,fontFamily:t,boxSizing:"border-box"};return e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Type"}),e.jsx("div",{style:{display:"flex",gap:7,marginBottom:16},children:["BUG","FEATURE","GENERAL"].map(u=>e.jsxs("button",{onClick:()=>j(u),style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,padding:"8px 10px",borderRadius:9,fontSize:14,fontWeight:600,cursor:"pointer",background:c===u?o:n.bg,color:c===u?"#fff":n.textSoft,border:`1px solid ${c===u?o:n.border}`,fontFamily:t},children:[E[u].icon,E[u].label]},u))}),e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Title"}),e.jsx("input",{value:s,onChange:u=>r(u.target.value),placeholder:"Short summary of the issue or idea",maxLength:200,style:{...S,marginBottom:16,display:"block"}}),e.jsxs("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:8,textTransform:"uppercase"},children:["Description"," ",e.jsx("span",{style:{fontWeight:400,textTransform:"none",letterSpacing:0},children:"(optional)"})]}),e.jsx("textarea",{value:l,onChange:u=>h(u.target.value),placeholder:"Steps to reproduce, expected behaviour, or more context",maxLength:2e3,rows:4,style:{...S,resize:"vertical",marginBottom:16}}),k&&e.jsx("p",{style:{fontSize:14,color:"#d6453d",marginBottom:12},children:k}),e.jsx("button",{onClick:m,disabled:b||!s.trim(),style:{width:"100%",padding:12,background:o,color:"#fff",border:"none",borderRadius:11,fontSize:14,fontWeight:600,cursor:"pointer",opacity:b||!s.trim()?.5:1,fontFamily:t},children:b?"Submitting…":"Submit feedback"})]})}const E={BUG:{label:"Bug",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("ellipse",{cx:"8",cy:"10",rx:"3.5",ry:"4.5"}),e.jsx("path",{d:"M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10"})]})},FEATURE:{label:"Feature",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1"}),e.jsx("circle",{cx:"8",cy:"8",r:"2.5"})]})},GENERAL:{label:"General",icon:e.jsx("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z"})})}},J={BUG:"#fdecec",FEATURE:"#e9f0fd"},Q={BUG:"#d6453d",FEATURE:"#3b76d6"};function I({type:o,p:n}){return e.jsx("span",{style:{padding:"2px 8px",borderRadius:9999,fontSize:10.5,fontWeight:700,letterSpacing:".02em",background:J[o]??n.bgSoft,color:Q[o]??n.textSoft},children:o})}const X={OPEN:"#b45309",IN_PROGRESS:"#1d4ed8",DONE:"#15803d",CLOSED:"#6b7280"};function W(){return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"#fff7ed",border:"1px solid #fed7aa",borderRadius:6,padding:"1px 6px",fontSize:10,fontWeight:700,color:"#ea580c"},children:[e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#ea580c",display:"inline-block"}}),"Pending review"]})}function T({status:o,boardStatus:n,p:t}){const f=(n==null?void 0:n.color)??X[o]??"#9ca3af";return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,background:t.bgSoft,border:`1px solid ${t.border}`,borderRadius:6,padding:"2px 8px",fontSize:10,fontWeight:600,color:t.textSoft},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:f,display:"inline-block",flexShrink:0}}),(n==null?void 0:n.name)??o.replace("_"," ")]})}function Z({size:o=16,color:n="currentColor"}){return e.jsx("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:n,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function U({color:o="currentColor",size:n=11}){return e.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"none",stroke:o,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M8 13V3M3 8l5-5 5 5"})})}function R(o){return new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"})}exports.FeedbackWidget=G;exports.UpstepProvider=$;exports.useUpstep=w;
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAW,QAAQ,EAAE,YAAY,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAMxC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAsE3C,UAAU,kBAAkB;IAC1B,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/E,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf;AAID,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,YAAY,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qBAmExC;AAED,wBAAgB,SAAS,IAAI,kBAAkB,CAI9C;AAID,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mFAAmF;IACnF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,wBAAgB,cAAc,CAAC,EAC7B,QAAyB,EACzB,WAAW,EACX,KAAK,EACL,YAAoB,EACpB,IAAW,GACZ,EAAE,mBAAmB,qBAyJrB"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAMxC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAmF3C,UAAU,kBAAkB;IAC1B,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,CACN,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,YAAY,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,OAAO,CAAC;CACf;AAID,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,YAAY,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qBAgGxC;AAED,wBAAgB,SAAS,IAAI,kBAAkB,CAI9C;AAID,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mFAAmF;IACnF,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,wBAAgB,cAAc,CAAC,EAC7B,QAAyB,EACzB,WAAW,EACX,KAAK,EACL,YAAoB,EACpB,IAAW,GACZ,EAAE,mBAAmB,qBAqYrB"}