@articles-media/articles-dev-box 1.0.22 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@articles-media/articles-dev-box",
3
3
  "description": "Shared code, functions, and components for different Articles Media projects.",
4
- "version": "1.0.22",
4
+ "version": "1.0.23",
5
5
  "type": "module",
6
6
  "imports": {
7
7
  "#root/src/*": "./src/*"
8
8
  },
9
- "main": "./dist/index.cjs",
9
+ "main": "./dist/index.js",
10
10
  "module": "./dist/index.js",
11
11
  "files": [
12
12
  "dist"
@@ -16,70 +16,22 @@
16
16
  "url": "git+https://github.com/Articles-Joey/articles-dev-box.git"
17
17
  },
18
18
  "exports": {
19
- ".": {
20
- "import": "./dist/index.js",
21
- "require": "./dist/index.cjs"
22
- },
23
- "./Ad": {
24
- "import": "./dist/Ad.js",
25
- "require": "./dist/Ad.cjs"
26
- },
27
- "./ArticlesAd": {
28
- "import": "./dist/ArticlesAd.js",
29
- "require": "./dist/ArticlesAd.cjs"
30
- },
31
- "./GameScoreboard": {
32
- "import": "./dist/GameScoreboard.js",
33
- "require": "./dist/GameScoreboard.cjs"
34
- },
35
- "./ReturnToLauncherButton": {
36
- "import": "./dist/ReturnToLauncherButton.js",
37
- "require": "./dist/ReturnToLauncherButton.cjs"
38
- },
39
- "./GlobalHead": {
40
- "import": "./dist/GlobalHead.js",
41
- "require": "./dist/GlobalHead.cjs"
42
- },
43
- "./GlobalBody": {
44
- "import": "./dist/GlobalBody.js",
45
- "require": "./dist/GlobalBody.cjs"
46
- },
47
- "./ViewUserModal": {
48
- "import": "./dist/ViewUserModal.js",
49
- "require": "./dist/ViewUserModal.cjs"
50
- },
51
- "./SettingsModal": {
52
- "import": "./dist/SettingsModal.js",
53
- "require": "./dist/SettingsModal.cjs"
54
- },
55
- "./CreditsModal": {
56
- "import": "./dist/CreditsModal.js",
57
- "require": "./dist/CreditsModal.cjs"
58
- },
59
- "./DarkModeHandler": {
60
- "import": "./dist/DarkModeHandler.js",
61
- "require": "./dist/DarkModeHandler.cjs"
62
- },
63
- "./FriendsList": {
64
- "import": "./dist/FriendsList.js",
65
- "require": "./dist/FriendsList.cjs"
66
- },
67
- "./useUserDetails": {
68
- "import": "./dist/useUserDetails.js",
69
- "require": "./dist/useUserDetails.cjs"
70
- },
71
- "./useUserToken": {
72
- "import": "./dist/useUserToken.js",
73
- "require": "./dist/useUserToken.cjs"
74
- },
75
- "./useUserFriends": {
76
- "import": "./dist/useUserFriends.js",
77
- "require": "./dist/useUserFriends.cjs"
78
- },
79
- "./useFullscreen": {
80
- "import": "./dist/useFullscreen.js",
81
- "require": "./dist/useFullscreen.cjs"
82
- },
19
+ ".": "./dist/index.js",
20
+ "./Ad": "./dist/Ad.js",
21
+ "./ArticlesAd": "./dist/ArticlesAd.js",
22
+ "./GameScoreboard": "./dist/GameScoreboard.js",
23
+ "./ReturnToLauncherButton": "./dist/ReturnToLauncherButton.js",
24
+ "./GlobalHead": "./dist/GlobalHead.js",
25
+ "./GlobalBody": "./dist/GlobalBody.js",
26
+ "./ViewUserModal": "./dist/ViewUserModal.js",
27
+ "./SettingsModal": "./dist/SettingsModal.js",
28
+ "./CreditsModal": "./dist/CreditsModal.js",
29
+ "./DarkModeHandler": "./dist/DarkModeHandler.js",
30
+ "./FriendsList": "./dist/FriendsList.js",
31
+ "./useUserDetails": "./dist/useUserDetails.js",
32
+ "./useUserToken": "./dist/useUserToken.js",
33
+ "./useUserFriends": "./dist/useUserFriends.js",
34
+ "./useFullscreen": "./dist/useFullscreen.js",
83
35
  "./dist/style.css": "./dist/articles-dev-box.css",
84
36
  "./dist/articles-dev-box.css": "./dist/articles-dev-box.css"
85
37
  },
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./classnames-pS64X3rL.cjs`),n=require(`./jsx-runtime-hCcDh67y.cjs`),r=require(`./Button-CbpRj01E.cjs`),i=require(`./Link-c7exNCJ3.cjs`),a=require(`./numberWithCommas-D9tgiUnq.cjs`);let o=require(`react`),s=require(`react-intersection-observer`),c=require(`swr`);c=e.n(c);let l=require(`date-fns`);var u=async e=>{if(process.env.NODE_ENV===`development`)try{let t=new URLSearchParams({ad_id:e.ad_id,user_ad_token:e.user_ad_token}).toString();return(await(await fetch(`http://localhost:3001/api/ads/${e.ad_id}?${t}`)).json()).result}catch{}let t=new URLSearchParams({ad_id:e.ad_id}).toString();return fetch(`${e.url}?${t}`).then(e=>e.json()).then(e=>e.result)},d={dedupingInterval:1e3*60*60},f=(e,t)=>{let{data:n,error:r,isLoading:i,mutate:a}=(0,c.default)(e?{url:`https://articles.media/api/ads/${e}`,ad_id:e,user_ad_token:t}:null,u,d);return{data:n,error:r,isLoading:i,mutate:a}},p=async e=>{if(process.env.NODE_ENV===`development`)try{return await(await fetch(`http://localhost:3001/api/ads`)).json()}catch{}return fetch(e.url).then(e=>e.json())},m=60,h={dedupingInterval:(0,l.minutesToMilliseconds)(m),focusThrottleInterval:(0,l.minutesToMilliseconds)(m)},g=e=>{let{data:t,error:n,isLoading:r,mutate:i}=(0,c.default)(e?.loading||e?.disabled?null:{url:`https://articles.media/api/ads`},p,h);return{data:t,error:n,isLoading:r,mutate:i}},_=n.t(),v=e.n(t.t(),1),y=(0,o.lazy)(()=>Promise.resolve().then(()=>require(`./AdDetailsModal-g0n7LiV6.cjs`))),b=(0,o.lazy)(()=>Promise.resolve().then(()=>require(`./AdConfirmExitModal-CRCnzYQM.cjs`)));function x(e,t){return Math.floor(Math.random()*(t-e+1))+e}function S(e){let{previewMode:t,darkMode:n,user_ad_token:c,userDetails:u,userDetailsLoading:d,prepend:p,append:m}=e,h=[],[S,C]=(0,o.useState)(null),{data:w,isLoading:T,mutate:E}=g({loading:d,disabled:u?.articles_membership?.status==`Active`}),{data:D,isLoading:O}=f(S,c),k=e.previewData||{},[ee,te]=(0,o.useState)(null),[ne,A]=(0,o.useState)(null),[j,M]=(0,o.useState)(null),[N,P]=(0,o.useState)(0),[F,I]=(0,o.useState)(!1),[L,R]=(0,o.useState)(!1),[z,B]=(0,o.useState)(!1),[V,H]=(0,o.useState)(new Date),[U,W]=(0,o.useState)([]);(0,o.useEffect)(()=>{w&&w?.length>0&&!S&&(console.log(`Ad Mounted or reduxAds changed`),C(e.ad_id||w[x(0,w?.length-1)]?._id))},[w]),(0,o.useEffect)(()=>{},[D]),(0,o.useEffect)(()=>{D?.populated_promos&&N>=0&&M(D?.populated_promos[N])},[N,D]);function G(){R(!L)}let{ref:K,inView:q,entry:re}=(0,s.useInView)({threshold:0,triggerOnce:!0});function J(e){if(t&&console.log(`Preventing this event from being logged as this ad is being shown in preview mode.`),U.find(t=>t==e)){console.log(`Already logged this event`);return}let n=new URLSearchParams({ad_id:D?._id,event:e}).toString();fetch(`/api/ads/event?${n}`).then(function(e){return e.json()}).then(function(t){W([...U,e]),console.log(t)}).catch(function(e){console.log(e)})}(0,o.useEffect)(()=>{if(!t&&(console.log(`inView`,q),q&&S)){let e=[{ad_id:S,date:new Date().toString()},...h.filter(e=>{if(console.log((0,l.differenceInMinutes)(new Date,new Date(e.date))),(0,l.differenceInMinutes)(new Date,new Date(e.date))>5){console.log(`adsViewed - Remove Old Ad View Object`);return}else return console.log(`adsViewed - Keep Ad View Object`),e})];console.log(`unexpiredRecentViews`,e)}},[q,S]);let[Y,X]=(0,o.useState)(null),[Z,Q]=(0,o.useState)(!1);function $(){Q(!0),console.log(`logAdAvoided called`,c);let e=process.env.NODE_ENV===`development`?`http://localhost:3001/api/user/advertising/avoided`:`https://articles.media/api/user/advertising/avoided`,t=new URLSearchParams({user_id:u?._id}).toString();fetch(`${e}?${t}`,{headers:{"x-articles-api-key":c}}).then(function(e){return e.json()}).then(function(e){Q(!1),X(e.avoided_count),console.log(e)}).catch(function(e){console.log(e),Q(!1)})}return(0,o.useEffect)(()=>{t||(console.log(`inView`,q),u?.articles_membership?.status==`Active`&&q&&$(`Ad Avoided`))},[q,u]),d?null:(0,_.jsxs)(`div`,{ref:K,className:(0,v.default)(`ad-wrap`,{"active-member":u?.articles_membership?.status==`Active`}),style:{"--articles-ad-background-color":k.background_color||D?.background_color,"--articles-ad-font-color":k.font_color||D?.font_color,"--articles-ad-border-color":k.border_color||D?.border_color},children:[L&&(0,_.jsx)(y,{setModalShow:R,ad:D,previewData:k}),z&&(0,_.jsx)(b,{setModalShow:B,ad:D,previewData:k}),p&&(0,_.jsx)(`div`,{className:`prepend-container`,children:p}),(0,_.jsxs)(`div`,{className:`ad`,children:[u?.articles_membership?.status!==`Active`&&(0,_.jsxs)(`div`,{className:`main-panel`,children:[(0,_.jsx)(`div`,{className:`ad-warning flex-header`,children:(0,_.jsxs)(`div`,{className:``,children:[D?.city&&`Local`,` Advertisement`]})}),(0,_.jsxs)(`div`,{className:`content-wrap`,children:[(0,_.jsxs)(`div`,{className:`photo-banner`,children:[(0,_.jsx)(`div`,{className:`logo`,children:(k.logo?.location||D?.logo?.location)&&(0,_.jsx)(`img`,{src:k?.logo?.key?`${process.env.NEXT_PUBLIC_CDN}${k?.logo?.key}`:`${process.env.NEXT_PUBLIC_CDN}${D?.logo?.key}`,alt:``})}),(0,_.jsx)(`div`,{className:`icon d-none`,children:(0,_.jsx)(`i`,{className:`fas fa-mug-hot`})}),(0,_.jsx)(`img`,{className:`photo`,src:k?.background?.key?`${process.env.NEXT_PUBLIC_CDN}${k.background?.key}`:`${process.env.NEXT_PUBLIC_CDN}${D?.background?.key}`,alt:``})]}),(0,_.jsxs)(`div`,{className:`details-wrap`,children:[(0,_.jsxs)(`div`,{className:`detail-title`,children:[(0,_.jsx)(`div`,{className:`detail`,children:(0,_.jsx)(`span`,{className:`h4`,children:k?.business||D?.business})}),(0,_.jsxs)(`div`,{className:`flex flex-column d-none`,children:[(0,_.jsxs)(`div`,{className:`detail`,children:[(0,_.jsx)(`span`,{className:`icon`,children:(0,_.jsx)(`i`,{className:`fas fa-search-location`})}),(0,_.jsxs)(`span`,{children:[D?.city,`, `,D?.state]})]}),(0,_.jsxs)(`div`,{className:`detail`,children:[(0,_.jsx)(`span`,{className:`icon`,children:(0,_.jsx)(`i`,{className:`fas fa-clock me-2`})}),(0,_.jsx)(`span`,{children:`6:30AM–8PM`})]})]})]}),D?.city&&(0,_.jsx)(`div`,{className:`details mb-3 d-none`}),(0,_.jsx)(`div`,{className:`short-description`,children:k?.description||D?.description})]})]}),(!1)?.roles?.isDev&&D?.populated_promos?.length>0&&(0,_.jsxs)(`div`,{children:[j&&(0,_.jsx)(`div`,{className:`promos-wrap`,children:j&&(0,_.jsxs)(`div`,{className:`promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0`,children:[(0,_.jsxs)(`div`,{className:``,children:[(0,_.jsx)(`div`,{children:j.title}),(0,_.jsx)(`div`,{className:`small`,children:(0,_.jsx)(`div`,{className:`small`,children:j.details})})]}),(0,_.jsx)(r.t,{className:`px-3`,small:!0,onClick:()=>{console.log(`Load Save Modal`),I(!0)},children:`Save`})]},j._id)}),(0,_.jsxs)(`div`,{className:`d-flex justify-content-between`,children:[(0,_.jsxs)(`div`,{className:`px-2`,children:[D?.populated_promos?.length,` Promos Active`]}),(0,_.jsxs)(`div`,{className:`controls`,children:[(0,_.jsx)(`i`,{className:`fad fa-arrow-circle-left`,type:`button`,onClick:()=>{P(N==0?D?.populated_promos?.length-1:e=>e-1)}}),D?.populated_promos?.map((e,t)=>(0,_.jsx)(`i`,{className:`fa-square ${t==N?`fad`:`fas`}`},e._id)),(0,_.jsx)(`i`,{className:`fad fa-arrow-circle-right`,type:`button`,onClick:()=>{N==D?.populated_promos?.length-1?P(0):P(e=>e+1)}})]})]})]}),(0,_.jsx)(`hr`,{style:{borderColor:`white`},className:`mt-auto mb-0`}),(0,_.jsxs)(`div`,{className:`action-wrap d-flex justify-content-lg-between px-3 py-2`,children:[(0,_.jsx)(`div`,{onClick:()=>{G(),J(`Details`)},className:`action flex-grow-1 flex-shrink-0`,children:`Details`}),(0,_.jsx)(`span`,{className:`px-4`}),(0,_.jsx)(`a`,{className:`action flex-grow-1 flex-shrink-0`,href:D?.website,target:`_blank`,rel:`noreferrer`,onClick:e=>{e.preventDefault(),B(!0),J(`Confirm Exit Modal Opened`)},children:(0,_.jsx)(`div`,{children:`Website`})})]})]}),u?.articles_membership?.status==`Active`&&(0,_.jsx)(`div`,{className:`main-panel`,children:(0,_.jsxs)(`div`,{className:`content-wrap`,children:[(0,_.jsxs)(`div`,{className:`photo-banner`,children:[(0,_.jsx)(`div`,{className:`logo`}),(0,_.jsxs)(`div`,{className:`splash`,children:[(0,_.jsx)(`i`,{className:`fas fa-broadcast-tower`}),(0,_.jsxs)(`div`,{className:`text`,children:[(0,_.jsx)(`div`,{className:`count`,children:Z?(0,_.jsx)(`i`,{className:`fas fa-spinner fa-spin me-0`}):Y?a.t(Y):0}),(0,_.jsx)(`div`,{className:`label`,children:`ads avoided.`})]})]}),(0,_.jsxs)(`div`,{className:`member-since`,children:[`Member since: `,(0,_.jsx)(a.n,{format:`PP`,date:u?.articles_membership?.membership_started})]})]}),(0,_.jsxs)(`div`,{className:`details-wrap`,children:[(0,_.jsx)(`div`,{className:`detail-title`,children:(0,_.jsx)(`div`,{className:`detail`,children:(0,_.jsx)(`span`,{className:`h4`,children:`Thanks for the support!`})})}),(0,_.jsxs)(`div`,{className:`short-description`,children:[(0,_.jsx)(`div`,{className:`mb-2`,children:`Without support from users like you, we wouldn't be here.`}),(0,_.jsxs)(`div`,{className:`links-list`,children:[(0,_.jsxs)(i.t,{newPage:!0,className:`link-item`,href:`https://articles.media/messages`,children:[(0,_.jsx)(`i`,{className:`fas fa-comments-alt`}),`0 unread messages.`]}),(0,_.jsxs)(i.t,{newPage:!0,className:`link-item`,href:`https://articles.media/settings/notifications`,onClick:()=>{$()},children:[(0,_.jsx)(`i`,{className:`fas fa-bell`}),`0 notifications.`]}),(0,_.jsxs)(i.t,{newPage:!0,className:`link-item`,href:`https://articles.media/settings/account`,children:[(0,_.jsx)(`i`,{className:`fas fa-cog`}),`Manage account settings.`]})]})]})]})]})})]}),m&&(0,_.jsx)(`div`,{className:`append-container`,children:m}),!t&&(0,_.jsx)(`div`,{className:`advertise-with-us p-1`,style:{backgroundColor:k.background_color||D?.background_color,color:k.font_color||D?.font_color,borderColor:k.border_color||D?.border_color},children:(0,_.jsxs)(i.t,{className:`small d-block w-100 text-center`,href:`https://articles.media/advertising`,newPage:!0,children:[(0,_.jsx)(`i`,{className:`fas fa-share me-1`}),`Advertise with Articles Media!`]})})]})}var C=(0,o.memo)(S);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return C}});
package/dist/Ad.cjs DELETED
@@ -1 +0,0 @@
1
- const e=require(`./Ad-DYtftKNV.cjs`);module.exports=e.t;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`),n=require(`./Link-c7exNCJ3.cjs`),r=require(`./Modal-DP9CeAVD.cjs`);let i=require(`react`);var a=e.t();function o(e){let{setModalShow:o,ad:s,previewData:c}=e;(0,i.useEffect)(()=>{console.log(`Mounted`)},[]);let l=()=>{o(!1)};return(0,a.jsx)(`div`,{children:(0,a.jsxs)(r.t,{show:!0,backdropClassName:`ad-details-modal-backdrop`,className:`articles-modal`,centered:!0,onHide:l,size:`md`,children:[(0,a.jsx)(r.t.Header,{className:`align-items-center`,closeButton:!0,children:(0,a.jsx)(r.t.Title,{children:`Confirm Exit`})}),(0,a.jsxs)(r.t.Body,{className:``,children:[(0,a.jsx)(`div`,{className:`ratio ratio-16x9 bg-black mb-2`}),(0,a.jsx)(`p`,{className:`mb-1`,children:`This advertiser has been approved and verified to display ads but always be cautious when interacting with ads. Any offsite interactions are at your own risk and should be approached with caution. We can not be held responsible for any issues that may arise.`})]}),(0,a.jsxs)(r.t.Footer,{className:`d-flex justify-content-between`,children:[(0,a.jsxs)(t.t,{variant:`articles`,onClick:l,children:[(0,a.jsx)(`i`,{className:`fad fa-times`}),`Close`]}),(0,a.jsx)(n.t,{href:s?.website,newPage:!0,children:(0,a.jsxs)(t.t,{variant:`articles`,onClick:l,children:[(0,a.jsx)(`i`,{className:`fad fa-link`}),`Proceed`]})})]})]})})}exports.default=o;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`),n=require(`./Link-c7exNCJ3.cjs`),r=require(`./Modal-DP9CeAVD.cjs`);let i=require(`react`);var a=e.t();function o(e){let{setModalShow:o,ad:s,previewData:c}=e;(0,i.useEffect)(()=>{console.log(`Mounted`)},[]);let l=()=>{o(!1)};return(0,a.jsx)(`div`,{children:(0,a.jsxs)(r.t,{show:!0,backdropClassName:`ad-details-modal-backdrop`,className:`articles-modal`,centered:!0,onHide:l,size:`md`,children:[(0,a.jsx)(r.t.Header,{className:`align-items-center`,closeButton:!0,children:(0,a.jsx)(r.t.Title,{children:`Ad Details`})}),(0,a.jsxs)(r.t.Body,{className:``,children:[(0,a.jsxs)(`p`,{className:`mb-1`,children:[`Advertiser: `,(0,a.jsx)(`b`,{children:s?.business})]}),(0,a.jsxs)(`p`,{className:`mb-0`,children:[`Ad ID: `,(0,a.jsx)(`b`,{children:c?._id||s._id})]}),(0,a.jsx)(`hr`,{}),(0,a.jsx)(`div`,{className:`mb-1`,children:`This ad is being shown to you for the following reasons`}),s.city?(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`h4 mb-1`,children:s.business}),(0,a.jsx)(`div`,{children:`Is advertising to all zip codes within a`}),(0,a.jsx)(`span`,{children:(0,a.jsx)(`div`,{className:`badge bg-black shadow-articles`,children:`15 Mile Radius`})}),(0,a.jsx)(`div`,{children:`of it's business`}),(0,a.jsx)(`hr`,{className:`border w-50 border-white`}),(0,a.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,a.jsx)(`div`,{children:`Your Zip code`}),(0,a.jsx)(`div`,{className:`badge bg-black shadow-articles ms-2`,children:`00000`}),(0,a.jsx)(`div`,{className:`ms-2`,children:`is`}),(0,a.jsx)(`div`,{className:`badge bg-black shadow-articles ms-2`,children:`4.2 miles away`})]})]}):(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`div`,{className:`h4 mb-1`,children:s.business}),(0,a.jsx)(`div`,{children:`Is advertising to all users`})]}),(0,a.jsx)(`div`,{className:`grow`}),(0,a.jsx)(`hr`,{className:`w-100`}),(0,a.jsx)(`div`,{className:`reason lh-sm mb-2`,children:`Ads we display to you will always be transparent as to why you are seeing them.`}),(0,a.jsx)(n.t,{href:`https://articles.media/settings/account`,newPage:!0,className:``,children:(0,a.jsx)(t.t,{small:!0,children:`Settings`})})]}),(0,a.jsx)(r.t.Footer,{className:`d-flex justify-content-center`,children:(0,a.jsx)(t.t,{variant:`articles`,onClick:l,children:`Close`})})]})})}exports.default=o;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./jsx-runtime-hCcDh67y.cjs`);let n=require(`react`);n=e.n(n);var r=t.t();function i({darkMode:e}){return(0,n.useEffect)(()=>{},[]),(0,n.useEffect)(()=>{let e=document.createElement(`script`);return e.src=`https://accounts.articles.media/js/ad.js`,e.async=!0,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),(0,r.jsx)(`div`,{className:``,children:(0,r.jsx)(`div`,{className:`articles-media-ad`})})}module.exports=i;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./classnames-pS64X3rL.cjs`),n=require(`./jsx-runtime-hCcDh67y.cjs`);let r=require(`react`);var i=e.n(t.t(),1),a=n.t(),o=(0,r.forwardRef)((e,t)=>{let{size:n,variant:r,style:o,small:s,large:c,onClick:l,className:u,disabled:d,active:f,type:p,onMouseDown:m,onMouseUp:h,onMouseLeave:g,onTouchStart:_,onTouchEnd:v,...y}=e;return(0,a.jsx)(`button`,{ref:t,...p&&{type:`submit`},disabled:d,style:o,onMouseDown:m,onMouseUp:h,onMouseLeave:g,onTouchStart:_,onTouchEnd:v,className:(0,i.default)(`btn ${r?`btn-${r}`:`btn-articles`}`,{[u]:u,"btn-lg":c,"btn-sm":s,active:f,[`btn-${n}`]:n}),onClick:l,children:e.children})});o.displayName=`ArticlesButton`,Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`);let n=require(`react`),r=require(`react-bootstrap`);var i=e.t();function a({show:e,setShow:a,useStore:o,owner:s,repo:c,developers:l,publisher:u,introText:d}){let[f,p]=(0,n.useState)(!1);return(0,i.jsxs)(r.Modal,{className:`articles-modal`,size:`md`,show:e,centered:!0,scrollable:!0,onExited:()=>{},onHide:()=>{a(!1)},children:[(0,i.jsx)(r.Modal.Header,{closeButton:!0,children:(0,i.jsx)(r.Modal.Title,{children:`Game Credits`})}),(0,i.jsxs)(r.Modal.Body,{className:`flex-column p-3`,children:[d&&(0,i.jsx)(`div`,{className:`mb-3`,children:d}),l?(0,i.jsx)(`div`,{}):(0,i.jsx)(`div`,{children:`Developed by: ArticlesJoey `}),u?(0,i.jsx)(`div`,{}):(0,i.jsx)(`div`,{children:`Published by: Articles Media `}),(0,i.jsx)(`div`,{className:`mb-3`}),s&&c&&(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`div`,{children:`Attributions:`}),(0,i.jsx)(`a`,{href:`https://github.com/${s}/${c}/blob/main/README.md`,target:`_blank`,rel:`noopener noreferrer`,children:(0,i.jsxs)(t.t,{children:[(0,i.jsx)(`i`,{className:`fab fa-github`}),`View on GitHub`]})})]})]}),(0,i.jsxs)(r.Modal.Footer,{className:`justify-content-between`,children:[(0,i.jsx)(`div`,{}),(0,i.jsx)(t.t,{variant:`outline-dark`,onClick:()=>{a(!1)},children:`Close`})]})]})}module.exports=a;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`);let t=require(`react`);var n=e.t();function r({useStore:e}){let r=e(e=>e.darkMode),i=e(e=>e._hasHydrated);return(0,t.useEffect)(()=>{if(i){if(r==null){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches;e.getState().setDarkMode(!!t)}r?document.body.setAttribute(`data-bs-theme`,`dark`):document.body.setAttribute(`data-bs-theme`,`light`)}},[r,i]),(0,n.jsx)(n.Fragment,{})}module.exports=r;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`),n=require(`./useUserFriends.cjs`);let r=require(`react-bootstrap`);var i=e.t();function a({show:e,setShow:a,componentType:o,className:s,style:c={},user_id:l,user_token:u,id:d=null,allowInvite:f=!1,inviteFunction:p=null,modalBackdropClassName:m=``}){let{data:h,error:g,isLoading:_,mutate:v}=n({user_id:l,user_token:u});if((!o||o==`list`)&&!_&&h&&h.length>0)return(0,i.jsx)(`ul`,{className:s,style:c,children:h.map(e=>(0,i.jsxs)(`li`,{children:[e?.populated_user?.username,` - `,e?.populated_user?.display_name||`No Display Name`]},e.user_id))});if(o.toLowerCase()==`modal`)return(0,i.jsxs)(r.Modal,{show:e,size:`md`,className:`articles-modal ${s}`,modalBackdropClassName:m,centered:!0,onHide:()=>a(!1),style:c,id:d,children:[(0,i.jsx)(r.Modal.Header,{children:(0,i.jsx)(r.Modal.Title,{children:`Friends`})}),(0,i.jsxs)(r.Modal.Body,{children:[_&&(0,i.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,i.jsx)(`i`,{className:`fad fa-spinner-third fa-spin fa-2x`}),(0,i.jsx)(`div`,{children:`Loading...`})]}),!_&&h&&h.length==0&&(0,i.jsx)(`div`,{children:`No friends to show.`}),!_&&h&&h.length>0&&(0,i.jsx)(`div`,{children:h.map(e=>(0,i.jsxs)(`div`,{className:`d-flex align-items-center justify-content-between border p-1`,children:[e?.populated_user?.username,` - `,e?.populated_user?.display_name||`No Display Name`,(0,i.jsxs)(`div`,{children:[f&&(0,i.jsx)(t.t,{variant:`articles`,onClick:()=>{f(e)},children:(0,i.jsx)(`i`,{className:`fad fa-comment-check`})}),(0,i.jsx)(t.t,{variant:`articles`,onClick:()=>{},children:(0,i.jsx)(`i`,{className:`fad fa-info`})})]})]},e.user_id))})]}),(0,i.jsxs)(r.Modal.Footer,{className:`justify-content-between`,children:[(0,i.jsxs)(t.t,{variant:`articles`,onClick:()=>{v()},children:[(0,i.jsx)(`i`,{className:`fad fa-redo me-2`}),(0,i.jsx)(`span`,{children:`Refresh`})]}),(0,i.jsxs)(t.t,{variant:`articles`,onClick:()=>{a(!1)},children:[(0,i.jsx)(`i`,{className:`fad fa-times me-2`}),`Close`]})]})]})}module.exports=a;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./jsx-runtime-hCcDh67y.cjs`),n=require(`./Button-CbpRj01E.cjs`),r=require(`./Modal-DP9CeAVD.cjs`),i=require(`./ViewUserModal-DPVcjXNU.cjs`);let a=require(`react`),o=require(`swr`);o=e.n(o);var s=t.t();function c({setChecked:e,checked:t,readOnly:n}){return(0,s.jsxs)(`label`,{className:`articles-switch mb-0 ${t&&`checked`}`,children:[(0,s.jsx)(`input`,{type:`checkbox`,readOnly:!!n,checked:t,onChange:()=>{}}),(0,s.jsx)(`span`,{onClick:n=>{if(e){e(!t);return}else{n.preventDefault();return}},className:`slider`})]})}var l=async e=>{if(process.env.NODE_ENV===`development`)try{let t=new URLSearchParams({game:e.game}).toString();return await(await fetch(`http://localhost:3001/api/community/games/scoreboard?${t}`)).json()}catch{}let t=new URLSearchParams({game:e.game}).toString();return fetch(`${e.url}?${t}`).then(e=>e.json())},u={dedupingInterval:1e3*60*30,refreshInterval:0,revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1},d=e=>{let{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=(0,o.default)(e?.game?{url:`https://articles.media/api/community/games/scoreboard`,game:e.game}:null,l,u);return{data:t,error:n,isLoading:r,isValidating:i,mutate:a}};function f({game:e,reloadScoreboard:t,setReloadScoreboard:o,prepend:l,append:u}){let[f,p]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),{data:g,isLoading:_,mutate:v}=d({game:e});return(0,a.useEffect)(()=>{},[]),(0,a.useEffect)(()=>{t&&(o(!1),v())},[t]),(0,s.jsxs)(`div`,{className:`scoreboard`,children:[(0,s.jsxs)(r.t,{show:f,size:`md`,className:`articles-modal`,centered:!0,onHide:()=>p(!1),children:[(0,s.jsx)(r.t.Header,{children:(0,s.jsx)(r.t.Title,{children:`Scoreboard Settings`})}),(0,s.jsx)(r.t.Body,{children:(0,s.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,onClick:()=>h(!m),children:[(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`i`,{className:`fas fa-trophy-alt`}),(0,s.jsx)(`span`,{children:`Join Scoreboard?`})]}),(0,s.jsx)(c,{checked:m})]})}),(0,s.jsx)(r.t.Footer,{className:`justify-content-between`,children:(0,s.jsx)(n.t,{variant:`articles`,onClick:()=>{p(!1)},children:`Close`})})]}),(0,s.jsx)(`div`,{className:`prepend-container`,children:l}),(0,s.jsxs)(`div`,{className:`card card-articles card-sm mb-3 mb-lg-0`,children:[(0,s.jsxs)(`div`,{className:`card-header d-flex justify-content-between align-items-center`,children:[(0,s.jsxs)(`span`,{children:[e,` Scoreboard`]}),(0,s.jsx)(n.t,{onClick:()=>{v()},small:!0,children:(0,s.jsx)(`i`,{className:`fad fa-redo me-0`})})]}),(0,s.jsxs)(`div`,{className:`card-body p-0`,children:[(g?.length||0)==0&&(0,s.jsx)(`div`,{className:`small p-2`,children:`No scores yet`}),g?.map((e,t)=>(0,s.jsxs)(`div`,{className:`result d-flex flex-column justify-content-between border-bottom p-2`,children:[(0,s.jsxs)(`div`,{className:`d-flex justify-content-between lh-sm`,children:[(0,s.jsxs)(`div`,{className:`d-flex`,children:[(0,s.jsx)(`h5`,{className:`mb-0 me-3`,children:t+1}),(0,s.jsx)(`div`,{className:`lh-sm`,children:(0,s.jsx)(i.t,{populated_user:e.populated_user,user_id:e.user_id})})]}),(0,s.jsx)(`div`,{children:(0,s.jsx)(`h5`,{className:`mb-0`,children:e.score||e.total})})]}),e.last_play&&e.public_last_play&&(0,s.jsxs)(`small`,{className:`mt-1`,style:{fontSize:`0.75rem`},children:[`Played: `,format(new Date(e.last_play),`MM/d/yy hh:mmaa`)]})]},e._id))]}),(0,s.jsxs)(`div`,{className:`card-footer d-flex justify-content-between align-items-center`,children:[(0,s.jsx)(`div`,{className:`small`,children:`Play to get on the board!`}),(0,s.jsx)(n.t,{small:!0,onClick:()=>{p(!0)},children:(0,s.jsx)(`i`,{className:`fad fa-cog me-0`})})]})]}),(0,s.jsx)(`div`,{className:`append-container`,children:u})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
@@ -1 +0,0 @@
1
- const e=require(`./GameScoreboard-DdOCRxON.cjs`);module.exports=e.t;
@@ -1,33 +0,0 @@
1
- "use client";const e=require(`./chunk-350yNsax.cjs`),t=require(`./classnames-pS64X3rL.cjs`),n=require(`./jsx-runtime-hCcDh67y.cjs`),r=require(`./useAuthSiteStatus-P5kHc_Bz.cjs`);let i=require(`react`);i=e.n(i);var a=e.n(t.t(),1),o=n.t(),s=(0,i.lazy)(()=>Promise.resolve().then(()=>require(`./StatusModal-D7WDDR9P.cjs`)));function c(e){let[t,n]=(0,i.useState)(!1),{data:c,error:l,isLoading:u,mutate:d}=r.n({disable:process.env.NODE_ENV!==`development`}),{data:f,error:p,isLoading:m,mutate:h}=r.t({disable:process.env.NODE_ENV!==`development`});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`link`,{rel:`stylesheet`,href:`https://cdn.articles.media/fonts/fontawesome/css/all.min.css`}),process.env.NODE_ENV===`development`&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`style`,{children:`
2
- @keyframes grow-shrink {
3
- 0% { transform: translateY(-50px); }
4
- 50% { transform: translateY(0px); }
5
- 100% { transform: translateY(-50px); }
6
- }
7
- .articles-global-body {
8
- transform: translateY(-40px);
9
- z-index: 1055!important;
10
- position: absolute;
11
- top: 0;
12
- left: 0;
13
- display: flex;
14
- justify-content: center;
15
- align-items: center;
16
- width: 50px;
17
- height: 50px;
18
- margin: 0;
19
- padding: 0;
20
- background-color: yellow;
21
- color: #FFFFFF;
22
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
23
- animation: grow-shrink 2s ease-in;
24
- border: 4px solid red;
25
- cursor: pointer;
26
- }
27
- .articles-global-body.main-connected {
28
- background-color: green;
29
- }
30
- .articles-global-body.auth-connected {
31
- border-color: blue;
32
- }
33
- `}),(0,o.jsx)(`div`,{onClick:()=>{n(!0)},className:(0,a.default)(`articles-global-body`,{"main-connected":c,"auth-connected":f}),children:(0,o.jsx)(`div`,{className:`content`,children:(0,o.jsx)(`i`,{className:`fas fa-thumbs-up`})})}),t&&(0,o.jsx)(i.Suspense,{children:(0,o.jsx)(s,{show:t,setShow:n})})]})]})}var l=(0,i.memo)(c);module.exports=l;
@@ -1 +0,0 @@
1
- var e=require(`./jsx-runtime-hCcDh67y.cjs`).t();function t(){return(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(`link`,{rel:`stylesheet`,href:`https://cdn.articles.media/fonts/fontawesome/css/all.min.css`})})}module.exports=t;
@@ -1 +0,0 @@
1
- var e=require(`./jsx-runtime-hCcDh67y.cjs`).t();function t(t){let{href:n,children:r,newPage:i,...a}=t;return(0,e.jsx)(`a`,{href:n,...a,...i&&{target:`_blank`,rel:`noopener noreferrer`},children:r})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,3 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./classnames-pS64X3rL.cjs`),n=require(`./jsx-runtime-hCcDh67y.cjs`);let r=require(`react`);r=e.n(r);let i=require(`react-dom`);i=e.n(i);var a=!!(typeof window<`u`&&window.document&&window.document.createElement),o=!1,s=!1;try{var c={get passive(){return o=!0},get once(){return s=o=!0}};a&&(window.addEventListener(`test`,c,c),window.removeEventListener(`test`,c,!0))}catch{}function l(e,t,n,r){if(r&&typeof r!=`boolean`&&!s){var i=r.once,a=r.capture,c=n;!s&&i&&(c=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=c),e.addEventListener(t,c,o?r:a)}e.addEventListener(t,n,r)}function u(e){return e&&e.ownerDocument||document}function d(e,t,n,r){var i=r&&typeof r!=`boolean`?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}var f;function p(e){if((!f&&f!==0||e)&&a){var t=document.createElement(`div`);t.style.position=`absolute`,t.style.top=`-9999px`,t.style.width=`50px`,t.style.height=`50px`,t.style.overflow=`scroll`,document.body.appendChild(t),f=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return f}function m(){return(0,r.useState)(null)}function h(e){let t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e},[e]),t}function g(e){let t=h(e);return(0,r.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}var _=e=>!e||typeof e==`function`?e:t=>{e.current=t};function v(e,t){let n=_(e),r=_(t);return e=>{n&&n(e),r&&r(e)}}function y(e,t){return(0,r.useMemo)(()=>v(e,t),[e,t])}function b(e){let t=(0,r.useRef)(e);return t.current=e,t}function x(e){let t=b(e);(0,r.useEffect)(()=>()=>t.current(),[])}function S(e){var t=u(e);return t&&t.defaultView||window}function C(e,t){return S(e).getComputedStyle(e,t)}var ee=/([A-Z])/g;function te(e){return e.replace(ee,`-$1`).toLowerCase()}var w=/^ms-/;function T(e){return te(e).replace(w,`-ms-`)}var ne=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function re(e){return!!(e&&ne.test(e))}function E(e,t){var n=``,r=``;if(typeof t==`string`)return e.style.getPropertyValue(T(t))||C(e).getPropertyValue(T(t));Object.keys(t).forEach(function(i){var a=t[i];!a&&a!==0?e.style.removeProperty(T(i)):re(i)?r+=i+`(`+a+`) `:n+=T(i)+`: `+a+`;`}),r&&(n+=`transform: `+r+`;`),e.style.cssText+=`;`+n}function D(e,t,n,r){return l(e,t,n,r),function(){d(e,t,n,r)}}function O(e,t,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),e){var i=document.createEvent(`HTMLEvents`);i.initEvent(t,n,r),e.dispatchEvent(i)}}function k(e){var t=E(e,`transitionDuration`)||``,n=t.indexOf(`ms`)===-1?1e3:1;return parseFloat(t)*n}function ie(e,t,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||O(e,`transitionend`,!0)},t+n),a=D(e,`transitionend`,function(){r=!0},{once:!0});return function(){clearTimeout(i),a()}}function A(e,t,n,r){n??=k(e)||0;var i=ie(e,n,r),a=D(e,`transitionend`,t);return function(){i(),a()}}function ae(e){e===void 0&&(e=u());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function j(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}function oe(){let e=(0,r.useRef)(!0),t=(0,r.useRef)(()=>e.current);return(0,r.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function M(e){let t=(0,r.useRef)(e);return t.current=e,t}function se(e){let t=M(e);(0,r.useEffect)(()=>()=>t.current(),[])}function ce(e){let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{t.current=e}),t.current}function N(e){let t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e},[e]),t}function P(e){let t=N(e);return(0,r.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}var F=`data-rr-ui-`;function le(e){return`${F}${e}`}function ue(e=document){let t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}var I=le(`modal-open`),L=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ue(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){let t={overflow:`hidden`},n=this.isRTL?`paddingLeft`:`paddingRight`,r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt(E(r,n)||`0`,10)+e.scrollBarWidth}px`),r.setAttribute(I,``),E(r,t)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){let t=this.getElement();t.removeAttribute(I),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return t!==-1||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),t!==0)?t:(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state),t)}remove(e){let t=this.modals.indexOf(e);t!==-1&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}},R=(0,r.createContext)(a?window:void 0);R.Provider;function z(){return(0,r.useContext)(R)}var B=(e,t)=>a?e==null?(t||u()).body:(typeof e==`function`&&(e=e()),e&&`current`in e&&(e=e.current),e&&(`nodeType`in e||e.getBoundingClientRect)?e:null):null;function de(e,t){let n=z(),[i,a]=(0,r.useState)(()=>B(e,n?.document));if(!i){let t=B(e);t&&a(t)}return(0,r.useEffect)(()=>{t&&i&&t(i)},[t,i]),(0,r.useEffect)(()=>{let t=B(e);t!==i&&a(t)},[e,i]),i}var V=e=>!e||typeof e==`function`?e:t=>{e.current=t};function fe(e,t){let n=V(e),r=V(t);return e=>{n&&n(e),r&&r(e)}}function H(e,t){return(0,r.useMemo)(()=>fe(e,t),[e,t])}var pe=typeof global<`u`&&global.navigator&&global.navigator.product===`ReactNative`,U=typeof document<`u`||pe?r.useLayoutEffect:r.useEffect;function me(e){return e.code===`Escape`||e.keyCode===27}function W(){let e=r.version.split(`.`);return{major:+e[0],minor:+e[1],patch:+e[2]}}function G(e){if(!e||typeof e==`function`)return null;let{major:t}=W();return t>=19?e.props.ref:e.ref}function he({children:e,in:t,onExited:n,mountOnEnter:i,unmountOnExit:a}){let o=(0,r.useRef)(null),s=(0,r.useRef)(t),c=P(n);(0,r.useEffect)(()=>{t?s.current=!0:c(o.current)},[t,c]);let l=(0,r.cloneElement)(e,{ref:H(o,G(e))});return t?l:a||!s.current&&i?null:l}var K=[`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`addEndListener`,`children`];function q(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ge(e){let{onEnter:t,onEntering:n,onEntered:i,onExit:a,onExiting:o,onExited:s,addEndListener:c,children:l}=e,u=q(e,K),d=(0,r.useRef)(null),f=H(d,G(l)),p=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,r.useCallback)(p(t),[t]),h=(0,r.useCallback)(p(n),[n]),g=(0,r.useCallback)(p(i),[i]),_=(0,r.useCallback)(p(a),[a]),v=(0,r.useCallback)(p(o),[o]),y=(0,r.useCallback)(p(s),[s]),b=(0,r.useCallback)(p(c),[c]);return Object.assign({},u,{nodeRef:d},t&&{onEnter:m},n&&{onEntering:h},i&&{onEntered:g},a&&{onExit:_},o&&{onExiting:v},s&&{onExited:y},c&&{addEndListener:b},{children:typeof l==`function`?(e,t)=>l(e,Object.assign({},t,{ref:f})):(0,r.cloneElement)(l,{ref:f})})}var J=n.t(),_e=[`component`];function ve(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ye=r.forwardRef((e,t)=>{let{component:n}=e,r=ge(ve(e,_e));return(0,J.jsx)(n,Object.assign({ref:t},r))});function be({in:e,onTransition:t}){let n=(0,r.useRef)(null),i=(0,r.useRef)(!0),a=P(t);return U(()=>{if(!n.current)return;let t=!1;return a({in:e,element:n.current,initial:i.current,isStale:()=>t}),()=>{t=!0}},[e,a]),U(()=>(i.current=!1,()=>{i.current=!0}),[]),n}function xe({children:e,in:t,onExited:n,onEntered:i,transition:a}){let[o,s]=(0,r.useState)(!t);t&&o&&s(!1);let c=H(be({in:!!t,onTransition:e=>{Promise.resolve(a(e)).then(()=>{e.isStale()||(e.in?i?.(e.element,e.initial):(s(!0),n?.(e.element)))},t=>{throw e.in||s(!0),t})}}),G(e));return o&&!t?null:(0,r.cloneElement)(e,{ref:c})}function Se(e,t,n){return e?(0,J.jsx)(ye,Object.assign({},n,{component:e})):t?(0,J.jsx)(xe,Object.assign({},n,{transition:t})):(0,J.jsx)(he,Object.assign({},n))}var Ce=`show.role.className.style.children.backdrop.keyboard.onBackdropClick.onEscapeKeyDown.transition.runTransition.backdropTransition.runBackdropTransition.autoFocus.enforceFocus.restoreFocus.restoreFocusOptions.renderDialog.renderBackdrop.manager.container.onShow.onHide.onExit.onExited.onExiting.onEnter.onEntering.onEntered`.split(`.`);function we(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Te;function Ee(e){return Te||=new L({ownerDocument:e?.document}),Te}function De(e){let t=z(),n=e||Ee(t),i=(0,r.useRef)({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>n.add(i.current),remove:()=>n.remove(i.current),isTopModal:()=>n.isTopModal(i.current),setDialogRef:(0,r.useCallback)(e=>{i.current.dialog=e},[]),setBackdropRef:(0,r.useCallback)(e=>{i.current.backdrop=e},[])})}var Oe=(0,r.forwardRef)((e,t)=>{let{show:n=!1,role:o=`dialog`,className:s,style:c,children:l,backdrop:u=!0,keyboard:d=!0,onBackdropClick:f,onEscapeKeyDown:p,transition:m,runTransition:h,backdropTransition:g,runBackdropTransition:_,autoFocus:v=!0,enforceFocus:y=!0,restoreFocus:b=!0,restoreFocusOptions:x,renderDialog:S,renderBackdrop:C=e=>(0,J.jsx)(`div`,Object.assign({},e)),manager:ee,container:te,onShow:w,onHide:T=()=>{},onExit:ne,onExited:re,onExiting:E,onEnter:O,onEntering:k,onEntered:ie}=e,A=we(e,Ce),M=z(),N=de(te),F=De(ee),le=oe(),ue=ce(n),[I,L]=(0,r.useState)(!n),R=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,()=>F,[F]),a&&!ue&&n&&(R.current=ae(M?.document)),n&&I&&L(!1);let B=P(()=>{if(F.add(),W.current=D(document,`keydown`,pe),U.current=D(document,`focus`,()=>setTimeout(fe),!0),w&&w(),v){let e=ae(F.dialog?.ownerDocument??M?.document);F.dialog&&e&&!j(F.dialog,e)&&(R.current=e,F.dialog.focus())}}),V=P(()=>{if(F.remove(),W.current==null||W.current(),U.current==null||U.current(),b){var e;(e=R.current)==null||e.focus==null||e.focus(x),R.current=null}});(0,r.useEffect)(()=>{!n||!N||B()},[n,N,B]),(0,r.useEffect)(()=>{I&&V()},[I,V]),se(()=>{V()});let fe=P(()=>{if(!y||!le()||!F.isTopModal())return;let e=ae(M?.document);F.dialog&&e&&!j(F.dialog,e)&&F.dialog.focus()}),H=P(e=>{e.target===e.currentTarget&&(f?.(e),u===!0&&T())}),pe=P(e=>{d&&me(e)&&F.isTopModal()&&(p?.(e),e.defaultPrevented||T())}),U=(0,r.useRef)(),W=(0,r.useRef)(),G=(...e)=>{L(!0),re?.(...e)};if(!N)return null;let he=Object.assign({role:o,ref:F.setDialogRef,"aria-modal":o===`dialog`?!0:void 0},A,{style:c,className:s,tabIndex:-1}),K=S?S(he):(0,J.jsx)(`div`,Object.assign({},he,{children:r.cloneElement(l,{role:`document`})}));K=Se(m,h,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:ne,onExiting:E,onExited:G,onEnter:O,onEntering:k,onEntered:ie,children:K});let q=null;return u&&(q=C({ref:F.setBackdropRef,onClick:H}),q=Se(g,_,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:q})),(0,J.jsx)(J.Fragment,{children:i.default.createPortal((0,J.jsxs)(J.Fragment,{children:[q,K]}),N)})});Oe.displayName=`Modal`;var ke=Object.assign(Oe,{Manager:L});function Ae(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function je(e,t){e.classList?e.classList.add(t):Ae(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}var Me=Function.prototype.bind.call(Function.prototype.call,[].slice);function Ne(e,t){return Me(e.querySelectorAll(t))}function Pe(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function Fe(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=Pe(e.className,t):e.setAttribute(`class`,Pe(e.className&&e.className.baseVal||``,t))}var Ie={FIXED_CONTENT:`.fixed-top, .fixed-bottom, .is-fixed, .sticky-top`,STICKY_CONTENT:`.sticky-top`,NAVBAR_TOGGLER:`.navbar-toggler`},Le=class extends L{adjustAndStore(e,t,n){let r=t.style[e];t.dataset[e]=r,E(t,{[e]:`${parseFloat(E(t,e))+n}px`})}restore(e,t){let n=t.dataset[e];n!==void 0&&(delete t.dataset[e],E(t,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);let t=this.getElement();if(je(t,`modal-open`),!e.scrollBarWidth)return;let n=this.isRTL?`paddingLeft`:`paddingRight`,r=this.isRTL?`marginLeft`:`marginRight`;Ne(t,Ie.FIXED_CONTENT).forEach(t=>this.adjustAndStore(n,t,e.scrollBarWidth)),Ne(t,Ie.STICKY_CONTENT).forEach(t=>this.adjustAndStore(r,t,-e.scrollBarWidth)),Ne(t,Ie.NAVBAR_TOGGLER).forEach(t=>this.adjustAndStore(r,t,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);let t=this.getElement();Fe(t,`modal-open`);let n=this.isRTL?`paddingLeft`:`paddingRight`,r=this.isRTL?`marginLeft`:`marginRight`;Ne(t,Ie.FIXED_CONTENT).forEach(e=>this.restore(n,e)),Ne(t,Ie.STICKY_CONTENT).forEach(e=>this.restore(r,e)),Ne(t,Ie.NAVBAR_TOGGLER).forEach(e=>this.restore(r,e))}},Re;function ze(e){return Re||=new Le(e),Re}function Be(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function He(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ve(e,t)}var Ue=e.t((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),We=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,ee=c,te=s,w=n,T=d,ne=i,re=h,E=m,D=r,O=o,k=a,ie=f,A=!1;function ae(e){return A||(A=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),j(e)||x(e)===l}function j(e){return x(e)===u}function oe(e){return x(e)===c}function M(e){return x(e)===s}function se(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function ce(e){return x(e)===d}function N(e){return x(e)===i}function P(e){return x(e)===h}function F(e){return x(e)===m}function le(e){return x(e)===r}function ue(e){return x(e)===o}function I(e){return x(e)===a}function L(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=ee,e.ContextProvider=te,e.Element=w,e.ForwardRef=T,e.Fragment=ne,e.Lazy=re,e.Memo=E,e.Portal=D,e.Profiler=O,e.StrictMode=k,e.Suspense=ie,e.isAsyncMode=ae,e.isConcurrentMode=j,e.isContextConsumer=oe,e.isContextProvider=M,e.isElement=se,e.isForwardRef=ce,e.isFragment=N,e.isLazy=P,e.isMemo=F,e.isPortal=le,e.isProfiler=ue,e.isStrictMode=I,e.isSuspense=L,e.isValidElementType=b,e.typeOf=x})()})),Ge=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=Ue():t.exports=We()})),Ke=e.t(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),qe=e.t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Je=e.t(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),Ye=e.t(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=qe(),i={},a=Je();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),Xe=e.t(((e,t)=>{var n=Ge(),r=Ke(),i=qe(),a=Je(),o=Ye(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:w(),objectOf:ee,oneOf:C,oneOfType:te,shape:ne,exact:re};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(O(s)!==e){var c=k(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=O(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=O(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=O(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=A(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return k(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function ee(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=O(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function te(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+ie(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function w(){function e(e,t,n,r,i){return E(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function T(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function ne(e){function t(t,n,r,a,o){var s=t[n],c=O(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return T(r,a,o,l,k(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function re(e){function t(t,n,o,s,c){var l=t[n],u=O(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return T(o,s,c,d,k(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
2
- Bad object: `+JSON.stringify(t[n],null,` `)+`
3
- Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function E(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(E);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!E(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!E(a[1]))return!1}}else return!1;return!0;default:return!1}}function D(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function O(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:D(t,e)?`symbol`:t}function k(e){if(e==null)return``+e;var t=O(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function ie(e){var t=k(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function A(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),Ze=e.t(((e,t)=>{var n=qe();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Qe=e.t(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=Ge();t.exports=Xe()(n.isElement,!0)}else t.exports=Ze()()})),$e={disabled:!1},Y=e.n(Qe()),et=process.env.NODE_ENV===`production`?null:Y.default.oneOfType([Y.default.number,Y.default.shape({enter:Y.default.number,exit:Y.default.number,appear:Y.default.number}).isRequired]);process.env.NODE_ENV===`production`||Y.default.oneOfType([Y.default.string,Y.default.shape({enter:Y.default.string,exit:Y.default.string,active:Y.default.string}),Y.default.shape({enter:Y.default.string,enterDone:Y.default.string,enterActive:Y.default.string,exit:Y.default.string,exitDone:Y.default.string,exitActive:Y.default.string})]);var tt=r.default.createContext(null),nt=function(e){return e.scrollTop},rt=`unmounted`,it=`exited`,at=`entering`,ot=`entered`,st=`exiting`,X=function(e){He(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=it,r.appearStatus=at):o=ot:o=t.unmountOnExit||t.mountOnEnter?rt:it,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:it}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=at):(n===`entering`||n===`entered`)&&(t=st)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this);n&&nt(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:rt})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,a=this.props.nodeRef?[r]:[i.default.findDOMNode(this),r],o=a[0],s=a[1],c=this.getTimeouts(),l=r?c.appear:c.enter;if(!e&&!n||$e.disabled){this.safeSetState({status:ot},function(){t.props.onEntered(o)});return}this.props.onEnter(o,s),this.safeSetState({status:at},function(){t.props.onEntering(o,s),t.onTransitionEnd(l,function(){t.safeSetState({status:ot},function(){t.props.onEntered(o,s)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:i.default.findDOMNode(this);if(!t||$e.disabled){this.safeSetState({status:it},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:st},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:it},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:i.default.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var i=Be(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return r.default.createElement(tt.Provider,{value:null},typeof n==`function`?n(e,i):r.default.cloneElement(r.default.Children.only(n),i))},t}(r.default.Component);X.contextType=tt,X.propTypes=process.env.NODE_ENV===`production`?{}:{nodeRef:Y.default.shape({current:typeof Element>`u`?Y.default.any:function(e,t,n,r,i,a){var o=e[t];return Y.default.instanceOf(o&&`ownerDocument`in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:Y.default.oneOfType([Y.default.func.isRequired,Y.default.element.isRequired]).isRequired,in:Y.default.bool,mountOnEnter:Y.default.bool,unmountOnExit:Y.default.bool,appear:Y.default.bool,enter:Y.default.bool,exit:Y.default.bool,timeout:function(e){var t=et;e.addEndListener||(t=t.isRequired);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.apply(void 0,[e].concat(r))},addEndListener:Y.default.func,onEnter:Y.default.func,onEntering:Y.default.func,onEntered:Y.default.func,onExit:Y.default.func,onExiting:Y.default.func,onExited:Y.default.func};function Z(){}X.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Z,onEntering:Z,onEntered:Z,onExit:Z,onExiting:Z,onExited:Z},X.UNMOUNTED=rt,X.EXITED=it,X.ENTERING=at,X.ENTERED=ot,X.EXITING=st;function ct(e,t){let n=E(e,t)||``,r=n.indexOf(`ms`)===-1?1e3:1;return parseFloat(n)*r}function lt(e,t){let n=A(e,r=>{r.target===e&&(n(),t(r))},ct(e,`transitionDuration`)+ct(e,`transitionDelay`))}function ut(e){e.offsetHeight}function dt(e){return e&&`setState`in e?i.default.findDOMNode(e):e??null}var ft=r.default.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:i,onExiting:a,onExited:o,addEndListener:s,children:c,childRef:l,...u},d)=>{let f=(0,r.useRef)(null),p=y(f,l),m=e=>{p(dt(e))},h=e=>t=>{e&&f.current&&e(f.current,t)},g=(0,r.useCallback)(h(e),[e]),_=(0,r.useCallback)(h(t),[t]),v=(0,r.useCallback)(h(n),[n]),b=(0,r.useCallback)(h(i),[i]),x=(0,r.useCallback)(h(a),[a]),S=(0,r.useCallback)(h(o),[o]),C=(0,r.useCallback)(h(s),[s]);return(0,J.jsx)(X,{ref:d,...u,onEnter:g,onEntered:v,onEntering:_,onExit:b,onExited:S,onExiting:x,addEndListener:C,nodeRef:f,children:typeof c==`function`?(e,t)=>c(e,{...t,ref:m}):r.default.cloneElement(c,{ref:m})})});ft.displayName=`TransitionWrapper`;var Q=e.n(t.t()),pt={[at]:`show`,[ot]:`show`},mt=r.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:i,...a},o)=>{let s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...a},c=(0,r.useCallback)((e,t)=>{ut(e),i?.(e,t)},[i]);return(0,J.jsx)(ft,{ref:o,addEndListener:lt,...s,onEnter:c,childRef:G(t),children:(i,a)=>r.cloneElement(t,{...a,className:(0,Q.default)(`fade`,e,t.props.className,pt[i],n[i])})})});mt.displayName=`Fade`;var ht=r.createContext({prefixes:{},breakpoints:[`xxl`,`xl`,`lg`,`md`,`sm`,`xs`],minBreakpoint:`xs`}),{Consumer:gt,Provider:_t}=ht;function $(e,t){let{prefixes:n}=(0,r.useContext)(ht);return e||n[t]||t}function vt(){let{dir:e}=(0,r.useContext)(ht);return e===`rtl`}var yt=r.forwardRef(({className:e,bsPrefix:t,as:n=`div`,...r},i)=>(t=$(t,`modal-body`),(0,J.jsx)(n,{ref:i,className:(0,Q.default)(e,t),...r})));yt.displayName=`ModalBody`;var bt=r.createContext({onHide(){}}),xt=r.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:i,fullscreen:a,children:o,scrollable:s,...c},l)=>{e=$(e,`modal`);let u=`${e}-dialog`,d=typeof a==`string`?`${e}-fullscreen-${a}`:`${e}-fullscreen`;return(0,J.jsx)(`div`,{...c,ref:l,className:(0,Q.default)(u,t,i&&`${e}-${i}`,r&&`${u}-centered`,s&&`${u}-scrollable`,a&&d),children:(0,J.jsx)(`div`,{className:(0,Q.default)(`${e}-content`,n),children:o})})});xt.displayName=`ModalDialog`;var St=r.forwardRef(({className:e,bsPrefix:t,as:n=`div`,...r},i)=>(t=$(t,`modal-footer`),(0,J.jsx)(n,{ref:i,className:(0,Q.default)(e,t),...r})));St.displayName=`ModalFooter`;var Ct={"aria-label":Y.default.string,onClick:Y.default.func,variant:Y.default.oneOf([`white`])},wt=r.forwardRef(({className:e,variant:t,"aria-label":n=`Close`,...r},i)=>(0,J.jsx)(`button`,{ref:i,type:`button`,className:(0,Q.default)(`btn-close`,t&&`btn-close-${t}`,e),"aria-label":n,...r}));wt.displayName=`CloseButton`,wt.propTypes=Ct;var Tt=r.forwardRef(({closeLabel:e=`Close`,closeVariant:t,closeButton:n=!1,onHide:i,children:a,...o},s)=>{let c=(0,r.useContext)(bt),l=g(()=>{c?.onHide(),i?.()});return(0,J.jsxs)(`div`,{ref:s,...o,children:[a,n&&(0,J.jsx)(wt,{"aria-label":e,variant:t,onClick:l})]})});Tt.displayName=`AbstractModalHeader`;var Et=r.forwardRef(({bsPrefix:e,className:t,closeLabel:n=`Close`,closeButton:r=!1,...i},a)=>(e=$(e,`modal-header`),(0,J.jsx)(Tt,{ref:a,...i,className:(0,Q.default)(t,e),closeLabel:n,closeButton:r})));Et.displayName=`ModalHeader`;var Dt=(e=>r.forwardRef((t,n)=>(0,J.jsx)(`div`,{...t,ref:n,className:(0,Q.default)(t.className,e)})))(`h4`),Ot=r.forwardRef(({className:e,bsPrefix:t,as:n=Dt,...r},i)=>(t=$(t,`modal-title`),(0,J.jsx)(n,{ref:i,className:(0,Q.default)(e,t),...r})));Ot.displayName=`ModalTitle`;function kt(e){return(0,J.jsx)(mt,{...e,timeout:null})}function At(e){return(0,J.jsx)(mt,{...e,timeout:null})}var jt=r.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:i,contentClassName:o,children:s,dialogAs:c=xt,"data-bs-theme":f,"aria-labelledby":h,"aria-describedby":_,"aria-label":v,show:b=!1,animation:S=!0,backdrop:C=!0,keyboard:ee=!0,onEscapeKeyDown:te,onShow:w,onHide:T,container:ne,autoFocus:re=!0,enforceFocus:E=!0,restoreFocus:D=!0,restoreFocusOptions:O,onEntered:k,onExit:ie,onExiting:ae,onEnter:j,onEntering:oe,onExited:M,backdropClassName:se,manager:ce,...N},P)=>{let[F,le]=(0,r.useState)({}),[ue,I]=(0,r.useState)(!1),L=(0,r.useRef)(!1),R=(0,r.useRef)(!1),z=(0,r.useRef)(null),[B,de]=m(),V=y(P,de),fe=g(T),H=vt();e=$(e,`modal`);let pe=(0,r.useMemo)(()=>({onHide:fe}),[fe]);function U(){return ce||ze({isRTL:H})}function me(e){if(!a)return;let t=U().getScrollbarWidth()>0,n=e.scrollHeight>u(e).documentElement.clientHeight;le({paddingRight:t&&!n?p():void 0,paddingLeft:!t&&n?p():void 0})}let W=g(()=>{B&&me(B.dialog)});x(()=>{d(window,`resize`,W),z.current==null||z.current()});let G=()=>{L.current=!0},he=e=>{L.current&&B&&e.target===B.dialog&&(R.current=!0),L.current=!1},K=()=>{I(!0),z.current=A(B.dialog,()=>{I(!1)})},q=e=>{e.target===e.currentTarget&&K()},ge=e=>{if(C===`static`){q(e);return}if(R.current||e.target!==e.currentTarget){R.current=!1;return}T?.()},_e=e=>{ee?te?.(e):(e.preventDefault(),C===`static`&&K())},ve=(e,t)=>{e&&me(e),j?.(e,t)},ye=e=>{z.current==null||z.current(),ie?.(e)},be=(e,t)=>{oe?.(e,t),l(window,`resize`,W)},xe=e=>{e&&(e.style.display=``),M?.(e),d(window,`resize`,W)},Se=(0,r.useCallback)(t=>(0,J.jsx)(`div`,{...t,className:(0,Q.default)(`${e}-backdrop`,se,!S&&`show`)}),[S,se,e]),Ce={...n,...F};return Ce.display=`block`,(0,J.jsx)(bt.Provider,{value:pe,children:(0,J.jsx)(ke,{show:b,ref:V,backdrop:C,container:ne,keyboard:!0,autoFocus:re,enforceFocus:E,restoreFocus:D,restoreFocusOptions:O,onEscapeKeyDown:_e,onShow:w,onHide:T,onEnter:ve,onEntering:be,onEntered:k,onExit:ye,onExiting:ae,onExited:xe,manager:U(),transition:S?kt:void 0,backdropTransition:S?At:void 0,renderBackdrop:Se,renderDialog:n=>(0,J.jsx)(`div`,{role:`dialog`,...n,style:Ce,className:(0,Q.default)(t,e,ue&&`${e}-static`,!S&&`show`),onClick:C?ge:void 0,onMouseUp:he,"data-bs-theme":f,"aria-label":v,"aria-labelledby":h,"aria-describedby":_,children:(0,J.jsx)(c,{...N,onMouseDown:G,className:i,contentClassName:o,children:s})})})})});jt.displayName=`Modal`;var Mt=Object.assign(jt,{Body:yt,Header:Et,Title:Ot,Footer:St,Dialog:xt,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150});Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return g}});
@@ -1 +0,0 @@
1
- "use client";require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`);let n=require(`react`);var r=e.t();function i({className:e,id:i}){let[a,o]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{o(!0)},[]),!a)return null;let s=new URLSearchParams(window.location.search),{launcher_mode:c}=Object.fromEntries(s);return c=c===`1`,c?(0,r.jsxs)(t.t,{className:`${e} w-100`,id:i,small:!0,style:{zIndex:10,position:`relative`},onClick:()=>{window.location.href=`https://games.articles.media`},children:[(0,r.jsx)(`i`,{className:`fad fa-gamepad`}),`Return to Games`]}):(0,r.jsxs)(t.t,{className:`${e} w-100`,small:!0,id:i,style:{zIndex:10,position:`relative`},onClick:()=>{window.location.href=`https://games.articles.media`},children:[(0,r.jsx)(`i`,{className:`fad fa-gamepad`}),`View our other games`]})}module.exports=i;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`);let n=require(`react`),r=require(`react-bootstrap`);var i=e.t();function a({useStore:e}){let n=e(e=>e?.darkMode),r=e(e=>e?.setDarkMode),a=e(e=>e?.graphicsQuality),o=e(e=>e?.setGraphicsQuality),s=e(e=>e?.landingAnimation),c=e(e=>e?.setLandingAnimation);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{children:`Dark Mode`}),(0,i.jsx)(`div`,{className:`mb-3`,children:[!1,!0].map((e,a)=>(0,i.jsx)(t.t,{active:n===e,onClick:()=>{r(e)},children:e?`On`:`Off`},a))}),(0,i.jsx)(`div`,{children:`Graphics Quality`}),(0,i.jsx)(`div`,{className:`mb-3`,children:[`Low`,`Medium`,`High`].map(e=>(0,i.jsx)(t.t,{active:a===e,onClick:()=>{o(e)},children:e},e))}),(0,i.jsx)(`div`,{children:`Landing Animation`}),(0,i.jsxs)(`div`,{className:`mb-3`,children:[(0,i.jsx)(t.t,{active:s===!1,onClick:()=>{c(!1)},children:`Disabled`}),(0,i.jsx)(t.t,{active:s===!0,onClick:()=>{c(!0)},children:`Enabled`})]})]})}function o({useAudioStore:e,config:n}){let a=e(e=>e?.audioSettings),o=e(e=>e?.setAudioSettings);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{children:`Sound`}),(0,i.jsxs)(`div`,{className:`mb-3`,children:[(0,i.jsx)(t.t,{active:!a?.enabled,onClick:()=>{o({...a,enabled:!1})},children:`Disabled`}),(0,i.jsx)(t.t,{active:a?.enabled,onClick:()=>{o({...a,enabled:!0})},children:`Enabled`})]}),n?.tabs?.Audio?.sliders?.map(e=>(0,i.jsxs)(`div`,{children:[(0,i.jsx)(r.Form.Label,{className:`mb-0`,children:e.label}),(0,i.jsx)(r.Form.Range,{value:a?.[e.key],onChange:t=>{o({...a,[e.key]:t.target.value})}})]},e.key))]})}function s({useStore:e}){let n=e(e=>e.socketServerHost),a=e(e=>e.setSocketServerHost);return(0,i.jsxs)(`div`,{className:`p-2`,children:[(0,i.jsx)(r.Form.Label,{className:`mb-0`,children:`Socket Server Host`}),(0,i.jsx)(r.Form.Control,{type:`text`,value:n,onChange:e=>a(e.target.value)}),(0,i.jsx)(r.Form.Label,{className:`mb-0`,children:`Edit this to connect to a different multiplayer host!`}),(0,i.jsxs)(`div`,{className:`mt-3`,children:[(0,i.jsx)(t.t,{className:`mb-1`,children:`Retry`}),(0,i.jsxs)(`div`,{children:[`Status: `,(0,i.jsx)(`span`,{className:`badge bg-danger`,children:`Offline`})]})]})]})}function c({useTouchControlsStore:e}){return(0,i.jsxs)(`div`,{className:``,children:[(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`h5`,{children:`Control Settings`}),(0,i.jsx)(`p`,{children:`Configure your key bindings and control preferences here.`})]}),e&&(0,i.jsx)(l,{useTouchControlsStore:e})]})}function l({useTouchControlsStore:e}){let t=e(e=>e.touchControls),n=e(e=>e.setTouchControls);return(0,i.jsx)(`div`,{className:`mb-3`,children:[!1,!0].map((e,r)=>(0,i.jsx)(ArticlesButton,{active:t===e,onClick:()=>{n(e)},children:e?`On`:`Off`},r))})}function u({useStore:e}){let n=e(e=>e?.debug),r=e(e=>e?.setDebug);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{children:`Debug Mode`}),(0,i.jsx)(`div`,{className:`mb-3`,children:[!1,!0].map((e,a)=>(0,i.jsx)(t.t,{active:n===e,onClick:()=>{r(e)},children:e?`On`:`Off`},a))})]})}function d({show:e,setShow:l,store:d,useAudioStore:f,config:p}){let[m,h]=(0,n.useState)(!1),[g,_]=(0,n.useState)(`Graphics`);return d(e=>e.darkMode),d(e=>e.setDarkMode),d(e=>e.arcadeMode),d(e=>e.setArcadeMode),(0,i.jsxs)(r.Modal,{className:`articles-modal`,size:`md`,show:e,centered:!0,scrollable:!0,onExited:()=>{},onHide:()=>{l(!1)},children:[(0,i.jsx)(r.Modal.Header,{closeButton:!0,children:(0,i.jsx)(r.Modal.Title,{children:`Game Settings`})}),(0,i.jsxs)(r.Modal.Body,{className:`flex-column p-0`,children:[(0,i.jsx)(`div`,{className:`p-2`,children:[`Graphics`,`Controls`,`Audio`,`Multiplayer`,`Other`].map(e=>(0,i.jsx)(t.t,{active:g==e,onClick:()=>{_(e)},children:e},e))}),(0,i.jsx)(`hr`,{className:`my-0`}),(0,i.jsxs)(`div`,{className:`p-2`,children:[g==`Controls`&&(0,i.jsx)(c,{useStore:d,config:p}),g==`Graphics`&&(0,i.jsx)(a,{useStore:d,config:p}),g==`Audio`&&(0,i.jsx)(o,{useAudioStore:f,config:p}),g==`Multiplayer`&&(0,i.jsx)(s,{useStore:d,config:p}),g==`Other`&&(0,i.jsx)(u,{useStore:d})]})]}),(0,i.jsx)(r.Modal.Footer,{className:`justify-content-between`,children:(0,i.jsxs)(`div`,{children:[(0,i.jsx)(t.t,{variant:`outline-dark`,onClick:()=>{l(!1)},children:`Close`}),(0,i.jsx)(t.t,{variant:`outline-danger ms-3`,onClick:()=>{},children:`Reset`})]})})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
@@ -1 +0,0 @@
1
- const e=require(`./SettingsModal--sWLmLGp.cjs`);module.exports=e.t;
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`),t=require(`./Button-CbpRj01E.cjs`),n=require(`./useAuthSiteStatus-P5kHc_Bz.cjs`);let r=require(`react`),i=require(`react-bootstrap`);var a=e.t();function o({show:e,setShow:o}){let[s,c]=(0,r.useState)(!1),[l,u]=(0,r.useState)(!1),d=(e,t,n)=>n?`...`:t?t.response?.status||`Error`:e?`200`:`-`,{data:f,error:p,isLoading:m,mutate:h}=n.n({disable:process.env.NODE_ENV!==`development`}),{data:g,error:_,isLoading:v,mutate:y}=n.t({disable:process.env.NODE_ENV!==`development`});return(0,a.jsxs)(i.Modal,{show:e,size:`md`,className:`articles-modal`,centered:!0,onHide:()=>o(!1),children:[(0,a.jsx)(i.Modal.Header,{children:(0,a.jsx)(i.Modal.Title,{children:`Status Details`})}),(0,a.jsxs)(i.Modal.Body,{children:[(0,a.jsxs)(`div`,{className:`d-flex align-items-center mb-2`,children:[(0,a.jsxs)(`h5`,{className:`mb-0 me-2`,children:[`Main Site Status: `,d(f,p,m)]}),(0,a.jsxs)(t.t,{variant:`link`,size:`sm`,className:`p-0`,onClick:()=>c(!s),children:[s?`Hide`:`View`,` More`]})]}),s&&(0,a.jsxs)(`pre`,{children:[m&&`Loading...`,p&&`Error: ${p.message}`,f&&JSON.stringify(f,null,2)]}),(0,a.jsxs)(`div`,{className:`d-flex align-items-center mb-2`,children:[(0,a.jsxs)(`h5`,{className:`mb-0 me-2`,children:[`Auth Site Status: `,d(g,_,v)]}),(0,a.jsxs)(t.t,{variant:`link`,size:`sm`,className:`p-0`,onClick:()=>u(!l),children:[l?`Hide`:`View`,` More`]})]}),l&&(0,a.jsxs)(`pre`,{children:[v&&`Loading...`,_&&`Error: ${_.message}`,g&&JSON.stringify(g,null,2)]})]}),(0,a.jsx)(i.Modal.Footer,{className:`justify-content-between`,children:(0,a.jsx)(t.t,{variant:`articles`,onClick:()=>{o(!1)},children:`Close`})})]})}exports.default=o;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`),t=require(`./classnames-pS64X3rL.cjs`),n=require(`./jsx-runtime-hCcDh67y.cjs`),r=require(`./Button-CbpRj01E.cjs`),i=require(`./Link-c7exNCJ3.cjs`),a=require(`./numberWithCommas-D9tgiUnq.cjs`),o=require(`./Modal-DP9CeAVD.cjs`);let s=require(`react`);s=e.n(s);let c=require(`swr`);c=e.n(c);let l=require(`date-fns`),u=require(`react-dom`);u=e.n(u);let d=require(`swr/immutable`);d=e.n(d);let f=require(`react-bootstrap`);function p(){let e=(0,s.useRef)(!0),t=(0,s.useRef)(()=>e.current);return(0,s.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}var m=2**31-1;function h(e,t,n){let r=n-Date.now();e.current=r<=m?setTimeout(t,r):setTimeout(()=>h(e,t,n),m)}function g(){let e=p(),t=(0,s.useRef)();return o._(()=>clearTimeout(t.current)),(0,s.useMemo)(()=>{let n=()=>clearTimeout(t.current);function r(r,i=0){e()&&(n(),i<=m?t.current=setTimeout(r,i):h(t,r,Date.now()+i))}return{set:r,clear:n,handleRef:t}},[])}var _=e.t(((e,t)=>{var n=process.env.NODE_ENV!==`production`,r=function(){};if(n){var i=function(e,t){var n=arguments.length;t=Array(n>1?n-1:0);for(var r=1;r<n;r++)t[r-1]=arguments[r];var i=0,a=`Warning: `+e.replace(/%s/g,function(){return t[i++]});typeof console<`u`&&console.error(a);try{throw Error(a)}catch{}};r=function(e,t,n){var r=arguments.length;n=Array(r>2?r-2:0);for(var a=2;a<r;a++)n[a-2]=arguments[a];if(t===void 0)throw Error("`warning(condition, format, ...args)` requires a warning message argument");e||i.apply(null,[t].concat(n))}}t.exports=r}));e.t(((e,t)=>{t.exports=function(e,t,n,r,i,a,o,s){if(process.env.NODE_ENV!==`production`&&t===void 0)throw Error(`invariant requires an error message argument`);if(!e){var c;if(t===void 0)c=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var l=[n,r,i,a,o,s],u=0;c=Error(t.replace(/%s/g,function(){return l[u++]})),c.name=`Invariant Violation`}throw c.framesToPop=1,c}}}))();function v(e,t,n){var r=(0,s.useRef)(e!==void 0),i=(0,s.useState)(t),a=i[0],o=i[1],c=e!==void 0,l=r.current;return r.current=c,!c&&l&&a!==t&&o(t),[c?e:a,(0,s.useCallback)(function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];n&&n.apply(void 0,[e].concat(r)),o(e)},[n])]}function y(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function b(e){function t(t){return this.constructor.getDerivedStateFromProps(e,t)??null}this.setState(t.bind(this))}function x(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0,x.__suppressDeprecationWarning=!0;function S(){return(0,s.useState)(null)}var C=Object.prototype.hasOwnProperty;function w(e,t,n){for(n of e.keys())if(T(n,t))return n}function T(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&T(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=w(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=w(t,i),!i)||!T(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(C.call(e,n)&&++r&&!C.call(t,n)||!(n in t)||!T(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function E(e){let t=o.m();return[e[0],(0,s.useCallback)(n=>{if(t())return e[1](n)},[t,e[1]])]}var D=`bottom`,O=`right`,k=`left`,A=`auto`,j=[`top`,D,O,k],M=`start`,N=`clippingParents`,P=`viewport`,F=`popper`,I=`reference`,ee=j.reduce(function(e,t){return e.concat([t+`-`+M,t+`-end`])},[]),L=[].concat(j,[A]).reduce(function(e,t){return e.concat([t,t+`-`+M,t+`-end`])},[]),te=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function R(e){return e.split(`-`)[0]}function z(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function B(e){return e instanceof z(e).Element||e instanceof Element}function V(e){return e instanceof z(e).HTMLElement||e instanceof HTMLElement}function ne(e){return typeof ShadowRoot>`u`?!1:e instanceof z(e).ShadowRoot||e instanceof ShadowRoot}var H=Math.max,re=Math.min,U=Math.round;function W(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function ie(){return!/^((?!chrome|android).)*safari/i.test(W())}function G(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&V(e)&&(i=e.offsetWidth>0&&U(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&U(r.height)/e.offsetHeight||1);var o=(B(e)?z(e):window).visualViewport,s=!ie()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function ae(e){var t=G(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function oe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ne(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function K(e){return e?(e.nodeName||``).toLowerCase():null}function q(e){return z(e).getComputedStyle(e)}function se(e){return[`table`,`td`,`th`].indexOf(K(e))>=0}function J(e){return((B(e)?e.ownerDocument:e.document)||window.document).documentElement}function ce(e){return K(e)===`html`?e:e.assignedSlot||e.parentNode||(ne(e)?e.host:null)||J(e)}function le(e){return!V(e)||q(e).position===`fixed`?null:e.offsetParent}function ue(e){var t=/firefox/i.test(W());if(/Trident/i.test(W())&&V(e)&&q(e).position===`fixed`)return null;var n=ce(e);for(ne(n)&&(n=n.host);V(n)&&[`html`,`body`].indexOf(K(n))<0;){var r=q(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function de(e){for(var t=z(e),n=le(e);n&&se(n)&&q(n).position===`static`;)n=le(n);return n&&(K(n)===`html`||K(n)===`body`&&q(n).position===`static`)?t:n||ue(e)||t}function fe(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function pe(e,t,n){return H(e,re(t,n))}function me(e,t,n){var r=pe(e,t,n);return r>n?n:r}function he(){return{top:0,right:0,bottom:0,left:0}}function ge(e){return Object.assign({},he(),e)}function Y(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var _e=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,ge(typeof e==`number`?Y(e,j):e)};function ve(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=R(n.placement),c=fe(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=_e(i.padding,n),d=ae(a),f=c===`y`?`top`:k,p=c===`y`?D:O,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=de(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=pe(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function ye(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||oe(t.elements.popper,r)&&(t.elements.arrow=r))}var be={name:`arrow`,enabled:!0,phase:`main`,fn:ve,effect:ye,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function xe(e){return e.split(`-`)[1]}var Se={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function Ce(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:U(n*i)/i||0,y:U(r*i)/i||0}}function we(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=k,b=`top`,x=window;if(l){var S=de(n),C=`clientHeight`,w=`clientWidth`;if(S===z(n)&&(S=J(n),q(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=D;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=O;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var A=Object.assign({position:s},l&&Se),j=u===!0?Ce({x:p,y:h},z(n)):{x:p,y:h};if(p=j.x,h=j.y,c){var M;return Object.assign({},A,(M={},M[b]=v?`0`:``,M[y]=_?`0`:``,M.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,M))}return Object.assign({},A,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function Te(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:R(t.placement),variation:xe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,we(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,we(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ee={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:Te,data:{}},De={passive:!0};function Oe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=z(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,De)}),s&&c.addEventListener(`resize`,n.update,De),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,De)}),s&&c.removeEventListener(`resize`,n.update,De)}}var ke={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:Oe,data:{}},Ae={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function je(e){return e.replace(/left|right|bottom|top/g,function(e){return Ae[e]})}var Me={start:`end`,end:`start`};function Ne(e){return e.replace(/start|end/g,function(e){return Me[e]})}function Pe(e){var t=z(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Fe(e){return G(J(e)).left+Pe(e).scrollLeft}function Ie(e,t){var n=z(e),r=J(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=ie();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Fe(e),y:c}}function Le(e){var t=J(e),n=Pe(e),r=e.ownerDocument?.body,i=H(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Fe(e),s=-n.scrollTop;return q(r||t).direction===`rtl`&&(o+=H(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Re(e){var t=q(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function ze(e){return[`html`,`body`,`#document`].indexOf(K(e))>=0?e.ownerDocument.body:V(e)&&Re(e)?e:ze(ce(e))}function Be(e,t){t===void 0&&(t=[]);var n=ze(e),r=n===e.ownerDocument?.body,i=z(n),a=r?[i].concat(i.visualViewport||[],Re(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Be(ce(a)))}function Ve(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function He(e,t){var n=G(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Ue(e,t,n){return t===`viewport`?Ve(Ie(e,n)):B(t)?He(t,n):Ve(Le(J(e)))}function We(e){var t=Be(ce(e)),n=[`absolute`,`fixed`].indexOf(q(e).position)>=0&&V(e)?de(e):e;return B(n)?t.filter(function(e){return B(e)&&oe(e,n)&&K(e)!==`body`}):[]}function Ge(e,t,n,r){var i=t===`clippingParents`?We(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Ue(e,n,r);return t.top=H(i.top,t.top),t.right=re(i.right,t.right),t.bottom=re(i.bottom,t.bottom),t.left=H(i.left,t.left),t},Ue(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ke(e){var t=e.reference,n=e.element,r=e.placement,i=r?R(r):null,a=r?xe(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case D:c={x:o,y:t.y+t.height};break;case O:c={x:t.x+t.width,y:s};break;case k:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?fe(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case M:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function qe(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?N:s,l=n.rootBoundary,u=l===void 0?P:l,d=n.elementContext,f=d===void 0?F:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,_=ge(typeof g==`number`?Y(g,j):g),v=f===`popper`?I:F,y=e.rects.popper,b=e.elements[m?v:f],x=Ge(B(b)?b:b.contextElement||J(e.elements.popper),c,u,o),S=G(e.elements.reference),C=Ke({reference:S,element:y,strategy:`absolute`,placement:i}),w=Ve(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function Je(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?L:c,u=xe(r),d=u?s?ee:ee.filter(function(e){return xe(e)===u}):j,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=qe(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[R(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function Ye(e){if(R(e)===`auto`)return[];var t=je(e);return[Ne(e),t,Ne(t)]}function Xe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,_=R(g)===g,v=c||(_||!m?[je(g)]:Ye(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(R(n)===`auto`?Je(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],A=R(E),j=xe(E)===M,N=[`top`,D].indexOf(A)>=0,P=N?`width`:`height`,F=qe(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),I=N?j?O:k:j?D:`top`;b[P]>x[P]&&(I=je(I));var ee=je(I),L=[];if(a&&L.push(F[A]<=0),s&&L.push(F[I]<=0,F[ee]<=0),L.every(function(e){return e})){w=E,C=!1;break}S.set(E,L)}if(C)for(var te=m?3:1,z=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},B=te;B>0&&z(B)!==`break`;B--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Ze={name:`flip`,enabled:!0,phase:`main`,fn:Xe,requiresIfExists:[`offset`],data:{_skip:!1}};function Qe(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $e(e){return[`top`,O,D,k].some(function(t){return e[t]>=0})}function et(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=qe(t,{elementContext:`reference`}),s=qe(t,{altBoundary:!0}),c=Qe(o,r),l=Qe(s,i,a),u=$e(c),d=$e(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var tt={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:et};function nt(e,t,n){var r=R(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function rt(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=L.reduce(function(e,n){return e[n]=nt(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var it={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:rt};function at(e){var t=e.state,n=e.name;t.modifiersData[n]=Ke({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var ot={name:`popperOffsets`,enabled:!0,phase:`read`,fn:at,data:{}};function st(e){return e===`x`?`y`:`x`}function ct(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=qe(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=R(t.placement),v=xe(t.placement),y=!v,b=fe(_),x=st(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(S){if(a){var M=b===`y`?`top`:k,N=b===`y`?D:O,P=b===`y`?`height`:`width`,F=S[b],I=F+g[M],ee=F-g[N],L=p?-w[P]/2:0,te=v===`start`?C[P]:w[P],z=v===`start`?-w[P]:-C[P],B=t.elements.arrow,V=p&&B?ae(B):{width:0,height:0},ne=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:he(),U=ne[M],W=ne[N],ie=pe(0,C[P],V[P]),G=y?C[P]/2-L-ie-U-E.mainAxis:te-ie-U-E.mainAxis,oe=y?-C[P]/2+L+ie+W+E.mainAxis:z+ie+W+E.mainAxis,K=t.elements.arrow&&de(t.elements.arrow),q=K?b===`y`?K.clientTop||0:K.clientLeft||0:0,se=A?.[b]??0,J=F+G-se-q,ce=F+oe-se,le=pe(p?re(I,J):I,F,p?H(ee,ce):ee);S[b]=le,j[b]=le-F}if(s){var ue=b===`x`?`top`:k,ge=b===`x`?D:O,Y=S[x],_e=x===`y`?`height`:`width`,ve=Y+g[ue],ye=Y-g[ge],be=[`top`,k].indexOf(_)!==-1,Se=A?.[x]??0,Ce=be?ve:Y-C[_e]-w[_e]-Se+E.altAxis,we=be?Y+C[_e]+w[_e]-Se-E.altAxis:ye,Te=p&&be?me(Ce,Y,we):pe(p?Ce:ve,Y,p?we:ye);S[x]=Te,j[x]=Te-Y}t.modifiersData[r]=j}}var lt={name:`preventOverflow`,enabled:!0,phase:`main`,fn:ct,requiresIfExists:[`offset`]};function ut(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function dt(e){return e===z(e)||!V(e)?Pe(e):ut(e)}function ft(e){var t=e.getBoundingClientRect(),n=U(t.width)/e.offsetWidth||1,r=U(t.height)/e.offsetHeight||1;return n!==1||r!==1}function pt(e,t,n){n===void 0&&(n=!1);var r=V(t),i=V(t)&&ft(t),a=J(t),o=G(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((K(t)!==`body`||Re(a))&&(s=dt(t)),V(t)?(c=G(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Fe(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function mt(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function ht(e){var t=mt(e);return te.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function gt(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function _t(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var vt={placement:`bottom`,modifiers:[],strategy:`absolute`};function yt(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function bt(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?vt:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},vt,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:B(e)?Be(e):e.contextElement?Be(e.contextElement):[],popper:Be(t)};var s=ht(_t([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(yt(t,n)){i.rects={reference:pt(t,de(n),i.options.strategy===`fixed`),popper:ae(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:gt(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!yt(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var xt=bt({defaultModifiers:[tt,ot,Ee,ke,it,Ze,lt,be]}),St=[`enabled`,`placement`,`strategy`,`modifiers`];function Ct(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var wt={name:`applyStyles`,enabled:!1,phase:`afterWrite`,fn:()=>void 0},Tt={name:`ariaDescribedBy`,enabled:!0,phase:`afterWrite`,effect:({state:e})=>()=>{let{reference:t,popper:n}=e.elements;if(`removeAttribute`in t){let e=(t.getAttribute(`aria-describedby`)||``).split(`,`).filter(e=>e.trim()!==n.id);e.length?t.setAttribute(`aria-describedby`,e.join(`,`)):t.removeAttribute(`aria-describedby`)}},fn:({state:e})=>{let{popper:t,reference:n}=e.elements,r=t.getAttribute(`role`)?.toLowerCase();if(t.id&&r===`tooltip`&&`setAttribute`in n){let e=n.getAttribute(`aria-describedby`);if(e&&e.split(`,`).indexOf(t.id)!==-1)return;n.setAttribute(`aria-describedby`,e?`${e},${t.id}`:t.id)}}},Et=[];function Dt(e,t,n={}){let{enabled:r=!0,placement:i=`bottom`,strategy:a=`absolute`,modifiers:o=Et}=n,c=Ct(n,St),l=(0,s.useRef)(o),u=(0,s.useRef)(),d=(0,s.useCallback)(()=>{var e;(e=u.current)==null||e.update()},[]),f=(0,s.useCallback)(()=>{var e;(e=u.current)==null||e.forceUpdate()},[]),[p,m]=E((0,s.useState)({placement:i,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),h=(0,s.useMemo)(()=>({name:`updateStateModifier`,enabled:!0,phase:`write`,requires:[`computeStyles`],fn:({state:e})=>{let t={},n={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],n[r]=e.attributes[r]}),m({state:e,styles:t,attributes:n,update:d,forceUpdate:f,placement:e.placement})}}),[d,f,m]),g=(0,s.useMemo)(()=>(T(l.current,o)||(l.current=o),l.current),[o]);return(0,s.useEffect)(()=>{!u.current||!r||u.current.setOptions({placement:i,strategy:a,modifiers:[...g,h,wt]})},[a,i,h,r,g]),(0,s.useEffect)(()=>{if(!(!r||e==null||t==null))return u.current=xt(e,t,Object.assign({},c,{placement:i,strategy:a,modifiers:[...g,Tt,h]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}var Ot=e.n(_()),kt=()=>{};function At(e){return e.button===0}function jt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Mt=e=>e&&(`current`in e?e.current:e),Nt={click:`mousedown`,mouseup:`mousedown`,pointerup:`pointerdown`};function Pt(e,t=kt,{disabled:n,clickTrigger:r=`click`}={}){let i=(0,s.useRef)(!1),a=(0,s.useRef)(!1),c=(0,s.useCallback)(t=>{let n=Mt(e);(0,Ot.default)(!!n,`ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node`),i.current=!n||jt(t)||!At(t)||!!o.h(n,t.target)||a.current,a.current=!1},[e]),l=o.p(t=>{let n=Mt(e);n&&o.h(n,t.target)?a.current=!0:a.current=!1}),u=o.p(e=>{i.current||t(e)});(0,s.useEffect)(()=>{if(n||e==null)return;let t=o.b(Mt(e)),i=t.defaultView||window,a=i.event??i.parent?.event,s=null;Nt[r]&&(s=o.g(t,Nt[r],l,!0));let d=o.g(t,r,c,!0),f=o.g(t,r,e=>{if(e===a){a=void 0;return}u(e)}),p=[];return`ontouchstart`in t.documentElement&&(p=[].slice.call(t.body.children).map(e=>o.g(e,`mousemove`,kt))),()=>{s?.(),d(),f(),p.forEach(e=>e())}},[e,n,r,c,l,u])}var Ft=()=>{};function It(e,t,{disabled:n,clickTrigger:r}={}){let i=t||Ft;Pt(e,i,{disabled:n,clickTrigger:r});let a=o.p(e=>{o.u(e)&&i(e)});(0,s.useEffect)(()=>{if(n||e==null)return;let t=o.b(Mt(e)),r=(t.defaultView||window).event,i=o.g(t,`keyup`,e=>{if(e===r){r=void 0;return}a(e)});return()=>{i()}},[e,n,a])}function Lt(e){let t={};return Array.isArray(e)?(e?.forEach(e=>{t[e.name]=e}),t):e||t}function Rt(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function zt({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:c={}}){let l=Lt(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:a?`fixed`:c.strategy,modifiers:Rt(Object.assign({},l,{eventListeners:{enabled:t,options:l.eventListeners?.options},preventOverflow:Object.assign({},l.preventOverflow,{options:o?Object.assign({padding:o},l.preventOverflow?.options):l.preventOverflow?.options}),offset:{options:Object.assign({offset:i},l.offset?.options)},arrow:Object.assign({},l.arrow,{enabled:!!s,options:Object.assign({},l.arrow?.options,{element:s})}),flip:Object.assign({enabled:!!r},l.flip)}))})}var Bt=s.forwardRef((e,t)=>{let{flip:n,offset:r,placement:i,containerPadding:a,popperConfig:c={},transition:l,runTransition:d}=e,[f,p]=S(),[m,h]=S(),g=o.d(p,t),_=o.f(e.container),v=o.f(e.target),[y,b]=(0,s.useState)(!e.show),x=Dt(v,f,zt({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:n,offset:r,arrowElement:m,popperConfig:c}));e.show&&y&&b(!1);let C=(...t)=>{b(!0),e.onExited&&e.onExited(...t)},w=e.show||!y;if(It(f,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!w)return null;let{onExit:T,onExiting:E,onEnter:D,onEntering:O,onEntered:k}=e,A=e.children(Object.assign({},x.attributes.popper,{style:x.styles.popper,ref:g}),{popper:x,placement:i,show:!!e.show,arrowProps:Object.assign({},x.attributes.arrow,{style:x.styles.arrow,ref:h})});return A=o.c(l,d,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:A,onExit:T,onExiting:E,onExited:C,onEnter:D,onEntering:O,onEntered:k}),_?u.default.createPortal(A,_):null});Bt.displayName=`Overlay`;var Vt=typeof global<`u`&&global.navigator&&global.navigator.product===`ReactNative`,Ht=typeof document<`u`||Vt?s.useLayoutEffect:s.useEffect,Ut=e.n(t.t()),X=n.t(),Wt=s.forwardRef(({className:e,bsPrefix:t,as:n=`div`,...r},i)=>(t=o.n(t,`popover-header`),(0,X.jsx)(n,{ref:i,className:(0,Ut.default)(e,t),...r})));Wt.displayName=`PopoverHeader`;var Gt=s.forwardRef(({className:e,bsPrefix:t,as:n=`div`,...r},i)=>(t=o.n(t,`popover-body`),(0,X.jsx)(n,{ref:i,className:(0,Ut.default)(e,t),...r})));Gt.displayName=`PopoverBody`,s.Component;function Kt(e,t){let n=e;return e===`left`?n=t?`end`:`start`:e===`right`&&(n=t?`start`:`end`),n}function qt(e=`absolute`){return{position:e,top:`0`,left:`0`,opacity:`0`,pointerEvents:`none`}}var Jt=s.forwardRef(({bsPrefix:e,placement:t=`right`,className:n,style:r,children:i,body:a,arrowProps:s,hasDoneInitialMeasure:c,popper:l,show:u,...d},f)=>{let p=o.n(e,`popover`),m=o.r(),[h]=t?.split(`-`)||[],g=Kt(h,m),_=r;return u&&!c&&(_={...r,...qt(l?.strategy)}),(0,X.jsxs)(`div`,{ref:f,role:`tooltip`,style:_,"x-placement":h,className:(0,Ut.default)(n,p,h&&`bs-popover-${g}`),...d,children:[(0,X.jsx)(`div`,{className:`popover-arrow`,...s}),a?(0,X.jsx)(Gt,{children:i}):i]})});Jt.displayName=`Popover`;var Yt=Object.assign(Jt,{Header:Wt,Body:Gt,POPPER_OFFSET:[0,8]}),Xt=s.forwardRef(({bsPrefix:e,placement:t=`right`,className:n,style:r,children:i,arrowProps:a,hasDoneInitialMeasure:s,popper:c,show:l,...u},d)=>{e=o.n(e,`tooltip`);let f=o.r(),[p]=t?.split(`-`)||[],m=Kt(p,f),h=r;return l&&!s&&(h={...r,...qt(c?.strategy)}),(0,X.jsxs)(`div`,{ref:d,style:h,role:`tooltip`,"x-placement":p,className:(0,Ut.default)(n,e,`bs-tooltip-${m}`),...u,children:[(0,X.jsx)(`div`,{className:`tooltip-arrow`,...a}),(0,X.jsx)(`div`,{className:`${e}-inner`,children:i})]})});Xt.displayName=`Tooltip`;var Z=Object.assign(Xt,{TOOLTIP_OFFSET:[0,6]});function Zt(e){let t=(0,s.useRef)(null),n=o.n(void 0,`popover`),r=o.n(void 0,`tooltip`);return[t,[(0,s.useMemo)(()=>({name:`offset`,options:{offset:()=>{if(e)return e;if(t.current){if(o.s(t.current,n))return Yt.POPPER_OFFSET;if(o.s(t.current,r))return Z.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r])]]}function Qt(e,t){let{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||=e=>n(o.a(e)),t.ref=r.__wrapped||=e=>r(o.a(e))}var $t=s.forwardRef(({children:e,transition:t=o.i,popperConfig:n={},rootClose:r=!1,placement:i=`top`,show:a=!1,...c},l)=>{let u=(0,s.useRef)({}),[d,f]=(0,s.useState)(null),[p,m]=Zt(c.offset),h=o.v(l,p),g=t===!0?o.i:t||void 0,_=o.y(e=>{f(e),n==null||n.onFirstUpdate==null||n.onFirstUpdate(e)});return Ht(()=>{d&&c.target&&(u.current.scheduleUpdate==null||u.current.scheduleUpdate())},[d,c.target]),(0,s.useEffect)(()=>{a||f(null)},[a]),(0,X.jsx)(Bt,{...c,ref:h,popperConfig:{...n,modifiers:m.concat(n.modifiers||[]),onFirstUpdate:_},transition:g,rootClose:r,placement:i,show:a,children:(r,{arrowProps:i,popper:a,show:o})=>{var c;Qt(r,i);let l=a?.placement,f=Object.assign(u.current,{state:a?.state,scheduleUpdate:a?.update,placement:l,outOfBoundaries:(a==null||(c=a.state)==null||(c=c.modifiersData.hide)==null?void 0:c.isReferenceHidden)||!1,strategy:n.strategy}),p=!!d;return typeof e==`function`?e({...r,placement:l,show:o,...!t&&o&&{className:`show`},popper:f,arrowProps:i,hasDoneInitialMeasure:p}):s.cloneElement(e,{...r,placement:l,arrowProps:i,popper:f,hasDoneInitialMeasure:p,className:(0,Ut.default)(e.props.className,!t&&o&&`show`),style:{...e.props.style,...r.style}})}})});$t.displayName=`Overlay`;var en=e.n(o.o());function tn(e){return e&&typeof e==`object`?e:{show:e,hide:e}}function nn(e,t,n){let[r]=t,i=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];(!a||a!==i)&&!o.h(i,a)&&e(...t)}en.default.oneOf([`click`,`hover`,`focus`]);var Q=({trigger:e=[`hover`,`focus`],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:c,delay:l,placement:u,flip:d=u&&u.indexOf(`auto`)!==-1,...f})=>{let p=(0,s.useRef)(null),m=o.v(p,o.l(n)),h=g(),_=(0,s.useRef)(``),[y,b]=v(i,a,c),x=tn(l),{onFocus:S,onBlur:C,onClick:w}=typeof n==`function`?{}:s.Children.only(n).props,T=e=>{m(o.a(e))},E=(0,s.useCallback)(()=>{if(h.clear(),_.current=`show`,!x.show){b(!0);return}h.set(()=>{_.current===`show`&&b(!0)},x.show)},[x.show,b,h]),D=(0,s.useCallback)(()=>{if(h.clear(),_.current=`hide`,!x.hide){b(!1);return}h.set(()=>{_.current===`hide`&&b(!1)},x.hide)},[x.hide,b,h]),O=(0,s.useCallback)((...e)=>{E(),S?.(...e)},[E,S]),k=(0,s.useCallback)((...e)=>{D(),C?.(...e)},[D,C]),A=(0,s.useCallback)((...e)=>{b(!y),w?.(...e)},[w,b,y]),j=(0,s.useCallback)((...e)=>{nn(E,e,`fromElement`)},[E]),M=(0,s.useCallback)((...e)=>{nn(D,e,`toElement`)},[D]),N=e==null?[]:[].concat(e),P={ref:T};return N.indexOf(`click`)!==-1&&(P.onClick=A),N.indexOf(`focus`)!==-1&&(P.onFocus=O,P.onBlur=k),N.indexOf(`hover`)!==-1&&(process.env.NODE_ENV!==`production`&&(0,Ot.default)(N.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),P.onMouseOver=j,P.onMouseOut=M),(0,X.jsxs)(X.Fragment,{children:[typeof n==`function`?n(P):(0,s.cloneElement)(n,P),(0,X.jsx)($t,{...f,show:y,onHide:D,flip:d,placement:u,popperConfig:r,target:p.current,children:t})]})};function rn(e){let{profile_photo:t,width:n,alt:r,hideDefault:i,activityStatus:a,user_id:o}=e;return t?.key?(0,X.jsxs)(`div`,{"data-using-react-profile-photo":`true`,className:`profile-photo-wrap ${n?``:`w-100 h-100`}`,style:{...n&&{width:n,height:n}},children:[(0,X.jsx)(an,{activityStatus:a,user_id:o}),(0,X.jsx)(`img`,{className:`w-100 h-100`,src:`${process.env.NEXT_PUBLIC_CDN}${t.key}`,style:{objectFit:`contain`},alt:r||`Profile photo of a user`})]}):(0,X.jsxs)(`div`,{"data-using-react-profile-photo":`true`,className:(0,Ut.default)(`profile-photo-wrap`,{"w-100 h-100":!n,"d-none":i}),style:{...n&&{width:n,height:n}},children:[(0,X.jsx)(an,{activityStatus:a,user_id:o}),(0,X.jsx)(`img`,{className:`w-100 h-100`,src:`${process.env.NEXT_PUBLIC_CDN}profile_photos/starter/articles.jpg`,style:{objectFit:`contain`},alt:r||`Profile photo of a user`})]})}function an({activityStatus:e,user_id:t}){if(!(!e||!t))return(0,X.jsx)(`div`,{"data-user_id":t,className:(0,Ut.default)(`online-status`,{"status-online":e?.status==`Online`||t==`630f0b337c52851e754b03f7`,"status-offline":e?.status==`Offline`,"status-away":e?.status==`Away`,"activity-active":!1})})}var on=e=>{let t=new URLSearchParams({user_id:e.user_id}).toString();return fetch(`${e.url}?${t}`).then(e=>e.json())},sn={dedupingInterval:1e3*60*1,focusThrottleInterval:1e3*60*1},cn=e=>{let{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=(0,d.default)(e?.user_id?{url:process.env.NODE_ENV===`development`?`http://localhost:3001/api/user-public/getUserDetails`:`https://articles.media/api/user-public/getUserDetails`,user_id:e.user_id}:null,on,sn);return{data:t,error:n,isLoading:r,isValidating:i,mutate:a}};function ln({className:e,noOutline:t,children:n,inline:r}){let[i,a]=(0,s.useState)();if((0,s.useEffect)(()=>{a(!0)},[]),n&&(!1)?.roles?.isDev&&i)return(0,X.jsx)(`div`,{className:`is-dev-content ${t&&`no-outline`} ${e} ${r&&`d-inline-block`}`,children:n})}var $={BASE:`https://articles.media`,SIGN_IN:`/login`,SIGN_UP:`/signup`,HOME:`/`,PROPOSALS:`/politics/proposals`,PROPOSALS_SUBMISSIONS_ALL:`/politics/proposals/submissions`,STORIES:`/news/stories`,ISSUES:`/news/issues`,MYTHS:`/news/myths`};function un({activeLayoutProposalSentiments:e,populated_user:t,usersProposalSentiments:n,setShowFullStanceDetails:a,showFullStanceDetails:o,userData:s}){return(0,X.jsx)(`div`,{className:`row mx-0 mb-2`,children:[{name:`${t?.display_name||s.display_name}`,data:e||{}},{name:`You`,data:n||{}}].map(e=>e.name==`You`?(0,X.jsx)(`div`,{className:`col-lg-6 px-1`,children:(0,X.jsxs)(`div`,{className:`card card-articles card-sm h-100`,children:[(0,X.jsx)(`div`,{className:`card-header`,children:(0,X.jsx)(`b`,{children:e.name})}),(0,X.jsx)(`div`,{className:`card-body p-2`,children:(0,X.jsx)(`small`,{children:`Login or create an account to compare your political stance with this user!`})}),(0,X.jsxs)(`div`,{className:`card-footer`,children:[(0,X.jsx)(i.t,{href:$.SIGN_IN,children:(0,X.jsx)(r.t,{small:!0,className:``,children:`Sign In`})}),(0,X.jsx)(i.t,{href:$.SIGN_UP,children:(0,X.jsx)(r.t,{small:!0,className:``,children:`Sign Up`})})]})]})},e.name):(0,X.jsx)(`div`,{className:`col-lg-6 px-1`,children:(0,X.jsxs)(`div`,{className:`card card-articles card-sm`,children:[(0,X.jsx)(`div`,{className:`card-header`,onClick:()=>{console.log(e.data)},children:(0,X.jsx)(`b`,{children:e.name})}),(0,X.jsxs)(`div`,{className:`card-body py-2 px-2 small`,children:[(0,X.jsxs)(`div`,{className:``,children:[(0,X.jsxs)(`div`,{className:`small`,children:[`Fundamental: `,e?.data?.fundamental?.filter(t=>e.data?.user_sentiments?.find(e=>e.proposal_id==t._id)?t:null).length,`/`,e?.data?.fundamental?.length]}),(0,X.jsx)(f.ProgressBar,{striped:!0,variant:`dark`,className:`shadow-articles mb-2`,now:(e.data?.fundamental?.filter(t=>e.data?.user_sentiments?.find(e=>e.proposal_id==t._id)?t:null).length/e.data?.fundamental?.length*100).toFixed(2),label:`${(e.data?.fundamental?.filter(t=>e.data?.user_sentiments?.find(e=>e.proposal_id==t._id)?t:null).length/e.data?.fundamental?.length*100).toFixed(2)}%`}),(0,X.jsxs)(f.ProgressBar,{className:`shadow-articles mb-2`,style:{height:`10px`},children:[(0,X.jsx)(f.ProgressBar,{striped:!0,variant:`danger`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Disagree`&&e.populated_proposal.fundamental)?.length/e.data?.fundamental?.length*100).toFixed(2)}),(0,X.jsx)(f.ProgressBar,{striped:!0,variant:`warning`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Needs Work`&&e.populated_proposal.fundamental)?.length/e.data?.fundamental?.length*100).toFixed(2)}),(0,X.jsx)(f.ProgressBar,{striped:!0,variant:`success`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Agree`&&e.populated_proposal.fundamental)?.length/e.data?.fundamental?.length*100).toFixed(2)})]}),(0,X.jsxs)(`div`,{className:``,children:[`Disagree: `,e.data?.user_sentiments?.filter(t=>{let n=e.data?.fundamental.find(e=>e._id==t.proposal_id);return t.sentiment_status==`Disagree`&&n})?.length||0]}),(0,X.jsxs)(`div`,{className:``,children:[`Needs Work: `,e.data?.user_sentiments?.filter(t=>{let n=e.data?.fundamental.find(e=>e._id==t.proposal_id);return t.sentiment_status==`Needs Work`&&n})?.length||0]}),(0,X.jsxs)(`div`,{className:`mb-2`,children:[`Agree: `,e.data?.user_sentiments?.filter(t=>{let n=e.data?.fundamental.find(e=>e._id==t.proposal_id);return t.sentiment_status==`Agree`&&n})?.length||0]})]}),!o&&(0,X.jsx)(`span`,{onClick:()=>a(!0),className:`badge bg-articles-secondary shadow-articles badge-hover`,children:`View More`}),o&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`hr`,{}),(0,X.jsxs)(`div`,{className:`mb-2`,children:[(0,X.jsxs)(`div`,{className:`small`,children:[`All: `,e.data?.user_sentiments?.length,`/`,e.data?.total]}),(0,X.jsx)(f.ProgressBar,{striped:!0,animated:!0,variant:`dark`,className:`shadow-articles mb-1`,now:(e.data?.user_sentiments?.length/e.data?.total*100).toFixed(2),label:`${(e.data?.user_sentiments?.length/e.data?.total*100).toFixed(2)}%`}),(0,X.jsxs)(f.ProgressBar,{className:`shadow-articles mb-2`,style:{height:`10px`},children:[(0,X.jsx)(f.ProgressBar,{striped:!0,animated:!0,variant:`danger`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Disagree`)?.length/e.data?.total*100).toFixed(2)}),(0,X.jsx)(f.ProgressBar,{striped:!0,animated:!0,variant:`warning`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Needs Work`)?.length/e.data?.total*100).toFixed(2)}),(0,X.jsx)(f.ProgressBar,{striped:!0,animated:!0,variant:`success`,now:(e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Agree`)?.length/e.data?.total*100).toFixed(2)})]}),(0,X.jsxs)(`div`,{className:``,children:[`Disagree: `,e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Disagree`)?.length||0]}),(0,X.jsxs)(`div`,{className:``,children:[`Needs Work: `,e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Needs Work`)?.length||0]}),(0,X.jsxs)(`div`,{className:`mb-2`,children:[`Agree: `,e.data?.user_sentiments?.filter(e=>e.sentiment_status==`Agree`)?.length||0]})]}),(0,X.jsx)(`hr`,{}),(0,X.jsx)(`p`,{className:`mb-0`,children:(0,X.jsxs)(`div`,{className:`row`,children:[(0,X.jsx)(`div`,{className:`col-9`,children:`Comments`}),(0,X.jsx)(`div`,{className:`col-3`,children:(0,X.jsx)(`b`,{children:e.data?.user_comments?.length||0})}),(0,X.jsx)(`div`,{className:`col-9`,children:`Submissions`}),(0,X.jsx)(`div`,{className:`col-3`,children:(0,X.jsx)(`b`,{children:e.data?.user_submissions})})]})})]})]})]})},e.name))})}function dn({activeLayoutProposalSentiments:e}){return(0,X.jsx)(`div`,{children:e.user_comments?.filter(e=>!e.parent_id).map(e=>(0,X.jsxs)(`div`,{className:`card card-articles card-sm border mb-2`,children:[(0,X.jsxs)(`div`,{className:`card-header small`,children:[`Commented on `,(0,X.jsx)(`b`,{children:e.populated_proposal.title})]}),(0,X.jsx)(`div`,{className:`card-body small p-2`,children:(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`small`,children:(0,l.format)(new Date(e.date),`M/dd/yy`)}),(0,X.jsx)(`div`,{children:e.comment})]})}),(0,X.jsx)(`div`,{className:`card-footer`,children:(0,X.jsx)(i.t,{prefetch:!1,href:`${$.PROPOSALS}/${e.populated_proposal.url}?interaction_id=${e._id}`,children:(0,X.jsx)(r.t,{small:!0,children:`View`})})})]},e._id))})}function fn({activeLayoutProposalSentiments:e}){return(0,X.jsx)(`div`,{children:e.user_sentiments?.map(e=>(0,X.jsxs)(`div`,{className:`card card-articles card-sm border mb-2`,children:[(0,X.jsxs)(`div`,{className:`card-header small`,children:[`Gave their sentiment on `,(0,X.jsx)(`b`,{children:e.populated_proposal.title})]}),(0,X.jsxs)(`div`,{className:`card-body small p-2`,children:[(0,X.jsxs)(`div`,{className:`d-flex align-items-center border-bottom pb-1`,children:[e.sentiment_status==`Agree`&&(0,X.jsx)(`div`,{className:`badge shadow-articles bg-success`,children:`Agree`}),e.sentiment_status==`Needs Work`&&(0,X.jsx)(`div`,{className:`badge shadow-articles bg-warning text-dark`,children:`Needs Work`}),e.sentiment_status==`Disagree`&&(0,X.jsx)(`div`,{className:`badge shadow-articles bg-danger`,children:`Disagree`}),(0,X.jsx)(`span`,{className:`small ms-2`,children:(0,l.format)(new Date(e.date),`M/dd/yy`)})]}),(0,X.jsx)(`div`,{className:`mt-1`,children:e.comment})]}),(0,X.jsx)(`div`,{className:`card-footer`,children:(0,X.jsx)(i.t,{prefetch:!1,href:`https://articles.media/politics/proposals/${e.populated_proposal.url}?interaction_id=${e._id}`,children:(0,X.jsx)(r.t,{small:!0,children:`View`})})})]},e._id))})}function pn({activeLayoutProposalSentiments:e,userProposalsSubmitted:t}){let[n,a]=(0,s.useState)(!1);return(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`mb-2`,children:t?.slice(0,n?100:1).map(e=>(0,X.jsxs)(`div`,{className:`card card-articles card-sm shadow-articles`,children:[(0,X.jsx)(`div`,{className:`card-body p-2 lh-sm d-flex align-items-center`,children:(0,X.jsxs)(`div`,{className:`ms-2`,children:[(0,X.jsx)(`div`,{children:e.title}),(0,X.jsxs)(`div`,{className:`small`,children:[e.type,e.fundamental&&` - Fundamental`]})]})}),(0,X.jsx)(`div`,{className:`card-footer d-flex`,children:(0,X.jsx)(i.t,{href:`${$.PROPOSALS_SUBMISSIONS_ALL}/${e._id}`,className:``,children:(0,X.jsx)(r.t,{small:!0,children:(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`i`,{className:`fad fa-eye me-1`}),`View`]})})})})]},e._id))}),t?.length>1&&(0,X.jsx)(r.t,{onClick:()=>a(!n),className:`w-100`,children:n?`View Less`:`View All`}),t?.length==0&&(0,X.jsx)(`span`,{className:`small`,children:`User has no proposal submissions`})]})}function mn(e){let{featured_image:t,thumbnail_size:n}=e;return(0,X.jsxs)(X.Fragment,{children:[(t?.image_type==`S3 File System`||t?.thumbnails?.length>0)&&(0,X.jsx)(X.Fragment,{children:t?.thumbnails?.length>0?(0,X.jsx)(X.Fragment,{children:n&&t?.thumbnails?.find(e=>e.width==n)?(0,X.jsx)(`img`,{style:{width:`100%`,height:`100%`,objectFit:`cover`},src:process.env.NEXT_PUBLIC_CDN+t?.thumbnails?.find(e=>e.width==n).key,loading:`lazy`,alt:``,className:`flex-shrink-0`}):(0,X.jsx)(`img`,{style:{width:`100%`,height:`100%`,objectFit:`cover`},src:process.env.NEXT_PUBLIC_CDN+[...t?.thumbnails].sort((e,t)=>e.width-t.width)[0].key,loading:`lazy`,alt:``,className:`flex-shrink-0`})}):(0,X.jsx)(`img`,{style:{width:`100%`,height:`100%`,objectFit:`cover`},src:process.env.NEXT_PUBLIC_CDN+t?.key,loading:`lazy`,alt:``,className:`flex-shrink-0`})}),t?.location&&!t?.image_type&&(t?.thumbnails?.length||0)<1&&(0,X.jsx)(`img`,{style:{objectFit:`cover`,width:`100%`,height:`100%`},src:`${process.env.NEXT_PUBLIC_CDN}${t?.key}`,alt:``,loading:`lazy`})]})}function hn(e){switch(e){case`story`:return $.STORIES;case`issue`:return $.ISSUES;case`myth`:return $.MYTHS;default:}}function gn({publicUserData:e}){return(0,X.jsx)(`div`,{children:e?.populated_news_comments?.filter(e=>!e.parent_id).map(e=>(0,X.jsxs)(`div`,{className:`card card-articles card-sm border mb-2`,children:[(0,X.jsxs)(`div`,{className:`card-header small`,children:[`Commented on `,(0,X.jsx)(`b`,{children:e.populated_news?.news_title})]}),(0,X.jsxs)(`div`,{className:`card-body small p-2 d-flex`,children:[(0,X.jsx)(`div`,{style:{width:`100px`,height:`100px`},className:`me-2 flex-shrink-0`,children:(0,X.jsx)(mn,{featured_image:e?.populated_news?.featured_image,thumbnail_size:100})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`small`,children:(0,l.format)(new Date(e.date),`M/dd/yy`)}),(0,X.jsx)(`div`,{children:e.comment})]})]}),(0,X.jsx)(`div`,{className:`card-footer`,children:(0,X.jsx)(i.t,{prefetch:!1,href:`${hn(e.populated_news?.news_type)}/${e.populated_news?.url}?interaction_id=${e._id}`,children:(0,X.jsx)(r.t,{small:!0,children:`View`})})})]},e._id))})}function _n({userNewsSubmitted:e}){let[t,n]=(0,s.useState)(!1);return(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`div`,{className:`mb-1 d-flex justify-content-between align-items-center`,children:[(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`i`,{className:`fad fa-newspaper me-1`}),(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{children:`News Submissions: `}),(0,X.jsx)(`span`,{className:`badge bg-dark`,children:e?.length||0})]})]}),(0,X.jsxs)(`span`,{className:`badge bg-articles-secondary`,children:[(0,X.jsx)(`i`,{className:`fad fa-info me-1`}),(0,X.jsx)(`span`,{children:`Info`})]})]}),(0,X.jsx)(`div`,{className:`mb-1`,children:e?.slice(0,t?100:1).map(e=>(0,X.jsxs)(`div`,{className:`card card-articles shadow-articles`,children:[(0,X.jsxs)(`div`,{className:`card-body py-1 px-2 lh-sm d-flex align-items-center`,children:[(0,X.jsx)(`img`,{className:``,src:e?.featured_image?.location,width:`40px`,height:`40px`,style:{objectFit:`cover`},alt:``}),(0,X.jsx)(`div`,{className:`ms-2`,children:(0,X.jsx)(`div`,{children:e.news_title})})]}),(0,X.jsx)(`div`,{className:`card-footer d-flex p-1`,children:(0,X.jsx)(i.t,{href:`${$.HOME}/${e.url}`,children:(0,X.jsxs)(r.t,{small:!0,className:``,children:[(0,X.jsx)(`i`,{className:`fad fa-eye me-1`}),`View`]})})})]},e._id))}),e?.length>1?(0,X.jsx)(r.t,{onClick:()=>n(!t),small:!0,className:``,children:t?`View Less`:`View All`}):(0,X.jsx)(`span`,{className:`small`,children:`User has no news submissions`})]})}function vn({activeLayoutProposalSentiments:e,userDonations:t,lifetimeContribution:n}){let[o,c]=(0,s.useState)(!1);return(0,X.jsxs)(`div`,{className:`card card-articles `,children:[(0,X.jsxs)(`div`,{className:`card-header d-flex justify-content-between align-items-center p-1`,children:[(0,X.jsx)(`span`,{children:`Donations: `}),(0,X.jsxs)(`span`,{className:`badge bg-dark`,children:[t.count,` - `,`$${a.t((n/100||0).toFixed(2))}`]})]}),(0,X.jsxs)(`div`,{className:`card-body p-2`,children:[t?.list?.length==0&&(0,X.jsx)(`span`,{className:`small`,children:`User has no donations`}),(0,X.jsx)(`div`,{className:`donations-wrap`,children:t?.list?.slice(0,o?100:3).map(e=>(0,X.jsxs)(`div`,{className:`border`,children:[(0,X.jsxs)(`div`,{className:`card-body py-1 px-2 lh-sm d-flex align-items-center`,children:[(0,X.jsx)(`div`,{className:`small`,children:`Most Recent`}),(0,X.jsxs)(`div`,{className:`ms-2 d-flex align-items-center`,children:[(0,X.jsx)(`div`,{className:`h4 mb-0 me-2`,children:`$${a.t((e.amount/100).toFixed(2))}`}),(0,X.jsx)(`div`,{className:`small`,children:(0,l.format)(new Date(e.date),`M/dd/yy`)})]})]}),(0,X.jsx)(`div`,{className:`card-footer d-flex p-1`,children:(0,X.jsx)(i.t,{href:`${$.HOME}/${e.url}`,children:(0,X.jsxs)(r.t,{className:``,small:!0,children:[(0,X.jsx)(`i`,{className:`fad fa-eye me-1`}),`View`]})})})]},e._id))})]}),(0,X.jsx)(`div`,{className:`card-footer p-1 d-flex justify-content-center`,children:t.count>1&&(0,X.jsx)(r.t,{onClick:()=>{c(!o)},className:`w-100`,children:o?`View Less`:`View All`})})]})}function yn({userLayoutsData:e,handleClose:t}){return(0,X.jsx)(`div`,{children:e?.map(e=>(0,X.jsxs)(`div`,{className:`card card-articles shadow-articles`,children:[(0,X.jsx)(`div`,{className:`card-body py-1 px-2 lh-sm d-flex align-items-center`,children:(0,X.jsxs)(`div`,{className:`ms-2`,children:[(0,X.jsx)(`div`,{children:e.name}),(0,X.jsx)(`div`,{className:`small`,children:`Last Viewed: Never`})]})}),(0,X.jsxs)(`div`,{className:`card-footer d-flex p-1`,children:[(!1)._id!==e.user_id&&(0,X.jsxs)(r.t,{className:``,small:!0,children:[(0,X.jsx)(`i`,{className:`fad fa-plus me-1`}),`Follow`]}),(0,X.jsx)(i.t,{href:`${$.HOME}/${e.url}`,children:(0,X.jsxs)(r.t,{className:``,small:!0,children:[(0,X.jsx)(`i`,{className:`fad fa-eye me-1`}),`View`]})})]})]},e._id))})}function bn({activeLayoutProposalSentiments:e,userData:t}){return(0,X.jsx)(`div`,{children:(0,X.jsx)(`div`,{className:``,children:t?.verified?.verified_methods?.map((e,t)=>Object.keys(e)?.length>0?(0,X.jsxs)(`div`,{className:`card card-articles card-sm object mb-2`,children:[(0,X.jsx)(`div`,{className:`card-header`,children:e?.method_name}),(0,X.jsx)(`div`,{className:`card-body p-2`,children:(0,X.jsxs)(`div`,{className:`small`,children:[(0,X.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,X.jsx)(`span`,{className:`me-2`,children:`Approved On: `}),(0,X.jsx)(a.n,{date:e.approved_date})]}),(0,X.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,X.jsx)(`span`,{className:`me-2`,children:`Approved By: `}),(0,X.jsx)(Tn,{user_id:e.approved_by,dangerousPopulate:!0})]})]})})]},t):(0,X.jsx)(`div`,{className:`single`,children:e},t))})})}var xn=[];function Sn({activeLayoutProposalSentiments:e}){return(0,X.jsx)(`div`,{children:(0,X.jsx)(`div`,{className:`achievements card card-articles`,children:(0,X.jsx)(`div`,{className:`card-body p-0`,children:xn.map(e=>(0,X.jsx)(`div`,{children:(0,X.jsxs)(`div`,{className:`achievement w-100 d-flex align-items-center`,children:[(0,X.jsx)(`div`,{className:`icon`,style:{width:`50px`},children:(0,X.jsx)(`i`,{className:`fad ${e.icon} fa-lg`})}),(0,X.jsxs)(`div`,{className:`details small me-auto`,children:[(0,X.jsx)(`b`,{className:`name`,children:e.name}),(0,X.jsx)(`div`,{className:`description mb-1`,children:e.description}),(0,X.jsx)(`div`,{className:`small`,children:e.tags?.map(e=>(0,X.jsx)(`span`,{className:`badge bg-dark border`,children:e},e))})]}),(0,X.jsx)(`div`,{className:`icon border-end-0 border-start border-dark`,children:(0,X.jsx)(`div`,{className:`text-center px-3`,children:(0,X.jsx)(`i`,{className:`fad fa-square fa-lg me-0`})})})]})},e.name))})})})}var Cn=e=>fetch(e).then(e=>e.json());(0,l.minutesToMilliseconds)(60),(0,l.minutesToMilliseconds)(60);var wn=e=>{let{data:t,error:n,isLoading:r,mutate:i}=(0,c.default)(process.env.NODE_ENV===`development`?`http://localhost:3001/api/news/resources/political-parties`:`https://articles.media/api/news/resources/political-parties`,Cn,e?.preload?{dedupingInterval:1e3*60*10,fallbackData:e?.preload}:{dedupingInterval:1e3*60*10});return{data:t,error:n,isLoading:r,mutate:i}};function Tn(e){let{populated_user:t,hidePhoto:n,visibleItems:c,size:u,className:d,dangerousPopulate:f,user_id:p,buttonType:m,children:h,fakeMembership:g}=e,[_,v]=(0,s.useState)(!1),[y,b]=(0,s.useState)({}),[x,S]=(0,s.useState)([]),[C,w]=(0,s.useState)([]),[T,E]=(0,s.useState)(null),[D,O]=(0,s.useState)([]),[k,A]=(0,s.useState)([]),[j,M]=(0,s.useState)(!1),{data:N,isLoading:P,mutate:F}=wn(),[I,ee]=(0,s.useState)(`Proposals Stance`),L=()=>{v(!1)};(0,s.useEffect)(()=>{t&&b({...t})},[]);let[te,R]=(0,s.useState)(!1),[z,B]=(0,s.useState)([]),[V,ne]=(0,s.useState)([]),{data:H,isLoading:re,mutate:U}=cn((p||t?._id)&&(_||f)?{user_id:p||t?._id}:null),{data:W,isLoading:ie,mutate:G}=cn((!1)?._id&&(_||f)?{user_id:(!1)?._id}:null);(0,s.useEffect)(()=>{H&&(console.log(`publicUserData`,H),b(H),S(H?.populated_public_layouts),w(H?.populated_public_donations),E(H?.populated_public_donations.total),A(H?.populated_public_proposals),B(H?.populated_public_proposals_stance),O(H?.populated_public_news_submissions||[]))},[H]),(0,s.useEffect)(()=>{W&&(console.log(`personalUserData`,W),ne(W?.populated_public_proposals_stance))},[W]);let ae=(t||y)?.articles_membership?.plan.replace(` `,`-`).toLowerCase(),oe=g?.replace(` `,`-`).toLowerCase(),K=`https://articles.media/images/store/memberships/`,q=()=>{let e=(t||y)?.articles_membership?.status==`Active`;return(0,X.jsxs)(`div`,{style:u==`lg`?{fontSize:`1.5rem`}:{},className:`view-user-modal-badge-wrap ${u==`lg`&&`large`} ${d&&d}`,children:[(0,X.jsxs)(`span`,{onClick:()=>{v(!0)},className:`position-relative view-user-modal-badge d-flex justify-content-between align-items-center badge bg-articles badge-hover `,children:[(e||g)&&(0,X.jsx)(`i`,{className:`fad membership-badge ${oe||ae} fa-badge-check`,style:{position:`absolute`,top:`-2px`,left:`-2px`,fontSize:`0.9rem`,zIndex:1}}),(0,X.jsxs)(`div`,{className:`d-flex align-items-center ${e&&``}`,children:[!n&&(0,X.jsx)(`div`,{className:u==`lg`?`me-0`:`me-1`,children:(0,X.jsx)(rn,{width:`15px`,profile_photo:y.profile_photo})}),y.display_name||t?.display_name]}),(0,X.jsx)(`i`,{className:`fad fa-plus-square me-0 ms-2`})]}),c?.includes(`Not Verified`)&&t?.verified?.status!==`Verified`&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{style:{pointerEvents:`none`},id:`button-tooltip`,children:(0,X.jsx)(`div`,{className:``,children:`User is not verified`})}),children:(0,X.jsxs)(`span`,{className:`verification-user-badge badge bg-danger d-flex align-items-center`,children:[(0,X.jsx)(`i`,{style:{paddingBottom:`2px`},className:`fas fa-robot me-1`}),(0,X.jsx)(`span`,{className:``,children:`Unverified`})]})}),!1,c?.includes(`Verification Status`)&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{id:`button-tooltip`,style:{pointerEvents:`none`,transformX:`-20px`},children:t?.verified?.status==`Verified`?`Verified`:` Not Verified`}),children:t?.verified?.status==`Verified`?(0,X.jsx)(`span`,{className:`verification-user-badge badge bg-success cursor-pointer`,children:(0,X.jsx)(`i`,{className:`fas fa-check me-0`})}):(0,X.jsxs)(`span`,{className:`verification-user-badge badge bg-danger cursor-pointer`,children:[(0,X.jsx)(`i`,{className:`fas fa-robot me-1`}),(0,X.jsx)(`span`,{children:`?`})]})}),c?.includes(`Political Party`)&&(0,X.jsx)(`div`,{className:`d-flex`,children:(t||y)?.political?.party_id&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsxs)(Z,{id:`tooltip-bottom`,style:{position:`fixed`},children:[(0,X.jsx)(`img`,{width:`40px`,height:`40px`,style:{objectFit:`contain`,padding:`0px`,zIndex:`10`,position:`relative`},loading:`lazy`,src:`${process.env.NEXT_PUBLIC_CDN}`+N?.find(e=>e._id==(t||y)?.political?.party_id)?.logo,alt:``}),(0,X.jsx)(`span`,{className:`ms-2`,children:N?.find(e=>e._id==(t||y)?.political?.party_id)?.name})]}),children:(0,X.jsx)(`div`,{className:`badge bg-light text-capitalize ms-0 h-100 d-flex justify-content-center align-items-center`,style:{padding:`0 0.15rem`,cursor:`pointer`},children:(t||y)?.political?.party_id&&((t||y)?.political?.party_id==`62a830440593acbd4061c48c`?(0,X.jsx)(`i`,{className:`fad fa-unlink unaffiliated-icon fa-lg me-0`}):(0,X.jsx)(`img`,{width:`15px`,height:`15px`,style:{objectFit:`contain`,padding:`0px`},loading:`lazy`,src:`${process.env.NEXT_PUBLIC_CDN}`+N?.find(e=>e._id==(t||y)?.political?.party_id)?.logo,alt:``}))})})})]})};function se(e){switch(e){case`Link`:return(0,X.jsx)(`span`,{type:`button`,onClick:()=>{v(!0)},children:h});default:return(0,X.jsx)(q,{})}}let[J,ce]=(0,s.useState)(!1),[le,ue]=(0,s.useState)({}),[de,fe]=(0,s.useState)({});(0,s.useEffect)(()=>{J&&Object.keys(le).length==0&&console.log(`adminUserData`,W)},[J]);let[pe,me]=(0,s.useState)(null);function he(){alert(`TODO`)}let ge=(0,s.useMemo)(()=>x?.filter(e=>e.user_layout)?.[0]?.url,[x]);return(0,X.jsxs)(X.Fragment,{children:[se(m),(0,X.jsxs)(o.t,{show:_,size:`lg`,id:`view-users-modal`,className:`view-users-modal articles-modal`,scrollable:!0,onHide:L,children:[(0,X.jsx)(o.t.Header,{closeButton:!0,children:(0,X.jsx)(`div`,{className:`w-100 d-flex justify-content-between align-items-center`,children:(0,X.jsx)(`h3`,{className:`mb-0`,children:`User Info`})})}),(0,X.jsx)(o.t.Body,{children:(0,X.jsxs)(`div`,{className:`main-panel`,children:[(0,X.jsxs)(`div`,{className:`d-flex`,children:[(0,X.jsxs)(`div`,{className:`d-flex flex-column align-items-center`,style:{width:`100px`},children:[(0,X.jsx)(`div`,{type:`button`,onClick:()=>{me(`${process.env.NEXT_PUBLIC_CDN}${y?.profile_photo?.key}`)},children:(0,X.jsx)(rn,{width:`100px`,profile_photo:y?.profile_photo})}),(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{id:`tooltip-bottom`,children:`Joined Articles Media`}),children:(0,X.jsxs)(`div`,{className:`badge bg-black border border-white shadow-sm rounded-0`,children:[`Joined `,y?.sign_up_date&&(0,l.format)(new Date(y?.sign_up_date),`M/dd/yy`)]})}),ge&&(0,X.jsx)(i.t,{href:`https://articles.media/layouts/${ge}`,className:`mt-2 w-100`,children:(0,X.jsxs)(r.t,{className:`w-100`,style:{},children:[(0,X.jsx)(`i`,{className:`fad fa-home`}),(0,X.jsx)(`span`,{children:`Layout`})]})}),(0,X.jsx)(ln,{className:`w-100`,children:(0,X.jsx)(i.t,{href:{pathname:`https://articles.media/messages`,query:{startMsg:y?._id}},className:`mt-2 w-100`,children:(0,X.jsxs)(r.t,{className:`w-100`,style:{fontSize:`0.88rem`},children:[(0,X.jsx)(`i`,{className:`fad fa-envelope`}),(0,X.jsx)(`span`,{children:`Message`})]})})}),J&&(0,X.jsxs)(`div`,{className:`d-flex flex-column w-100 mt-2`,style:{maxWidth:`100px`},children:[(0,X.jsx)(r.t,{variant:`warning`,small:!0,className:``,children:(0,X.jsx)(Textfit,{max:14,mode:`single`,children:`Remove Photo`})}),le?.user?.profile_photo?.banned_uploads?(0,X.jsx)(r.t,{variant:`warning`,small:!0,className:``,onClick:()=>{toggleBanCustomPhotoUpload()},children:(0,X.jsx)(Textfit,{max:14,mode:`single`,children:`Unban Uploads`})}):(0,X.jsx)(r.t,{variant:`danger`,small:!0,className:``,onClick:()=>{toggleBanCustomPhotoUpload()},children:(0,X.jsx)(Textfit,{max:14,mode:`single`,children:`Ban Uploads`})})]})]}),(0,X.jsxs)(`div`,{className:`mx-2`,children:[(0,X.jsxs)(`div`,{className:`d-flex align-items-center mb-1`,children:[(0,X.jsx)(`h5`,{className:`mb-0`,children:t?.display_name||y.display_name}),(0,X.jsxs)(`span`,{className:`ms-2`,children:[` @`,y?.username]})]}),y?.articles_membership?.status==`Active`&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{id:`tooltip-bottom`,children:(0,X.jsxs)(`div`,{className:`d-flex flex-column py-1`,children:[(0,X.jsxs)(`div`,{className:`position-relative`,children:[y?.articles_membership?.plan==`Supporter`&&(0,X.jsx)(`img`,{src:`${K}supporter.jpg`,width:50,height:50,alt:`Membership plan level`}),y?.articles_membership?.plan==`Premium Supporter`&&(0,X.jsx)(`img`,{src:`${K}premiumSupporter.jpg`,width:50,height:50,alt:`Membership plan level`}),y?.articles_membership?.plan==`Advocate`&&(0,X.jsx)(`img`,{src:`${K}advocate.jpg`,width:50,height:50,alt:`Membership plan level`}),(0,X.jsx)(`i`,{className:`fad membership-badge ${ae} fa-badge-check me-1`,style:{position:`absolute`,top:`50%`,left:`50%`,transform:`translateX(-50%) translateY(-50%)`,fontSize:`1.5rem`}})]}),(0,X.jsxs)(`span`,{className:`lh-sm`,children:[(0,X.jsx)(`div`,{children:y?.articles_membership?.plan}),(0,X.jsxs)(`div`,{className:`small`,children:[`Since `,(0,X.jsx)(a.n,{format:`MM/dd/yy`,date:y?.articles_membership?.membership_started})]})]})]})}),children:(0,X.jsxs)(`div`,{className:`badge bg-articles border me-1 mb-1`,style:{cursor:`pointer`},children:[(0,X.jsx)(`i`,{className:`fad membership-badge ${ae} fa-badge-check me-1`,style:{}}),(0,X.jsx)(`span`,{children:y?.articles_membership?.plan}),(0,X.jsx)(`span`,{className:`px-1`,children:`|`}),(0,X.jsx)(`span`,{className:`months fw-bold`,children:(0,l.differenceInMonths)(new Date,new Date(y?.articles_membership?.membership_started))||0})]})}),y?.address?.state&&(0,X.jsx)(Q,{placement:`bottom`,overlay:y.address?.state?.length==2?(0,X.jsxs)(Z,{id:`tooltip-bottom`,children:[`From the state of `,convertRegion(y.address?.state,`name`)?convertRegion(y.address?.state,`name`)[0]:``]}):(0,X.jsxs)(Z,{id:`tooltip-bottom`,children:[`From the state of `,y.address?.state]}),children:(0,X.jsxs)(`div`,{className:`badge bg-articles border me-1 mb-1`,children:[(0,X.jsx)(`i`,{className:`fad fa-map-pin me-1`}),y.address?.state]})}),y.verified?.status!==`Verified`&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{id:`tooltip-bottom`,children:`User is not verified`}),children:(0,X.jsxs)(`div`,{className:`badge bg-danger me-1 mb-1`,children:[(0,X.jsx)(`i`,{className:`fad fa-robot me-1`}),`Unverified`]})}),y.verified?.status==`Verified`&&(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsxs)(Z,{id:`tooltip-bottom`,className:``,children:[(0,X.jsxs)(`div`,{children:[`Verified by `,y.verified?.verified_methods?.length,` method`,y.verified?.verified_methods?.length>1&&`s`]}),(0,X.jsx)(`hr`,{}),(0,X.jsx)(`div`,{className:`pb-2`,children:y.verified?.verified_methods?.map((e,t)=>Object.keys(e)?.length>0?(0,X.jsx)(`div`,{className:`object`,children:e?.method_name},t):(0,X.jsx)(`div`,{className:`single`,children:e},t))})]}),children:(0,X.jsxs)(`div`,{className:`badge bg-articles border me-1 mb-1`,children:[(0,X.jsx)(`i`,{className:`fad fa-star me-1`}),y.verified?.status]})}),y.political?.party_id&&(0,X.jsx)(X.Fragment,{children:(0,X.jsx)(Q,{placement:`bottom`,overlay:(0,X.jsx)(Z,{id:`tooltip-bottom`,children:(0,X.jsx)(`div`,{children:`Users political party`})}),children:(0,X.jsx)(i.t,{href:`https://articles.media/politics/parties/${(t||y)?.political?.party_id}`,children:(0,X.jsx)(`div`,{className:`badge bg-articles border text-capitalize me-1`,children:(0,X.jsxs)(`div`,{className:``,children:[(t||y)?.political?.party_id==`62a830440593acbd4061c48c`?(0,X.jsx)(`i`,{className:`fad fa-unlink unaffiliated-icon fa-lg me-0`}):(0,X.jsx)(`img`,{width:`14px`,height:`14px`,style:{objectFit:`contain`,padding:`0px`},loading:`lazy`,src:`${process.env.NEXT_PUBLIC_CDN}`+N?.find(e=>e._id==y?.political?.party_id)?.logo,alt:``}),(0,X.jsx)(`span`,{className:`ms-1`,children:N?.find(e=>e._id==y.political?.party_id)?.name})]})})})})}),(0,X.jsx)(`hr`,{}),(0,X.jsx)(`div`,{className:`small`,children:y?._id==`5e90cc96579a17440c5d7d52`&&(0,X.jsx)(`span`,{children:`Founder of Articles Media, thank you for using the site, feel free to message me with any questions, concerns or anything else.`})})]})]}),(0,X.jsx)(`hr`,{}),J&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`d-flex align-items-center justify-content-between`,children:(0,X.jsx)(`div`,{className:`small`,children:`Admin Mode Toolbar`})}),(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`div`,{className:`d-flex mb-2`,children:[(0,X.jsx)(r.t,{small:!0,variant:`warning`,className:``,onClick:()=>{loadAdminUserData()},children:(0,X.jsx)(`i`,{className:`fad fa-redo me-0`})}),(0,X.jsx)(r.t,{active:J?.edit,small:!0,className:``,onClick:()=>{ce({...J,edit:!J?.edit})},children:`Edit Mode`}),J?.edit&&(0,X.jsx)(r.t,{small:!0,variant:`success`,className:`me-0`,onClick:()=>{he()},children:(0,X.jsx)(`i`,{className:`fad fa-save me-0`})})]}),[`User Details`,`Verification`,`Moderation`,`Bans`,`Stripe`,`Layouts`,`Reset Password`,`Sessions`].map(e=>(0,X.jsx)(r.t,{active:e==J?.tab,small:!0,onClick:()=>{ce({...J,tab:e})},children:e},e))]}),(0,X.jsx)(`hr`,{})]}),(0,X.jsxs)(`div`,{className:`pe-3 pb-3`,children:[(0,X.jsx)(`div`,{className:`mb-2 me-2`,children:[{name:`Proposals Stance`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:(0,X.jsxs)(`div`,{className:`small`,children:[(0,X.jsx)(`span`,{children:V?.fundamental?.filter(e=>V?.user_sentiments?.find(t=>t.proposal_id==e._id)?e:null).length}),(0,X.jsx)(`span`,{className:`px-1`,children:`/`}),(0,X.jsx)(`span`,{children:V?.fundamental?.length})]})})},{name:`Proposal Sentiments`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:y?.populated_public_proposals_stance?.user_sentiments_count||0})},{name:`Proposal Comments`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:y?.populated_public_proposals_stance?.user_comments_count||0})},{name:`Proposal Submissions`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:k?.length||0})},{name:`News Comments`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:y?.populated_news_comments_count||0})},{name:`News Submissions`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:D?.length||0})},{name:`Verifications`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:y.verified?.verified_methods?.length||0})},{name:`Layouts`,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:x?.length||0})},{name:`Donations`,badge:(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`badge bg-primary ms-1`,children:H?.populated_public_donations?.count||0}),(0,X.jsxs)(`span`,{className:`badge bg-black`,children:[`$`,a.t((H?.populated_public_donations.total/100).toFixed(2))]})]})},{name:`Orders`,badge:(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`badge bg-primary ms-1`,children:`0`}),(0,X.jsx)(`span`,{className:`badge bg-black`,children:`0`})]})},{name:`Achievements`,dev:!0,badge:(0,X.jsx)(`span`,{className:`badge bg-black ms-1`,children:`0`})}].map(e=>(e.name,e.name,e.badge,e.name,e.dev?(0,X.jsx)(ln,{inline:!0,children:(0,X.jsxs)(r.t,{onClick:()=>ee(e.name),active:e.name==I,small:!0,children:[e.name,e.badge]},e.name)},e.name):(0,X.jsxs)(r.t,{onClick:()=>ee(e.name),active:e.name==I,small:!0,children:[e.name,e.badge]},e.name)))}),I==`Proposals Stance`&&(0,X.jsx)(un,{activeLayoutProposalSentiments:z,populated_user:t,usersProposalSentiments:V,setShowFullStanceDetails:R,showFullStanceDetails:te,userData:y}),I==`Proposal Comments`&&(0,X.jsx)(dn,{activeLayoutProposalSentiments:z}),I==`Proposal Sentiments`&&(0,X.jsx)(fn,{activeLayoutProposalSentiments:z}),I==`Proposal Submissions`&&(0,X.jsx)(pn,{userProposalsSubmitted:H?.populated_public_proposals}),I==`News Comments`&&(0,X.jsx)(gn,{publicUserData:H}),I==`News Submissions`&&(0,X.jsx)(_n,{publicUserData:H,userNewsSubmitted:H?.populated_public_news_submissions}),I==`Donations`&&(0,X.jsx)(vn,{publicUserData:H,userDonations:H?.populated_public_donations,lifetimeContribution:T}),I==`Layouts`&&(0,X.jsx)(yn,{publicUserData:H,userLayoutsData:H?.populated_public_layouts}),I==`Verifications`&&(0,X.jsx)(bn,{publicUserData:H,userData:y}),I==`Achievements`&&(0,X.jsx)(Sn,{publicUserData:H})]})]})}),(0,X.jsxs)(o.t.Footer,{className:`justify-content-between`,children:[(!1)?._id==`5e90cc96579a17440c5d7d52`?(0,X.jsxs)(`span`,{children:[(0,X.jsxs)(ln,{inline:!0,className:`me-2`,children:[(0,X.jsxs)(r.t,{onClick:()=>{ce(J?!1:{tab:``})},small:!0,active:J,variant:``,className:`me-1`,children:[(0,X.jsx)(`i`,{className:`fad fa-pen`}),(0,X.jsx)(`span`,{children:`Admin Mode`})]}),(0,X.jsx)(r.t,{onClick:()=>{U(),G()},small:!0,variant:`warning`,className:``,children:(0,X.jsx)(`i`,{className:`fad fa-redo me-0`})})]}),(0,X.jsx)(`span`,{style:{fontSize:`0.8rem`},children:y?._id})]}):(0,X.jsx)(`span`,{}),(0,X.jsx)(`div`,{className:`justify-content-`,children:(0,X.jsx)(r.t,{variant:`articles`,onClick:L,children:`Close`})})]})]})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return Tn}});
@@ -1 +0,0 @@
1
- "use client";const e=require(`./ViewUserModal-DPVcjXNU.cjs`);module.exports=e.t;
@@ -1 +0,0 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -1 +0,0 @@
1
- var e=require(`./chunk-350yNsax.cjs`).t(((e,t)=>{(function(){"use strict";var e={}.hasOwnProperty;function n(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,r(n)))}return e}function r(t){if(typeof t==`string`||typeof t==`number`)return t;if(typeof t!=`object`)return``;if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes(`[native code]`))return t.toString();var r=``;for(var a in t)e.call(t,a)&&t[a]&&(r=i(r,a));return r}function i(e,t){return t?e?e+` `+t:e+t:e}t!==void 0&&t.exports?(n.default=n,t.exports=n):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return n}):window.classNames=n})()}));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return e}});
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./ReturnToLauncherButton.cjs`),t=require(`./ArticlesAd.cjs`),n=require(`./Ad-DYtftKNV.cjs`),r=require(`./ViewUserModal-DPVcjXNU.cjs`),i=require(`./GameScoreboard-DdOCRxON.cjs`),a=require(`./GlobalHead.cjs`),o=require(`./GlobalBody.cjs`),s=require(`./SettingsModal--sWLmLGp.cjs`),c=require(`./CreditsModal.cjs`),l=require(`./DarkModeHandler.cjs`),u=require(`./useUserFriends.cjs`),d=require(`./FriendsList.cjs`),f=require(`./useUserDetails.cjs`),p=require(`./useUserToken.cjs`),m=require(`./useFullscreen.cjs`);exports.Ad=n.t,exports.ArticlesAd=t,exports.CreditsModal=c,exports.DarkModeHandler=l,exports.FriendsList=d,exports.GameScoreboard=i.t,exports.GlobalBody=o,exports.GlobalHead=a,exports.ReturnToLauncherButton=e,exports.SettingsModal=s.t,exports.ViewUserModal=r.t,exports.useFullscreen=m,exports.useUserDetails=f,exports.useUserFriends=u,exports.useUserToken=p;
@@ -1,6 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`);var t=e.t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),n=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case E:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===_)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===E)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=k.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(A.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){N||(N=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,`key`,{get:n,configurable:!0})}function l(){var e=t(this.type);return P[e]||(P[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:h,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,`ref`,{enumerable:!1,value:null}):Object.defineProperty(e,`ref`,{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,`validated`,{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,`_debugInfo`,{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,`_debugStack`,{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,`_debugTask`,{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function d(e,n,i,o,l,d){var p=n.children;if(p!==void 0)if(o)if(j(p)){for(o=0;o<p.length;o++)f(p[o]);Object.freeze&&Object.freeze(p)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`);else f(p);if(A.call(n,`key`)){p=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,L[p+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
2
- let props = %s;
3
- <%s {...props} />
4
- React keys must be passed directly to JSX without using spread:
5
- let props = %s;
6
- <%s key={someKey} {...props} />`,o,p,m,p),L[p+o]=!0)}if(p=null,i!==void 0&&(r(i),p=``+i),s(n)&&(r(n.key),p=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return p&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,p,i,a(),l,d)}function f(e){p(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===E&&(e._payload.status===`fulfilled`?p(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function p(e){return typeof e==`object`&&!!e&&e.$$typeof===h}var m=require(`react`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.client.reference`),k=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,j=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(e){return e()}};var N,P={},F=m.react_stack_bottom_frame.bind(m,o)(),I=M(i(o)),L={};e.Fragment=_,e.jsx=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!1,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)},e.jsxs=function(e,t,n){var r=1e4>k.recentlyCreatedOwnerStacks++;return d(e,t,n,!0,r?Error(`react-stack-top-frame`):F,r?M(i(e)):I)}})()})),r=e.t(((e,r)=>{process.env.NODE_ENV===`production`?r.exports=t():r.exports=n()}));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);const e=require(`./jsx-runtime-hCcDh67y.cjs`);let t=require(`date-fns`);var n=e.t();function r(e){let r=e?.date,i=e?.format;return r?(0,n.jsx)(`span`,{"date-renderer":`ArticlesDate`,children:(0,t.format)(new Date(r),i||`MM/dd/yy - h:mmaa`)}):`Need date prop`}function i(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,`,`)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`);let t=require(`swr`);t=e.n(t);var n=e=>fetch(e).then(e=>e.json()),r=e=>{let{data:r,error:i,isLoading:a,mutate:o}=(0,t.default)(process.env.NODE_ENV===`development`&&!e?.disable?`http://localhost:3001/api/config`:null,n,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:r,error:i,isLoading:a,mutate:o}},i=e=>fetch(e).then(e=>e.json()),a=e=>{let{data:n,error:r,isLoading:a,mutate:o}=(0,t.default)(process.env.NODE_ENV===`development`&&!e?.disable?`http://localhost:3012/api/status`:null,i,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:n,error:r,isLoading:a,mutate:o}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
@@ -1 +0,0 @@
1
- require(`./chunk-350yNsax.cjs`);let e=require(`react`);var t=()=>{let[t,n]=(0,e.useState)(!1);return(0,e.useEffect)(()=>{let e=()=>{n(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement)};return document.addEventListener(`fullscreenchange`,e),document.addEventListener(`mozfullscreenchange`,e),document.addEventListener(`webkitfullscreenchange`,e),document.addEventListener(`MSFullscreenChange`,e),()=>{document.removeEventListener(`fullscreenchange`,e),document.removeEventListener(`mozfullscreenchange`,e),document.removeEventListener(`webkitfullscreenchange`,e),document.removeEventListener(`MSFullscreenChange`,e)}},[]),{isFullscreen:t,requestFullscreen:e=>{let t=e?document.getElementById(e):document.documentElement;t&&(t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen(),n(!0))},exitFullscreen:()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),n(!1)}}};module.exports=t;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`);let t=require(`swr`);t=e.n(t);var n=e=>{let t=new URLSearchParams({token:e.token}).toString();return fetch(`${e.url}?${t}`).then(e=>e.json())},r=e=>{let{data:r,error:i,isLoading:a,mutate:o}=(0,t.default)(e.token?{url:(process.env.NODE_ENV===`development`?`http://localhost:3012`:`https://accounts.articles.media`)+`/api/auth/session`,token:e.token}:null,n,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:r,error:i,isLoading:a,mutate:o}};module.exports=r;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`);let t=require(`swr`);t=e.n(t);var n=async e=>{if(process.env.NODE_ENV===`development`)try{let t=new URLSearchParams({game:e.game}).toString();return await(await fetch(`http://localhost:3001/api/user/friends?${t}`,{headers:{"x-articles-api-key":e.user_token}})).json()}catch{}let t=new URLSearchParams({game:e.game}).toString();return fetch(`${e.url}?${t}`,{headers:{"x-articles-api-key":e.user_token}}).then(e=>e.json())},r={dedupingInterval:1e3*60*30,refreshInterval:0,revalidateOnFocus:!1,revalidateIfStale:!1,shouldRetryOnError:!1},i=e=>{let{data:i,error:a,isLoading:o,isValidating:s,mutate:c}=(0,t.default)(e?.user_id&&e?.user_token?{url:`https://articles.media/api/user/friends`,user_token:e.user_token}:null,n,r);return{data:i,error:a,isLoading:o,isValidating:s,mutate:c}};module.exports=i;
@@ -1 +0,0 @@
1
- const e=require(`./chunk-350yNsax.cjs`);let t=require(`swr`);t=e.n(t);var n=e=>fetch(e).then(e=>e.json()),r=e=>{let{data:r,error:i,isLoading:a,mutate:o}=(0,t.default)(process.env.NODE_ENV===`development`?`http://localhost:${e}/api/token`:`/api/token`,n,{revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1});return{data:r,error:i,isLoading:a,mutate:o}};module.exports=r;