@epic-web/workshop-app 5.22.2 → 5.22.4

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.
Files changed (107) hide show
  1. package/build/client/assets/{_-BDcQ_M2J.js → _-CHaVBRQw.js} +2 -2
  2. package/build/client/assets/{_-BDcQ_M2J.js.map → _-CHaVBRQw.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js → _exerciseNumber-3uq8PYSd.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-CG2AFTtQ.js.map → _exerciseNumber-3uq8PYSd.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js → _exerciseNumber_._stepNumber-D5VDI7vZ.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-COWC332q.js.map → _exerciseNumber_._stepNumber-D5VDI7vZ.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js → _exerciseNumber_.finished-3Iv9ikNq.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber_.finished-BgGBYU74.js.map → _exerciseNumber_.finished-3Iv9ikNq.js.map} +1 -1
  9. package/build/client/assets/_layout-Brb3LPqZ.js +5 -0
  10. package/build/client/assets/_layout-Brb3LPqZ.js.map +1 -0
  11. package/build/client/assets/_layout-CkabS-6c.js +9 -0
  12. package/build/client/assets/_layout-CkabS-6c.js.map +1 -0
  13. package/build/client/assets/accordion-BjQ-5Z44.js +2 -0
  14. package/build/client/assets/accordion-BjQ-5Z44.js.map +1 -0
  15. package/build/client/assets/{account-BwQvf4AS.js → account-CN4B8rm4.js} +2 -2
  16. package/build/client/assets/{account-BwQvf4AS.js.map → account-CN4B8rm4.js.map} +1 -1
  17. package/build/client/assets/app-lUkT_xku.js +2 -0
  18. package/build/client/assets/{app-XHqxOZfy.js.map → app-lUkT_xku.js.map} +1 -1
  19. package/build/client/assets/{button-DVPKzWkn.js → button-ChOzbirS.js} +2 -2
  20. package/build/client/assets/{button-DVPKzWkn.js.map → button-ChOzbirS.js.map} +1 -1
  21. package/build/client/assets/{diff-C7Zh3uuA.js → diff-CTHVtVGQ.js} +2 -2
  22. package/build/client/assets/{diff-C7Zh3uuA.js.map → diff-CTHVtVGQ.js.map} +1 -1
  23. package/build/client/assets/diff-CVrsnWqw.js +2 -0
  24. package/build/client/assets/{diff-DVOUmaq6.js.map → diff-CVrsnWqw.js.map} +1 -1
  25. package/build/client/assets/discord-Cl4hiMqz.js +2 -0
  26. package/build/client/assets/discord-Cl4hiMqz.js.map +1 -0
  27. package/build/client/assets/{discord-CoBo5eVK.js → discord-gROK6Zn6.js} +2 -2
  28. package/build/client/assets/{discord-CoBo5eVK.js.map → discord-gROK6Zn6.js.map} +1 -1
  29. package/build/client/assets/{epic-video-DRZssA4U.js → epic-video-BQtjG_Y0.js} +2 -2
  30. package/build/client/assets/{epic-video-DRZssA4U.js.map → epic-video-BQtjG_Y0.js.map} +1 -1
  31. package/build/client/assets/{error-boundary-De7jJlR5.js → error-boundary-CAu3AmhN.js} +2 -2
  32. package/build/client/assets/{error-boundary-De7jJlR5.js.map → error-boundary-CAu3AmhN.js.map} +1 -1
  33. package/build/client/assets/{finished-6JNE1a1E.js → finished-9PhQncNF.js} +2 -2
  34. package/build/client/assets/{finished-6JNE1a1E.js.map → finished-9PhQncNF.js.map} +1 -1
  35. package/build/client/assets/index-BncqUVfr.js +39 -0
  36. package/build/client/assets/index-BncqUVfr.js.map +1 -0
  37. package/build/client/assets/{index-BZWIdOoA.js → index-CMYl882D.js} +2 -2
  38. package/build/client/assets/{index-BZWIdOoA.js.map → index-CMYl882D.js.map} +1 -1
  39. package/build/client/assets/index-CSGHuBiw.js +5 -0
  40. package/build/client/assets/index-CSGHuBiw.js.map +1 -0
  41. package/build/client/assets/{index-Cnxrq9Ny.js → index-CYZfnGWa.js} +2 -2
  42. package/build/client/assets/{index-Cnxrq9Ny.js.map → index-CYZfnGWa.js.map} +1 -1
  43. package/build/client/assets/index-mZJ8sz9i.js +2 -0
  44. package/build/client/assets/{index-M647UyZv.js.map → index-mZJ8sz9i.js.map} +1 -1
  45. package/build/client/assets/{index-CyFsiCNp.js → index-qo6WmPUa.js} +2 -2
  46. package/build/client/assets/{index-CyFsiCNp.js.map → index-qo6WmPUa.js.map} +1 -1
  47. package/build/client/assets/{loading-ClL22bF9.js → loading-CPEkK5hO.js} +2 -2
  48. package/build/client/assets/{loading-ClL22bF9.js.map → loading-CPEkK5hO.js.map} +1 -1
  49. package/build/client/assets/{login-C3I5NCrj.js → login-C9JmYc0v.js} +2 -2
  50. package/build/client/assets/{login-C3I5NCrj.js.map → login-C9JmYc0v.js.map} +1 -1
  51. package/build/client/assets/{manifest-6206f67a.js → manifest-4acdd3e2.js} +1 -1
  52. package/build/client/assets/{mdx-Z4bEoKXn.js → mdx-CnaWQCDw.js} +2 -2
  53. package/build/client/assets/{mdx-Z4bEoKXn.js.map → mdx-CnaWQCDw.js.map} +1 -1
  54. package/build/client/assets/{misc-BK2EiKtY.js → misc-CQmANiHr.js} +2 -2
  55. package/build/client/assets/{misc-BK2EiKtY.js.map → misc-CQmANiHr.js.map} +1 -1
  56. package/build/client/assets/{nav-chevrons-DVD_0i2a.js → nav-chevrons-DCuva9-Q.js} +2 -2
  57. package/build/client/assets/{nav-chevrons-DVD_0i2a.js.map → nav-chevrons-DCuva9-Q.js.map} +1 -1
  58. package/build/client/assets/{onboarding-DjyKxkKx.js → onboarding-DzfDHJg_.js} +2 -2
  59. package/build/client/assets/{onboarding-DjyKxkKx.js.map → onboarding-DzfDHJg_.js.map} +1 -1
  60. package/build/client/assets/{online-CHlOuJG-.js → online-BsTX44az.js} +2 -2
  61. package/build/client/assets/{online-CHlOuJG-.js.map → online-BsTX44az.js.map} +1 -1
  62. package/build/client/assets/{preferences-BmwlU5EC.js → preferences-BYBJKp8k.js} +2 -2
  63. package/build/client/assets/{preferences-BmwlU5EC.js.map → preferences-BYBJKp8k.js.map} +1 -1
  64. package/build/client/assets/{presence-CPOTHCHm.js → presence-D5UF-NOM.js} +2 -2
  65. package/build/client/assets/{presence-CPOTHCHm.js.map → presence-D5UF-NOM.js.map} +1 -1
  66. package/build/client/assets/{preview-B2BxDDhi.js → preview-DaTpH6lj.js} +2 -2
  67. package/build/client/assets/{preview-B2BxDDhi.js.map → preview-DaTpH6lj.js.map} +1 -1
  68. package/build/client/assets/{product-BkDgAOLQ.js → product-BKhLQKd7.js} +2 -2
  69. package/build/client/assets/{product-BkDgAOLQ.js.map → product-BKhLQKd7.js.map} +1 -1
  70. package/build/client/assets/{progress-CnHFlUmF.js → progress-DwE8EkAa.js} +2 -2
  71. package/build/client/assets/{progress-CnHFlUmF.js.map → progress-DwE8EkAa.js.map} +1 -1
  72. package/build/client/assets/{progress-bar-Q9l2dtTg.js → progress-bar-ZCHf2Y4W.js} +2 -2
  73. package/build/client/assets/{progress-bar-Q9l2dtTg.js.map → progress-bar-ZCHf2Y4W.js.map} +1 -1
  74. package/build/client/assets/{revalidation-ws-CLolY6Iu.js → revalidation-ws-BoJZTvOQ.js} +2 -2
  75. package/build/client/assets/{revalidation-ws-CLolY6Iu.js.map → revalidation-ws-BoJZTvOQ.js.map} +1 -1
  76. package/build/client/assets/{root-B7xuuOHl.js → root-4MvCzrFd.js} +3 -3
  77. package/build/client/assets/root-4MvCzrFd.js.map +1 -0
  78. package/build/client/assets/{set-playground-ZcPraYj5.js → set-playground-IUJCGVu2.js} +2 -2
  79. package/build/client/assets/{set-playground-ZcPraYj5.js.map → set-playground-IUJCGVu2.js.map} +1 -1
  80. package/build/client/assets/test-B8jDo0X4.js +2 -0
  81. package/build/client/assets/{test-Bt9AuCey.js.map → test-B8jDo0X4.js.map} +1 -1
  82. package/build/client/assets/{tests-CmjMQrMj.js → tests-y-atkhWB.js} +2 -2
  83. package/build/client/assets/{tests-CmjMQrMj.js.map → tests-y-atkhWB.js.map} +1 -1
  84. package/build/client/assets/tooltip-Cd0yJoQb.js +2 -0
  85. package/build/client/assets/tooltip-Cd0yJoQb.js.map +1 -0
  86. package/build/server/index.js +6 -4
  87. package/build/server/index.js.map +1 -1
  88. package/package.json +3 -3
  89. package/build/client/assets/_layout-DKC1JUTc.js +0 -2
  90. package/build/client/assets/_layout-DKC1JUTc.js.map +0 -1
  91. package/build/client/assets/_layout-DuDUPWax.js +0 -6
  92. package/build/client/assets/_layout-DuDUPWax.js.map +0 -1
  93. package/build/client/assets/accordion-BPyhq471.js +0 -2
  94. package/build/client/assets/accordion-BPyhq471.js.map +0 -1
  95. package/build/client/assets/app-XHqxOZfy.js +0 -2
  96. package/build/client/assets/diff-DVOUmaq6.js +0 -2
  97. package/build/client/assets/discord-CFZUT74L.js +0 -2
  98. package/build/client/assets/discord-CFZUT74L.js.map +0 -1
  99. package/build/client/assets/index-6Hu4Lmzn.js +0 -2
  100. package/build/client/assets/index-6Hu4Lmzn.js.map +0 -1
  101. package/build/client/assets/index-BE3KRz8n.js +0 -42
  102. package/build/client/assets/index-BE3KRz8n.js.map +0 -1
  103. package/build/client/assets/index-M647UyZv.js +0 -2
  104. package/build/client/assets/root-B7xuuOHl.js.map +0 -1
  105. package/build/client/assets/test-Bt9AuCey.js +0 -2
  106. package/build/client/assets/tooltip-leWCE50J.js +0 -2
  107. package/build/client/assets/tooltip-leWCE50J.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{r as l,j as t,e as xe}from"./index-CGzylDPY.js";import{h as pe,u as G,n as ve,P,f as N,e as K,d as he,g as ge,S as je}from"./tooltip-leWCE50J.js";import{f as be,u as B}from"./index-6Hu4Lmzn.js";import{u as $,I as E,c as we}from"./misc-BK2EiKtY.js";import{D as Ne}from"./diff-C7Zh3uuA.js";import{G as ye}from"./error-boundary-De7jJlR5.js";import{L as Ce}from"./loading-ClL22bF9.js";import{D as Te,u as Pe}from"./discord-CoBo5eVK.js";import{u as Ee}from"./online-CHlOuJG-.js";import{u as V,A as Ie,L as H,e as Se}from"./components-DrvY4pal.js";import{J as De}from"./index-CB8bjE90.js";import{S as Re}from"./set-playground-ZcPraYj5.js";import{P as Fe,a as _e}from"./tests-CmjMQrMj.js";import{P as F}from"./preview-B2BxDDhi.js";import"./index-BE3KRz8n.js";import"./accordion-BPyhq471.js";import"./mdx-Z4bEoKXn.js";import"./epic-video-DRZssA4U.js";import"./index-BZWIdOoA.js";import"./pe-DXT2FOp1.js";import"./user-C0j04V55.js";import"./workshop-config-oL_FWDKq.js";import"./progress-bar-Q9l2dtTg.js";import"./revalidation-ws-CLolY6Iu.js";import"./use-event-source-AZJtQsFX.js";import"./button-DVPKzWkn.js";function Ae(e,s=[]){let r=[];function n(c,o){const u=l.createContext(o),x=r.length;r=[...r,o];function f(d){const{scope:p,children:w,...m}=d,g=(p==null?void 0:p[e][x])||u,i=l.useMemo(()=>m,Object.values(m));return t.jsx(g.Provider,{value:i,children:w})}function v(d,p){const w=(p==null?void 0:p[e][x])||u,m=l.useContext(w);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${c}\``)}return f.displayName=c+"Provider",[f,v]}const a=()=>{const c=r.map(o=>l.createContext(o));return function(u){const x=(u==null?void 0:u[e])||c;return l.useMemo(()=>({[`__scope${e}`]:{...u,[e]:x}}),[u,x])}};return a.scopeName=e,[n,ke(a,...s)]}function ke(...e){const s=e[0];if(e.length===1)return s;const r=()=>{const n=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(c){const o=n.reduce((u,{useScope:x,scopeName:f})=>{const d=x(c)[`__scope${f}`];return{...u,...d}},{});return l.useMemo(()=>({[`__scope${s.scopeName}`]:o}),[o])}};return r.scopeName=s.scopeName,r}var R="rovingFocusGroup.onEntryFocus",Le={bubbles:!1,cancelable:!0},I="RovingFocusGroup",[_,z,Me]=be(I),[Ue,Y]=Ae(I,[Me]),[Oe,Ge]=Ue(I),W=l.forwardRef((e,s)=>t.jsx(_.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(_.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Ke,{...e,ref:s})})}));W.displayName=I;var Ke=l.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:c,currentTabStopId:o,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:x,onEntryFocus:f,preventScrollOnEntryFocus:v=!1,...d}=e,p=l.useRef(null),w=pe(s,p),m=B(c),[g=null,i]=G({prop:o,defaultProp:u,onChange:x}),[h,b]=l.useState(!1),C=ve(f),le=z(r),S=l.useRef(!1),[ce,M]=l.useState(0);return l.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(R,C),()=>j.removeEventListener(R,C)},[C]),t.jsx(Oe,{scope:r,orientation:n,dir:m,loop:a,currentTabStopId:g,onItemFocus:l.useCallback(j=>i(j),[i]),onItemShiftTab:l.useCallback(()=>b(!0),[]),onFocusableItemAdd:l.useCallback(()=>M(j=>j+1),[]),onFocusableItemRemove:l.useCallback(()=>M(j=>j-1),[]),children:t.jsx(P.div,{tabIndex:h||ce===0?-1:0,"data-orientation":n,...d,ref:w,style:{outline:"none",...e.style},onMouseDown:N(e.onMouseDown,()=>{S.current=!0}),onFocus:N(e.onFocus,j=>{const ue=!S.current;if(j.target===j.currentTarget&&ue&&!h){const U=new CustomEvent(R,Le);if(j.currentTarget.dispatchEvent(U),!U.defaultPrevented){const D=le().filter(y=>y.focusable),de=D.find(y=>y.active),fe=D.find(y=>y.id===g),me=[de,fe,...D].filter(Boolean).map(y=>y.ref.current);Q(me,v)}}S.current=!1}),onBlur:N(e.onBlur,()=>b(!1))})})}),J="RovingFocusGroupItem",q=l.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:c,...o}=e,u=K(),x=c||u,f=Ge(J,r),v=f.currentTabStopId===x,d=z(r),{onFocusableItemAdd:p,onFocusableItemRemove:w}=f;return l.useEffect(()=>{if(n)return p(),()=>w()},[n,p,w]),t.jsx(_.ItemSlot,{scope:r,id:x,focusable:n,active:a,children:t.jsx(P.span,{tabIndex:v?0:-1,"data-orientation":f.orientation,...o,ref:s,onMouseDown:N(e.onMouseDown,m=>{n?f.onItemFocus(x):m.preventDefault()}),onFocus:N(e.onFocus,()=>f.onItemFocus(x)),onKeyDown:N(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){f.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const g=Ve(m,f.orientation,f.dir);if(g!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let h=d().filter(b=>b.focusable).map(b=>b.ref.current);if(g==="last")h.reverse();else if(g==="prev"||g==="next"){g==="prev"&&h.reverse();const b=h.indexOf(m.currentTarget);h=f.loop?He(h,b+1):h.slice(b+1)}setTimeout(()=>Q(h))}})})})});q.displayName=J;var Be={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $e(e,s){return s!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ve(e,s,r){const n=$e(e.key,r);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Be[n]}function Q(e,s=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:s}),document.activeElement!==r))return}function He(e,s){return e.map((r,n)=>e[(s+n)%e.length])}var ze=W,Ye=q,k="Tabs",[We,Ft]=he(k,[Y]),X=Y(),[Je,L]=We(k),Z=l.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:c,orientation:o="horizontal",dir:u,activationMode:x="automatic",...f}=e,v=B(u),[d,p]=G({prop:n,onChange:a,defaultProp:c});return t.jsx(Je,{scope:r,baseId:K(),value:d,onValueChange:p,orientation:o,dir:v,activationMode:x,children:t.jsx(P.div,{dir:v,"data-orientation":o,...f,ref:s})})});Z.displayName=k;var ee="TabsList",te=l.forwardRef((e,s)=>{const{__scopeTabs:r,loop:n=!0,...a}=e,c=L(ee,r),o=X(r);return t.jsx(ze,{asChild:!0,...o,orientation:c.orientation,dir:c.dir,loop:n,children:t.jsx(P.div,{role:"tablist","aria-orientation":c.orientation,...a,ref:s})})});te.displayName=ee;var re="TabsTrigger",se=l.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...c}=e,o=L(re,r),u=X(r),x=ae(o.baseId,n),f=ie(o.baseId,n),v=n===o.value;return t.jsx(Ye,{asChild:!0,...u,focusable:!a,active:v,children:t.jsx(P.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":f,"data-state":v?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:x,...c,ref:s,onMouseDown:N(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?o.onValueChange(n):d.preventDefault()}),onKeyDown:N(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(n)}),onFocus:N(e.onFocus,()=>{const d=o.activationMode!=="manual";!v&&!a&&d&&o.onValueChange(n)})})})});se.displayName=re;var ne="TabsContent",oe=l.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,forceMount:a,children:c,...o}=e,u=L(ne,r),x=ae(u.baseId,n),f=ie(u.baseId,n),v=n===u.value,d=l.useRef(v);return l.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),t.jsx(ge,{present:a||v,children:({present:p})=>t.jsx(P.div,{"data-state":v?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":x,hidden:!p,id:f,tabIndex:0,...o,ref:s,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&c})})});oe.displayName=ne;function ae(e,s){return`${e}-trigger-${s}`}function ie(e,s){return`${e}-content-${s}`}var qe=Z,Qe=te,Xe=se,T=oe;function Ze(){return t.jsxs("div",{className:"flex h-full w-full flex-col gap-4 pt-4",children:[t.jsx("div",{className:"text-center",children:t.jsx(Te,{})}),t.jsx("div",{className:"flex-1 overflow-y-scroll bg-accent pb-4 scrollbar-thin scrollbar-thumb-scrollbar",children:t.jsx(et,{})})]})}function et(){const e=V(),s=Pe(),r=$();return Ee()?t.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[t.jsx(l.Suspense,{fallback:t.jsx("div",{className:"flex h-full w-full flex-col items-center justify-center",children:t.jsx(Ce,{children:"Loading Discord Posts"})}),children:t.jsx(Ie,{resolve:e.discordPostsPromise,errorElement:t.jsx("div",{className:"text-red-500",children:"There was a problem loading the discord posts"}),children:a=>t.jsx("ul",{className:"flex w-full flex-col gap-4 p-3 xl:p-12",children:a.map(c=>t.jsx("li",{className:"rounded-xl border bg-background transition-all duration-200 focus-within:-translate-y-1 focus-within:shadow-lg hover:-translate-y-1 hover:shadow-lg",children:t.jsx(tt,{thread:c})},c.id))})})}),t.jsx("div",{children:t.jsxs(H,{to:r&&!s.includes("oauth")?s.replace(/^https/,"discord"):s,target:s.includes("oauth")?void 0:"_blank",rel:"noreferrer noopener",onClick:r?a=>{a.preventDefault(),window.open(a.currentTarget.href,"_blank","noreferrer noopener")}:void 0,className:"flex items-center gap-2 p-2 text-xl hover:underline",children:["Create Post ",t.jsx(E,{name:"ExternalLink"})]})})]}):t.jsx("div",{className:"flex h-full flex-col items-center justify-between",children:t.jsx("div",{className:"text-foreground-destructive flex h-full w-full flex-col items-center justify-center",children:t.jsx(E,{name:"WifiNoConnection",size:"xl",children:"Unable to load discord messages when offline"})})})}function tt({thread:e}){const s=e.reactions.filter(r=>r.count);return t.jsx("div",{children:t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[e.tags.length?t.jsx("div",{className:"flex gap-2",children:e.tags.map(r=>t.jsxs("div",{className:"flex items-center justify-center gap-1 rounded-full bg-accent px-2 py-1 text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(O,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.name})]},r.name))}):null,t.jsx("strong",{className:"text-xl font-bold",children:e.name}),t.jsxs("div",{className:"flex items-start gap-1",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[e.authorAvatarUrl?t.jsx("img",{src:e.authorAvatarUrl,alt:"",className:"h-6 w-6 rounded-full"}):null,t.jsxs("span",{children:[t.jsx("span",{className:"font-bold",style:e.authorHexAccentColor?{color:e.authorHexAccentColor}:{},children:e.authorDisplayName}),":"," "]})]}),t.jsx("span",{className:"flex-1 overflow-ellipsis text-muted-foreground",children:e.messagePreview})]})]}),e.previewImageUrl?t.jsx("img",{src:e.previewImageUrl,alt:"",className:"h-28 w-28 rounded-lg object-cover"}):null]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{children:s.length?t.jsx("ul",{className:"flex items-center gap-2",children:s.map((r,n)=>t.jsxs("li",{className:"flex items-center gap-1 rounded-md border border-blue-600 bg-blue-500/20 px-[5px] py-[0.5px] text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(O,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.count})]},n))}):null}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(E,{name:"Chat"})," ",e.messageCount]}),` · ${e.lastUpdatedDisplay}`]})]}),t.jsxs("span",{className:"flex items-center gap-4",children:[t.jsx("a",{href:e.link.replace(/^https/,"discord"),children:t.jsx(E,{name:"Discord"})}),t.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer noopener",children:t.jsx(E,{name:"ExternalLink"})})]})]})]})})}function O({name:e,url:s}){return s?t.jsx("img",{src:s,alt:e,className:"h-full w-full"}):e||null}function rt({appInfo:e,inBrowserBrowserRef:s,problemAppName:r,allApps:n,isUpToDate:a}){return t.jsx(Fe,{playgroundAppName:e==null?void 0:e.appName,problemAppName:r,allApps:n,isUpToDate:a,children:(e==null?void 0:e.dev.type)==="none"?t.jsxs("div",{children:[t.jsx("div",{className:"text-foreground-secondary flex h-full items-center justify-center text-2xl",children:"Non-UI playground"}),t.jsx("div",{children:t.jsxs("div",{className:"text-foreground-secondary flex flex-wrap gap-1 text-center",children:["Navigate to"," ",t.jsx(je,{content:e.fullPath,children:t.jsx("span",{className:"underline",onClick:()=>{navigator.clipboard.writeText(e.fullPath),De.success("Copied playground path to clipboard")},children:"the playground directory"})})," ","in your editor and terminal to work on this exercise!"]})})]}):e?t.jsx(F,{id:e.appName,appInfo:e,inBrowserBrowserRef:s}):t.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[t.jsx("p",{children:"Please set the playground first"}),r?t.jsx(Re,{appName:r}):null]})})}const A=["playground","problem","solution","tests","diff","chat"],st=e=>!!(e&&A.includes(e));function nt(e,s,r){const n=new URLSearchParams(e);return r===null?n.delete(s):n.set(s,r),n}function _t(){var v,d,p,w,m,g;const e=V(),[s]=Se(),r=s.get("preview"),n=l.useRef(null),a=$(),c=xe();function o(i){var h,b,C;if(i==="tests")return ENV.EPICSHOP_DEPLOYED||!e.playground||e.playground.test.type==="none";if(i==="problem"||i==="solution"){if(((h=e[i])==null?void 0:h.dev.type)==="none")return!0;if(ENV.EPICSHOP_DEPLOYED)return((b=e[i])==null?void 0:b.dev.type)!=="browser"&&!((C=e[i])!=null&&C.stackBlitzUrl)}return!!(i==="playground"&&ENV.EPICSHOP_DEPLOYED)}const u=st(r)?r:A.find(i=>!o(i)),x=`/diff?${new URLSearchParams({app1:((v=e.problem)==null?void 0:v.name)??"",app2:((d=e.solution)==null?void 0:d.name)??""})}`;function f(i){i.altKey&&!i.ctrlKey&&!i.shiftKey&&!i.metaKey&&(i.preventDefault(),c(x))}return t.jsxs(qe,{className:"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1",value:u,children:[t.jsx(Qe,{className:"h-14 min-h-14 overflow-x-hidden border-b scrollbar-thin scrollbar-thumb-scrollbar",children:A.map(i=>{const h=o(i);return t.jsx(Xe,{value:i,hidden:h,asChild:!0,children:t.jsx(H,{id:`${i}-tab`,className:we("clip-path-button relative h-full px-6 py-4 font-mono text-sm uppercase outline-none radix-state-active:z-10 radix-state-active:bg-foreground radix-state-active:text-background radix-state-active:hover:bg-foreground/80 radix-state-active:hover:text-background/80 radix-state-inactive:hover:bg-foreground/20 radix-state-inactive:hover:text-foreground/80 focus:bg-foreground/80 focus:text-background/80",h?"hidden":"inline-block"),preventScrollReset:!0,prefetch:"intent",onClick:f,to:i==="diff"&&a?x:`?${nt(s,"preview",i==="playground"?null:i)}`,children:i})},i)})}),t.jsxs("div",{className:"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto",children:[t.jsx(T,{value:"playground",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(rt,{appInfo:e.playground,problemAppName:(p=e.problem)==null?void 0:p.name,inBrowserBrowserRef:n,allApps:e.allApps,isUpToDate:((w=e.playground)==null?void 0:w.isUpToDate)??!1})}),t.jsx(T,{value:"problem",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(F,{appInfo:e.problem,inBrowserBrowserRef:n})}),t.jsx(T,{value:"solution",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(F,{appInfo:e.solution,inBrowserBrowserRef:n})}),t.jsx(T,{value:"tests",className:"flex w-full flex-grow items-start justify-center self-start overflow-hidden radix-state-inactive:hidden",children:t.jsx(_e,{appInfo:e.playground,problemAppName:(m=e.problem)==null?void 0:m.name,allApps:e.allApps,isUpToDate:((g=e.playground)==null?void 0:g.isUpToDate)??!1})}),t.jsx(T,{value:"diff",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Ne,{diff:e.diff,allApps:e.allApps})}),t.jsx(T,{value:"chat",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Ze,{})})]})]})}function At(){return t.jsx(ye,{statusHandlers:{404:()=>t.jsx("p",{children:"Sorry, we couldn't find an app here."})}})}export{At as ErrorBoundary,_t as default};
2
- //# sourceMappingURL=index-M647UyZv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root-B7xuuOHl.js","sources":["../../../../../node_modules/@remix-run/react/dist/esm/scroll-restoration.js","../../../../../node_modules/tween-functions/index.js","../../../../../node_modules/confetti-react/dist/confetti-react.esm.js","../../../../../node_modules/remix-utils/build/react/client-only.js","../../../app/components/confetti.tsx","../../../app/components/toaster.tsx","../../../app/routes/admin+/notifications.tsx","../../../app/routes/admin+/update-repo.tsx","../../../app/styles/app.css?url","../../../app/styles/tailwind.css?url","../../../app/root.tsx"],"sourcesContent":["/**\n * @remix-run/react v2.12.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';\nimport * as React from 'react';\nimport { useLocation, useMatches, UNSAFE_useScrollRestoration } from 'react-router-dom';\nimport { useRemixContext } from './components.js';\n\nlet STORAGE_KEY = \"positions\";\n\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n *\n * @see https://remix.run/components/scroll-restoration\n */\nfunction ScrollRestoration({\n getKey,\n ...props\n}) {\n let {\n isSpaMode\n } = useRemixContext();\n let location = useLocation();\n let matches = useMatches();\n UNSAFE_useScrollRestoration({\n getKey,\n storageKey: STORAGE_KEY\n });\n\n // In order to support `getKey`, we need to compute a \"key\" here so we can\n // hydrate that up so that SSR scroll restoration isn't waiting on React to\n // hydrate. *However*, our key on the server is not the same as our key on\n // the client! So if the user's getKey implementation returns the SSR\n // location key, then let's ignore it and let our inline <script> below pick\n // up the client side history state key\n let key = React.useMemo(() => {\n if (!getKey) return null;\n let userKey = getKey(location, matches);\n return userKey !== location.key ? userKey : null;\n },\n // Nah, we only need this the first time for the SSR render\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n\n // In SPA Mode, there's nothing to restore on initial render since we didn't\n // render anything on the server\n if (isSpaMode) {\n return null;\n }\n let restoreScroll = ((STORAGE_KEY, restoreKey) => {\n if (!window.history.state || !window.history.state.key) {\n let key = Math.random().toString(32).slice(2);\n window.history.replaceState({\n key\n }, \"\");\n }\n try {\n let positions = JSON.parse(sessionStorage.getItem(STORAGE_KEY) || \"{}\");\n let storedY = positions[restoreKey || window.history.state.key];\n if (typeof storedY === \"number\") {\n window.scrollTo(0, storedY);\n }\n } catch (error) {\n console.error(error);\n sessionStorage.removeItem(STORAGE_KEY);\n }\n }).toString();\n return /*#__PURE__*/React.createElement(\"script\", _extends({}, props, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `(${restoreScroll})(${JSON.stringify(STORAGE_KEY)}, ${JSON.stringify(key)})`\n }\n }));\n}\n\nexport { ScrollRestoration };\n","'use strict';\n\n// t: current time, b: beginning value, _c: final value, d: total duration\nvar tweenFunctions = {\n linear: function(t, b, _c, d) {\n var c = _c - b;\n return c * t / d + b;\n },\n easeInQuad: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t + b;\n },\n easeOutQuad: function(t, b, _c, d) {\n var c = _c - b;\n return -c * (t /= d) * (t - 2) + b;\n },\n easeInOutQuad: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t + b;\n } else {\n return -c / 2 * ((--t) * (t - 2) - 1) + b;\n }\n },\n easeInCubic: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t + b;\n },\n easeOutCubic: function(t, b, _c, d) {\n var c = _c - b;\n return c * ((t = t / d - 1) * t * t + 1) + b;\n },\n easeInOutCubic: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t + 2) + b;\n }\n },\n easeInQuart: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t * t + b;\n },\n easeOutQuart: function(t, b, _c, d) {\n var c = _c - b;\n return -c * ((t = t / d - 1) * t * t * t - 1) + b;\n },\n easeInOutQuart: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t + b;\n } else {\n return -c / 2 * ((t -= 2) * t * t * t - 2) + b;\n }\n },\n easeInQuint: function(t, b, _c, d) {\n var c = _c - b;\n return c * (t /= d) * t * t * t * t + b;\n },\n easeOutQuint: function(t, b, _c, d) {\n var c = _c - b;\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n easeInOutQuint: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return c / 2 * t * t * t * t * t + b;\n } else {\n return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;\n }\n },\n easeInSine: function(t, b, _c, d) {\n var c = _c - b;\n return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;\n },\n easeOutSine: function(t, b, _c, d) {\n var c = _c - b;\n return c * Math.sin(t / d * (Math.PI / 2)) + b;\n },\n easeInOutSine: function(t, b, _c, d) {\n var c = _c - b;\n return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;\n },\n easeInExpo: function(t, b, _c, d) {\n var c = _c - b;\n return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;\n },\n easeOutExpo: function(t, b, _c, d) {\n var c = _c - b;\n return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;\n },\n easeInOutExpo: function(t, b, _c, d) {\n var c = _c - b;\n if (t === 0) {\n return b;\n }\n if (t === d) {\n return b + c;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * Math.pow(2, 10 * (t - 1)) + b;\n } else {\n return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;\n }\n },\n easeInCirc: function(t, b, _c, d) {\n var c = _c - b;\n return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;\n },\n easeOutCirc: function(t, b, _c, d) {\n var c = _c - b;\n return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;\n },\n easeInOutCirc: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d / 2) < 1) {\n return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;\n } else {\n return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;\n }\n },\n easeInElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n },\n easeOutElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;\n },\n easeInOutElastic: function(t, b, _c, d) {\n var c = _c - b;\n var a, p, s;\n s = 1.70158;\n p = 0;\n a = c;\n if (t === 0) {\n return b;\n } else if ((t /= d / 2) === 2) {\n return b + c;\n }\n if (!p) {\n p = d * (0.3 * 1.5);\n }\n if (a < Math.abs(c)) {\n a = c;\n s = p / 4;\n } else {\n s = p / (2 * Math.PI) * Math.asin(c / a);\n }\n if (t < 1) {\n return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;\n } else {\n return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * 0.5 + c + b;\n }\n },\n easeInBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n easeOutBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n easeInOutBack: function(t, b, _c, d, s) {\n var c = _c - b;\n if (s === void 0) {\n s = 1.70158;\n }\n if ((t /= d / 2) < 1) {\n return c / 2 * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n } else {\n return c / 2 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n }\n },\n easeInBounce: function(t, b, _c, d) {\n var c = _c - b;\n var v;\n v = tweenFunctions.easeOutBounce(d - t, 0, c, d);\n return c - v + b;\n },\n easeOutBounce: function(t, b, _c, d) {\n var c = _c - b;\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n } else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n } else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n } else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n }\n },\n easeInOutBounce: function(t, b, _c, d) {\n var c = _c - b;\n var v;\n if (t < d / 2) {\n v = tweenFunctions.easeInBounce(t * 2, 0, c, d);\n return v * 0.5 + b;\n } else {\n v = tweenFunctions.easeOutBounce(t * 2 - d, 0, c, d);\n return v * 0.5 + c * 0.5 + b;\n }\n }\n};\n\nmodule.exports = tweenFunctions;\n","import React, { Component } from 'react';\nimport tweens from 'tween-functions';\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n\n _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction degreesToRads(degrees) {\n return degrees * Math.PI / 180;\n}\nfunction randomRange(min, max) {\n return min + Math.random() * (max - min);\n}\nfunction randomInt(min, max) {\n return Math.floor(min + Math.random() * (max - min + 1));\n}\n\nvar ParticleShape;\n\n(function (ParticleShape) {\n ParticleShape[ParticleShape[\"Circle\"] = 0] = \"Circle\";\n ParticleShape[ParticleShape[\"Square\"] = 1] = \"Square\";\n ParticleShape[ParticleShape[\"Strip\"] = 2] = \"Strip\";\n})(ParticleShape || (ParticleShape = {}));\n\nvar RotationDirection;\n\n(function (RotationDirection) {\n RotationDirection[RotationDirection[\"Positive\"] = 1] = \"Positive\";\n RotationDirection[RotationDirection[\"Negative\"] = -1] = \"Negative\";\n})(RotationDirection || (RotationDirection = {}));\n\nvar Particle = /*#__PURE__*/function () {\n function Particle(context, getOptions, x, y) {\n this.getOptions = getOptions;\n\n var _this$getOptions = this.getOptions(),\n colors = _this$getOptions.colors,\n initialVelocityX = _this$getOptions.initialVelocityX,\n initialVelocityY = _this$getOptions.initialVelocityY;\n\n this.context = context;\n this.x = x;\n this.y = y;\n this.w = randomRange(5, 20);\n this.h = randomRange(5, 20);\n this.radius = randomRange(5, 10);\n this.vx = randomRange(-initialVelocityX, initialVelocityX);\n this.vy = randomRange(-initialVelocityY, 0);\n this.shape = randomInt(0, 2);\n this.angle = degreesToRads(randomRange(0, 360));\n this.angularSpin = randomRange(-0.2, 0.2);\n this.color = colors[Math.floor(Math.random() * colors.length)];\n this.rotateY = randomRange(0, 1);\n this.rotationDirection = randomRange(0, 1) ? RotationDirection.Positive : RotationDirection.Negative;\n }\n\n var _proto = Particle.prototype;\n\n _proto.update = function update() {\n var _this$getOptions2 = this.getOptions(),\n gravity = _this$getOptions2.gravity,\n wind = _this$getOptions2.wind,\n friction = _this$getOptions2.friction,\n opacity = _this$getOptions2.opacity,\n drawShape = _this$getOptions2.drawShape;\n\n this.x += this.vx;\n this.y += this.vy;\n this.vy += gravity;\n this.vx += wind;\n this.vx *= friction;\n this.vy *= friction;\n\n if (this.rotateY >= 1 && this.rotationDirection === RotationDirection.Positive) {\n this.rotationDirection = RotationDirection.Negative;\n } else if (this.rotateY <= -1 && this.rotationDirection === RotationDirection.Negative) {\n this.rotationDirection = RotationDirection.Positive;\n }\n\n var rotateDelta = 0.1 * this.rotationDirection;\n this.rotateY += rotateDelta;\n this.angle += this.angularSpin;\n this.context.save();\n this.context.translate(this.x, this.y);\n this.context.rotate(this.angle);\n this.context.scale(1, this.rotateY);\n this.context.rotate(this.angle);\n this.context.beginPath();\n this.context.fillStyle = this.color;\n this.context.strokeStyle = this.color;\n this.context.globalAlpha = opacity;\n this.context.lineCap = 'round';\n this.context.lineWidth = 2;\n\n if (drawShape && typeof drawShape === 'function') {\n drawShape.call(this, this.context);\n } else {\n switch (this.shape) {\n case ParticleShape.Circle:\n {\n this.context.beginPath();\n this.context.arc(0, 0, this.radius, 0, 2 * Math.PI);\n this.context.fill();\n break;\n }\n\n case ParticleShape.Square:\n {\n this.context.fillRect(-this.w / 2, -this.h / 2, this.w, this.h);\n break;\n }\n\n case ParticleShape.Strip:\n {\n this.context.fillRect(-this.w / 6, -this.h / 2, this.w / 3, this.h);\n break;\n }\n\n default:\n {\n throw new Error('Unknown type in Particle.ts');\n }\n }\n }\n\n this.context.closePath();\n this.context.restore();\n };\n\n return Particle;\n}();\n\nvar ParticleGeneratorClass = function ParticleGeneratorClass(canvas, getOptions) {\n var _this = this;\n\n this.x = 0;\n this.y = 0;\n this.w = 0;\n this.h = 0;\n this.lastNumberOfPieces = 0;\n this.tweenInitTime = Date.now();\n this.particles = [];\n this.particlesGenerated = 0;\n\n this.removeParticleAt = function (i) {\n _this.particles.splice(i, 1);\n };\n\n this.getParticle = function () {\n var newParticleX = randomRange(_this.x, _this.w + _this.x);\n var newParticleY = randomRange(_this.y, _this.h + _this.y);\n return new Particle(_this.context, _this.getOptions, newParticleX, newParticleY);\n };\n\n this.animate = function () {\n var canvas = _this.canvas,\n context = _this.context,\n particlesGenerated = _this.particlesGenerated,\n lastNumberOfPieces = _this.lastNumberOfPieces;\n\n var _this$getOptions = _this.getOptions(),\n run = _this$getOptions.run,\n recycle = _this$getOptions.recycle,\n numberOfPieces = _this$getOptions.numberOfPieces,\n debug = _this$getOptions.debug,\n tweenFunction = _this$getOptions.tweenFunction,\n tweenDuration = _this$getOptions.tweenDuration;\n\n if (!run) {\n return false;\n }\n\n var nP = _this.particles.length;\n var activeCount = recycle ? nP : particlesGenerated;\n var now = Date.now(); // Initial population\n\n if (activeCount < numberOfPieces) {\n // Use the numberOfPieces prop as a key to reset the easing timing\n if (lastNumberOfPieces !== numberOfPieces) {\n _this.tweenInitTime = now;\n _this.lastNumberOfPieces = numberOfPieces;\n }\n\n var tweenInitTime = _this.tweenInitTime; // Add more than one piece per loop, otherwise the number of pieces would\n // be limitted by the RAF framerate\n\n var progressTime = now - tweenInitTime > tweenDuration ? tweenDuration : Math.max(0, now - tweenInitTime);\n var tweenedVal = tweenFunction(progressTime, activeCount, numberOfPieces, tweenDuration);\n var numToAdd = Math.round(tweenedVal - activeCount);\n\n for (var i = 0; i < numToAdd; i += 1) {\n _this.particles.push(_this.getParticle());\n }\n\n _this.particlesGenerated += numToAdd;\n }\n\n if (debug) {\n // Draw debug text\n context.font = '12px sans-serif';\n context.fillStyle = '#333';\n context.textAlign = 'right';\n context.fillText(\"Particles: \" + nP, canvas.width - 10, canvas.height - 20);\n } // Maintain the population\n\n\n _this.particles.forEach(function (p, i) {\n // Update each particle's position\n p.update(); // Prune the off-canvas particles\n\n if (p.y > canvas.height || p.y < -100 || p.x > canvas.width + 100 || p.x < -100) {\n if (recycle && activeCount <= numberOfPieces) {\n // Replace the particle with a brand new one\n _this.particles[i] = _this.getParticle();\n } else {\n _this.removeParticleAt(i);\n }\n }\n });\n\n return nP > 0 || activeCount < numberOfPieces;\n };\n\n this.canvas = canvas;\n var ctx = this.canvas.getContext('2d');\n\n if (!ctx) {\n throw new Error('Could not get canvas context');\n }\n\n this.context = ctx;\n this.getOptions = getOptions;\n};\n\nvar confettiDefaults = {\n width: typeof window !== 'undefined' ? window.innerWidth : 300,\n height: typeof window !== 'undefined' ? window.innerHeight : 200,\n numberOfPieces: 200,\n friction: 0.99,\n wind: 0,\n gravity: 0.1,\n initialVelocityX: 4,\n initialVelocityY: 10,\n colors: ['#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800', '#FF5722', '#795548'],\n opacity: 1.0,\n debug: false,\n tweenFunction: tweens.easeInOutQuad,\n tweenDuration: 5000,\n recycle: true,\n run: true\n};\nvar Confetti = /*#__PURE__*/function () {\n function Confetti(canvas, opts) {\n var _this = this;\n\n this.setOptionsWithDefaults = function (opts) {\n var computedConfettiDefaults = {\n confettiSource: {\n x: 0,\n y: 0,\n w: _this.canvas.width,\n h: 0\n }\n };\n _this._options = _extends({}, computedConfettiDefaults, confettiDefaults, opts);\n Object.assign(_this, opts.confettiSource);\n };\n\n this.update = function () {\n var _this$options = _this.options,\n run = _this$options.run,\n onConfettiComplete = _this$options.onConfettiComplete,\n canvas = _this.canvas,\n context = _this.context;\n\n if (run) {\n context.fillStyle = 'white';\n context.clearRect(0, 0, canvas.width, canvas.height);\n }\n\n if (_this.generator.animate()) {\n _this.rafId = requestAnimationFrame(_this.update);\n } else {\n if (onConfettiComplete && typeof onConfettiComplete === 'function' && _this.generator.particlesGenerated > 0) {\n onConfettiComplete.call(_this, _this);\n }\n\n _this._options.run = false;\n }\n };\n\n this.reset = function () {\n if (_this.generator && _this.generator.particlesGenerated > 0) {\n _this.generator.particlesGenerated = 0;\n _this.generator.particles = [];\n _this.generator.lastNumberOfPieces = 0;\n }\n };\n\n this.stop = function () {\n _this.options = {\n run: false\n };\n\n if (_this.rafId) {\n cancelAnimationFrame(_this.rafId);\n _this.rafId = undefined;\n }\n };\n\n this.canvas = canvas;\n var ctx = this.canvas.getContext('2d');\n\n if (!ctx) {\n throw new Error('Could not get canvas context');\n }\n\n this.context = ctx;\n this.generator = new ParticleGeneratorClass(this.canvas, function () {\n return _this.options;\n });\n this.options = opts;\n this.update();\n }\n\n _createClass(Confetti, [{\n key: \"options\",\n get: function get() {\n return this._options;\n },\n set: function set(opts) {\n var lastRunState = this._options && this._options.run;\n var lastRecycleState = this._options && this._options.recycle;\n this.setOptionsWithDefaults(opts);\n\n if (this.generator) {\n Object.assign(this.generator, this.options.confettiSource);\n\n if (typeof opts.recycle === 'boolean' && opts.recycle && lastRecycleState === false) {\n this.generator.lastNumberOfPieces = this.generator.particles.length;\n }\n }\n\n if (typeof opts.run === 'boolean' && opts.run && lastRunState === false) {\n this.update();\n }\n }\n }]);\n\n return Confetti;\n}();\n\nvar ref = /*#__PURE__*/React.createRef();\n\nfunction extractCanvasProps(props) {\n var confettiOptions = {};\n var refs = {};\n var rest = {};\n var confettiOptionKeys = [].concat(Object.keys(confettiDefaults), ['confettiSource', 'drawShape', 'onConfettiComplete']);\n var refProps = ['canvasRef'];\n Object.keys(props).forEach(function (prop) {\n var val = props[prop];\n\n if (confettiOptionKeys.includes(prop)) {\n confettiOptions[prop] = val;\n } else if (refProps.includes(prop)) {\n refProps[prop] = val;\n } else {\n rest[prop] = val;\n }\n });\n return [confettiOptions, rest, refs];\n}\n\nvar ConfettiReactInternal = /*#__PURE__*/function (_Component) {\n _inheritsLoose(ConfettiReactInternal, _Component);\n\n function ConfettiReactInternal(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.canvas = React.createRef();\n _this.canvas = props.canvasRef || ref;\n return _this;\n }\n\n var _proto = ConfettiReactInternal.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n if (this.canvas.current) {\n var opts = extractCanvasProps(this.props)[0];\n this.confetti = new Confetti(this.canvas.current, opts);\n }\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var confettiOptions = extractCanvasProps(this.props)[0];\n\n if (this.confetti) {\n this.confetti.options = confettiOptions;\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this.confetti) {\n this.confetti.stop();\n }\n\n this.confetti = undefined;\n };\n\n _proto.render = function render() {\n var _extractCanvasProps = extractCanvasProps(this.props),\n confettiOptions = _extractCanvasProps[0],\n passedProps = _extractCanvasProps[1];\n\n var canvasStyles = _extends({\n zIndex: 2,\n position: 'absolute',\n pointerEvents: 'none',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0\n }, passedProps.style);\n\n return React.createElement(\"canvas\", Object.assign({\n width: confettiOptions.width,\n height: confettiOptions.height,\n ref: this.canvas\n }, passedProps, {\n style: canvasStyles\n }));\n };\n\n return ConfettiReactInternal;\n}(Component);\n\nConfettiReactInternal.defaultProps = /*#__PURE__*/_extends({}, confettiDefaults);\nConfettiReactInternal.displayName = 'ConfettiReact'; // eslint-disable-next-line react/display-name\n\nvar Index = /*#__PURE__*/React.forwardRef(function (props, _ref) {\n return React.createElement(ConfettiReactInternal, Object.assign({\n canvasRef: ref\n }, props));\n});\n\nexport default Index;\nexport { Index };\n//# sourceMappingURL=confetti-react.esm.js.map\n","import * as React from \"react\";\nimport { useHydrated } from \"./use-hydrated.js\";\n/**\n * Render the children only after the JS has loaded client-side. Use an optional\n * fallback component if the JS is not yet loaded.\n *\n * Example: Render a Chart component if JS loads, renders a simple FakeChart\n * component server-side or if there is no JS. The FakeChart can have only the\n * UI without the behavior or be a loading spinner or skeleton.\n * ```tsx\n * return (\n * <ClientOnly fallback={<FakeChart />}>\n * {() => <Chart />}\n * </ClientOnly>\n * );\n * ```\n */\nexport function ClientOnly({ children, fallback = null }) {\n return useHydrated() ? React.createElement(React.Fragment, null, children()) : React.createElement(React.Fragment, null, fallback);\n}\n","import { Index as ConfettiShower } from 'confetti-react'\nimport { ClientOnly } from 'remix-utils/client-only'\n\nexport function Confetti({ id }: { id?: string | null }) {\n\tif (!id) return null\n\n\treturn (\n\t\t<ClientOnly>\n\t\t\t{() => (\n\t\t\t\t<ConfettiShower\n\t\t\t\t\tkey={id}\n\t\t\t\t\trun={Boolean(id)}\n\t\t\t\t\trecycle={false}\n\t\t\t\t\tnumberOfPieces={800}\n\t\t\t\t\twidth={window.innerWidth}\n\t\t\t\t\theight={window.innerHeight}\n\t\t\t\t/>\n\t\t\t)}\n\t\t</ClientOnly>\n\t)\n}\n","import { useEffect } from 'react'\nimport { Toaster, toast as showToast } from 'sonner'\nimport { type Toast } from '#app/utils/toast.server.ts'\n\nexport function EpicToaster({ toast }: { toast?: Toast | null }) {\n\treturn (\n\t\t<>\n\t\t\t<Toaster closeButton position=\"top-center\" />\n\t\t\t{toast ? <ShowToast toast={toast} /> : null}\n\t\t</>\n\t)\n}\n\nfunction ShowToast({ toast }: { toast: Toast }) {\n\tconst { id, type, title, description } = toast\n\tuseEffect(() => {\n\t\tsetTimeout(() => {\n\t\t\tshowToast[type](title, { id, description })\n\t\t}, 0)\n\t}, [description, id, title, type])\n\treturn null\n}\n","import { muteNotification } from '@epic-web/workshop-utils/db.server'\nimport { type getUnmutedNotifications } from '@epic-web/workshop-utils/notifications.server'\nimport { json, type ActionFunctionArgs } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { useEffect, useRef } from 'react'\nimport { toast } from 'sonner'\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\tconst id = formData.get('id')\n\tif (typeof id !== 'string') {\n\t\treturn json({ error: 'Invalid notification id' }, { status: 400 })\n\t}\n\tif (intent === 'mute') {\n\t\tawait muteNotification(id)\n\t\treturn json({ success: true })\n\t}\n\treturn json({ error: 'Invalid intent' }, { status: 400 })\n}\n\nexport function Notifications({\n\tunmutedNotifications,\n}: {\n\tunmutedNotifications: Awaited<ReturnType<typeof getUnmutedNotifications>>\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst fetcherRef = useRef(fetcher)\n\tconst toastedIds = useRef<Set<string>>(new Set())\n\n\tuseEffect(() => {\n\t\tfor (const notification of unmutedNotifications) {\n\t\t\tif (toastedIds.current.has(notification.id)) continue\n\t\t\ttoastedIds.current.add(notification.id)\n\n\t\t\ttoast.info(notification.title, {\n\t\t\t\tid: notification.id,\n\t\t\t\tdescription: (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p>{notification.message}</p>\n\t\t\t\t\t\t{notification.link && (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={notification.link}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tclassName=\"text-xs underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tLearn more\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t),\n\t\t\t\tduration: Infinity,\n\t\t\t\taction: {\n\t\t\t\t\tlabel: 'Dismiss',\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\tfetcherRef.current.submit(\n\t\t\t\t\t\t\t{ intent: 'mute', id: notification.id },\n\t\t\t\t\t\t\t{ method: 'post', action: '/admin/notifications' },\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t}, [unmutedNotifications])\n\n\treturn null\n}\n","import { spawn } from 'child_process'\nimport { muteNotification } from '@epic-web/workshop-utils/db.server'\nimport {\n\tcheckForUpdatesCached,\n\tupdateLocalRepo,\n} from '@epic-web/workshop-utils/git.server'\nimport { json } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { useEffect, useRef } from 'react'\nimport { toast } from 'sonner'\n\nexport async function action({ request }: { request: Request }) {\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\tconst id = formData.get('id')\n\n\tif (intent === 'dismiss' && typeof id === 'string') {\n\t\tawait muteNotification(id)\n\t\treturn json({ type: 'dismissed' } as const)\n\t}\n\n\tif (intent === 'update' && typeof id === 'string') {\n\t\tconst updates = await checkForUpdatesCached()\n\t\tif (!updates.updatesAvailable) {\n\t\t\treturn json({ type: 'error', error: 'No updates available' } as const, {\n\t\t\t\tstatus: 400,\n\t\t\t})\n\t\t}\n\n\t\tawait updateLocalRepo()\n\n\t\t// restart the server\n\t\tspawn(process.argv[0]!, process.argv.slice(1), {\n\t\t\tdetached: true,\n\t\t\tstdio: 'inherit',\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\tEPICSHOP_SLOW_START: 'true',\n\t\t\t},\n\t\t})\n\n\t\tsetTimeout(() => {\n\t\t\tconsole.log('exiting the old server process')\n\t\t\tprocess.exit(0)\n\t\t}, 200)\n\n\t\treturn json({ type: 'success' } as const)\n\t}\n\n\tthrow json({ type: 'error', error: 'Invalid intent' } as const, {\n\t\tstatus: 400,\n\t})\n}\n\nexport function UpdateToast({\n\trepoUpdates,\n}: {\n\trepoUpdates: Awaited<ReturnType<typeof checkForUpdatesCached>>\n}) {\n\tconst updateFetcher = useFetcher<typeof action>()\n\tconst updateFetcherRef = useRef(updateFetcher)\n\tconst { updatesAvailable, diffLink, remoteCommit } = repoUpdates\n\n\tuseEffect(() => {\n\t\tif (updatesAvailable && remoteCommit) {\n\t\t\ttoast.info('New workshop updates available', {\n\t\t\t\tduration: Infinity,\n\t\t\t\tdescription: (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{`Get the latest updates by clicking the update button. `}\n\t\t\t\t\t\t{diffLink ? (\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={diffLink}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tclassName=\"text-xs underline\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tView changes\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t</div>\n\t\t\t\t),\n\t\t\t\tonDismiss: () => {\n\t\t\t\t\tconst formData = new FormData()\n\t\t\t\t\tformData.append('intent', 'dismiss')\n\t\t\t\t\tformData.append('id', remoteCommit)\n\t\t\t\t\tupdateFetcherRef.current.submit(formData, {\n\t\t\t\t\t\tmethod: 'post',\n\t\t\t\t\t\taction: '/admin/update-repo',\n\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\taction: {\n\t\t\t\t\tlabel: 'Update',\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\tconst formData = new FormData()\n\t\t\t\t\t\tformData.append('intent', 'update')\n\t\t\t\t\t\tformData.append('id', remoteCommit)\n\t\t\t\t\t\tupdateFetcherRef.current.submit(formData, {\n\t\t\t\t\t\t\tmethod: 'post',\n\t\t\t\t\t\t\taction: '/admin/update-repo',\n\t\t\t\t\t\t})\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\t\t}\n\t}, [updatesAvailable, diffLink, remoteCommit])\n\n\tconst fetcherResponse = updateFetcher.data\n\tuseEffect(() => {\n\t\tif (!fetcherResponse) return\n\t\tif (fetcherResponse.type === 'error') {\n\t\t\ttoast.error('Failed to update workshop', {\n\t\t\t\tdescription: fetcherResponse.error,\n\t\t\t})\n\t\t} else if (fetcherResponse.type === 'success') {\n\t\t\ttoast.success('Workshop updated', {\n\t\t\t\tdescription: 'Refreshing the page in 5 seconds...',\n\t\t\t\taction: {\n\t\t\t\t\tlabel: 'Refresh now',\n\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\twindow.location.reload()\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t})\n\t\t\tsetTimeout(() => {\n\t\t\t\twindow.location.reload()\n\t\t\t}, 5000)\n\t\t} else {\n\t\t\ttoast.error('Failed to update workshop', {\n\t\t\t\tdescription: 'Unknown error',\n\t\t\t})\n\t\t}\n\t}, [fetcherResponse])\n\n\treturn null\n}\n","import \"/home/runner/work/epicshop/epicshop/packages/workshop-app/app/styles/app.css?transform-only\";export default \"__VITE_CSS_URL__2f686f6d652f72756e6e65722f776f726b2f6570696373686f702f6570696373686f702f7061636b616765732f776f726b73686f702d6170702f6170702f7374796c65732f6170702e6373733f7472616e73666f726d2d6f6e6c79__\"","import \"/home/runner/work/epicshop/epicshop/packages/workshop-app/app/styles/tailwind.css?transform-only\";export default \"__VITE_CSS_URL__2f686f6d652f72756e6e65722f776f726b2f6570696373686f702f6570696373686f702f7061636b616765732f776f726b73686f702d6170702f6170702f7374796c65732f7461696c77696e642e6373733f7472616e73666f726d2d6f6e6c79__\"","import path from 'node:path'\nimport { getPresentUsers } from '@epic-web/workshop-presence/presence.server'\nimport { getApps } from '@epic-web/workshop-utils/apps.server'\nimport { getWorkshopConfig } from '@epic-web/workshop-utils/config.server'\nimport {\n\tgetPreferences,\n\treadOnboardingData,\n\tgetMutedNotifications,\n} from '@epic-web/workshop-utils/db.server'\nimport { getEnv } from '@epic-web/workshop-utils/env.server'\nimport {\n\tgetProgress,\n\tgetUserInfo,\n\tuserHasAccessToWorkshop,\n} from '@epic-web/workshop-utils/epic-api.server'\nimport { checkForUpdatesCached } from '@epic-web/workshop-utils/git.server'\nimport { getUnmutedNotifications } from '@epic-web/workshop-utils/notifications.server'\nimport { makeTimings } from '@epic-web/workshop-utils/timing.server'\nimport {\n\tgetSetClientIdCookieHeader,\n\tgetUserId,\n} from '@epic-web/workshop-utils/user.server'\nimport { checkConnectionCached } from '@epic-web/workshop-utils/utils.server'\nimport { cssBundleHref } from '@remix-run/css-bundle'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype LinksFunction,\n\ttype LoaderFunctionArgs,\n\ttype MetaFunction,\n} from '@remix-run/node'\nimport {\n\tLinks,\n\tMeta,\n\tOutlet,\n\tScripts,\n\tScrollRestoration,\n\tuseLoaderData,\n\tuseNavigation,\n} from '@remix-run/react'\nimport { promiseHash } from 'remix-utils/promise'\nimport { useSpinDelay } from 'spin-delay'\nimport { Confetti } from './components/confetti.tsx'\nimport { GeneralErrorBoundary } from './components/error-boundary.tsx'\nimport { EpicProgress } from './components/progress-bar.tsx'\nimport { EpicToaster } from './components/toaster.tsx'\nimport { TooltipProvider } from './components/ui/tooltip.tsx'\nimport { Notifications } from './routes/admin+/notifications.tsx'\nimport { UpdateToast } from './routes/admin+/update-repo.tsx'\nimport { useTheme } from './routes/theme/index.tsx'\nimport { getTheme } from './routes/theme/theme-session.server.ts'\nimport appStylesheetUrl from './styles/app.css?url'\nimport tailwindStylesheetUrl from './styles/tailwind.css?url'\nimport { ClientHintCheck, getHints } from './utils/client-hints.tsx'\nimport { getConfetti } from './utils/confetti.server.ts'\nimport { cn, combineHeaders, getDomainUrl, useAltDown } from './utils/misc.tsx'\nimport { Presence } from './utils/presence.tsx'\nimport { getSeoMetaTags } from './utils/seo.ts'\nimport { getToast } from './utils/toast.server.ts'\n\nexport const links: LinksFunction = () => {\n\treturn [\n\t\t{ rel: 'stylesheet', href: '/neogrotesk-font.css' },\n\t\t{\n\t\t\trel: 'stylesheet',\n\t\t\thref: 'https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,200;0,300;0,400;0,500;0,600;1,700&display=swap',\n\t\t},\n\t\t{ rel: 'stylesheet', href: tailwindStylesheetUrl },\n\t\t{ rel: 'stylesheet', href: appStylesheetUrl },\n\t\t...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : []),\n\t\t{\n\t\t\trel: 'icon',\n\t\t\thref: '/favicon.ico',\n\t\t\tsizes: '48x48',\n\t\t},\n\t\t{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },\n\t]\n}\n\nexport const meta: MetaFunction<typeof loader> = ({ data }) => {\n\tif (!data) return []\n\n\treturn getSeoMetaTags({\n\t\tinstructor: data.instructor,\n\t\ttitle: data.workshopTitle,\n\t\tdescription: data.workshopSubtitle,\n\t\trequestInfo: data.requestInfo,\n\t})\n}\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('rootLoader')\n\tconst workshopConfig = getWorkshopConfig()\n\tconst {\n\t\ttitle: workshopTitle,\n\t\tsubtitle: workshopSubtitle,\n\t\tinstructor,\n\t\tonboardingVideo,\n\t} = workshopConfig\n\n\tconst onboarding = await readOnboardingData()\n\tif (\n\t\t!ENV.EPICSHOP_DEPLOYED &&\n\t\t!onboarding?.tourVideosWatched.includes(onboardingVideo)\n\t) {\n\t\tif (new URL(request.url).pathname !== '/onboarding') {\n\t\t\tthrow redirect('/onboarding')\n\t\t}\n\t}\n\tconst theme = getTheme(request)\n\tconst { confettiId, headers: confettiHeaders } = getConfetti(request)\n\tconst { toast, headers: toastHeaders } = await getToast(request)\n\tconst isOnlinePromise = checkConnectionCached({ request, timings })\n\n\tconst asyncStuff = await promiseHash({\n\t\tuserId: getUserId({ request }),\n\t\tpreferences: getPreferences(),\n\t\tprogress: getProgress({ timings }).catch((e) => {\n\t\t\tconsole.error('Failed to get progress', e)\n\t\t\tconst emptyProgress: Awaited<ReturnType<typeof getProgress>> = []\n\t\t\treturn emptyProgress\n\t\t}),\n\t\tuser: getUserInfo(),\n\t\tuserHasAccess: userHasAccessToWorkshop({ request, timings }),\n\t\tapps: getApps({ request, timings }),\n\t\trepoUpdates: checkForUpdatesCached(),\n\t\tunmutedNotifications: getUnmutedNotifications(),\n\t})\n\n\tconst presentUsers = await getPresentUsers({\n\t\trequest,\n\t\ttimings,\n\t})\n\n\t// Filter out repoUpdates if muted\n\tconst mutedNotifications = await getMutedNotifications()\n\tlet repoUpdates = asyncStuff.repoUpdates\n\tif (\n\t\trepoUpdates &&\n\t\trepoUpdates.remoteCommit &&\n\t\tmutedNotifications.includes(repoUpdates.remoteCommit)\n\t) {\n\t\trepoUpdates = { ...repoUpdates, updatesAvailable: false }\n\t}\n\n\treturn data(\n\t\t{\n\t\t\t...asyncStuff,\n\t\t\tworkshopConfig,\n\t\t\tworkshopTitle,\n\t\t\tworkshopSubtitle,\n\t\t\tinstructor,\n\t\t\tapps: asyncStuff.apps.map(({ name, fullPath, relativePath }) => ({\n\t\t\t\tname,\n\t\t\t\tfullPath,\n\t\t\t\trelativePath,\n\t\t\t})),\n\t\t\tENV: getEnv(),\n\t\t\trequestInfo: {\n\t\t\t\tprotocol: new URL(request.url).protocol,\n\t\t\t\thostname: new URL(request.url).hostname,\n\t\t\t\tport: new URL(request.url).port,\n\t\t\t\torigin: new URL(request.url).origin,\n\t\t\t\tdomain: getDomainUrl(request),\n\t\t\t\thints: getHints(request),\n\t\t\t\tpath: new URL(request.url).pathname,\n\t\t\t\tsession: { theme },\n\t\t\t\tseparator: path.sep,\n\t\t\t\tonline: await isOnlinePromise,\n\t\t\t},\n\t\t\ttoast,\n\t\t\tconfettiId,\n\t\t\tpresence: {\n\t\t\t\tusers: presentUsers,\n\t\t\t},\n\t\t\trepoUpdates,\n\t\t},\n\t\t{\n\t\t\theaders: combineHeaders(\n\t\t\t\ttoastHeaders,\n\t\t\t\tconfettiHeaders,\n\t\t\t\t{ 'Server-Timing': timings.toString() },\n\t\t\t\tasyncStuff.userId?.type === 'cookie.randomId'\n\t\t\t\t\t? { 'Set-Cookie': getSetClientIdCookieHeader(asyncStuff.userId.id) }\n\t\t\t\t\t: undefined,\n\t\t\t),\n\t\t},\n\t)\n}\n\nfunction Document({\n\tchildren,\n\tenv = {},\n\tclassName,\n\tstyle,\n}: {\n\tchildren: React.ReactNode\n\tenv?: Record<string, unknown>\n\tclassName: string\n\tstyle?: React.CSSProperties\n}) {\n\treturn (\n\t\t<html lang=\"en\" className={className} style={style}>\n\t\t\t<head>\n\t\t\t\t<ClientHintCheck />\n\t\t\t\t<Meta />\n\t\t\t\t<meta charSet=\"utf-8\" />\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />\n\t\t\t\t<Links />\n\t\t\t\t<script\n\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t__html: `window.ENV = ${JSON.stringify(env)}`,\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</head>\n\t\t\t<body className=\"bg-background text-foreground scrollbar-thin scrollbar-thumb-scrollbar h-screen-safe\">\n\t\t\t\t{children}\n\t\t\t\t<ScrollRestoration />\n\t\t\t\t<Scripts />\n\t\t\t</body>\n\t\t</html>\n\t)\n}\n\nfunction App() {\n\tconst data = useLoaderData<typeof loader>()\n\tconst navigation = useNavigation()\n\tconst showSpinner = useSpinDelay(navigation.state !== 'idle', {\n\t\tdelay: 400,\n\t\tminDuration: 200,\n\t})\n\tconst altDown = useAltDown()\n\n\tconst theme = useTheme()\n\treturn (\n\t\t<Document\n\t\t\tstyle={\n\t\t\t\tdata.preferences?.fontSize\n\t\t\t\t\t? { fontSize: `${data.preferences?.fontSize}px` }\n\t\t\t\t\t: {}\n\t\t\t}\n\t\t\tclassName={cn(\n\t\t\t\t'antialiased h-screen-safe',\n\t\t\t\ttheme,\n\t\t\t\t{ 'cursor-progress': showSpinner },\n\t\t\t\taltDown ? 'alt-down' : null,\n\t\t\t)}\n\t\t\tenv={data.ENV}\n\t\t>\n\t\t\t<Outlet />\n\t\t\t<Confetti id={data.confettiId} />\n\t\t\t<EpicToaster toast={data.toast} />\n\t\t\t<UpdateToast repoUpdates={data.repoUpdates} />\n\t\t\t<EpicProgress />\n\t\t\t<Notifications unmutedNotifications={data.unmutedNotifications} />\n\t\t</Document>\n\t)\n}\n\nexport default function AppWithProviders() {\n\tconst { user } = useLoaderData<typeof loader>()\n\treturn (\n\t\t<Presence user={user}>\n\t\t\t<TooltipProvider>\n\t\t\t\t<App />\n\t\t\t</TooltipProvider>\n\t\t</Presence>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<Document className=\"h-screen-safe\">\n\t\t\t<GeneralErrorBoundary />\n\t\t</Document>\n\t)\n}\n"],"names":["STORAGE_KEY","ScrollRestoration","getKey","props","isSpaMode","useRemixContext","location","useLocation","matches","useMatches","UNSAFE_useScrollRestoration","key","React.useMemo","userKey","restoreScroll","restoreKey","storedY","error","React.createElement","_extends","tweenFunctions","t","b","_c","d","c","a","p","s","v","tweenFunctions_1","_defineProperties","target","i","descriptor","_createClass","Constructor","protoProps","staticProps","source","_inheritsLoose","subClass","superClass","_setPrototypeOf","o","degreesToRads","degrees","randomRange","min","max","randomInt","ParticleShape","RotationDirection","Particle","context","getOptions","x","y","_this$getOptions","colors","initialVelocityX","initialVelocityY","_proto","_this$getOptions2","gravity","wind","friction","opacity","drawShape","rotateDelta","ParticleGeneratorClass","canvas","_this","newParticleX","newParticleY","particlesGenerated","lastNumberOfPieces","run","recycle","numberOfPieces","debug","tweenFunction","tweenDuration","nP","activeCount","now","tweenInitTime","progressTime","tweenedVal","numToAdd","ctx","confettiDefaults","tweens","Confetti","opts","computedConfettiDefaults","_this$options","onConfettiComplete","lastRunState","lastRecycleState","ref","React","extractCanvasProps","confettiOptions","refs","rest","confettiOptionKeys","refProps","prop","val","ConfettiReactInternal","_Component","_extractCanvasProps","passedProps","canvasStyles","Component","Index","_ref","ClientOnly","children","fallback","useHydrated","React.Fragment","id","jsx","ConfettiShower","EpicToaster","toast","jsxs","Fragment","Toaster","ShowToast","type","title","description","useEffect","showToast","Notifications","unmutedNotifications","fetcher","useFetcher","fetcherRef","useRef","toastedIds","Set","notification","current","has","add","info","message","link","href","className","duration","Infinity","action","label","onClick","submit","intent","method","UpdateToast","repoUpdates","updateFetcher","updateFetcherRef","updatesAvailable","diffLink","remoteCommit","rel","onDismiss","formData","FormData","append","fetcherResponse","data","success","window","reload","setTimeout","appStylesheetUrl","tailwindStylesheetUrl","links","sizes","meta","getSeoMetaTags","instructor","workshopTitle","workshopSubtitle","requestInfo","Document","env","style","lang","ClientHintCheck","Meta","charSet","name","content","Links","dangerouslySetInnerHTML","__html","JSON","stringify","Scripts","App","useLoaderData","navigation","useNavigation","showSpinner","useSpinDelay","state","delay","minDuration","altDown","useAltDown","theme","useTheme","preferences","fontSize","cn","ENV","Outlet","confettiId","EpicProgress","AppWithProviders","user","Presence","TooltipProvider","ErrorBoundary","GeneralErrorBoundary"],"mappings":"onBAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,IAAIA,EAAc,YAQlB,SAASC,GAAkB,CACzB,OAAAC,EACA,GAAGC,CACL,EAAG,CACD,GAAI,CACF,UAAAC,CACD,EAAGC,GAAe,EACfC,EAAWC,IACXC,EAAUC,IACdC,GAA4B,CAC1B,OAAAR,EACA,WAAYF,CAChB,CAAG,EAQD,IAAIW,EAAMC,EAAAA,QAAc,IAAM,CAC5B,GAAI,CAACV,EAAQ,OAAO,KACpB,IAAIW,EAAUX,EAAOI,EAAUE,CAAO,EACtC,OAAOK,IAAYP,EAAS,IAAMO,EAAU,IAC7C,EAGD,CAAA,CAAE,EAIF,GAAIT,EACF,OAAO,KAET,IAAIU,GAAiB,CAACd,EAAae,IAAe,CAChD,GAAI,CAAC,OAAO,QAAQ,OAAS,CAAC,OAAO,QAAQ,MAAM,IAAK,CACtD,IAAIJ,EAAM,KAAK,OAAQ,EAAC,SAAS,EAAE,EAAE,MAAM,CAAC,EAC5C,OAAO,QAAQ,aAAa,CAC1B,IAAAA,CACD,EAAE,EAAE,CACN,CACD,GAAI,CAEF,IAAIK,EADY,KAAK,MAAM,eAAe,QAAQhB,CAAW,GAAK,IAAI,EAC9Ce,GAAc,O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OgD,EAAKhD,KAAO,CAAA,EAC/BH,EAAA,IAAAsC,GAAA,CAAYC,YAAaY,EAAKZ,WAAa,CAAA,QAC3C6D,GAAa,CAAA,CAAA,EACbpG,EAAAA,IAAAa,GAAA,CAAcC,qBAAsBqC,EAAKrC,oBAAsB,CAAA,CAAA,CAAA,CACjE,CAEF,CAEA,SAAwBuF,IAAmB,CACpC,KAAA,CAAEC,KAAAA,CAAK,EAAIpB,EAA6B,EAE7C,OAAAlF,EAAAA,IAACuG,IAASD,KAAAA,EACT3G,SAAAK,EAAA,IAACwG,IACA7G,SAACK,EAAAA,IAAAiF,GAAA,EAAI,EACN,CACD,CAAA,CAEF,CAEO,SAASwB,IAAgB,CAC/B,aACEvC,EAAS,CAAArC,UAAU,gBACnBlC,SAAAK,EAAAA,IAAC0G,IAAqB,CACvB,CAAA,CAEF","x_google_ignoreList":[0,1,2,3]}
@@ -1,2 +0,0 @@
1
- import{j as t}from"./index-CGzylDPY.js";import{T as r}from"./tests-CmjMQrMj.js";import{u as p}from"./components-DrvY4pal.js";import"./epic-video-DRZssA4U.js";import"./index-BZWIdOoA.js";import"./misc-BK2EiKtY.js";import"./tooltip-leWCE50J.js";import"./pe-DXT2FOp1.js";import"./online-CHlOuJG-.js";import"./loading-ClL22bF9.js";import"./user-C0j04V55.js";import"./workshop-config-oL_FWDKq.js";import"./accordion-BPyhq471.js";import"./index-6Hu4Lmzn.js";import"./index-BE3KRz8n.js";import"./use-event-source-AZJtQsFX.js";import"./set-playground-ZcPraYj5.js";import"./progress-bar-Q9l2dtTg.js";function A(){const{appInfo:o}=p();return t.jsx(r,{playgroundAppInfo:o},o.name)}export{A as default};
2
- //# sourceMappingURL=test-Bt9AuCey.js.map
@@ -1,2 +0,0 @@
1
- import{r as f,j as P,B as nn}from"./index-CGzylDPY.js";import{r as ut}from"./components-DrvY4pal.js";import{a as on}from"./misc-BK2EiKtY.js";function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function rn(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ft(...e){return t=>e.forEach(n=>rn(n,t))}function Q(...e){return f.useCallback(ft(...e),e)}function pr(e,t){const n=f.createContext(t),o=i=>{const{children:s,...c}=i,a=f.useMemo(()=>c,Object.values(c));return P.jsx(n.Provider,{value:a,children:s})};o.displayName=e+"Provider";function r(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[o,r]}function sn(e,t=[]){let n=[];function o(i,s){const c=f.createContext(s),a=n.length;n=[...n,s];const l=d=>{var v;const{scope:m,children:p,...h}=d,g=((v=m==null?void 0:m[e])==null?void 0:v[a])||c,x=f.useMemo(()=>h,Object.values(h));return P.jsx(g.Provider,{value:x,children:p})};l.displayName=i+"Provider";function u(d,m){var g;const p=((g=m==null?void 0:m[e])==null?void 0:g[a])||c,h=f.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[l,u]}const r=()=>{const i=n.map(s=>f.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return r.scopeName=e,[o,cn(r,...t)]}function cn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((c,{useScope:a,scopeName:l})=>{const d=a(i)[`__scope${l}`];return{...c,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var dt=f.forwardRef((e,t)=>{const{children:n,...o}=e,r=f.Children.toArray(n),i=r.find(an);if(i){const s=i.props.children,c=r.map(a=>a===i?f.Children.count(s)>1?f.Children.only(null):f.isValidElement(s)?s.props.children:null:a);return P.jsx(De,{...o,ref:t,children:f.isValidElement(s)?f.cloneElement(s,void 0,c):null})}return P.jsx(De,{...o,ref:t,children:n})});dt.displayName="Slot";var De=f.forwardRef((e,t)=>{const{children:n,...o}=e;if(f.isValidElement(n)){const r=un(n);return f.cloneElement(n,{...ln(o,n.props),ref:t?ft(t,r):r})}return f.Children.count(n)>1?f.Children.only(null):null});De.displayName="SlotClone";var pt=({children:e})=>P.jsx(P.Fragment,{children:e});function an(e){return f.isValidElement(e)&&e.type===pt}function ln(e,t){const n={...t};for(const o in t){const r=e[o],i=t[o];/^on[A-Z]/.test(o)?r&&i?n[o]=(...c)=>{i(...c),r(...c)}:r&&(n[o]=r):o==="style"?n[o]={...r,...i}:o==="className"&&(n[o]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function un(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ee=fn.reduce((e,t)=>{const n=f.forwardRef((o,r)=>{const{asChild:i,...s}=o,c=i?dt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(c,{...s,ref:r})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dn(e,t){e&&ut.flushSync(()=>e.dispatchEvent(t))}function ie(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function pn(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e);f.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var mn="DismissableLayer",Ne="dismissableLayer.update",hn="dismissableLayer.pointerDownOutside",gn="dismissableLayer.focusOutside",et,mt=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ht=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...a}=e,l=f.useContext(mt),[u,d]=f.useState(null),m=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=f.useState({}),h=Q(t,E=>d(E)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),y=u?g.indexOf(u):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,b=yn(E=>{const O=E.target,M=[...l.branches].some(T=>T.contains(O));!w||M||(r==null||r(E),s==null||s(E),E.defaultPrevented||c==null||c())},m),A=wn(E=>{const O=E.target;[...l.branches].some(T=>T.contains(O))||(i==null||i(E),s==null||s(E),E.defaultPrevented||c==null||c())},m);return pn(E=>{y===l.layers.size-1&&(o==null||o(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},m),f.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(et=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),tt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=et)}},[u,m,n,l]),f.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),tt())},[u,l]),f.useEffect(()=>{const E=()=>p({});return document.addEventListener(Ne,E),()=>document.removeEventListener(Ne,E)},[]),P.jsx(ee.div,{...a,ref:h,style:{pointerEvents:C?w?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,A.onFocusCapture),onBlurCapture:U(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,b.onPointerDownCapture)})});ht.displayName=mn;var xn="DismissableLayerBranch",vn=f.forwardRef((e,t)=>{const n=f.useContext(mt),o=f.useRef(null),r=Q(t,o);return f.useEffect(()=>{const i=o.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(ee.div,{...e,ref:r})});vn.displayName=xn;function yn(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),o=f.useRef(!1),r=f.useRef(()=>{});return f.useEffect(()=>{const i=c=>{if(c.target&&!o.current){let a=function(){gt(hn,n,l,{discrete:!0})};const l={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=a,t.addEventListener("click",r.current,{once:!0})):a()}else t.removeEventListener("click",r.current);o.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function wn(e,t=globalThis==null?void 0:globalThis.document){const n=ie(e),o=f.useRef(!1);return f.useEffect(()=>{const r=i=>{i.target&&!o.current&&gt(gn,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function tt(){const e=new CustomEvent(Ne);document.dispatchEvent(e)}function gt(e,t,n,{discrete:o}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?dn(r,i):r.dispatchEvent(i)}var ne=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},bn=nn.useId||(()=>{}),Cn=0;function En(e){const[t,n]=f.useState(bn());return ne(()=>{e||n(o=>o??String(Cn++))},[e]),e||(t?`radix-${t}`:"")}const Pn=["top","right","bottom","left"],G=Math.min,j=Math.max,xe=Math.round,me=Math.floor,q=e=>({x:e,y:e}),An={left:"right",right:"left",bottom:"top",top:"bottom"},Rn={start:"end",end:"start"};function Le(e,t,n){return j(e,G(t,n))}function Y(e,t){return typeof e=="function"?e(t):e}function X(e){return e.split("-")[0]}function se(e){return e.split("-")[1]}function Fe(e){return e==="x"?"y":"x"}function We(e){return e==="y"?"height":"width"}function K(e){return["top","bottom"].includes(X(e))?"y":"x"}function Ie(e){return Fe(K(e))}function On(e,t,n){n===void 0&&(n=!1);const o=se(e),r=Ie(e),i=We(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ve(s)),[s,ve(s)]}function Tn(e){const t=ve(e);return[Me(e),t,Me(t)]}function Me(e){return e.replace(/start|end/g,t=>Rn[t])}function Sn(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:s;default:return[]}}function Dn(e,t,n,o){const r=se(e);let i=Sn(X(e),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Me)))),i}function ve(e){return e.replace(/left|right|bottom|top/g,t=>An[t])}function Nn(e){return{top:0,right:0,bottom:0,left:0,...e}}function xt(e){return typeof e!="number"?Nn(e):{top:e,right:e,bottom:e,left:e}}function ye(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function nt(e,t,n){let{reference:o,floating:r}=e;const i=K(t),s=Ie(t),c=We(s),a=X(t),l=i==="y",u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let p;switch(a){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-r.width,y:d};break;default:p={x:o.x,y:o.y}}switch(se(t)){case"start":p[s]-=m*(n&&l?-1:1);break;case"end":p[s]+=m*(n&&l?-1:1);break}return p}const Ln=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),a=await(s.isRTL==null?void 0:s.isRTL(t));let l=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=nt(l,o,a),m=o,p={},h=0;for(let g=0;g<c.length;g++){const{name:x,fn:v}=c[g],{x:y,y:C,data:w,reset:b}=await v({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:l,platform:s,elements:{reference:e,floating:t}});u=y??u,d=C??d,p={...p,[x]:{...p[x],...w}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(l=b.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):b.rects),{x:u,y:d}=nt(l,m,a)),g=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}};async function le(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:a}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=Y(t,e),h=xt(p),x=c[m?d==="floating"?"reference":"floating":d],v=ye(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:l,rootBoundary:u,strategy:a})),y=d==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),w=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},b=ye(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:C,strategy:a}):y);return{top:(v.top-b.top+h.top)/w.y,bottom:(b.bottom-v.bottom+h.bottom)/w.y,left:(v.left-b.left+h.left)/w.x,right:(b.right-v.right+h.right)/w.x}}const Mn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:a}=t,{element:l,padding:u=0}=Y(e,t)||{};if(l==null)return{};const d=xt(u),m={x:n,y:o},p=Ie(r),h=We(p),g=await s.getDimensions(l),x=p==="y",v=x?"top":"left",y=x?"bottom":"right",C=x?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-m[p]-i.floating[h],b=m[p]-i.reference[p],A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l));let E=A?A[C]:0;(!E||!await(s.isElement==null?void 0:s.isElement(A)))&&(E=c.floating[C]||i.floating[h]);const O=w/2-b/2,M=E/2-g[h]/2-1,T=G(d[v],M),k=G(d[y],M),$=T,D=E-g[h]-k,S=E/2-g[h]/2+O,W=Le($,S,D),N=!a.arrow&&se(r)!=null&&S!==W&&i.reference[h]/2-(S<$?T:k)-g[h]/2<0,L=N?S<$?S-$:S-D:0;return{[p]:m[p]+L,data:{[p]:W,centerOffset:S-W-L,...N&&{alignmentOffset:L}},reset:N}}}),_n=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:a,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...x}=Y(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=X(r),y=K(c),C=X(c)===c,w=await(a.isRTL==null?void 0:a.isRTL(l.floating)),b=m||(C||!g?[ve(c)]:Tn(c)),A=h!=="none";!m&&A&&b.push(...Dn(c,g,h,w));const E=[c,...b],O=await le(t,x),M=[];let T=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&M.push(O[v]),d){const S=On(r,s,w);M.push(O[S[0]],O[S[1]])}if(T=[...T,{placement:r,overflows:M}],!M.every(S=>S<=0)){var k,$;const S=(((k=i.flip)==null?void 0:k.index)||0)+1,W=E[S];if(W)return{data:{index:S,overflows:T},reset:{placement:W}};let N=($=T.filter(L=>L.overflows[0]<=0).sort((L,R)=>L.overflows[1]-R.overflows[1])[0])==null?void 0:$.placement;if(!N)switch(p){case"bestFit":{var D;const L=(D=T.filter(R=>{if(A){const _=K(R.placement);return _===y||_==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(_=>_>0).reduce((_,H)=>_+H,0)]).sort((R,_)=>R[1]-_[1])[0])==null?void 0:D[0];L&&(N=L);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rt(e){return Pn.some(t=>e[t]>=0)}const kn=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Y(e,t);switch(o){case"referenceHidden":{const i=await le(t,{...r,elementContext:"reference"}),s=ot(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:rt(s)}}}case"escaped":{const i=await le(t,{...r,altBoundary:!0}),s=ot(i,n.floating);return{data:{escapedOffsets:s,escaped:rt(s)}}}default:return{}}}}};async function $n(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=X(n),c=se(n),a=K(n)==="y",l=["left","top"].includes(s)?-1:1,u=i&&a?-1:1,d=Y(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof h=="number"&&(p=c==="end"?h*-1:h),a?{x:p*u,y:m*l}:{x:m*l,y:p*u}}const jn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=t,a=await $n(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+a.x,y:i+a.y,data:{...a,placement:s}}}}},Fn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:x=>{let{x:v,y}=x;return{x:v,y}}},...a}=Y(e,t),l={x:n,y:o},u=await le(t,a),d=K(X(r)),m=Fe(d);let p=l[m],h=l[d];if(i){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",y=p+u[x],C=p-u[v];p=Le(y,p,C)}if(s){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=h+u[x],C=h-u[v];h=Le(y,h,C)}const g=c.fn({...t,[m]:p,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:i,[d]:s}}}}}},Wn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:a=!0,crossAxis:l=!0}=Y(e,t),u={x:n,y:o},d=K(r),m=Fe(d);let p=u[m],h=u[d];const g=Y(c,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){const C=m==="y"?"height":"width",w=i.reference[m]-i.floating[C]+x.mainAxis,b=i.reference[m]+i.reference[C]-x.mainAxis;p<w?p=w:p>b&&(p=b)}if(l){var v,y;const C=m==="y"?"width":"height",w=["top","left"].includes(X(r)),b=i.reference[d]-i.floating[C]+(w&&((v=s.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),A=i.reference[d]+i.reference[C]+(w?0:((y=s.offset)==null?void 0:y[d])||0)-(w?x.crossAxis:0);h<b?h=b:h>A&&(h=A)}return{[m]:p,[d]:h}}}},In=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:s,elements:c}=t,{apply:a=()=>{},...l}=Y(e,t),u=await le(t,l),d=X(r),m=se(r),p=K(r)==="y",{width:h,height:g}=i.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(v=d,x=m==="end"?"top":"bottom");const y=g-u.top-u.bottom,C=h-u.left-u.right,w=G(g-u[x],y),b=G(h-u[v],C),A=!t.middlewareData.shift;let E=w,O=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=y),A&&!m){const T=j(u.left,0),k=j(u.right,0),$=j(u.top,0),D=j(u.bottom,0);p?O=h-2*(T!==0||k!==0?T+k:j(u.left,u.right)):E=g-2*($!==0||D!==0?$+D:j(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:E});const M=await s.getDimensions(c.floating);return h!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function be(){return typeof window<"u"}function ce(e){return vt(e)?(e.nodeName||"").toLowerCase():"#document"}function F(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function V(e){var t;return(t=(vt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function vt(e){return be()?e instanceof Node||e instanceof F(e).Node:!1}function I(e){return be()?e instanceof Element||e instanceof F(e).Element:!1}function z(e){return be()?e instanceof HTMLElement||e instanceof F(e).HTMLElement:!1}function it(e){return!be()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof F(e).ShadowRoot}function fe(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function Bn(e){return["table","td","th"].includes(ce(e))}function Ce(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Be(e){const t=He(),n=I(e)?B(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Hn(e){let t=Z(e);for(;z(t)&&!oe(t);){if(Be(t))return t;if(Ce(t))return null;t=Z(t)}return null}function He(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function oe(e){return["html","body","#document"].includes(ce(e))}function B(e){return F(e).getComputedStyle(e)}function Ee(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Z(e){if(ce(e)==="html")return e;const t=e.assignedSlot||e.parentNode||it(e)&&e.host||V(e);return it(t)?t.host:t}function yt(e){const t=Z(e);return oe(t)?e.ownerDocument?e.ownerDocument.body:e.body:z(t)&&fe(t)?t:yt(t)}function ue(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=yt(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),s=F(r);if(i){const c=_e(s);return t.concat(s,s.visualViewport||[],fe(r)?r:[],c&&n?ue(c):[])}return t.concat(r,ue(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wt(e){const t=B(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=z(e),i=r?e.offsetWidth:n,s=r?e.offsetHeight:o,c=xe(n)!==i||xe(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function ze(e){return I(e)?e:e.contextElement}function te(e){const t=ze(e);if(!z(t))return q(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=wt(t);let s=(i?xe(n.width):n.width)/o,c=(i?xe(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const zn=q(0);function bt(e){const t=F(e);return!He()||!t.visualViewport?zn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vn(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==F(e)?!1:t}function J(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=ze(e);let s=q(1);t&&(o?I(o)&&(s=te(o)):s=te(e));const c=Vn(i,n,o)?bt(i):q(0);let a=(r.left+c.x)/s.x,l=(r.top+c.y)/s.y,u=r.width/s.x,d=r.height/s.y;if(i){const m=F(i),p=o&&I(o)?F(o):o;let h=m,g=_e(h);for(;g&&o&&p!==h;){const x=te(g),v=g.getBoundingClientRect(),y=B(g),C=v.left+(g.clientLeft+parseFloat(y.paddingLeft))*x.x,w=v.top+(g.clientTop+parseFloat(y.paddingTop))*x.y;a*=x.x,l*=x.y,u*=x.x,d*=x.y,a+=C,l+=w,h=F(g),g=_e(h)}}return ye({width:u,height:d,x:a,y:l})}function Un(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",s=V(o),c=t?Ce(t.floating):!1;if(o===s||c&&i)return n;let a={scrollLeft:0,scrollTop:0},l=q(1);const u=q(0),d=z(o);if((d||!d&&!i)&&((ce(o)!=="body"||fe(s))&&(a=Ee(o)),z(o))){const m=J(o);l=te(o),u.x=m.x+o.clientLeft,u.y=m.y+o.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+u.x,y:n.y*l.y-a.scrollTop*l.y+u.y}}function Yn(e){return Array.from(e.getClientRects())}function ke(e,t){const n=Ee(e).scrollLeft;return t?t.left+n:J(V(e)).left+n}function Xn(e){const t=V(e),n=Ee(e),o=e.ownerDocument.body,r=j(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=j(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ke(e);const c=-n.scrollTop;return B(o).direction==="rtl"&&(s+=j(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}function Gn(e,t){const n=F(e),o=V(e),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,a=0;if(r){i=r.width,s=r.height;const l=He();(!l||l&&t==="fixed")&&(c=r.offsetLeft,a=r.offsetTop)}return{width:i,height:s,x:c,y:a}}function qn(e,t){const n=J(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=z(e)?te(e):q(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,a=r*i.x,l=o*i.y;return{width:s,height:c,x:a,y:l}}function st(e,t,n){let o;if(t==="viewport")o=Gn(e,n);else if(t==="document")o=Xn(V(e));else if(I(t))o=qn(t,n);else{const r=bt(e);o={...t,x:t.x-r.x,y:t.y-r.y}}return ye(o)}function Ct(e,t){const n=Z(e);return n===t||!I(n)||oe(n)?!1:B(n).position==="fixed"||Ct(n,t)}function Kn(e,t){const n=t.get(e);if(n)return n;let o=ue(e,[],!1).filter(c=>I(c)&&ce(c)!=="body"),r=null;const i=B(e).position==="fixed";let s=i?Z(e):e;for(;I(s)&&!oe(s);){const c=B(s),a=Be(s);!a&&c.position==="fixed"&&(r=null),(i?!a&&!r:!a&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||fe(s)&&!a&&Ct(e,s))?o=o.filter(u=>u!==s):r=c,s=Z(s)}return t.set(e,o),o}function Zn(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const s=[...n==="clippingAncestors"?Ce(t)?[]:Kn(t,this._c):[].concat(n),o],c=s[0],a=s.reduce((l,u)=>{const d=st(t,u,r);return l.top=j(d.top,l.top),l.right=G(d.right,l.right),l.bottom=G(d.bottom,l.bottom),l.left=j(d.left,l.left),l},st(t,c,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Jn(e){const{width:t,height:n}=wt(e);return{width:t,height:n}}function Qn(e,t,n){const o=z(t),r=V(t),i=n==="fixed",s=J(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const a=q(0);if(o||!o&&!i)if((ce(t)!=="body"||fe(r))&&(c=Ee(t)),o){const p=J(t,!0,i,t);a.x=p.x+t.clientLeft,a.y=p.y+t.clientTop}else r&&(a.x=ke(r));let l=0,u=0;if(r&&!o&&!i){const p=r.getBoundingClientRect();u=p.top+c.scrollTop,l=p.left+c.scrollLeft-ke(r,p)}const d=s.left+c.scrollLeft-a.x-l,m=s.top+c.scrollTop-a.y-u;return{x:d,y:m,width:s.width,height:s.height}}function Te(e){return B(e).position==="static"}function ct(e,t){if(!z(e)||B(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return V(e)===n&&(n=n.ownerDocument.body),n}function Et(e,t){const n=F(e);if(Ce(e))return n;if(!z(e)){let r=Z(e);for(;r&&!oe(r);){if(I(r)&&!Te(r))return r;r=Z(r)}return n}let o=ct(e,t);for(;o&&Bn(o)&&Te(o);)o=ct(o,t);return o&&oe(o)&&Te(o)&&!Be(o)?n:o||Hn(e)||n}const eo=async function(e){const t=this.getOffsetParent||Et,n=this.getDimensions,o=await n(e.floating);return{reference:Qn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function to(e){return B(e).direction==="rtl"}const no={convertOffsetParentRelativeRectToViewportRelativeRect:Un,getDocumentElement:V,getClippingRect:Zn,getOffsetParent:Et,getElementRects:eo,getClientRects:Yn,getDimensions:Jn,getScale:te,isElement:I,isRTL:to};function oo(e,t){let n=null,o;const r=V(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),i();const{left:l,top:u,width:d,height:m}=e.getBoundingClientRect();if(c||t(),!d||!m)return;const p=me(u),h=me(r.clientWidth-(l+d)),g=me(r.clientHeight-(u+m)),x=me(l),y={rootMargin:-p+"px "+-h+"px "+-g+"px "+-x+"px",threshold:j(0,G(1,a))||1};let C=!0;function w(b){const A=b[0].intersectionRatio;if(A!==a){if(!C)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}C=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(e)}return s(!0),i}function ro(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=ze(e),u=r||i?[...l?ue(l):[],...ue(t)]:[];u.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=l&&c?oo(l,n):null;let m=-1,p=null;s&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(t)})),n()}),l&&!a&&p.observe(l),p.observe(t));let h,g=a?J(e):null;a&&x();function x(){const v=J(e);g&&(v.x!==g.x||v.y!==g.y||v.width!==g.width||v.height!==g.height)&&n(),g=v,h=requestAnimationFrame(x)}return n(),()=>{var v;u.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,a&&cancelAnimationFrame(h)}}const io=jn,so=Fn,co=_n,ao=In,lo=kn,at=Mn,uo=Wn,fo=(e,t,n)=>{const o=new Map,r={platform:no,...n},i={...r.platform,_c:o};return Ln(e,t,{...r,platform:i})};var ge=typeof document<"u"?f.useLayoutEffect:f.useEffect;function we(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!we(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!we(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lt(e,t){const n=Pt(e);return Math.round(t*n)/n}function Se(e){const t=f.useRef(e);return ge(()=>{t.current=e}),t}function po(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:a,open:l}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=f.useState(o);we(m,o)||p(o);const[h,g]=f.useState(null),[x,v]=f.useState(null),y=f.useCallback(R=>{R!==A.current&&(A.current=R,g(R))},[]),C=f.useCallback(R=>{R!==E.current&&(E.current=R,v(R))},[]),w=i||h,b=s||x,A=f.useRef(null),E=f.useRef(null),O=f.useRef(u),M=a!=null,T=Se(a),k=Se(r),$=Se(l),D=f.useCallback(()=>{if(!A.current||!E.current)return;const R={placement:t,strategy:n,middleware:m};k.current&&(R.platform=k.current),fo(A.current,E.current,R).then(_=>{const H={..._,isPositioned:$.current!==!1};S.current&&!we(O.current,H)&&(O.current=H,ut.flushSync(()=>{d(H)}))})},[m,t,n,k,$]);ge(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[l]);const S=f.useRef(!1);ge(()=>(S.current=!0,()=>{S.current=!1}),[]),ge(()=>{if(w&&(A.current=w),b&&(E.current=b),w&&b){if(T.current)return T.current(w,b,D);D()}},[w,b,D,T,M]);const W=f.useMemo(()=>({reference:A,floating:E,setReference:y,setFloating:C}),[y,C]),N=f.useMemo(()=>({reference:w,floating:b}),[w,b]),L=f.useMemo(()=>{const R={position:n,left:0,top:0};if(!N.floating)return R;const _=lt(N.floating,u.x),H=lt(N.floating,u.y);return c?{...R,transform:"translate("+_+"px, "+H+"px)",...Pt(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:H}},[n,c,N.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:D,refs:W,elements:N,floatingStyles:L}),[u,D,W,N,L])}const mo=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?at({element:o.current,padding:r}).fn(n):{}:o?at({element:o,padding:r}).fn(n):{}}}},ho=(e,t)=>({...io(e),options:[e,t]}),go=(e,t)=>({...so(e),options:[e,t]}),xo=(e,t)=>({...uo(e),options:[e,t]}),vo=(e,t)=>({...co(e),options:[e,t]}),yo=(e,t)=>({...ao(e),options:[e,t]}),wo=(e,t)=>({...lo(e),options:[e,t]}),bo=(e,t)=>({...mo(e),options:[e,t]});var Co="Arrow",At=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return P.jsx(ee.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:P.jsx("polygon",{points:"0,0 30,0 15,10"})})});At.displayName=Co;var Eo=At;function Po(e,t=[]){let n=[];function o(i,s){const c=f.createContext(s),a=n.length;n=[...n,s];function l(d){const{scope:m,children:p,...h}=d,g=(m==null?void 0:m[e][a])||c,x=f.useMemo(()=>h,Object.values(h));return P.jsx(g.Provider,{value:x,children:p})}function u(d,m){const p=(m==null?void 0:m[e][a])||c,h=f.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const r=()=>{const i=n.map(s=>f.createContext(s));return function(c){const a=(c==null?void 0:c[e])||i;return f.useMemo(()=>({[`__scope${e}`]:{...c,[e]:a}}),[c,a])}};return r.scopeName=e,[o,Ao(r,...t)]}function Ao(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const s=o.reduce((c,{useScope:a,scopeName:l})=>{const d=a(i)[`__scope${l}`];return{...c,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ro(e){const[t,n]=f.useState(void 0);return ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const a=i.borderBoxSize,l=Array.isArray(a)?a[0]:a;s=l.inlineSize,c=l.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var Ve="Popper",[Rt,Ot]=Po(Ve),[Oo,Tt]=Rt(Ve),St=e=>{const{__scopePopper:t,children:n}=e,[o,r]=f.useState(null);return P.jsx(Oo,{scope:t,anchor:o,onAnchorChange:r,children:n})};St.displayName=Ve;var Dt="PopperAnchor",Nt=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=Tt(Dt,n),s=f.useRef(null),c=Q(t,s);return f.useEffect(()=>{i.onAnchorChange((o==null?void 0:o.current)||s.current)}),o?null:P.jsx(ee.div,{...r,ref:c})});Nt.displayName=Dt;var Ue="PopperContent",[To,So]=Rt(Ue),Lt=f.forwardRef((e,t)=>{var Xe,Ge,qe,Ke,Ze,Je;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:a=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:h,...g}=e,x=Tt(Ue,n),[v,y]=f.useState(null),C=Q(t,ae=>y(ae)),[w,b]=f.useState(null),A=Ro(w),E=(A==null?void 0:A.width)??0,O=(A==null?void 0:A.height)??0,M=o+(i!=="center"?"-"+i:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],$=k.length>0,D={padding:T,boundary:k.filter(No),altBoundary:$},{refs:S,floatingStyles:W,placement:N,isPositioned:L,middlewareData:R}=po({strategy:"fixed",placement:M,whileElementsMounted:(...ae)=>ro(...ae,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[ho({mainAxis:r+O,alignmentAxis:s}),a&&go({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?xo():void 0,...D}),a&&vo({...D}),yo({...D,apply:({elements:ae,rects:Qe,availableWidth:Jt,availableHeight:Qt})=>{const{width:en,height:tn}=Qe.reference,pe=ae.floating.style;pe.setProperty("--radix-popper-available-width",`${Jt}px`),pe.setProperty("--radix-popper-available-height",`${Qt}px`),pe.setProperty("--radix-popper-anchor-width",`${en}px`),pe.setProperty("--radix-popper-anchor-height",`${tn}px`)}}),w&&bo({element:w,padding:c}),Lo({arrowWidth:E,arrowHeight:O}),m&&wo({strategy:"referenceHidden",...D})]}),[_,H]=kt(N),de=ie(h);ne(()=>{L&&(de==null||de())},[L,de]);const Xt=(Xe=R.arrow)==null?void 0:Xe.x,Gt=(Ge=R.arrow)==null?void 0:Ge.y,qt=((qe=R.arrow)==null?void 0:qe.centerOffset)!==0,[Kt,Zt]=f.useState();return ne(()=>{v&&Zt(window.getComputedStyle(v).zIndex)},[v]),P.jsx("div",{ref:S.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:L?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Kt,"--radix-popper-transform-origin":[(Ke=R.transformOrigin)==null?void 0:Ke.x,(Ze=R.transformOrigin)==null?void 0:Ze.y].join(" "),...((Je=R.hide)==null?void 0:Je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:P.jsx(To,{scope:n,placedSide:_,onArrowChange:b,arrowX:Xt,arrowY:Gt,shouldHideArrow:qt,children:P.jsx(ee.div,{"data-side":_,"data-align":H,...g,ref:C,style:{...g.style,animation:L?void 0:"none"}})})})});Lt.displayName=Ue;var Mt="PopperArrow",Do={top:"bottom",right:"left",bottom:"top",left:"right"},_t=f.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=So(Mt,o),s=Do[i.placedSide];return P.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:P.jsx(Eo,{...r,ref:n,style:{...r.style,display:"block"}})})});_t.displayName=Mt;function No(e){return e!==null}var Lo=e=>({name:"transformOrigin",options:e,fn(t){var x,v,y;const{placement:n,rects:o,middlewareData:r}=t,s=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=s?0:e.arrowWidth,a=s?0:e.arrowHeight,[l,u]=kt(n),d={start:"0%",center:"50%",end:"100%"}[u],m=(((v=r.arrow)==null?void 0:v.x)??0)+c/2,p=(((y=r.arrow)==null?void 0:y.y)??0)+a/2;let h="",g="";return l==="bottom"?(h=s?d:`${m}px`,g=`${-a}px`):l==="top"?(h=s?d:`${m}px`,g=`${o.floating.height+a}px`):l==="right"?(h=`${-a}px`,g=s?d:`${p}px`):l==="left"&&(h=`${o.floating.width+a}px`,g=s?d:`${p}px`),{data:{x:h,y:g}}}});function kt(e){const[t,n="center"]=e.split("-");return[t,n]}var Mo=St,_o=Nt,ko=Lt,$o=_t;function jo(e,t){return f.useReducer((n,o)=>t[n][o]??n,e)}var $t=e=>{const{present:t,children:n}=e,o=Fo(t),r=typeof n=="function"?n({present:o.isPresent}):f.Children.only(n),i=Q(o.ref,Wo(r));return typeof n=="function"||o.isPresent?f.cloneElement(r,{ref:i}):null};$t.displayName="Presence";function Fo(e){const[t,n]=f.useState(),o=f.useRef({}),r=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[c,a]=jo(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const l=he(o.current);i.current=c==="mounted"?l:"none"},[c]),ne(()=>{const l=o.current,u=r.current;if(u!==e){const m=i.current,p=he(l);e?a("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?a("UNMOUNT"):a(u&&m!==p?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,a]),ne(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=p=>{const g=he(o.current).includes(p.animationName);if(p.target===t&&g&&(a("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=p=>{p.target===t&&(i.current=he(o.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:f.useCallback(l=>{l&&(o.current=getComputedStyle(l)),n(l)},[])}}function he(e){return(e==null?void 0:e.animationName)||"none"}function Wo(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Io({prop:e,defaultProp:t,onChange:n=()=>{}}){const[o,r]=Bo({defaultProp:t,onChange:n}),i=e!==void 0,s=i?e:o,c=ie(n),a=f.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&c(d)}else r(l)},[i,e,r,c]);return[s,a]}function Bo({defaultProp:e,onChange:t}){const n=f.useState(e),[o]=n,r=f.useRef(o),i=ie(t);return f.useEffect(()=>{r.current!==o&&(i(o),r.current=o)},[o,r,i]),n}var Ho="VisuallyHidden",jt=f.forwardRef((e,t)=>P.jsx(ee.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));jt.displayName=Ho;var zo=jt,[Pe,mr]=sn("Tooltip",[Ot]),Ae=Ot(),Ft="TooltipProvider",Vo=700,$e="tooltip.open",[Uo,Ye]=Pe(Ft),Wt=e=>{const{__scopeTooltip:t,delayDuration:n=Vo,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,[s,c]=f.useState(!0),a=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),P.jsx(Uo,{scope:t,isOpenDelayed:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),c(!1)},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:f.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:i})};Wt.displayName=Ft;var Re="Tooltip",[Yo,Oe]=Pe(Re),It=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,a=Ye(Re,e.__scopeTooltip),l=Ae(t),[u,d]=f.useState(null),m=En(),p=f.useRef(0),h=s??a.disableHoverableContent,g=c??a.delayDuration,x=f.useRef(!1),[v=!1,y]=Io({prop:o,defaultProp:r,onChange:E=>{E?(a.onOpen(),document.dispatchEvent(new CustomEvent($e))):a.onClose(),i==null||i(E)}}),C=f.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=f.useCallback(()=>{window.clearTimeout(p.current),x.current=!1,y(!0)},[y]),b=f.useCallback(()=>{window.clearTimeout(p.current),y(!1)},[y]),A=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,y(!0)},g)},[g,y]);return f.useEffect(()=>()=>window.clearTimeout(p.current),[]),P.jsx(Mo,{...l,children:P.jsx(Yo,{scope:t,contentId:m,open:v,stateAttribute:C,trigger:u,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{a.isOpenDelayed?A():w()},[a.isOpenDelayed,A,w]),onTriggerLeave:f.useCallback(()=>{h?b():window.clearTimeout(p.current)},[b,h]),onOpen:w,onClose:b,disableHoverableContent:h,children:n})})};It.displayName=Re;var je="TooltipTrigger",Bt=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Oe(je,n),i=Ye(je,n),s=Ae(n),c=f.useRef(null),a=Q(t,c,r.onTriggerChange),l=f.useRef(!1),u=f.useRef(!1),d=f.useCallback(()=>l.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),P.jsx(_o,{asChild:!0,...s,children:P.jsx(ee.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:a,onPointerMove:U(e.onPointerMove,m=>{m.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:U(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:U(e.onFocus,()=>{l.current||r.onOpen()}),onBlur:U(e.onBlur,r.onClose),onClick:U(e.onClick,r.onClose)})})});Bt.displayName=je;var Xo="TooltipPortal",[hr,Go]=Pe(Xo,{forceMount:void 0}),re="TooltipContent",Ht=f.forwardRef((e,t)=>{const n=Go(re,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,s=Oe(re,e.__scopeTooltip);return P.jsx($t,{present:o||s.open,children:s.disableHoverableContent?P.jsx(zt,{side:r,...i,ref:t}):P.jsx(qo,{side:r,...i,ref:t})})}),qo=f.forwardRef((e,t)=>{const n=Oe(re,e.__scopeTooltip),o=Ye(re,e.__scopeTooltip),r=f.useRef(null),i=Q(t,r),[s,c]=f.useState(null),{trigger:a,onClose:l}=n,u=r.current,{onPointerInTransitChange:d}=o,m=f.useCallback(()=>{c(null),d(!1)},[d]),p=f.useCallback((h,g)=>{const x=h.currentTarget,v={x:h.clientX,y:h.clientY},y=Qo(v,x.getBoundingClientRect()),C=er(v,y),w=tr(g.getBoundingClientRect()),b=or([...C,...w]);c(b),d(!0)},[d]);return f.useEffect(()=>()=>m(),[m]),f.useEffect(()=>{if(a&&u){const h=x=>p(x,u),g=x=>p(x,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",g),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",g)}}},[a,u,p,m]),f.useEffect(()=>{if(s){const h=g=>{const x=g.target,v={x:g.clientX,y:g.clientY},y=(a==null?void 0:a.contains(x))||(u==null?void 0:u.contains(x)),C=!nr(v,s);y?m():C&&(m(),l())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,s,l,m]),P.jsx(zt,{...e,ref:i})}),[Ko,Zo]=Pe(Re,{isInside:!1}),zt=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,a=Oe(re,n),l=Ae(n),{onClose:u}=a;return f.useEffect(()=>(document.addEventListener($e,u),()=>document.removeEventListener($e,u)),[u]),f.useEffect(()=>{if(a.trigger){const d=m=>{const p=m.target;p!=null&&p.contains(a.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[a.trigger,u]),P.jsx(ht,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:P.jsxs(ko,{"data-state":a.stateAttribute,...l,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[P.jsx(pt,{children:o}),P.jsx(Ko,{scope:n,isInside:!0,children:P.jsx(zo,{id:a.contentId,role:"tooltip",children:r||o})})]})})});Ht.displayName=re;var Vt="TooltipArrow",Jo=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Ae(n);return Zo(Vt,n).isInside?null:P.jsx($o,{...r,...o,ref:t})});Jo.displayName=Vt;function Qo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function er(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function tr(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function nr(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i].x,a=t[i].y,l=t[s].x,u=t[s].y;a>o!=u>o&&n<(l-c)*(o-a)/(u-a)+c&&(r=!r)}return r}function or(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),rr(t)}function rr(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(r.y-s.y)>=(i.y-s.y)*(r.x-s.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ir=Wt,sr=It,cr=Bt,Ut=Ht;const gr=ir,ar=sr,lr=cr;function Yt({className:e,sideOffset:t=4,ref:n,...o}){return P.jsx(Ut,{ref:n,sideOffset:t,className:on("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}Yt.displayName=Ut.displayName;function xr({content:e,children:t}){return e?P.jsxs(ar,{children:[P.jsx(lr,{asChild:!0,children:t}),P.jsx(Yt,{children:e})]}):t}export{_o as A,ko as C,ht as D,ee as P,Mo as R,xr as S,gr as T,jt as V,ar as a,lr as b,Yt as c,sn as d,En as e,U as f,$t as g,Q as h,ne as i,Ot as j,dt as k,$o as l,pr as m,ie as n,Io as u};
2
- //# sourceMappingURL=tooltip-leWCE50J.js.map