diff --git a/static/web/404.html b/static/web/404.html index 633aff4a3..7eb730e92 100644 --- a/static/web/404.html +++ b/static/web/404.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/404/index.html b/static/web/404/index.html index 633aff4a3..7eb730e92 100644 --- a/static/web/404/index.html +++ b/static/web/404/index.html @@ -1,4 +1,4 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file + }

404

This page could not be found.

\ No newline at end of file diff --git a/static/web/_next/static/NPtPXiZ9pD1w5A1Mw-WM8/_buildManifest.js b/static/web/_next/static/NPtPXiZ9pD1w5A1Mw-WM8/_buildManifest.js deleted file mode 100644 index 46b8d1a9d..000000000 --- a/static/web/_next/static/NPtPXiZ9pD1w5A1Mw-WM8/_buildManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__BUILD_MANIFEST=function(s,a,c,e,i,t,n,d,f,h,o,b,m,u,k,r,g,j,p,l,_,w,v,y,I,B,F){return{__rewrites:{beforeFiles:[],afterFiles:[{source:"/api/:path*"},{source:"/hls/:path*"},{source:"/img/:path*"},{source:"/logo"},{source:"/thumbnail.jpg"}],fallback:[]},"/":[a,s,c,t,n,f,b,m,g,"static/chunks/4466-94f091f94ca74426.js",h,"static/css/901e2e696ed480dd.css","static/chunks/pages/index-08253d4ef17adb43.js"],"/_error":["static/chunks/pages/_error-02cc11fd74b4e5ff.js"],"/admin":[a,s,c,e,i,t,n,d,o,m,"static/chunks/8676-c38bd41883242e8e.js","static/chunks/pages/admin-75288f493201279e.js"],"/admin/access-tokens":[a,s,c,e,i,"static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js"],"/admin/actions":[a,s,c,e,"static/chunks/pages/admin/actions-9eeca8440633457f.js"],"/admin/chat/messages":[j,a,s,c,e,i,n,p,"static/chunks/pages/admin/chat/messages-7e88922542839f8a.js"],"/admin/chat/users":[j,a,s,c,e,i,t,n,p,"static/chunks/pages/admin/chat/users-072de9838f91e5fb.js"],"/admin/config/appearance":[l,b,_,w,"static/css/6c8941159bdd16f6.css","static/chunks/pages/admin/config/appearance-be1829febefc4db6.js"],"/admin/config-chat":["static/chunks/pages/admin/config-chat-fab037451220beb1.js"],"/admin/config-federation":["static/chunks/8572-deca358d1a965d80.js","static/chunks/pages/admin/config-federation-3e7e0a54acf1bd9b.js"],"/admin/config-notify":["static/chunks/pages/admin/config-notify-b525013f97b7a9a9.js"],"/admin/config-public-details":[l,a,s,c,e,u,_,"static/chunks/1043-0321cc31d7cd63e2.js","static/chunks/pages/admin/config-public-details-085c048afcb776d7.js"],"/admin/config-server-details":[v,"static/chunks/pages/admin/config-server-details-a148074a13faf6b7.js"],"/admin/config-social-items":[a,s,c,e,"static/chunks/pages/admin/config-social-items-f022d29681248095.js"],"/admin/config-storage":["static/chunks/pages/admin/config-storage-7c5510a084d9c01c.js"],"/admin/config-video":[a,s,c,e,v,"static/chunks/6962-f197cc126c73fb7f.js","static/chunks/pages/admin/config-video-5e04088ce814f271.js"],"/admin/federation/actions":[a,s,c,e,i,"static/chunks/pages/admin/federation/actions-d79f77b8b18148ad.js"],"/admin/federation/followers":[a,s,c,e,i,t,"static/chunks/pages/admin/federation/followers-0cddb891db616443.js"],"/admin/hardware-info":[k,i,t,d,o,r,u,"static/chunks/pages/admin/hardware-info-34c5be89db1620b1.js"],"/admin/help":[t,d,b,w,"static/chunks/7830-37f6f9f7aaae2bbf.js","static/chunks/pages/admin/help-1963799991a3eee0.js"],"/admin/logs":[a,s,c,e,i,m,"static/chunks/pages/admin/logs-c494c4dc6f214d8b.js"],"/admin/stream-health":[k,i,t,d,o,r,"static/chunks/2934-4a8cbef0e0cea1a5.js","static/chunks/pages/admin/stream-health-6467dc61a002b06b.js"],"/admin/upgrade":[a,s,c,e,"static/chunks/2069-e3384794326f4767.js","static/chunks/pages/admin/upgrade-41783a74d59f851b.js"],"/admin/viewer-info":[k,a,s,c,e,i,t,n,d,o,r,u,"static/chunks/pages/admin/viewer-info-1518736f920a85d9.js"],"/admin/webhooks":[a,s,c,e,"static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js"],"/embed/chat/readonly":[y,I,f,B,h,F,"static/css/4913162dac9a95fc.css","static/chunks/pages/embed/chat/readonly-67babfd67c1bbe6e.js"],"/embed/chat/readwrite":[y,I,s,f,B,"static/chunks/911-9156415c36038fd8.js",h,F,"static/css/4b32f6bf48cc9a1c.css","static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js"],"/embed/video":["static/chunks/d6e1aeb5-0705bf43bcd6af77.js",n,f,"static/css/7c735c05af084bb2.css","static/chunks/7902-139b487986de3737.js",g,h,"static/chunks/2239-ceff4252276e3d5e.js","static/css/f065863129f648da.css","static/chunks/pages/embed/video-58a5d6ba4b2bb819.js"],sortedPages:["/","/_app","/_error","/admin","/admin/access-tokens","/admin/actions","/admin/chat/messages","/admin/chat/users","/admin/config/appearance","/admin/config-chat","/admin/config-federation","/admin/config-notify","/admin/config-public-details","/admin/config-server-details","/admin/config-social-items","/admin/config-storage","/admin/config-video","/admin/federation/actions","/admin/federation/followers","/admin/hardware-info","/admin/help","/admin/logs","/admin/stream-health","/admin/upgrade","/admin/viewer-info","/admin/webhooks","/embed/chat/readonly","/embed/chat/readwrite","/embed/video"]}}("static/chunks/3903-37c1af34070ecbf4.js","static/chunks/8909-a395a0ce823f9797.js","static/chunks/4267-cfe0f573c442773c.js","static/chunks/2206-e3f24e552029bbca.js","static/chunks/8091-5d2e0cdb05cd1ef7.js","static/chunks/4381-3dc1e6927d726454.js","static/chunks/5938-b5bac17e4fa31c49.js","static/chunks/5101-e7798e997c291884.js","static/chunks/6395-e4a02973025beaca.js","static/chunks/7466-1e76829814bac0c3.js","static/chunks/4763-cd081ceb0032736f.js","static/chunks/1082-51b9f63c6446d49d.js","static/chunks/5360-ddb180f0aeda9ff0.js","static/chunks/7910-44b63d030e4b1767.js","static/chunks/ee8b1517-9cf421a7da630c58.js","static/chunks/236-f876fd1a47451d45.js","static/chunks/8245-b34a27e35386277e.js","static/chunks/29107295-1453a3860b50f70e.js","static/chunks/9550-db4a457e5e1bbbcf.js","static/chunks/4ad82c5e-929b3fa886d2b3d7.js","static/chunks/1943-fa053f32e80a6fa2.js","static/chunks/1938-540c13593ccef671.js","static/chunks/3286-716fef4ced844a4d.js","static/chunks/d3048c20-b61d7fb6003662e6.js","static/chunks/d2094a0f-ffa3d9fcb172f7b4.js","static/chunks/2852-bdd68deecc4d3e7e.js","static/chunks/4977-ecbc50443dc5370e.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/static/web/_next/static/chunks/1494-7efdaa16d8a02ed8.js b/static/web/_next/static/chunks/1494-7efdaa16d8a02ed8.js new file mode 100644 index 000000000..89bc72824 --- /dev/null +++ b/static/web/_next/static/chunks/1494-7efdaa16d8a02ed8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1494],{82911:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1413),a=n(67294),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]},name:"question-circle",theme:"filled"},l=n(42135),o=function(e,t){return a.createElement(l.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};o.displayName="QuestionCircleFilled";var i=a.forwardRef(o)},84674:function(e,t,n){n.d(t,{Z:function(){return i}});var r=n(1413),a=n(67294),s={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm288.5 682.8L277.7 224C258 240 240 258 224 277.7l522.8 522.8C682.8 852.7 601 884 512 884c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372c0 89-31.3 170.8-83.5 234.8z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372c89 0 170.8-31.3 234.8-83.5L224 277.7c16-19.7 34-37.7 53.7-53.7l522.8 522.8C852.7 682.8 884 601 884 512c0-205.4-166.6-372-372-372z",fill:t}}]}},name:"stop",theme:"twotone"},l=n(42135),o=function(e,t){return a.createElement(l.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:s}))};o.displayName="StopTwoTone";var i=a.forwardRef(o)},15746:function(e,t,n){var r=n(21584);t.Z=r.Z},27049:function(e,t,n){var r=n(87462),a=n(4942),s=n(94184),l=n.n(s),o=n(67294),i=n(53124),c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};t.Z=function(e){var t,n=o.useContext(i.E_),s=n.getPrefixCls,d=n.direction,u=e.prefixCls,m=e.type,f=void 0===m?"horizontal":m,h=e.orientation,x=void 0===h?"center":h,p=e.orientationMargin,j=e.className,g=e.children,Z=e.dashed,y=e.plain,v=c(e,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),b=s("divider",u),w=x.length>0?"-".concat(x):x,C=!!g,k="left"===x&&null!=p,N="right"===x&&null!=p,T=l()(b,"".concat(b,"-").concat(f),(t={},(0,a.Z)(t,"".concat(b,"-with-text"),C),(0,a.Z)(t,"".concat(b,"-with-text").concat(w),C),(0,a.Z)(t,"".concat(b,"-dashed"),!!Z),(0,a.Z)(t,"".concat(b,"-plain"),!!y),(0,a.Z)(t,"".concat(b,"-rtl"),"rtl"===d),(0,a.Z)(t,"".concat(b,"-no-default-orientation-margin-left"),k),(0,a.Z)(t,"".concat(b,"-no-default-orientation-margin-right"),N),t),j),O=(0,r.Z)((0,r.Z)({},k&&{marginLeft:p}),N&&{marginRight:p});return o.createElement("div",(0,r.Z)({className:T},v,{role:"separator"}),g&&"vertical"!==f&&o.createElement("span",{className:"".concat(b,"-inner-text"),style:O},g))}},71230:function(e,t,n){var r=n(92820);t.Z=r.Z},37926:function(e,t,n){n.d(t,{e:function(){return d}});var r=n(85893),a=n(85402),s=n(71577),l=n(21640),o=n(82911),i=n(84674),c=n(64777);let d=e=>{let{user:t,isEnabled:n,label:d,onClick:u}=e;async function m(e){let{id:t}=e;try{let r=await (0,c.rQ)(c.NM,{data:{userId:t,enabled:!n},method:"POST",auth:!0});return r.success}catch(a){console.error(a)}return!1}let f=n?"ban":"unban",h=n?(0,r.jsx)(l.Z,{style:{color:"var(--ant-error)"}}):(0,r.jsx)(o.Z,{style:{color:"var(--ant-warning)"}}),x=(0,r.jsxs)(r.Fragment,{children:["Are you sure you want to ",f," ",(0,r.jsx)("strong",{children:t.displayName}),n?" and remove their messages?":"?"]}),p=()=>{a.Z.confirm({title:"Confirm ".concat(f),content:x,onCancel(){},onOk:()=>new Promise((e,n)=>{let r=m(t);r?setTimeout(()=>{e(r),null==u||u()},3e3):n()}),okType:"danger",okText:n?"Absolutely":null,icon:h})};return(0,r.jsx)(s.Z,{onClick:p,size:"small",icon:n?(0,r.jsx)(i.Z,{twoToneColor:"#ff4d4f"}):null,className:"block-user-button",children:d||f})};d.defaultProps={label:"",onClick:null}},35691:function(e,t,n){n.d(t,{Z:function(){return M}});var r=n(85893),a=n(67294),s=n(94199),l=n(85402),o=n(84485),i=n(71230),c=n(15746),d=n(27049),u=n(26713),m=n(45938),f=n(58091),h=n(96486),x=n(37926),p=n(71577),j=n(21640),g=n(82911),Z=n(84674),y=n(1413),v={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z",fill:e}},{tag:"path",attrs:{d:"M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zM632.8 328H688c6.5 0 10.3 7.4 6.5 12.7L481.9 633.4a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.2 0 10 2.5 13 6.6l64.7 89.1 150.9-207.8c3-4.1 7.9-6.6 13-6.6z",fill:t}},{tag:"path",attrs:{d:"M404.2 453.3c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z",fill:e}}]}},name:"safety-certificate",theme:"twotone"},b=n(42135),w=function(e,t){return a.createElement(b.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:v}))};w.displayName="SafetyCertificateTwoTone";var C=a.forwardRef(w),k=n(64777);let N=e=>{var t;let{user:n,onClick:a}=e;async function s(e,t){let{id:n}=e;try{let r=await (0,k.rQ)(k.jr,{data:{userId:n,isModerator:t},method:"POST",auth:!0});return r.success}catch(a){console.error(a)}return!1}let o=null===(t=n.scopes)||void 0===t?void 0:t.includes("MODERATOR"),i=o?"remove moderator":"add moderator",c=o?(0,r.jsx)(j.Z,{style:{color:"var(--ant-error)"}}):(0,r.jsx)(g.Z,{style:{color:"var(--ant-warning)"}}),d=(0,r.jsxs)(r.Fragment,{children:["Are you sure you want to ",i," ",(0,r.jsx)("strong",{children:n.displayName}),"?"]}),u=()=>{l.Z.confirm({title:"Confirm ".concat(i),content:d,onCancel(){},onOk:()=>new Promise((e,t)=>{let r=s(n,!o);r?setTimeout(()=>{e(r),null==a||a()},3e3):t()}),okType:"danger",okText:o?"Yup!":null,icon:c})};return(0,r.jsx)(p.Z,{onClick:u,size:"small",icon:o?(0,r.jsx)(Z.Z,{twoToneColor:"#ff4d4f"}):(0,r.jsx)(C,{twoToneColor:"#22bb44"}),className:"block-user-button",children:i})};N.defaultProps={onClick:null};var T=n(55709),O=n(70241);let M=e=>{let{user:t,connectionInfo:n,children:p}=e,[j,g]=(0,a.useState)(!1),Z=()=>{g(!0)},y=()=>{g(!1)},{displayName:v,createdAt:b,previousNames:w,nameChangedAt:C,disabledAt:k}=t,{connectedAt:M,messageCount:z,userAgent:A}=n||{},P=null,D=w&&[...w];w&&w.length>1&&C&&(P=new Date(C),D.reverse());let E=new Date(b),L=(0,f.Z)(E,"PP pp"),S=P?(0,m.Z)(P):null;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.Z,{title:(0,r.jsxs)(r.Fragment,{children:["Created at: ",L,".",(0,r.jsx)("br",{})," Click for more info."]}),placement:"bottomLeft",children:(0,r.jsx)("button",{type:"button","aria-label":"Display more details about this user",className:"user-item-container",onClick:Z,children:p})}),(0,r.jsx)(l.Z,{destroyOnClose:!0,width:600,cancelText:"Close",okButtonProps:{style:{display:"none"}},title:"User details: ".concat(v),open:j,onOk:y,onCancel:y,children:(0,r.jsxs)("div",{className:"user-details",children:[(0,r.jsx)(o.Z.Title,{level:4,children:v}),(0,r.jsxs)("p",{className:"created-at",children:["User created at ",L,"."]}),(0,r.jsxs)(i.Z,{gutter:16,children:[n&&(0,r.jsxs)(c.Z,{md:P?12:24,children:[(0,r.jsx)(o.Z.Title,{level:5,children:"This user is currently connected to Chat."}),(0,r.jsxs)("ul",{className:"connection-info",children:[(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Active for:"})," ",(0,m.Z)(new Date(M))]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"Messages sent:"})," ",z]}),(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{children:"User Agent:"}),(0,r.jsx)("br",{}),(0,O.AB)(A)]})]})]}),P&&(0,r.jsxs)(c.Z,{md:n?12:24,children:[(0,r.jsx)(o.Z.Title,{level:5,children:"This user is also seen as:"}),(0,r.jsx)("ul",{className:"previous-names-list",children:(0,h.uniq)(D).map((e,t)=>(0,r.jsxs)("li",{className:0===t?"latest":"",children:[(0,r.jsx)("span",{className:"user-name-item",children:e}),0===t?" (Changed ".concat(S," ago)"):""]}))})]})]}),(0,r.jsx)(d.Z,{}),(0,r.jsxs)(u.Z,{direction:"horizontal",children:[k?(0,r.jsxs)(r.Fragment,{children:["This user was banned on ",(0,r.jsx)("code",{children:(0,T.u)(k)}),".",(0,r.jsx)("br",{}),(0,r.jsx)("br",{}),(0,r.jsx)(x.e,{label:"Unban this user",user:t,isEnabled:!1,onClick:y})]}):(0,r.jsx)(x.e,{label:"Ban this user",user:t,isEnabled:!0,onClick:y}),(0,r.jsx)(N,{user:t,onClick:y})]})]})})]})};M.defaultProps={connectionInfo:null}},55709:function(e,t,n){n.d(t,{K:function(){return c},u:function(){return i}});var r=n(85893),a=n(52206),s=n(58091),l=n(35691),o=n(37926);function i(e){return(0,s.Z)(new Date(e),"MMM d H:mma")}let c=e=>{let{data:t}=e;return(0,r.jsx)(a.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"Last Known Display Name",dataIndex:"displayName",key:"displayName",render:(e,t)=>(0,r.jsx)(l.Z,{user:t,children:(0,r.jsx)("span",{className:"display-name",children:e})})},{title:"Created",dataIndex:"createdAt",key:"createdAt",render:e=>i(e),sorter:(e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime(),sortDirections:["descend","ascend"]},{title:"Disabled at",dataIndex:"disabledAt",key:"disabledAt",defaultSortOrder:"descend",render:e=>e?i(e):null,sorter:(e,t)=>new Date(e.disabledAt).getTime()-new Date(t.disabledAt).getTime(),sortDirections:["descend","ascend"]},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,r.jsx)(o.e,{user:t,isEnabled:!t.disabledAt})}],dataSource:t,size:"small",rowKey:"id"})}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/6962-b90f867181a2d643.js b/static/web/_next/static/chunks/6962-b90f867181a2d643.js new file mode 100644 index 000000000..9a0920bdf --- /dev/null +++ b/static/web/_next/static/chunks/6962-b90f867181a2d643.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6962,8733],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1413),a=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=n(42135),u=function(e,t){return a.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:o}))};u.displayName="DeleteOutlined";var i=a.forwardRef(u)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),a=n(87462),o=n(71002),c=n(94184),u=n.n(c),i=n(67294),l=n(53124),s=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},d=["xs","sm","md","lg","xl","xxl"],v=i.forwardRef(function(e,t){var n,c=i.useContext(l.E_),v=c.getPrefixCls,m=c.direction,p=i.useContext(s.Z),h=p.gutter,g=p.wrap,b=p.supportFlexGap,y=e.prefixCls,Z=e.span,x=e.order,C=e.offset,E=e.push,k=e.pull,w=e.className,O=e.children,M=e.flex,S=e.style,N=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=v("col",y),R={};d.forEach(function(t){var n,c={},u=e[t];"number"==typeof u?c.span=u:"object"===(0,o.Z)(u)&&(c=u||{}),delete N[t],R=(0,a.Z)((0,a.Z)({},R),(n={},(0,r.Z)(n,"".concat(P,"-").concat(t,"-").concat(c.span),void 0!==c.span),(0,r.Z)(n,"".concat(P,"-").concat(t,"-order-").concat(c.order),c.order||0===c.order),(0,r.Z)(n,"".concat(P,"-").concat(t,"-offset-").concat(c.offset),c.offset||0===c.offset),(0,r.Z)(n,"".concat(P,"-").concat(t,"-push-").concat(c.push),c.push||0===c.push),(0,r.Z)(n,"".concat(P,"-").concat(t,"-pull-").concat(c.pull),c.pull||0===c.pull),(0,r.Z)(n,"".concat(P,"-rtl"),"rtl"===m),n))});var j=u()(P,(n={},(0,r.Z)(n,"".concat(P,"-").concat(Z),void 0!==Z),(0,r.Z)(n,"".concat(P,"-order-").concat(x),x),(0,r.Z)(n,"".concat(P,"-offset-").concat(C),C),(0,r.Z)(n,"".concat(P,"-push-").concat(E),E),(0,r.Z)(n,"".concat(P,"-pull-").concat(k),k),n),w,R),F={};if(h&&h[0]>0){var I=h[0]/2;F.paddingLeft=I,F.paddingRight=I}if(h&&h[1]>0&&!b){var T=h[1]/2;F.paddingTop=T,F.paddingBottom=T}return M&&(F.flex="number"==typeof M?"".concat(M," ").concat(M," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(M)?"0 0 ".concat(M):M,!1!==g||F.minWidth||(F.minWidth=0)),i.createElement("div",(0,a.Z)({},N,{style:(0,a.Z)((0,a.Z)({},F),S),className:j,ref:t}),O)});t.Z=v},92820:function(e,t,n){"use strict";var r=n(87462),a=n(4942),o=n(71002),c=n(97685),u=n(94184),i=n.n(u),l=n(67294),s=n(53124),f=n(98082),d=n(24308),v=n(93355),m=n(99134),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function h(e,t){var n=l.useState("string"==typeof e?e:""),r=(0,c.Z)(n,2),a=r[0],u=r[1],i=function(){if("object"===(0,o.Z)(e))for(var n=0;n0?-(z[0]/2):void 0,X=null!=z[1]&&z[1]>0?-(z[1]/2):void 0;if(W&&(V.marginLeft=W,V.marginRight=W),A){var Y=(0,c.Z)(z,2);V.rowGap=Y[1]}else X&&(V.marginTop=X,V.marginBottom=X);var K=(0,c.Z)(z,2),$=K[0],U=K[1],J=l.useMemo(function(){return{gutter:[$,U],wrap:k,supportFlexGap:A}},[$,U,k,A]);return l.createElement(m.Z.Provider,{value:J},l.createElement("div",(0,r.Z)({},w,{className:G,style:(0,r.Z)((0,r.Z)({},V),Z),ref:t}),x))});t.Z=g},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},22918:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(71002),a=n(4942),o=n(87462),c=n(97685),u=n(94184),i=n.n(u),l=n(74902),s=n(67294),f=n(96774),d=n.n(f),v=n(21770),m=n(45987),p=n(1413),h=n(15105),g=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function b(e,t,n,r){var a=(t-n)/(r-n),o={};switch(e){case"rtl":o.right="".concat(100*a,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(100*a,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(100*a,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(100*a,"%"),o.transform="translateX(-50%)"}return o}function y(e,t){return Array.isArray(e)?e[t]:e}var Z=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],x=s.forwardRef(function(e,t){var n,r,c=e.prefixCls,u=e.value,l=e.valueIndex,f=e.onStartMove,d=e.style,v=e.render,x=e.dragging,C=e.onOffsetChange,E=(0,m.Z)(e,Z),k=s.useContext(g),w=k.min,O=k.max,M=k.direction,S=k.disabled,N=k.range,P=k.tabIndex,R=k.ariaLabelForHandle,j=k.ariaLabelledByForHandle,F=k.ariaValueTextFormatterForHandle,I="".concat(c,"-handle"),T=function(e){S||f(e,l)},L=b(M,u,w,O),H=s.createElement("div",(0,o.Z)({ref:t,className:i()(I,(n={},(0,a.Z)(n,"".concat(I,"-").concat(l+1),N),(0,a.Z)(n,"".concat(I,"-dragging"),x),n)),style:(0,p.Z)((0,p.Z)({},L),d),onMouseDown:T,onTouchStart:T,onKeyDown:function(e){if(!S){var t=null;switch(e.which||e.keyCode){case h.Z.LEFT:t="ltr"===M||"btt"===M?-1:1;break;case h.Z.RIGHT:t="ltr"===M||"btt"===M?1:-1;break;case h.Z.UP:t="ttb"!==M?1:-1;break;case h.Z.DOWN:t="ttb"!==M?-1:1;break;case h.Z.HOME:t="min";break;case h.Z.END:t="max";break;case h.Z.PAGE_UP:t=2;break;case h.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),C(t,l))}},tabIndex:S?null:y(P,l),role:"slider","aria-valuemin":w,"aria-valuemax":O,"aria-valuenow":u,"aria-disabled":S,"aria-label":y(R,l),"aria-labelledby":y(j,l),"aria-valuetext":null===(r=y(F,l))||void 0===r?void 0:r(u)},E));return v&&(H=v(H,{index:l,prefixCls:c,value:u,dragging:x})),H}),C=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],E=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.onStartMove,c=e.onOffsetChange,u=e.values,i=e.handleRender,l=e.draggingIndex,f=(0,m.Z)(e,C),d=s.useRef({});return s.useImperativeHandle(t,function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}}),s.createElement(s.Fragment,null,u.map(function(e,t){return s.createElement(x,(0,o.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:l===t,prefixCls:n,style:y(r,t),key:t,value:e,valueIndex:t,onStartMove:a,onOffsetChange:c,render:i},f))}))});function k(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function w(e){var t=e.prefixCls,n=e.style,r=e.start,a=e.end,o=e.index,c=e.onStartMove,u=s.useContext(g),l=u.direction,f=u.min,d=u.max,v=u.disabled,m=u.range,h="".concat(t,"-track"),b=(r-f)/(d-f),y=(a-f)/(d-f),Z=function(e){!v&&c&&c(e,-1)},x={};switch(l){case"rtl":x.right="".concat(100*b,"%"),x.width="".concat(100*y-100*b,"%");break;case"btt":x.bottom="".concat(100*b,"%"),x.height="".concat(100*y-100*b,"%");break;case"ttb":x.top="".concat(100*b,"%"),x.height="".concat(100*y-100*b,"%");break;default:x.left="".concat(100*b,"%"),x.width="".concat(100*y-100*b,"%")}return s.createElement("div",{className:i()(h,m&&"".concat(h,"-").concat(o+1)),style:(0,p.Z)((0,p.Z)({},x),n),onMouseDown:Z,onTouchStart:Z})}function O(e){var t=e.prefixCls,n=e.style,r=e.values,a=e.startPoint,o=e.onStartMove,c=s.useContext(g),u=c.included,i=c.range,l=c.min,f=s.useMemo(function(){if(!i){if(0===r.length)return[];var e=null!=a?a:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],o=0;o=0&&eh},[eh,eB]),eG=s.useMemo(function(){return Object.keys(eS||{}).map(function(e){var t=eS[e],n={value:Number(e)};return t&&"object"===(0,r.Z)(t)&&!s.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||"number"==typeof t}).sort(function(e,t){return e.value-t.value})},[eS]),eV=(n=void 0===em||em,o=s.useCallback(function(e){return isFinite(e),Math.max(eA,Math.min(e_,e))},[eA,e_]),u=s.useCallback(function(e){if(null!==eB){var t=eA+Math.round((o(e)-eA)/eB)*eB,n=function(e){return(String(e).split(".")[1]||"").length},r=Math.max(n(eB),n(e_),n(eA)),a=Number(t.toFixed(r));return eA<=a&&a<=e_?a:null}return null},[eB,eA,e_,o]),f=s.useCallback(function(e){var t=o(e),n=eG.map(function(e){return e.value});null!==eB&&n.push(u(e)),n.push(eA,e_);var r=n[0],a=e_-eA;return n.forEach(function(e){var n=Math.abs(t-e);n<=a&&(r=e,a=n)}),r},[eA,e_,eG,eB,o,u]),m=function e(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof n){var o,c=t[r],i=c+n,s=[];eG.forEach(function(e){s.push(e.value)}),s.push(eA,e_),s.push(u(c));var f=n>0?1:-1;"unit"===a?s.push(u(c+f*eB)):s.push(u(i)),s=s.filter(function(e){return null!==e}).filter(function(e){return n<0?e<=c:e>=c}),"unit"===a&&(s=s.filter(function(e){return e!==c}));var d="unit"===a?c:i,v=Math.abs((o=s[0])-d);if(s.forEach(function(e){var t=Math.abs(e-d);t1){var m=(0,l.Z)(t);return m[r]=o,e(m,n-f,r,a)}return o}return"min"===n?eA:"max"===n?e_:void 0},p=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e[n],o=m(e,t,n,r);return{value:o,changed:o!==a}},h=function(e){return null===ez&&0===e||"number"==typeof ez&&e3&&void 0!==arguments[3]?arguments[3]:"unit",o=e.map(f),c=o[r],u=m(o,t,r,a);if(o[r]=u,!1===n){var i=ez||0;r>0&&o[r-1]!==c&&(o[r]=Math.max(o[r],o[r-1]+i)),r0;v-=1)for(var g=!0;h(o[v]-o[v-1])&&g;){var b=p(o,-1,v-1);o[v-1]=b.value,g=b.changed}for(var y=o.length-1;y>0;y-=1)for(var Z=!0;h(o[y]-o[y-1])&&Z;){var x=p(o,-1,y-1);o[y-1]=x.value,Z=x.changed}for(var C=0;C=0?es+1:2;for(n=n.slice(0,a);n.length=0&&eL.current.focus(e)}e7(null)},[e8]);var e9=s.useMemo(function(){return(!eg||null!==eB)&&eg},[eg,eB]),e6=(b=function(){null==ev||ev(e0(eq.current))},y=s.useState(null),x=(Z=(0,c.Z)(y,2))[0],C=Z[1],w=s.useState(-1),N=(M=(0,c.Z)(w,2))[0],R=M[1],j=s.useState(eQ),I=(F=(0,c.Z)(j,2))[0],T=F[1],L=s.useState(eQ),D=(H=(0,c.Z)(L,2))[0],A=H[1],_=s.useRef(null),B=s.useRef(null),s.useEffect(function(){-1===N&&T(eQ)},[eQ,N]),s.useEffect(function(){return function(){document.removeEventListener("mousemove",_.current),document.removeEventListener("mouseup",B.current),document.removeEventListener("touchmove",_.current),document.removeEventListener("touchend",B.current)}},[]),z=function(e,t){I.some(function(t,n){return t!==e[n]})&&(void 0!==t&&C(t),T(e),e1(e))},G=function(e,t){if(-1===e){var n=D[0],r=D[D.length-1],a=t*(e_-eA);a=Math.min(a=Math.max(a,eA-n),e_-r),a=eX(n+a)-n,z(D.map(function(e){return e+a}))}else{var o=(0,l.Z)(I);o[e]=D[e];var c=eY(o,(e_-eA)*t,e,"dist");z(c.values,c.value)}},(V=s.useRef(G)).current=G,[N,x,s.useMemo(function(){var e=(0,l.Z)(eQ).sort(function(e,t){return e-t}),t=(0,l.Z)(I).sort(function(e,t){return e-t});return e.every(function(e,n){return e===t[n]})?I:eQ},[eQ,I]),function(e,t){e.stopPropagation();var n=eQ[t];R(t),C(n),A(eQ);var r=k(e),a=r.pageX,o=r.pageY,c=function(e){e.preventDefault();var n,r=k(e),c=r.pageX,u=r.pageY,i=c-a,l=u-o,s=eH.current.getBoundingClientRect(),f=s.width,d=s.height;switch(eD){case"btt":n=-l/d;break;case"ttb":n=l/d;break;case"rtl":n=-i/f;break;default:n=i/f}V.current(t,n)},u=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",c),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",c),_.current=null,B.current=null,R(-1),b()};document.addEventListener("mouseup",u),document.addEventListener("mousemove",c),document.addEventListener("touchend",u),document.addEventListener("touchmove",c),_.current=c,B.current=u}]),e5=(0,c.Z)(e6,4),te=e5[0],tt=e5[1],tn=e5[2],tr=e5[3],ta=function(e,t){tr(e,t),null==ed||ed(e0(eq.current))},to=-1!==te;s.useEffect(function(){if(!to){var e=eQ.lastIndexOf(tt);eL.current.focus(e)}},[to]);var tc=s.useMemo(function(){return(0,l.Z)(tn).sort(function(e,t){return e-t})},[tn]),tu=s.useMemo(function(){return el?[tc[0],tc[tc.length-1]]:[eA,tc[0]]},[tc,el,eA]),ti=(0,c.Z)(tu,2),tl=ti[0],ts=ti[1];s.useImperativeHandle(t,function(){return{focus:function(){eL.current.focus(0)},blur:function(){var e=document.activeElement;eH.current.contains(e)&&(null==e||e.blur())}}}),s.useEffect(function(){Q&&eL.current.focus(0)},[]);var tf=s.useMemo(function(){return{min:eA,max:e_,direction:eD,disabled:J,step:eB,included:ex,includedStart:tl,includedEnd:ts,range:el,tabIndex:ej,ariaLabelForHandle:eF,ariaLabelledByForHandle:eI,ariaValueTextFormatterForHandle:eT}},[eA,e_,eD,J,eB,ex,tl,ts,el,ej,eF,eI,eT]);return s.createElement(g.Provider,{value:tf},s.createElement("div",{ref:eH,className:i()(Y,K,(W={},(0,a.Z)(W,"".concat(Y,"-disabled"),J),(0,a.Z)(W,"".concat(Y,"-vertical"),ey),(0,a.Z)(W,"".concat(Y,"-horizontal"),!ey),(0,a.Z)(W,"".concat(Y,"-with-marks"),eG.length),W)),style:$,onMouseDown:function(e){e.preventDefault();var t,n=eH.current.getBoundingClientRect(),r=n.width,a=n.height,o=n.left,c=n.top,u=n.bottom,i=n.right,l=e.clientX,s=e.clientY;switch(eD){case"btt":t=(u-s)/a;break;case"ttb":t=(s-c)/a;break;case"rtl":t=(i-l)/r;break;default:t=(l-o)/r}e2(eX(eA+t*(e_-eA)))}},s.createElement("div",{className:"".concat(Y,"-rail"),style:ew}),s.createElement(O,{prefixCls:Y,style:eE,values:tc,startPoint:eC,onStartMove:e9?ta:null}),s.createElement(P,{prefixCls:Y,marks:eG,dots:eN,style:eO,activeStyle:eM}),s.createElement(E,{ref:eL,prefixCls:Y,style:ek,values:tn,draggingIndex:te,onStartMove:ta,onOffsetChange:function(e,t){if(!J){var n=eY(eQ,e,t);null==ed||ed(e0(eQ)),e1(n.values),null==ev||ev(e0(n.values)),e7(n.value)}},onFocus:q,onBlur:ee,handleRender:eP}),s.createElement(S,{prefixCls:Y,marks:eG,onClick:e2})))}),j=n(53124),F=n(75164),I=n(42550),T=n(94199),L=s.forwardRef(function(e,t){var n=e.open,r=(0,s.useRef)(null),a=(0,s.useRef)(null);function c(){F.Z.cancel(a.current),a.current=null}return s.useEffect(function(){return n?a.current=(0,F.Z)(function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),a.current=null}):c(),c},[n,e.title]),s.createElement(T.Z,(0,o.Z)({ref:(0,I.sQ)(r,t)},e))}),H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},D=s.forwardRef(function(e,t){var n=s.useContext(j.E_),u=n.getPrefixCls,l=n.direction,f=n.getPopupContainer,d=s.useState({}),v=(0,c.Z)(d,2),m=v[0],p=v[1],h=function(e,t){p(function(n){return(0,o.Z)((0,o.Z)({},n),(0,a.Z)({},e,t))})},g=e.prefixCls,b=e.range,y=e.className,Z=H(e,["prefixCls","range","className"]),x=u("slider",g),C=i()(y,(0,a.Z)({},"".concat(x,"-rtl"),"rtl"===l));"rtl"!==l||Z.vertical||(Z.reverse=!Z.reverse);var E=s.useMemo(function(){return b?"object"===(0,r.Z)(b)?[!0,b.draggableTrack]:[!0,!1]:[!1]},[b]),k=(0,c.Z)(E,2),w=k[0],O=k[1];return s.createElement(R,(0,o.Z)({},Z,{step:Z.step,range:w,draggableTrack:O,className:C,ref:t,prefixCls:x,handleRender:function(t,n){var r,a=n.index,c=n.dragging,i=u(),d=e.tooltip,v=e.vertical,p=(0,o.Z)({formatter:null!==(r=e.tipFormatter)&&void 0!==r?r:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},void 0===d?{}:d),g=p.open,b=p.placement,y=p.getPopupContainer,Z=p.prefixCls,C=p.formatter,E=!!C&&(m[a]||c),k=(0,o.Z)((0,o.Z)({},t.props),{onMouseEnter:function(){return h(a,!0)},onMouseLeave:function(){return h(a,!1)}}),w=u("tooltip",Z);return s.createElement(L,{prefixCls:w,title:C?C(n.value):"",open:g||void 0===g&&E,placement:b||(v?"rtl"===l?"left":"right":"top"),transitionName:"".concat(i,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:y||f},s.cloneElement(t,k))}}))})},94594:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(87462),a=n(4942),o=n(50888),c=n(94184),u=n.n(c),i=n(97685),l=n(45987),s=n(67294),f=n(21770),d=n(15105),v=s.forwardRef(function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-switch":r,c=e.className,v=e.checked,m=e.defaultChecked,p=e.disabled,h=e.loadingIcon,g=e.checkedChildren,b=e.unCheckedChildren,y=e.onClick,Z=e.onChange,x=e.onKeyDown,C=(0,l.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=(0,f.Z)(!1,{value:v,defaultValue:m}),k=(0,i.Z)(E,2),w=k[0],O=k[1];function M(e,t){var n=w;return p||(O(n=e),null==Z||Z(n,t)),n}var S=u()(o,c,(n={},(0,a.Z)(n,"".concat(o,"-checked"),w),(0,a.Z)(n,"".concat(o,"-disabled"),p),n));return s.createElement("button",Object.assign({},C,{type:"button",role:"switch","aria-checked":w,disabled:p,className:S,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?M(!1,e):e.which===d.Z.RIGHT&&M(!0,e),null==x||x(e)},onClick:function(e){var t=M(!w,e);null==y||y(t,e)}}),h,s.createElement("span",{className:"".concat(o,"-inner")},w?g:b))});v.displayName="Switch";var m=n(53124),p=n(98866),h=n(97647),g=n(68349),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},y=s.forwardRef(function(e,t){var n,c=e.prefixCls,i=e.size,l=e.disabled,f=e.loading,d=e.className,y=b(e,["prefixCls","size","disabled","loading","className"]),Z=s.useContext(m.E_),x=Z.getPrefixCls,C=Z.direction,E=s.useContext(h.Z),k=s.useContext(p.Z),w=x("switch",c),O=s.createElement("div",{className:"".concat(w,"-handle")},f&&s.createElement(o.Z,{className:"".concat(w,"-loading-icon")})),M=u()((n={},(0,a.Z)(n,"".concat(w,"-small"),"small"===(i||E)),(0,a.Z)(n,"".concat(w,"-loading"),f),(0,a.Z)(n,"".concat(w,"-rtl"),"rtl"===C),n),void 0===d?"":d);return s.createElement(g.Z,{insertExtraNode:!0},s.createElement(v,(0,r.Z)({},y,{prefixCls:w,className:M,disabled:(null!=l?l:k)||f,ref:t,loadingIcon:O})))});y.__ANT_SWITCH=!0;var Z=y},27561:function(e,t,n){var r=n(67990),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),a=n(7771),o=n(14841),c=Math.max,u=Math.min;e.exports=function(e,t,n){var i,l,s,f,d,v,m=0,p=!1,h=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var n=i,r=l;return i=l=void 0,m=t,f=e.apply(r,n)}function y(e){var n=e-v,r=e-m;return void 0===v||n>=t||n<0||h&&r>=s}function Z(){var e,n,r,o=a();if(y(o))return x(o);d=setTimeout(Z,(e=o-v,n=o-m,r=t-e,h?u(r,s-n):r))}function x(e){return(d=void 0,g&&i)?b(e):(i=l=void 0,f)}function C(){var e,n=a(),r=y(n);if(i=arguments,l=this,v=n,r){if(void 0===d)return m=e=v,d=setTimeout(Z,t),p?b(e):f;if(h)return clearTimeout(d),d=setTimeout(Z,t),b(v)}return void 0===d&&(d=setTimeout(Z,t)),f}return t=o(t)||0,r(n)&&(p=!!n.leading,s=(h="maxWait"in n)?c(o(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),m=0,i=v=l=d=void 0},C.flush=function(){return void 0===d?f:x(a())},C}},33448:function(e,t,n){var r=n(44239),a=n(37005);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),a=n(13218),o=n(33448),c=0/0,u=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return c;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=i.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):u.test(e)?c:+e}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/6962-f197cc126c73fb7f.js b/static/web/_next/static/chunks/6962-f197cc126c73fb7f.js deleted file mode 100644 index 71553e1a5..000000000 --- a/static/web/_next/static/chunks/6962-f197cc126c73fb7f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6962],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1413),a=n(67294),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=n(42135),u=function(e,t){return a.createElement(c.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:o}))};u.displayName="DeleteOutlined";var i=a.forwardRef(u)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),a=n(87462),o=n(71002),c=n(94184),u=n.n(c),i=n(67294),l=n(53124),s=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},d=["xs","sm","md","lg","xl","xxl"],v=i.forwardRef(function(e,t){var n,c=i.useContext(l.E_),v=c.getPrefixCls,m=c.direction,p=i.useContext(s.Z),h=p.gutter,g=p.wrap,b=p.supportFlexGap,y=e.prefixCls,Z=e.span,x=e.order,C=e.offset,E=e.push,k=e.pull,w=e.className,O=e.children,M=e.flex,S=e.style,N=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=v("col",y),R={};d.forEach(function(t){var n,c={},u=e[t];"number"==typeof u?c.span=u:"object"===(0,o.Z)(u)&&(c=u||{}),delete N[t],R=(0,a.Z)((0,a.Z)({},R),(n={},(0,r.Z)(n,"".concat(P,"-").concat(t,"-").concat(c.span),void 0!==c.span),(0,r.Z)(n,"".concat(P,"-").concat(t,"-order-").concat(c.order),c.order||0===c.order),(0,r.Z)(n,"".concat(P,"-").concat(t,"-offset-").concat(c.offset),c.offset||0===c.offset),(0,r.Z)(n,"".concat(P,"-").concat(t,"-push-").concat(c.push),c.push||0===c.push),(0,r.Z)(n,"".concat(P,"-").concat(t,"-pull-").concat(c.pull),c.pull||0===c.pull),(0,r.Z)(n,"".concat(P,"-rtl"),"rtl"===m),n))});var j=u()(P,(n={},(0,r.Z)(n,"".concat(P,"-").concat(Z),void 0!==Z),(0,r.Z)(n,"".concat(P,"-order-").concat(x),x),(0,r.Z)(n,"".concat(P,"-offset-").concat(C),C),(0,r.Z)(n,"".concat(P,"-push-").concat(E),E),(0,r.Z)(n,"".concat(P,"-pull-").concat(k),k),n),w,R),F={};if(h&&h[0]>0){var I=h[0]/2;F.paddingLeft=I,F.paddingRight=I}if(h&&h[1]>0&&!b){var T=h[1]/2;F.paddingTop=T,F.paddingBottom=T}return M&&(F.flex="number"==typeof M?"".concat(M," ").concat(M," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(M)?"0 0 ".concat(M):M,!1!==g||F.minWidth||(F.minWidth=0)),i.createElement("div",(0,a.Z)({},N,{style:(0,a.Z)((0,a.Z)({},F),S),className:j,ref:t}),O)});t.Z=v},92820:function(e,t,n){"use strict";var r=n(87462),a=n(4942),o=n(71002),c=n(97685),u=n(94184),i=n.n(u),l=n(67294),s=n(53124),f=n(98082),d=n(24308),v=n(93355),m=n(99134),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function h(e,t){var n=l.useState("string"==typeof e?e:""),r=(0,c.Z)(n,2),a=r[0],u=r[1],i=function(){if("object"===(0,o.Z)(e))for(var n=0;n0?-(z[0]/2):void 0,X=null!=z[1]&&z[1]>0?-(z[1]/2):void 0;if(W&&(V.marginLeft=W,V.marginRight=W),A){var Y=(0,c.Z)(z,2);V.rowGap=Y[1]}else X&&(V.marginTop=X,V.marginBottom=X);var K=(0,c.Z)(z,2),$=K[0],U=K[1],J=l.useMemo(function(){return{gutter:[$,U],wrap:k,supportFlexGap:A}},[$,U,k,A]);return l.createElement(m.Z.Provider,{value:J},l.createElement("div",(0,r.Z)({},w,{className:G,style:(0,r.Z)((0,r.Z)({},V),Z),ref:t}),x))});t.Z=g},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},22918:function(e,t,n){"use strict";n.d(t,{Z:function(){return D}});var r=n(71002),a=n(4942),o=n(87462),c=n(97685),u=n(94184),i=n.n(u),l=n(74902),s=n(67294),f=n(96774),d=n.n(f),v=n(21770),m=n(45987),p=n(1413),h=n(15105),g=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function b(e,t,n,r){var a=(t-n)/(r-n),o={};switch(e){case"rtl":o.right="".concat(100*a,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(100*a,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(100*a,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(100*a,"%"),o.transform="translateX(-50%)"}return o}function y(e,t){return Array.isArray(e)?e[t]:e}var Z=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],x=s.forwardRef(function(e,t){var n,r,c=e.prefixCls,u=e.value,l=e.valueIndex,f=e.onStartMove,d=e.style,v=e.render,x=e.dragging,C=e.onOffsetChange,E=(0,m.Z)(e,Z),k=s.useContext(g),w=k.min,O=k.max,M=k.direction,S=k.disabled,N=k.range,P=k.tabIndex,R=k.ariaLabelForHandle,j=k.ariaLabelledByForHandle,F=k.ariaValueTextFormatterForHandle,I="".concat(c,"-handle"),T=function(e){S||f(e,l)},L=b(M,u,w,O),H=s.createElement("div",(0,o.Z)({ref:t,className:i()(I,(n={},(0,a.Z)(n,"".concat(I,"-").concat(l+1),N),(0,a.Z)(n,"".concat(I,"-dragging"),x),n)),style:(0,p.Z)((0,p.Z)({},L),d),onMouseDown:T,onTouchStart:T,onKeyDown:function(e){if(!S){var t=null;switch(e.which||e.keyCode){case h.Z.LEFT:t="ltr"===M||"btt"===M?-1:1;break;case h.Z.RIGHT:t="ltr"===M||"btt"===M?1:-1;break;case h.Z.UP:t="ttb"!==M?1:-1;break;case h.Z.DOWN:t="ttb"!==M?-1:1;break;case h.Z.HOME:t="min";break;case h.Z.END:t="max";break;case h.Z.PAGE_UP:t=2;break;case h.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),C(t,l))}},tabIndex:S?null:y(P,l),role:"slider","aria-valuemin":w,"aria-valuemax":O,"aria-valuenow":u,"aria-disabled":S,"aria-label":y(R,l),"aria-labelledby":y(j,l),"aria-valuetext":null===(r=y(F,l))||void 0===r?void 0:r(u)},E));return v&&(H=v(H,{index:l,prefixCls:c,value:u,dragging:x})),H}),C=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],E=s.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.onStartMove,c=e.onOffsetChange,u=e.values,i=e.handleRender,l=e.draggingIndex,f=(0,m.Z)(e,C),d=s.useRef({});return s.useImperativeHandle(t,function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}}),s.createElement(s.Fragment,null,u.map(function(e,t){return s.createElement(x,(0,o.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:l===t,prefixCls:n,style:y(r,t),key:t,value:e,valueIndex:t,onStartMove:a,onOffsetChange:c,render:i},f))}))});function k(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function w(e){var t=e.prefixCls,n=e.style,r=e.start,a=e.end,o=e.index,c=e.onStartMove,u=s.useContext(g),l=u.direction,f=u.min,d=u.max,v=u.disabled,m=u.range,h="".concat(t,"-track"),b=(r-f)/(d-f),y=(a-f)/(d-f),Z=function(e){!v&&c&&c(e,-1)},x={};switch(l){case"rtl":x.right="".concat(100*b,"%"),x.width="".concat(100*y-100*b,"%");break;case"btt":x.bottom="".concat(100*b,"%"),x.height="".concat(100*y-100*b,"%");break;case"ttb":x.top="".concat(100*b,"%"),x.height="".concat(100*y-100*b,"%");break;default:x.left="".concat(100*b,"%"),x.width="".concat(100*y-100*b,"%")}return s.createElement("div",{className:i()(h,m&&"".concat(h,"-").concat(o+1)),style:(0,p.Z)((0,p.Z)({},x),n),onMouseDown:Z,onTouchStart:Z})}function O(e){var t=e.prefixCls,n=e.style,r=e.values,a=e.startPoint,o=e.onStartMove,c=s.useContext(g),u=c.included,i=c.range,l=c.min,f=s.useMemo(function(){if(!i){if(0===r.length)return[];var e=null!=a?a:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],o=0;o=0&&eh},[eh,eB]),eG=s.useMemo(function(){return Object.keys(eS||{}).map(function(e){var t=eS[e],n={value:Number(e)};return t&&"object"===(0,r.Z)(t)&&!s.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n}).filter(function(e){var t=e.label;return t||"number"==typeof t}).sort(function(e,t){return e.value-t.value})},[eS]),eV=(n=void 0===em||em,o=s.useCallback(function(e){return isFinite(e),Math.max(eA,Math.min(e_,e))},[eA,e_]),u=s.useCallback(function(e){if(null!==eB){var t=eA+Math.round((o(e)-eA)/eB)*eB,n=function(e){return(String(e).split(".")[1]||"").length},r=Math.max(n(eB),n(e_),n(eA)),a=Number(t.toFixed(r));return eA<=a&&a<=e_?a:null}return null},[eB,eA,e_,o]),f=s.useCallback(function(e){var t=o(e),n=eG.map(function(e){return e.value});null!==eB&&n.push(u(e)),n.push(eA,e_);var r=n[0],a=e_-eA;return n.forEach(function(e){var n=Math.abs(t-e);n<=a&&(r=e,a=n)}),r},[eA,e_,eG,eB,o,u]),m=function e(t,n,r){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof n){var o,c=t[r],i=c+n,s=[];eG.forEach(function(e){s.push(e.value)}),s.push(eA,e_),s.push(u(c));var f=n>0?1:-1;"unit"===a?s.push(u(c+f*eB)):s.push(u(i)),s=s.filter(function(e){return null!==e}).filter(function(e){return n<0?e<=c:e>=c}),"unit"===a&&(s=s.filter(function(e){return e!==c}));var d="unit"===a?c:i,v=Math.abs((o=s[0])-d);if(s.forEach(function(e){var t=Math.abs(e-d);t1){var m=(0,l.Z)(t);return m[r]=o,e(m,n-f,r,a)}return o}return"min"===n?eA:"max"===n?e_:void 0},p=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e[n],o=m(e,t,n,r);return{value:o,changed:o!==a}},h=function(e){return null===ez&&0===e||"number"==typeof ez&&e3&&void 0!==arguments[3]?arguments[3]:"unit",o=e.map(f),c=o[r],u=m(o,t,r,a);if(o[r]=u,!1===n){var i=ez||0;r>0&&o[r-1]!==c&&(o[r]=Math.max(o[r],o[r-1]+i)),r0;v-=1)for(var g=!0;h(o[v]-o[v-1])&&g;){var b=p(o,-1,v-1);o[v-1]=b.value,g=b.changed}for(var y=o.length-1;y>0;y-=1)for(var Z=!0;h(o[y]-o[y-1])&&Z;){var x=p(o,-1,y-1);o[y-1]=x.value,Z=x.changed}for(var C=0;C=0?es+1:2;for(n=n.slice(0,a);n.length=0&&eL.current.focus(e)}e7(null)},[e8]);var e9=s.useMemo(function(){return(!eg||null!==eB)&&eg},[eg,eB]),e6=(b=function(){null==ev||ev(e0(eq.current))},y=s.useState(null),x=(Z=(0,c.Z)(y,2))[0],C=Z[1],w=s.useState(-1),N=(M=(0,c.Z)(w,2))[0],R=M[1],j=s.useState(eQ),I=(F=(0,c.Z)(j,2))[0],T=F[1],L=s.useState(eQ),D=(H=(0,c.Z)(L,2))[0],A=H[1],_=s.useRef(null),B=s.useRef(null),s.useEffect(function(){-1===N&&T(eQ)},[eQ,N]),s.useEffect(function(){return function(){document.removeEventListener("mousemove",_.current),document.removeEventListener("mouseup",B.current),document.removeEventListener("touchmove",_.current),document.removeEventListener("touchend",B.current)}},[]),z=function(e,t){I.some(function(t,n){return t!==e[n]})&&(void 0!==t&&C(t),T(e),e1(e))},G=function(e,t){if(-1===e){var n=D[0],r=D[D.length-1],a=t*(e_-eA);a=Math.min(a=Math.max(a,eA-n),e_-r),a=eX(n+a)-n,z(D.map(function(e){return e+a}))}else{var o=(0,l.Z)(I);o[e]=D[e];var c=eY(o,(e_-eA)*t,e,"dist");z(c.values,c.value)}},(V=s.useRef(G)).current=G,[N,x,s.useMemo(function(){var e=(0,l.Z)(eQ).sort(function(e,t){return e-t}),t=(0,l.Z)(I).sort(function(e,t){return e-t});return e.every(function(e,n){return e===t[n]})?I:eQ},[eQ,I]),function(e,t){e.stopPropagation();var n=eQ[t];R(t),C(n),A(eQ);var r=k(e),a=r.pageX,o=r.pageY,c=function(e){e.preventDefault();var n,r=k(e),c=r.pageX,u=r.pageY,i=c-a,l=u-o,s=eH.current.getBoundingClientRect(),f=s.width,d=s.height;switch(eD){case"btt":n=-l/d;break;case"ttb":n=l/d;break;case"rtl":n=-i/f;break;default:n=i/f}V.current(t,n)},u=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",c),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",c),_.current=null,B.current=null,R(-1),b()};document.addEventListener("mouseup",u),document.addEventListener("mousemove",c),document.addEventListener("touchend",u),document.addEventListener("touchmove",c),_.current=c,B.current=u}]),e5=(0,c.Z)(e6,4),te=e5[0],tt=e5[1],tn=e5[2],tr=e5[3],ta=function(e,t){tr(e,t),null==ed||ed(e0(eq.current))},to=-1!==te;s.useEffect(function(){if(!to){var e=eQ.lastIndexOf(tt);eL.current.focus(e)}},[to]);var tc=s.useMemo(function(){return(0,l.Z)(tn).sort(function(e,t){return e-t})},[tn]),tu=s.useMemo(function(){return el?[tc[0],tc[tc.length-1]]:[eA,tc[0]]},[tc,el,eA]),ti=(0,c.Z)(tu,2),tl=ti[0],ts=ti[1];s.useImperativeHandle(t,function(){return{focus:function(){eL.current.focus(0)},blur:function(){var e=document.activeElement;eH.current.contains(e)&&(null==e||e.blur())}}}),s.useEffect(function(){Q&&eL.current.focus(0)},[]);var tf=s.useMemo(function(){return{min:eA,max:e_,direction:eD,disabled:J,step:eB,included:ex,includedStart:tl,includedEnd:ts,range:el,tabIndex:ej,ariaLabelForHandle:eF,ariaLabelledByForHandle:eI,ariaValueTextFormatterForHandle:eT}},[eA,e_,eD,J,eB,ex,tl,ts,el,ej,eF,eI,eT]);return s.createElement(g.Provider,{value:tf},s.createElement("div",{ref:eH,className:i()(Y,K,(W={},(0,a.Z)(W,"".concat(Y,"-disabled"),J),(0,a.Z)(W,"".concat(Y,"-vertical"),ey),(0,a.Z)(W,"".concat(Y,"-horizontal"),!ey),(0,a.Z)(W,"".concat(Y,"-with-marks"),eG.length),W)),style:$,onMouseDown:function(e){e.preventDefault();var t,n=eH.current.getBoundingClientRect(),r=n.width,a=n.height,o=n.left,c=n.top,u=n.bottom,i=n.right,l=e.clientX,s=e.clientY;switch(eD){case"btt":t=(u-s)/a;break;case"ttb":t=(s-c)/a;break;case"rtl":t=(i-l)/r;break;default:t=(l-o)/r}e2(eX(eA+t*(e_-eA)))}},s.createElement("div",{className:"".concat(Y,"-rail"),style:ew}),s.createElement(O,{prefixCls:Y,style:eE,values:tc,startPoint:eC,onStartMove:e9?ta:null}),s.createElement(P,{prefixCls:Y,marks:eG,dots:eN,style:eO,activeStyle:eM}),s.createElement(E,{ref:eL,prefixCls:Y,style:ek,values:tn,draggingIndex:te,onStartMove:ta,onOffsetChange:function(e,t){if(!J){var n=eY(eQ,e,t);null==ed||ed(e0(eQ)),e1(n.values),null==ev||ev(e0(n.values)),e7(n.value)}},onFocus:q,onBlur:ee,handleRender:eP}),s.createElement(S,{prefixCls:Y,marks:eG,onClick:e2})))}),j=n(53124),F=n(75164),I=n(42550),T=n(94199),L=s.forwardRef(function(e,t){var n=e.open,r=(0,s.useRef)(null),a=(0,s.useRef)(null);function c(){F.Z.cancel(a.current),a.current=null}return s.useEffect(function(){return n?a.current=(0,F.Z)(function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),a.current=null}):c(),c},[n,e.title]),s.createElement(T.Z,(0,o.Z)({ref:(0,I.sQ)(r,t)},e))}),H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},D=s.forwardRef(function(e,t){var n=s.useContext(j.E_),u=n.getPrefixCls,l=n.direction,f=n.getPopupContainer,d=s.useState({}),v=(0,c.Z)(d,2),m=v[0],p=v[1],h=function(e,t){p(function(n){return(0,o.Z)((0,o.Z)({},n),(0,a.Z)({},e,t))})},g=e.prefixCls,b=e.range,y=e.className,Z=H(e,["prefixCls","range","className"]),x=u("slider",g),C=i()(y,(0,a.Z)({},"".concat(x,"-rtl"),"rtl"===l));"rtl"!==l||Z.vertical||(Z.reverse=!Z.reverse);var E=s.useMemo(function(){return b?"object"===(0,r.Z)(b)?[!0,b.draggableTrack]:[!0,!1]:[!1]},[b]),k=(0,c.Z)(E,2),w=k[0],O=k[1];return s.createElement(R,(0,o.Z)({},Z,{step:Z.step,range:w,draggableTrack:O,className:C,ref:t,prefixCls:x,handleRender:function(t,n){var r,a=n.index,c=n.dragging,i=u(),d=e.tooltip,v=e.vertical,p=(0,o.Z)({formatter:null!==(r=e.tipFormatter)&&void 0!==r?r:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},void 0===d?{}:d),g=p.open,b=p.placement,y=p.getPopupContainer,Z=p.prefixCls,C=p.formatter,E=!!C&&(m[a]||c),k=(0,o.Z)((0,o.Z)({},t.props),{onMouseEnter:function(){return h(a,!0)},onMouseLeave:function(){return h(a,!1)}}),w=u("tooltip",Z);return s.createElement(L,{prefixCls:w,title:C?C(n.value):"",open:g||void 0===g&&E,placement:b||(v?"rtl"===l?"left":"right":"top"),transitionName:"".concat(i,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:y||f},s.cloneElement(t,k))}}))})},94594:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(87462),a=n(4942),o=n(50888),c=n(94184),u=n.n(c),i=n(97685),l=n(45987),s=n(67294),f=n(21770),d=n(15105),v=s.forwardRef(function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-switch":r,c=e.className,v=e.checked,m=e.defaultChecked,p=e.disabled,h=e.loadingIcon,g=e.checkedChildren,b=e.unCheckedChildren,y=e.onClick,Z=e.onChange,x=e.onKeyDown,C=(0,l.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),E=(0,f.Z)(!1,{value:v,defaultValue:m}),k=(0,i.Z)(E,2),w=k[0],O=k[1];function M(e,t){var n=w;return p||(O(n=e),null==Z||Z(n,t)),n}var S=u()(o,c,(n={},(0,a.Z)(n,"".concat(o,"-checked"),w),(0,a.Z)(n,"".concat(o,"-disabled"),p),n));return s.createElement("button",Object.assign({},C,{type:"button",role:"switch","aria-checked":w,disabled:p,className:S,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?M(!1,e):e.which===d.Z.RIGHT&&M(!0,e),null==x||x(e)},onClick:function(e){var t=M(!w,e);null==y||y(t,e)}}),h,s.createElement("span",{className:"".concat(o,"-inner")},w?g:b))});v.displayName="Switch";var m=n(53124),p=n(98866),h=n(97647),g=n(68349),b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},y=s.forwardRef(function(e,t){var n,c=e.prefixCls,i=e.size,l=e.disabled,f=e.loading,d=e.className,y=b(e,["prefixCls","size","disabled","loading","className"]),Z=s.useContext(m.E_),x=Z.getPrefixCls,C=Z.direction,E=s.useContext(h.Z),k=s.useContext(p.Z),w=x("switch",c),O=s.createElement("div",{className:"".concat(w,"-handle")},f&&s.createElement(o.Z,{className:"".concat(w,"-loading-icon")})),M=u()((n={},(0,a.Z)(n,"".concat(w,"-small"),"small"===(i||E)),(0,a.Z)(n,"".concat(w,"-loading"),f),(0,a.Z)(n,"".concat(w,"-rtl"),"rtl"===C),n),void 0===d?"":d);return s.createElement(g.Z,{insertExtraNode:!0},s.createElement(v,(0,r.Z)({},y,{prefixCls:w,className:M,disabled:(null!=l?l:k)||f,ref:t,loadingIcon:O})))});y.__ANT_SWITCH=!0;var Z=y},27561:function(e,t,n){var r=n(67990),a=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(a,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),a=n(7771),o=n(14841),c=Math.max,u=Math.min;e.exports=function(e,t,n){var i,l,s,f,d,v,m=0,p=!1,h=!1,g=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var n=i,r=l;return i=l=void 0,m=t,f=e.apply(r,n)}function y(e){var n=e-v,r=e-m;return void 0===v||n>=t||n<0||h&&r>=s}function Z(){var e,n,r,o=a();if(y(o))return x(o);d=setTimeout(Z,(e=o-v,n=o-m,r=t-e,h?u(r,s-n):r))}function x(e){return(d=void 0,g&&i)?b(e):(i=l=void 0,f)}function C(){var e,n=a(),r=y(n);if(i=arguments,l=this,v=n,r){if(void 0===d)return m=e=v,d=setTimeout(Z,t),p?b(e):f;if(h)return clearTimeout(d),d=setTimeout(Z,t),b(v)}return void 0===d&&(d=setTimeout(Z,t)),f}return t=o(t)||0,r(n)&&(p=!!n.leading,s=(h="maxWait"in n)?c(o(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),C.cancel=function(){void 0!==d&&clearTimeout(d),m=0,i=v=l=d=void 0},C.flush=function(){return void 0===d?f:x(a())},C}},33448:function(e,t,n){var r=n(44239),a=n(37005);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),a=n(13218),o=n(33448),c=0/0,u=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return c;if(a(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=a(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=i.test(e);return n||l.test(e)?s(e.slice(2),n?2:8):u.test(e)?c:+e}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/8119-277d5fb5b4c5ba1e.js b/static/web/_next/static/chunks/8119-277d5fb5b4c5ba1e.js new file mode 100644 index 000000000..1999a2357 --- /dev/null +++ b/static/web/_next/static/chunks/8119-277d5fb5b4c5ba1e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8119],{18119:function(e,t,r){r.d(t,{Z:function(){return ea}});var n=r(65223),a=r(4942),l=r(87462),o=r(74902),i=r(94184),c=r.n(i),u=r(62874),s=r(67294),d=r(53124),f=r(33603),m=r(97685);function p(e){var t=s.useState(e),r=(0,m.Z)(t,2),n=r[0],a=r[1];return s.useEffect(function(){var t=setTimeout(function(){a(e)},e.length?0:10);return function(){clearTimeout(t)}},[e]),n}var h=[];function v(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"==typeof e?e:"".concat(r,"-").concat(n),error:e,errorStatus:t}}function g(e){var t=e.help,r=e.helpStatus,i=e.errors,m=e.warnings,g=e.className,b=e.fieldId,y=e.onVisibleChanged,Z=s.useContext(n.Rk).prefixCls,E=s.useContext(d.E_).getPrefixCls,w="".concat(Z,"-item-explain"),C=E(),x=p(void 0===i?h:i),k=p(void 0===m?h:m),O=s.useMemo(function(){return null!=t?[v(t,r,"help")]:[].concat((0,o.Z)(x.map(function(e,t){return v(e,"error","error",t)})),(0,o.Z)(k.map(function(e,t){return v(e,"warning","warning",t)})))},[t,r,x,k]),N={};return b&&(N.id="".concat(b,"_help")),s.createElement(u.Z,{motionDeadline:f.ZP.motionDeadline,motionName:"".concat(C,"-show-help"),visible:!!O.length,onVisibleChanged:y},function(e){var t=e.className,r=e.style;return s.createElement("div",(0,l.Z)({},N,{className:c()(w,t,g),style:r,role:"alert"}),s.createElement(u.V,(0,l.Z)({keys:O},f.ZP,{motionName:"".concat(C,"-show-help-item"),component:!1}),function(e){var t=e.key,r=e.error,n=e.errorStatus,l=e.className,o=e.style;return s.createElement("div",{key:t,className:c()(l,(0,a.Z)({},"".concat(w,"-").concat(n),n)),style:o},r)}))})}var b=r(71002),y=r(71990),Z=r(98866),E=r(97647),w=r(12615),C=["parentNode"];function x(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function k(e,t){if(e.length){var r=e.join("_");return t?"".concat(t,"_").concat(r):C.includes(r)?"".concat("form_item","_").concat(r):r}}function O(e){return x(e).join("_")}function N(e){var t=(0,y.useForm)(),r=(0,m.Z)(t,1)[0],n=s.useRef({}),a=s.useMemo(function(){return null!=e?e:(0,l.Z)((0,l.Z)({},r),{__INTERNAL__:{itemRef:function(e){return function(t){var r=O(e);t?n.current[r]=t:delete n.current[r]}}},scrollToField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=k(x(e),a.__INTERNAL__.name),n=r?document.getElementById(r):null;n&&(0,w.Z)(n,(0,l.Z)({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:function(e){var t=O(e);return n.current[t]}})},[e,r]);return[a]}var _=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},q=s.forwardRef(function(e,t){var r,o=s.useContext(E.Z),i=s.useContext(Z.Z),u=s.useContext(d.E_),f=u.getPrefixCls,p=u.direction,h=u.form,v=e.prefixCls,g=e.className,w=e.size,C=void 0===w?o:w,x=e.disabled,k=e.form,O=e.colon,q=e.labelAlign,I=e.labelWrap,F=e.labelCol,M=e.wrapperCol,P=e.hideRequiredMark,R=e.layout,j=void 0===R?"horizontal":R,S=e.scrollToFirstError,W=e.requiredMark,T=e.onFinishFailed,V=e.name,A=_(e,["prefixCls","className","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),L=(0,s.useMemo)(function(){return void 0!==W?W:h&&void 0!==h.requiredMark?h.requiredMark:!P},[P,W,h]),H=null!=O?O:null==h?void 0:h.colon,B=f("form",v),D=c()(B,(r={},(0,a.Z)(r,"".concat(B,"-").concat(j),!0),(0,a.Z)(r,"".concat(B,"-hide-required-mark"),!1===L),(0,a.Z)(r,"".concat(B,"-rtl"),"rtl"===p),(0,a.Z)(r,"".concat(B,"-").concat(C),C),r),void 0===g?"":g),z=N(k),Y=(0,m.Z)(z,1)[0],K=Y.__INTERNAL__;K.name=V;var X=(0,s.useMemo)(function(){return{name:V,labelAlign:q,labelCol:F,labelWrap:I,wrapperCol:M,vertical:"vertical"===j,colon:H,requiredMark:L,itemRef:K.itemRef,form:Y}},[V,q,F,M,j,H,L,Y]);return s.useImperativeHandle(t,function(){return Y}),s.createElement(Z.n,{disabled:void 0===x?i:x},s.createElement(E.q,{size:C},s.createElement(n.q3.Provider,{value:X},s.createElement(y.default,(0,l.Z)({id:V},A,{name:V,onFinishFailed:function(e){null==T||T(e);var t={block:"nearest"};S&&e.errorFields.length&&("object"===(0,b.Z)(S)&&(t=S),Y.scrollToField(e.errorFields[0].name,t))},form:Y,className:D})))))}),I=r(30470),F=r(42550),M=r(96159),P=r(93355),R=r(75164),j=r(89739),S=r(4340),W=r(21640),T=r(50888),V=r(8410),A=r(98423),L=r(92820),H=r(25035),B=r(21584),D=r(23715),z=r(6213),Y=r(94199),K=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},X=function(e){var t=e.prefixCls,r=e.label,o=e.htmlFor,i=e.labelCol,u=e.labelAlign,d=e.colon,f=e.required,p=e.requiredMark,h=e.tooltip,v=(0,D.E)("Form"),g=(0,m.Z)(v,1)[0];return r?s.createElement(n.q3.Consumer,{key:"label"},function(e){var n,m,v=e.vertical,y=e.labelAlign,Z=e.labelCol,E=e.labelWrap,w=e.colon,C=i||Z||{},x="".concat(t,"-item-label"),k=c()(x,"left"===(u||y)&&"".concat(x,"-left"),C.className,(0,a.Z)({},"".concat(x,"-wrap"),!!E)),O=r,N=!0===d||!1!==w&&!1!==d;N&&!v&&"string"==typeof r&&""!==r.trim()&&(O=r.replace(/[:|:]\s*$/,""));var _=h?"object"!==(0,b.Z)(h)||s.isValidElement(h)?{title:h}:h:null;if(_){var q=_.icon,I=void 0===q?s.createElement(H.Z,null):q,F=K(_,["icon"]),M=s.createElement(Y.Z,(0,l.Z)({},F),s.cloneElement(I,{className:"".concat(t,"-item-tooltip"),title:""}));O=s.createElement(s.Fragment,null,O,M)}"optional"!==p||f||(O=s.createElement(s.Fragment,null,O,s.createElement("span",{className:"".concat(t,"-item-optional"),title:""},(null==g?void 0:g.optional)||(null===(m=z.Z.Form)||void 0===m?void 0:m.optional))));var P=c()((n={},(0,a.Z)(n,"".concat(t,"-item-required"),f),(0,a.Z)(n,"".concat(t,"-item-required-mark-optional"),"optional"===p),(0,a.Z)(n,"".concat(t,"-item-no-colon"),!N),n));return s.createElement(B.Z,(0,l.Z)({},C,{className:k}),s.createElement("label",{htmlFor:o,className:P,title:"string"==typeof r?r:""},O))}):null},U=function(e){var t=e.prefixCls,r=e.status,a=e.wrapperCol,o=e.children,i=e.errors,u=e.warnings,d=e._internalItemRender,f=e.extra,m=e.help,p=e.fieldId,h=e.marginBottom,v=e.onErrorVisibleChanged,b="".concat(t,"-item"),y=s.useContext(n.q3),Z=a||y.wrapperCol||{},E=c()("".concat(b,"-control"),Z.className),w=s.useMemo(function(){return(0,l.Z)({},y)},[y]);delete w.labelCol,delete w.wrapperCol;var C=s.createElement("div",{className:"".concat(b,"-control-input")},s.createElement("div",{className:"".concat(b,"-control-input-content")},o)),x=s.useMemo(function(){return{prefixCls:t,status:r}},[t,r]),k=null!==h||i.length||u.length?s.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},s.createElement(n.Rk.Provider,{value:x},s.createElement(g,{fieldId:p,errors:i,warnings:u,help:m,helpStatus:r,className:"".concat(b,"-explain-connected"),onVisibleChanged:v})),!!h&&s.createElement("div",{style:{width:0,height:h}})):null,O={};p&&(O.id="".concat(p,"_extra"));var N=f?s.createElement("div",(0,l.Z)({},O,{className:"".concat(b,"-extra")}),f):null,_=d&&"pro_table_render"===d.mark&&d.render?d.render(e,{input:C,errorList:k,extra:N}):s.createElement(s.Fragment,null,C,k,N);return s.createElement(n.q3.Provider,{value:w},s.createElement(B.Z,(0,l.Z)({},Z,{className:E}),_))},$=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},Q={success:j.Z,warning:W.Z,error:S.Z,validating:T.Z};function G(e){var t,r=e.prefixCls,o=e.className,i=e.style,u=e.help,d=e.errors,f=e.warnings,h=e.validateStatus,v=e.meta,g=e.hasFeedback,b=e.hidden,y=e.children,Z=e.fieldId,E=e.isRequired,w=e.onSubItemMetaChange,C=$(e,["prefixCls","className","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","isRequired","onSubItemMetaChange"]),x="".concat(r,"-item"),k=s.useContext(n.q3).requiredMark,O=s.useRef(null),N=p(d),_=p(f),q=null!=u,I=!!(q||d.length||f.length),F=s.useState(null),M=(0,m.Z)(F,2),P=M[0],R=M[1];(0,V.Z)(function(){I&&O.current&&R(parseInt(getComputedStyle(O.current).marginBottom,10))},[I]);var j="";void 0!==h?j=h:v.validating?j="validating":N.length?j="error":_.length?j="warning":v.touched&&(j="success");var S=s.useMemo(function(){var e;if(g){var t=j&&Q[j];e=t?s.createElement("span",{className:c()("".concat(x,"-feedback-icon"),"".concat(x,"-feedback-icon-").concat(j))},s.createElement(t,null)):null}return{status:j,hasFeedback:g,feedbackIcon:e,isFormItemInput:!0}},[j,g]),W=(t={},(0,a.Z)(t,x,!0),(0,a.Z)(t,"".concat(x,"-with-help"),q||N.length||_.length),(0,a.Z)(t,"".concat(o),!!o),(0,a.Z)(t,"".concat(x,"-has-feedback"),j&&g),(0,a.Z)(t,"".concat(x,"-has-success"),"success"===j),(0,a.Z)(t,"".concat(x,"-has-warning"),"warning"===j),(0,a.Z)(t,"".concat(x,"-has-error"),"error"===j),(0,a.Z)(t,"".concat(x,"-is-validating"),"validating"===j),(0,a.Z)(t,"".concat(x,"-hidden"),b),t);return s.createElement("div",{className:c()(W),style:i,ref:O},s.createElement(L.Z,(0,l.Z)({className:"".concat(x,"-row")},(0,A.Z)(C,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","required","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol"])),s.createElement(X,(0,l.Z)({htmlFor:Z,required:E,requiredMark:k},e,{prefixCls:r})),s.createElement(U,(0,l.Z)({},e,v,{errors:N,warnings:_,prefixCls:r,status:j,help:u,marginBottom:P,onErrorVisibleChanged:function(e){e||R(null)}}),s.createElement(n.qI.Provider,{value:w},s.createElement(n.aM.Provider,{value:S},y)))),!!P&&s.createElement("div",{className:"".concat(x,"-margin-offset"),style:{marginBottom:-P}}))}(0,P.b)("success","warning","error","validating","");var J=s.memo(function(e){return e.children},function(e,t){return e.value===t.value&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(function(e,r){return e===t.childProps[r]})});function ee(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}var et=function(e){var t,r,a,i,c,u,f,p,h,v=e.name,g=e.noStyle,Z=e.dependencies,E=e.prefixCls,w=e.shouldUpdate,C=e.rules,O=e.children,N=e.required,_=e.label,q=e.messageVariables,P=e.trigger,j=void 0===P?"onChange":P,S=e.validateTrigger,W=e.hidden,T=(0,s.useContext)(d.E_).getPrefixCls,V=(0,s.useContext)(n.q3).name,A="function"==typeof O,L=(0,s.useContext)(n.qI),H=(0,s.useContext)(y.FieldContext).validateTrigger,B=void 0!==S?S:H,D=null!=v,z=T("form",E),Y=s.useContext(y.ListContext),K=s.useRef(),X=(t=s.useState({}),a=(r=(0,m.Z)(t,2))[0],i=r[1],c=(0,s.useRef)(null),u=(0,s.useRef)([]),f=(0,s.useRef)(!1),s.useEffect(function(){return f.current=!1,function(){f.current=!0,R.Z.cancel(c.current),c.current=null}},[]),[a,function(e){f.current||(null===c.current&&(u.current=[],c.current=(0,R.Z)(function(){c.current=null,i(function(e){var t=e;return u.current.forEach(function(e){t=e(t)}),t})})),u.current.push(e))}]),U=(0,m.Z)(X,2),$=U[0],Q=U[1],et=(0,I.Z)(function(){return ee()}),er=(0,m.Z)(et,2),en=er[0],ea=er[1],el=function(e,t){Q(function(r){var n=(0,l.Z)({},r),a=[].concat((0,o.Z)(e.name.slice(0,-1)),(0,o.Z)(t)).join("__SPLIT__");return e.destroy?delete n[a]:n[a]=e,n})},eo=s.useMemo(function(){var e=(0,o.Z)(en.errors),t=(0,o.Z)(en.warnings);return Object.values($).forEach(function(r){e.push.apply(e,(0,o.Z)(r.errors||[])),t.push.apply(t,(0,o.Z)(r.warnings||[]))}),[e,t]},[$,en.errors,en.warnings]),ei=(0,m.Z)(eo,2),ec=ei[0],eu=ei[1],es=(p=s.useContext(n.q3).itemRef,h=s.useRef({}),function(e,t){var r=t&&"object"===(0,b.Z)(t)&&t.ref,n=e.join("_");return(h.current.name!==n||h.current.originRef!==r)&&(h.current.name=n,h.current.originRef=r,h.current.ref=(0,F.sQ)(p(e),r)),h.current.ref});function ed(t,r,n){return g&&!W?t:s.createElement(G,(0,l.Z)({key:"row"},e,{prefixCls:z,fieldId:r,isRequired:n,errors:ec,warnings:eu,meta:en,onSubItemMetaChange:el}),t)}if(!D&&!A&&!Z)return ed(O);var ef={};return"string"==typeof _?ef.label=_:v&&(ef.label=String(v)),q&&(ef=(0,l.Z)((0,l.Z)({},ef),q)),s.createElement(y.Field,(0,l.Z)({},e,{messageVariables:ef,trigger:j,validateTrigger:B,onMetaChange:function(e){var t=null==Y?void 0:Y.getKey(e.name);if(ea(e.destroy?ee():e,!0),g&&L){var r=e.name;if(e.destroy)r=K.current||r;else if(void 0!==t){var n=(0,m.Z)(t,2),a=n[0],l=n[1];r=[a].concat((0,o.Z)(l)),K.current=r}L(e,r)}}}),function(t,r,n){var a=x(v).length&&r?r.name:[],i=k(a,V),c=void 0!==N?N:!!(C&&C.some(function(e){if(e&&"object"===(0,b.Z)(e)&&e.required&&!e.warningOnly)return!0;if("function"==typeof e){var t=e(n);return t&&t.required&&!t.warningOnly}return!1})),u=(0,l.Z)({},t),d=null;if(Array.isArray(O)&&D)d=O;else if(A&&(!(w||Z)||D));else if(!Z||A||D){if((0,M.l$)(O)){var f=(0,l.Z)((0,l.Z)({},O.props),u);if(f.id||(f.id=i),e.help||ec.length>0||eu.length>0||e.extra){var m=[];(e.help||ec.length>0)&&m.push("".concat(i,"_help")),e.extra&&m.push("".concat(i,"_extra")),f["aria-describedby"]=m.join(" ")}ec.length>0&&(f["aria-invalid"]="true"),c&&(f["aria-required"]="true"),(0,F.Yr)(O)&&(f.ref=es(a,O)),new Set([].concat((0,o.Z)(x(j)),(0,o.Z)(x(B)))).forEach(function(e){f[e]=function(){for(var t,r,n,a=arguments.length,l=Array(a),o=0;ot.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);at.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r},en=q;en.Item=et,en.List=function(e){var t=e.prefixCls,r=e.children,a=er(e,["prefixCls","children"]),o=(0,s.useContext(d.E_).getPrefixCls)("form",t),i=s.useMemo(function(){return{prefixCls:o,status:"error"}},[o]);return s.createElement(y.List,(0,l.Z)({},a),function(e,t,a){return s.createElement(n.Rk.Provider,{value:i},r(e.map(function(e){return(0,l.Z)((0,l.Z)({},e),{fieldKey:e.key})}),t,{errors:a.errors,warnings:a.warnings}))})},en.ErrorList=g,en.useForm=N,en.useFormInstance=function(){return(0,s.useContext)(n.q3).form},en.useWatch=y.useWatch,en.Provider=n.RV,en.create=function(){};var ea=en},12615:function(e,t,r){function n(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function a(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function l(e,t){if(e.clientHeightt||l>e&&o=t&&i>=r?l-e-n:o>t&&ir?o-t+a:0}function i(e,t){var r=window,a=t.scrollMode,i=t.block,c=t.inline,u=t.boundary,s=t.skipOverflowHiddenElements,d="function"==typeof u?u:function(e){return e!==u};if(!n(e))throw TypeError("Invalid target");for(var f=document.scrollingElement||document.documentElement,m=[],p=e;n(p)&&d(p);){if((p=p.parentElement)===f){m.push(p);break}null!=p&&p===document.body&&l(p)&&!l(document.documentElement)||null!=p&&l(p,s)&&m.push(p)}for(var h=r.visualViewport?r.visualViewport.width:innerWidth,v=r.visualViewport?r.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),Z=y.height,E=y.width,w=y.top,C=y.right,x=y.bottom,k=y.left,O="start"===i||"nearest"===i?w:"end"===i?x:w+Z/2,N="center"===c?k+E/2:"end"===c?C:k,_=[],q=0;q=0&&k>=0&&x<=v&&C<=h&&w>=R&&x<=S&&k>=W&&C<=j)break;var T=getComputedStyle(I),V=parseInt(T.borderLeftWidth,10),A=parseInt(T.borderTopWidth,10),L=parseInt(T.borderRightWidth,10),H=parseInt(T.borderBottomWidth,10),B=0,D=0,z="offsetWidth"in I?I.offsetWidth-I.clientWidth-V-L:0,Y="offsetHeight"in I?I.offsetHeight-I.clientHeight-A-H:0;if(f===I)B="start"===i?O:"end"===i?O-v:"nearest"===i?o(b,b+v,v,A,H,b+O,b+O+Z,Z):O-v/2,D="start"===c?N:"center"===c?N-h/2:"end"===c?N-h:o(g,g+h,h,V,L,g+N,g+N+E,E),B=Math.max(0,B+b),D=Math.max(0,D+g);else{B="start"===i?O-R-A:"end"===i?O-S+H+Y:"nearest"===i?o(R,S,M,A,H+Y,O,O+Z,Z):O-(R+M/2)+Y/2,D="start"===c?N-W-V:"center"===c?N-(W+P/2)+z/2:"end"===c?N-j+L+z:o(W,j,P,V,L+z,N,N+E,E);var K=I.scrollLeft,X=I.scrollTop;O+=X-(B=Math.max(0,Math.min(X+B,I.scrollHeight-M+Y))),N+=K-(D=Math.max(0,Math.min(K+D,I.scrollWidth-P+z)))}_.push({el:I,top:B,left:D})}return _}function c(e){return e===Object(e)&&0!==Object.keys(e).length}r.d(t,{Z:function(){return u}});var u=function(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(c(t)&&"function"==typeof t.behavior)return t.behavior(r?i(e,t):[]);if(r){var n=!1===t?{block:"end",inline:"nearest"}:c(t)?t:{block:"start",inline:"nearest"};return function(e,t){void 0===t&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(e){var n=e.el,a=e.top,l=e.left;n.scroll&&r?n.scroll({top:a,left:l,behavior:t}):(n.scrollTop=a,n.scrollLeft=l)})}(i(e,n),n.behavior)}}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/8119.9ed703c0791a92b4.js b/static/web/_next/static/chunks/8119.9ed703c0791a92b4.js deleted file mode 100644 index f181e207f..000000000 --- a/static/web/_next/static/chunks/8119.9ed703c0791a92b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8119],{18119:function(e,t,r){r.d(t,{Z:function(){return eo}});var n=r(65223),o=r(4942),a=r(87462),l=r(74902),i=r(94184),c=r.n(i),u=r(62874),s=r(67294),f=r(53124),d=r(33603),p=r(97685);function m(e){var t=s.useState(e),r=(0,p.Z)(t,2),n=r[0],o=r[1];return s.useEffect(function(){var t=setTimeout(function(){o(e)},e.length?0:10);return function(){clearTimeout(t)}},[e]),n}var v=[];function h(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return{key:"string"==typeof e?e:"".concat(r,"-").concat(n),error:e,errorStatus:t}}function g(e){var t=e.help,r=e.helpStatus,i=e.errors,p=e.warnings,g=e.className,b=e.fieldId,y=e.onVisibleChanged,Z=s.useContext(n.Rk).prefixCls,x=s.useContext(f.E_).getPrefixCls,w="".concat(Z,"-item-explain"),E=x(),C=m(void 0===i?v:i),O=m(void 0===p?v:p),j=s.useMemo(function(){return null!=t?[h(t,r,"help")]:[].concat((0,l.Z)(C.map(function(e,t){return h(e,"error","error",t)})),(0,l.Z)(O.map(function(e,t){return h(e,"warning","warning",t)})))},[t,r,C,O]),k={};return b&&(k.id="".concat(b,"_help")),s.createElement(u.Z,{motionDeadline:d.ZP.motionDeadline,motionName:"".concat(E,"-show-help"),visible:!!j.length,onVisibleChanged:y},function(e){var t=e.className,r=e.style;return s.createElement("div",(0,a.Z)({},k,{className:c()(w,t,g),style:r,role:"alert"}),s.createElement(u.V,(0,a.Z)({keys:j},d.ZP,{motionName:"".concat(E,"-show-help-item"),component:!1}),function(e){var t=e.key,r=e.error,n=e.errorStatus,a=e.className,l=e.style;return s.createElement("div",{key:t,className:c()(a,(0,o.Z)({},"".concat(w,"-").concat(n),n)),style:l},r)}))})}var b=r(71002),y=r(71990),Z=r(98866),x=r(97647),w=r(12615),E=["parentNode"];function C(e){return void 0===e||!1===e?[]:Array.isArray(e)?e:[e]}function O(e,t){if(e.length){var r=e.join("_");return t?"".concat(t,"_").concat(r):E.includes(r)?"".concat("form_item","_").concat(r):r}}function j(e){return C(e).join("_")}function k(e){var t=(0,y.useForm)(),r=(0,p.Z)(t,1)[0],n=s.useRef({}),o=s.useMemo(function(){return null!=e?e:(0,a.Z)((0,a.Z)({},r),{__INTERNAL__:{itemRef:function(e){return function(t){var r=j(e);t?n.current[r]=t:delete n.current[r]}}},scrollToField:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=O(C(e),o.__INTERNAL__.name),n=r?document.getElementById(r):null;n&&(0,w.Z)(n,(0,a.Z)({scrollMode:"if-needed",block:"nearest"},t))},getFieldInstance:function(e){var t=j(e);return n.current[t]}})},[e,r]);return[o]}var N=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},P=s.forwardRef(function(e,t){var r,l=s.useContext(x.Z),i=s.useContext(Z.Z),u=s.useContext(f.E_),d=u.getPrefixCls,m=u.direction,v=u.form,h=e.prefixCls,g=e.className,w=e.size,E=void 0===w?l:w,C=e.disabled,O=e.form,j=e.colon,P=e.labelAlign,_=e.labelWrap,I=e.labelCol,S=e.wrapperCol,q=e.hideRequiredMark,F=e.layout,R=void 0===F?"horizontal":F,M=e.scrollToFirstError,W=e.requiredMark,T=e.onFinishFailed,A=e.name,V=N(e,["prefixCls","className","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name"]),L=(0,s.useMemo)(function(){return void 0!==W?W:v&&void 0!==v.requiredMark?v.requiredMark:!q},[q,W,v]),B=null!=j?j:null==v?void 0:v.colon,H=d("form",h),D=c()(H,(r={},(0,o.Z)(r,"".concat(H,"-").concat(R),!0),(0,o.Z)(r,"".concat(H,"-hide-required-mark"),!1===L),(0,o.Z)(r,"".concat(H,"-rtl"),"rtl"===m),(0,o.Z)(r,"".concat(H,"-").concat(E),E),r),void 0===g?"":g),z=k(O),Y=(0,p.Z)(z,1)[0],G=Y.__INTERNAL__;G.name=A;var K=(0,s.useMemo)(function(){return{name:A,labelAlign:P,labelCol:I,labelWrap:_,wrapperCol:S,vertical:"vertical"===R,colon:B,requiredMark:L,itemRef:G.itemRef,form:Y}},[A,P,I,S,R,B,L,Y]);return s.useImperativeHandle(t,function(){return Y}),s.createElement(Z.n,{disabled:void 0===C?i:C},s.createElement(x.q,{size:E},s.createElement(n.q3.Provider,{value:K},s.createElement(y.default,(0,a.Z)({id:A},V,{name:A,onFinishFailed:function(e){null==T||T(e);var t={block:"nearest"};M&&e.errorFields.length&&("object"===(0,b.Z)(M)&&(t=M),Y.scrollToField(e.errorFields[0].name,t))},form:Y,className:D})))))}),_=r(30470),I=r(42550),S=r(96159),q=r(93355),F=r(75164),R=r(89739),M=r(4340),W=r(21640),T=r(50888),A=r(8410),V=r(98423),L=r(92820),B=r(25035),H=r(21584),D=r(23715),z=r(6213),Y=r(94199),G=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},K=function(e){var t=e.prefixCls,r=e.label,l=e.htmlFor,i=e.labelCol,u=e.labelAlign,f=e.colon,d=e.required,m=e.requiredMark,v=e.tooltip,h=(0,D.E)("Form"),g=(0,p.Z)(h,1)[0];return r?s.createElement(n.q3.Consumer,{key:"label"},function(e){var n,p,h=e.vertical,y=e.labelAlign,Z=e.labelCol,x=e.labelWrap,w=e.colon,E=i||Z||{},C="".concat(t,"-item-label"),O=c()(C,"left"===(u||y)&&"".concat(C,"-left"),E.className,(0,o.Z)({},"".concat(C,"-wrap"),!!x)),j=r,k=!0===f||!1!==w&&!1!==f;k&&!h&&"string"==typeof r&&""!==r.trim()&&(j=r.replace(/[:|:]\s*$/,""));var N=v?"object"!==(0,b.Z)(v)||s.isValidElement(v)?{title:v}:v:null;if(N){var P=N.icon,_=void 0===P?s.createElement(B.Z,null):P,I=G(N,["icon"]),S=s.createElement(Y.Z,(0,a.Z)({},I),s.cloneElement(_,{className:"".concat(t,"-item-tooltip"),title:""}));j=s.createElement(s.Fragment,null,j,S)}"optional"!==m||d||(j=s.createElement(s.Fragment,null,j,s.createElement("span",{className:"".concat(t,"-item-optional"),title:""},(null==g?void 0:g.optional)||(null===(p=z.Z.Form)||void 0===p?void 0:p.optional))));var q=c()((n={},(0,o.Z)(n,"".concat(t,"-item-required"),d),(0,o.Z)(n,"".concat(t,"-item-required-mark-optional"),"optional"===m),(0,o.Z)(n,"".concat(t,"-item-no-colon"),!k),n));return s.createElement(H.Z,(0,a.Z)({},E,{className:O}),s.createElement("label",{htmlFor:l,className:q,title:"string"==typeof r?r:""},j))}):null},X=function(e){var t=e.prefixCls,r=e.status,o=e.wrapperCol,l=e.children,i=e.errors,u=e.warnings,f=e._internalItemRender,d=e.extra,p=e.help,m=e.fieldId,v=e.marginBottom,h=e.onErrorVisibleChanged,b="".concat(t,"-item"),y=s.useContext(n.q3),Z=o||y.wrapperCol||{},x=c()("".concat(b,"-control"),Z.className),w=s.useMemo(function(){return(0,a.Z)({},y)},[y]);delete w.labelCol,delete w.wrapperCol;var E=s.createElement("div",{className:"".concat(b,"-control-input")},s.createElement("div",{className:"".concat(b,"-control-input-content")},l)),C=s.useMemo(function(){return{prefixCls:t,status:r}},[t,r]),O=null!==v||i.length||u.length?s.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},s.createElement(n.Rk.Provider,{value:C},s.createElement(g,{fieldId:m,errors:i,warnings:u,help:p,helpStatus:r,className:"".concat(b,"-explain-connected"),onVisibleChanged:h})),!!v&&s.createElement("div",{style:{width:0,height:v}})):null,j={};m&&(j.id="".concat(m,"_extra"));var k=d?s.createElement("div",(0,a.Z)({},j,{className:"".concat(b,"-extra")}),d):null,N=f&&"pro_table_render"===f.mark&&f.render?f.render(e,{input:E,errorList:O,extra:k}):s.createElement(s.Fragment,null,E,O,k);return s.createElement(n.q3.Provider,{value:w},s.createElement(H.Z,(0,a.Z)({},Z,{className:x}),N))},$=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},U={success:R.Z,warning:W.Z,error:M.Z,validating:T.Z};function J(e){var t,r=e.prefixCls,l=e.className,i=e.style,u=e.help,f=e.errors,d=e.warnings,v=e.validateStatus,h=e.meta,g=e.hasFeedback,b=e.hidden,y=e.children,Z=e.fieldId,x=e.isRequired,w=e.onSubItemMetaChange,E=$(e,["prefixCls","className","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","isRequired","onSubItemMetaChange"]),C="".concat(r,"-item"),O=s.useContext(n.q3).requiredMark,j=s.useRef(null),k=m(f),N=m(d),P=null!=u,_=!!(P||f.length||d.length),I=s.useState(null),S=(0,p.Z)(I,2),q=S[0],F=S[1];(0,A.Z)(function(){_&&j.current&&F(parseInt(getComputedStyle(j.current).marginBottom,10))},[_]);var R="";void 0!==v?R=v:h.validating?R="validating":k.length?R="error":N.length?R="warning":h.touched&&(R="success");var M=s.useMemo(function(){var e;if(g){var t=R&&U[R];e=t?s.createElement("span",{className:c()("".concat(C,"-feedback-icon"),"".concat(C,"-feedback-icon-").concat(R))},s.createElement(t,null)):null}return{status:R,hasFeedback:g,feedbackIcon:e,isFormItemInput:!0}},[R,g]),W=(t={},(0,o.Z)(t,C,!0),(0,o.Z)(t,"".concat(C,"-with-help"),P||k.length||N.length),(0,o.Z)(t,"".concat(l),!!l),(0,o.Z)(t,"".concat(C,"-has-feedback"),R&&g),(0,o.Z)(t,"".concat(C,"-has-success"),"success"===R),(0,o.Z)(t,"".concat(C,"-has-warning"),"warning"===R),(0,o.Z)(t,"".concat(C,"-has-error"),"error"===R),(0,o.Z)(t,"".concat(C,"-is-validating"),"validating"===R),(0,o.Z)(t,"".concat(C,"-hidden"),b),t);return s.createElement("div",{className:c()(W),style:i,ref:j},s.createElement(L.Z,(0,a.Z)({className:"".concat(C,"-row")},(0,V.Z)(E,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","required","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol"])),s.createElement(K,(0,a.Z)({htmlFor:Z,required:x,requiredMark:O},e,{prefixCls:r})),s.createElement(X,(0,a.Z)({},e,h,{errors:k,warnings:N,prefixCls:r,status:R,help:u,marginBottom:q,onErrorVisibleChanged:function(e){e||F(null)}}),s.createElement(n.qI.Provider,{value:w},s.createElement(n.aM.Provider,{value:M},y)))),!!q&&s.createElement("div",{className:"".concat(C,"-margin-offset"),style:{marginBottom:-q}}))}(0,q.b)("success","warning","error","validating","");var Q=s.memo(function(e){return e.children},function(e,t){return e.value===t.value&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every(function(e,r){return e===t.childProps[r]})});function ee(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[]}}var et=function(e){var t,r,o,i,c,u,d,m,v,h=e.name,g=e.noStyle,Z=e.dependencies,x=e.prefixCls,w=e.shouldUpdate,E=e.rules,j=e.children,k=e.required,N=e.label,P=e.messageVariables,q=e.trigger,R=void 0===q?"onChange":q,M=e.validateTrigger,W=e.hidden,T=(0,s.useContext)(f.E_).getPrefixCls,A=(0,s.useContext)(n.q3).name,V="function"==typeof j,L=(0,s.useContext)(n.qI),B=(0,s.useContext)(y.FieldContext).validateTrigger,H=void 0!==M?M:B,D=null!=h,z=T("form",x),Y=s.useContext(y.ListContext),G=s.useRef(),K=(t=s.useState({}),o=(r=(0,p.Z)(t,2))[0],i=r[1],c=(0,s.useRef)(null),u=(0,s.useRef)([]),d=(0,s.useRef)(!1),s.useEffect(function(){return d.current=!1,function(){d.current=!0,F.Z.cancel(c.current),c.current=null}},[]),[o,function(e){d.current||(null===c.current&&(u.current=[],c.current=(0,F.Z)(function(){c.current=null,i(function(e){var t=e;return u.current.forEach(function(e){t=e(t)}),t})})),u.current.push(e))}]),X=(0,p.Z)(K,2),$=X[0],U=X[1],et=(0,_.Z)(function(){return ee()}),er=(0,p.Z)(et,2),en=er[0],eo=er[1],ea=function(e,t){U(function(r){var n=(0,a.Z)({},r),o=[].concat((0,l.Z)(e.name.slice(0,-1)),(0,l.Z)(t)).join("__SPLIT__");return e.destroy?delete n[o]:n[o]=e,n})},el=s.useMemo(function(){var e=(0,l.Z)(en.errors),t=(0,l.Z)(en.warnings);return Object.values($).forEach(function(r){e.push.apply(e,(0,l.Z)(r.errors||[])),t.push.apply(t,(0,l.Z)(r.warnings||[]))}),[e,t]},[$,en.errors,en.warnings]),ei=(0,p.Z)(el,2),ec=ei[0],eu=ei[1],es=(m=s.useContext(n.q3).itemRef,v=s.useRef({}),function(e,t){var r=t&&"object"===(0,b.Z)(t)&&t.ref,n=e.join("_");return(v.current.name!==n||v.current.originRef!==r)&&(v.current.name=n,v.current.originRef=r,v.current.ref=(0,I.sQ)(m(e),r)),v.current.ref});function ef(t,r,n){return g&&!W?t:s.createElement(J,(0,a.Z)({key:"row"},e,{prefixCls:z,fieldId:r,isRequired:n,errors:ec,warnings:eu,meta:en,onSubItemMetaChange:ea}),t)}if(!D&&!V&&!Z)return ef(j);var ed={};return"string"==typeof N?ed.label=N:h&&(ed.label=String(h)),P&&(ed=(0,a.Z)((0,a.Z)({},ed),P)),s.createElement(y.Field,(0,a.Z)({},e,{messageVariables:ed,trigger:R,validateTrigger:H,onMetaChange:function(e){var t=null==Y?void 0:Y.getKey(e.name);if(eo(e.destroy?ee():e,!0),g&&L){var r=e.name;if(e.destroy)r=G.current||r;else if(void 0!==t){var n=(0,p.Z)(t,2),o=n[0],a=n[1];r=[o].concat((0,l.Z)(a)),G.current=r}L(e,r)}}}),function(t,r,n){var o=C(h).length&&r?r.name:[],i=O(o,A),c=void 0!==k?k:!!(E&&E.some(function(e){if(e&&"object"===(0,b.Z)(e)&&e.required&&!e.warningOnly)return!0;if("function"==typeof e){var t=e(n);return t&&t.required&&!t.warningOnly}return!1})),u=(0,a.Z)({},t),f=null;if(Array.isArray(j)&&D)f=j;else if(V&&(!(w||Z)||D));else if(!Z||V||D){if((0,S.l$)(j)){var d=(0,a.Z)((0,a.Z)({},j.props),u);if(d.id||(d.id=i),e.help||ec.length>0||eu.length>0||e.extra){var p=[];(e.help||ec.length>0)&&p.push("".concat(i,"_help")),e.extra&&p.push("".concat(i,"_extra")),d["aria-describedby"]=p.join(" ")}ec.length>0&&(d["aria-invalid"]="true"),c&&(d["aria-required"]="true"),(0,I.Yr)(j)&&(d.ref=es(o,j)),new Set([].concat((0,l.Z)(C(R)),(0,l.Z)(C(H)))).forEach(function(e){d[e]=function(){for(var t,r,n,o=arguments.length,a=Array(o),l=0;lt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},en=P;en.Item=et,en.List=function(e){var t=e.prefixCls,r=e.children,o=er(e,["prefixCls","children"]),l=(0,s.useContext(f.E_).getPrefixCls)("form",t),i=s.useMemo(function(){return{prefixCls:l,status:"error"}},[l]);return s.createElement(y.List,(0,a.Z)({},o),function(e,t,o){return s.createElement(n.Rk.Provider,{value:i},r(e.map(function(e){return(0,a.Z)((0,a.Z)({},e),{fieldKey:e.key})}),t,{errors:o.errors,warnings:o.warnings}))})},en.ErrorList=g,en.useForm=k,en.useFormInstance=function(){return(0,s.useContext)(n.q3).form},en.useWatch=y.useWatch,en.Provider=n.RV,en.create=function(){};var eo=en},99134:function(e,t,r){var n=(0,r(67294).createContext)({});t.Z=n},21584:function(e,t,r){var n=r(4942),o=r(87462),a=r(71002),l=r(94184),i=r.n(l),c=r(67294),u=r(53124),s=r(99134),f=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},d=["xs","sm","md","lg","xl","xxl"],p=c.forwardRef(function(e,t){var r,l=c.useContext(u.E_),p=l.getPrefixCls,m=l.direction,v=c.useContext(s.Z),h=v.gutter,g=v.wrap,b=v.supportFlexGap,y=e.prefixCls,Z=e.span,x=e.order,w=e.offset,E=e.push,C=e.pull,O=e.className,j=e.children,k=e.flex,N=e.style,P=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),_=p("col",y),I={};d.forEach(function(t){var r,l={},i=e[t];"number"==typeof i?l.span=i:"object"===(0,a.Z)(i)&&(l=i||{}),delete P[t],I=(0,o.Z)((0,o.Z)({},I),(r={},(0,n.Z)(r,"".concat(_,"-").concat(t,"-").concat(l.span),void 0!==l.span),(0,n.Z)(r,"".concat(_,"-").concat(t,"-order-").concat(l.order),l.order||0===l.order),(0,n.Z)(r,"".concat(_,"-").concat(t,"-offset-").concat(l.offset),l.offset||0===l.offset),(0,n.Z)(r,"".concat(_,"-").concat(t,"-push-").concat(l.push),l.push||0===l.push),(0,n.Z)(r,"".concat(_,"-").concat(t,"-pull-").concat(l.pull),l.pull||0===l.pull),(0,n.Z)(r,"".concat(_,"-rtl"),"rtl"===m),r))});var S=i()(_,(r={},(0,n.Z)(r,"".concat(_,"-").concat(Z),void 0!==Z),(0,n.Z)(r,"".concat(_,"-order-").concat(x),x),(0,n.Z)(r,"".concat(_,"-offset-").concat(w),w),(0,n.Z)(r,"".concat(_,"-push-").concat(E),E),(0,n.Z)(r,"".concat(_,"-pull-").concat(C),C),r),O,I),q={};if(h&&h[0]>0){var F=h[0]/2;q.paddingLeft=F,q.paddingRight=F}if(h&&h[1]>0&&!b){var R=h[1]/2;q.paddingTop=R,q.paddingBottom=R}return k&&(q.flex="number"==typeof k?"".concat(k," ").concat(k," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(k)?"0 0 ".concat(k):k,!1!==g||q.minWidth||(q.minWidth=0)),c.createElement("div",(0,o.Z)({},P,{style:(0,o.Z)((0,o.Z)({},q),N),className:S,ref:t}),j)});t.Z=p},92820:function(e,t,r){var n=r(87462),o=r(4942),a=r(71002),l=r(97685),i=r(94184),c=r.n(i),u=r(67294),s=r(53124),f=r(98082),d=r(24308),p=r(93355),m=r(99134),v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function h(e,t){var r=u.useState("string"==typeof e?e:""),n=(0,l.Z)(r,2),o=n[0],i=n[1],c=function(){if("object"===(0,a.Z)(e))for(var r=0;r0?-(B[0]/2):void 0,Y=null!=B[1]&&B[1]>0?-(B[1]/2):void 0;if(z&&(D.marginLeft=z,D.marginRight=z),A){var G=(0,l.Z)(B,2);D.rowGap=G[1]}else Y&&(D.marginTop=Y,D.marginBottom=Y);var K=(0,l.Z)(B,2),X=K[0],$=K[1],U=u.useMemo(function(){return{gutter:[X,$],wrap:C,supportFlexGap:A}},[X,$,C,A]);return u.createElement(m.Z.Provider,{value:U},u.createElement("div",(0,n.Z)({},O,{className:H,style:(0,n.Z)((0,n.Z)({},D),Z),ref:t}),x))});t.Z=g},12615:function(e,t,r){function n(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function a(e,t){if(e.clientHeightt||a>e&&l=t&&i>=r?a-e-n:l>t&&ir?l-t+o:0}function i(e,t){var r=window,o=t.scrollMode,i=t.block,c=t.inline,u=t.boundary,s=t.skipOverflowHiddenElements,f="function"==typeof u?u:function(e){return e!==u};if(!n(e))throw TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,p=[],m=e;n(m)&&f(m);){if((m=m.parentElement)===d){p.push(m);break}null!=m&&m===document.body&&a(m)&&!a(document.documentElement)||null!=m&&a(m,s)&&p.push(m)}for(var v=r.visualViewport?r.visualViewport.width:innerWidth,h=r.visualViewport?r.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),Z=y.height,x=y.width,w=y.top,E=y.right,C=y.bottom,O=y.left,j="start"===i||"nearest"===i?w:"end"===i?C:w+Z/2,k="center"===c?O+x/2:"end"===c?E:O,N=[],P=0;P=0&&O>=0&&C<=h&&E<=v&&w>=F&&C<=M&&O>=W&&E<=R)break;var T=getComputedStyle(_),A=parseInt(T.borderLeftWidth,10),V=parseInt(T.borderTopWidth,10),L=parseInt(T.borderRightWidth,10),B=parseInt(T.borderBottomWidth,10),H=0,D=0,z="offsetWidth"in _?_.offsetWidth-_.clientWidth-A-L:0,Y="offsetHeight"in _?_.offsetHeight-_.clientHeight-V-B:0;if(d===_)H="start"===i?j:"end"===i?j-h:"nearest"===i?l(b,b+h,h,V,B,b+j,b+j+Z,Z):j-h/2,D="start"===c?k:"center"===c?k-v/2:"end"===c?k-v:l(g,g+v,v,A,L,g+k,g+k+x,x),H=Math.max(0,H+b),D=Math.max(0,D+g);else{H="start"===i?j-F-V:"end"===i?j-M+B+Y:"nearest"===i?l(F,M,S,V,B+Y,j,j+Z,Z):j-(F+S/2)+Y/2,D="start"===c?k-W-A:"center"===c?k-(W+q/2)+z/2:"end"===c?k-R+L+z:l(W,R,q,A,L+z,k,k+x,x);var G=_.scrollLeft,K=_.scrollTop;j+=K-(H=Math.max(0,Math.min(K+H,_.scrollHeight-S+Y))),k+=G-(D=Math.max(0,Math.min(G+D,_.scrollWidth-q+z)))}N.push({el:_,top:H,left:D})}return N}function c(e){return e===Object(e)&&0!==Object.keys(e).length}r.d(t,{Z:function(){return u}});var u=function(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(c(t)&&"function"==typeof t.behavior)return t.behavior(r?i(e,t):[]);if(r){var n=!1===t?{block:"end",inline:"nearest"}:c(t)?t:{block:"start",inline:"nearest"};return function(e,t){void 0===t&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(e){var n=e.el,o=e.top,a=e.left;n.scroll&&r?n.scroll({top:o,left:a,behavior:t}):(n.scrollTop=o,n.scrollLeft=a)})}(i(e,n),n.behavior)}}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/8733-edfbb1aa3b3f78e4.js b/static/web/_next/static/chunks/8733-edfbb1aa3b3f78e4.js new file mode 100644 index 000000000..db8cd4beb --- /dev/null +++ b/static/web/_next/static/chunks/8733-edfbb1aa3b3f78e4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8733],{99134:function(t,e,r){"use strict";var n=(0,r(67294).createContext)({});e.Z=n},21584:function(t,e,r){"use strict";var n=r(4942),o=r(87462),c=r(71002),a=r(94184),i=r.n(a),u=r(67294),f=r(53124),s=r(99134),l=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r},p=["xs","sm","md","lg","xl","xxl"],v=u.forwardRef(function(t,e){var r,a=u.useContext(f.E_),v=a.getPrefixCls,d=a.direction,m=u.useContext(s.Z),y=m.gutter,x=m.wrap,Z=m.supportFlexGap,b=t.prefixCls,g=t.span,h=t.order,O=t.offset,w=t.push,j=t.pull,E=t.className,C=t.children,P=t.flex,N=t.style,S=l(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),T=v("col",b),A={};p.forEach(function(e){var r,a={},i=t[e];"number"==typeof i?a.span=i:"object"===(0,c.Z)(i)&&(a=i||{}),delete S[e],A=(0,o.Z)((0,o.Z)({},A),(r={},(0,n.Z)(r,"".concat(T,"-").concat(e,"-").concat(a.span),void 0!==a.span),(0,n.Z)(r,"".concat(T,"-").concat(e,"-order-").concat(a.order),a.order||0===a.order),(0,n.Z)(r,"".concat(T,"-").concat(e,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,n.Z)(r,"".concat(T,"-").concat(e,"-push-").concat(a.push),a.push||0===a.push),(0,n.Z)(r,"".concat(T,"-").concat(e,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,n.Z)(r,"".concat(T,"-rtl"),"rtl"===d),r))});var _=i()(T,(r={},(0,n.Z)(r,"".concat(T,"-").concat(g),void 0!==g),(0,n.Z)(r,"".concat(T,"-order-").concat(h),h),(0,n.Z)(r,"".concat(T,"-offset-").concat(O),O),(0,n.Z)(r,"".concat(T,"-push-").concat(w),w),(0,n.Z)(r,"".concat(T,"-pull-").concat(j),j),r),E,A),k={};if(y&&y[0]>0){var R=y[0]/2;k.paddingLeft=R,k.paddingRight=R}if(y&&y[1]>0&&!Z){var W=y[1]/2;k.paddingTop=W,k.paddingBottom=W}return P&&(k.flex="number"==typeof P?"".concat(P," ").concat(P," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(P)?"0 0 ".concat(P):P,!1!==x||k.minWidth||(k.minWidth=0)),u.createElement("div",(0,o.Z)({},S,{style:(0,o.Z)((0,o.Z)({},k),N),className:_,ref:e}),C)});e.Z=v},92820:function(t,e,r){"use strict";var n=r(87462),o=r(4942),c=r(71002),a=r(97685),i=r(94184),u=r.n(i),f=r(67294),s=r(53124),l=r(98082),p=r(24308),v=r(93355),d=r(99134),m=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(t);oe.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r};function y(t,e){var r=f.useState("string"==typeof t?t:""),n=(0,a.Z)(r,2),o=n[0],i=n[1],u=function(){if("object"===(0,c.Z)(t))for(var r=0;r0?-(L[0]/2):void 0,z=null!=L[1]&&L[1]>0?-(L[1]/2):void 0;if(q&&(J.marginLeft=q,J.marginRight=q),M){var H=(0,a.Z)(L,2);J.rowGap=H[1]}else z&&(J.marginTop=z,J.marginBottom=z);var K=(0,a.Z)(L,2),Q=K[0],U=K[1],V=f.useMemo(function(){return{gutter:[Q,U],wrap:j,supportFlexGap:M}},[Q,U,j,M]);return f.createElement(d.Z.Provider,{value:V},f.createElement("div",(0,n.Z)({},E,{className:D,style:(0,n.Z)((0,n.Z)({},J),g),ref:e}),h))});e.Z=x},27561:function(t,e,r){var n=r(67990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,n(t)+1).replace(o,""):t}},67990:function(t){var e=/\s/;t.exports=function(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},23279:function(t,e,r){var n=r(13218),o=r(7771),c=r(14841),a=Math.max,i=Math.min;t.exports=function(t,e,r){var u,f,s,l,p,v,d=0,m=!1,y=!1,x=!0;if("function"!=typeof t)throw TypeError("Expected a function");function Z(e){var r=u,n=f;return u=f=void 0,d=e,l=t.apply(n,r)}function b(t){var r=t-v,n=t-d;return void 0===v||r>=e||r<0||y&&n>=s}function g(){var t,r,n,c=o();if(b(c))return h(c);p=setTimeout(g,(t=c-v,r=c-d,n=e-t,y?i(n,s-r):n))}function h(t){return(p=void 0,x&&u)?Z(t):(u=f=void 0,l)}function O(){var t,r=o(),n=b(r);if(u=arguments,f=this,v=r,n){if(void 0===p)return d=t=v,p=setTimeout(g,e),m?Z(t):l;if(y)return clearTimeout(p),p=setTimeout(g,e),Z(v)}return void 0===p&&(p=setTimeout(g,e)),l}return e=c(e)||0,n(r)&&(m=!!r.leading,s=(y="maxWait"in r)?a(c(r.maxWait)||0,e):s,x="trailing"in r?!!r.trailing:x),O.cancel=function(){void 0!==p&&clearTimeout(p),d=0,u=v=f=p=void 0},O.flush=function(){return void 0===p?l:h(o())},O}},33448:function(t,e,r){var n=r(44239),o=r(37005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==n(t)}},7771:function(t,e,r){var n=r(55639);t.exports=function(){return n.Date.now()}},14841:function(t,e,r){var n=r(27561),o=r(13218),c=r(33448),a=0/0,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,f=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(c(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=n(t);var r=u.test(t);return r||f.test(t)?s(t.slice(2),r?2:8):i.test(t)?a:+t}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/9096.5f00ce63bc222d7d.js b/static/web/_next/static/chunks/9096.5f00ce63bc222d7d.js deleted file mode 100644 index 329fb98d9..000000000 --- a/static/web/_next/static/chunks/9096.5f00ce63bc222d7d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9096],{59096:function(e,t,n){n.r(t),n.d(t,{NameChangeModal:function(){return m}});var a=n(85893),l=n(67294),r=n(4480),i=n(38939),o=n(71577),s=n(18119),u=n(69677),d=n(91951),h=n(77466);let{Option:c}=i.Z,p=e=>{let{color:t}=e;return(0,a.jsx)("div",{style:{textAlign:"center",backgroundColor:"var(--theme-color-users-".concat(t,")"),width:"100%",height:"100%"}})},m=()=>{let e=(0,r.sJ)(h.db),t=(0,r.sJ)(h.Gt),[n,m]=(0,l.useState)(null==e?void 0:e.displayName);if(!e)return null;let{displayName:C,displayColor:g}=e,x=()=>n!==C&&""!==n&&(null==t?void 0:t.isConnected()),y=()=>{if(!x())return;let e={type:d.C.NAME_CHANGE,newName:n};t.send(e)},v=e=>{let n={type:d.C.COLOR_CHANGE,newColor:Number(e)};t.send(n)},b=[...Array(8)].map((e,t)=>t),f=(0,a.jsx)(o.Z,{type:"primary",id:"name-change-submit",onClick:y,disabled:!x(),children:"Change name"});return(0,a.jsxs)("div",{children:["Your chat display name is what people see when you send chat messages.",(0,a.jsx)(s.Z,{onSubmitCapture:y,style:{paddingTop:"8px"},children:(0,a.jsx)(u.Z.Search,{enterButton:f,id:"name-change-field",value:n,onChange:e=>m(e.target.value),placeholder:"Your chat display name",maxLength:30,showCount:!0,defaultValue:C})}),(0,a.jsx)(s.Z.Item,{label:"Your Color",style:{paddingTop:"8px",zIndex:1e3,marginBottom:0},children:(0,a.jsx)(i.Z,{style:{width:120},onChange:v,defaultValue:g.toString(),children:b.map(e=>(0,a.jsx)(c,{title:e,children:(0,a.jsx)(p,{color:e})},e.toString()))})}),'You can also authenticate an IndieAuth or Fediverse account via the "Authenticate" menu.']})}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/9346.acf119a16ef5eb86.js b/static/web/_next/static/chunks/9346.acf119a16ef5eb86.js new file mode 100644 index 000000000..3dfc0b8f5 --- /dev/null +++ b/static/web/_next/static/chunks/9346.acf119a16ef5eb86.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9346],{99134:function(e,t,n){var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){var r=n(4942),a=n(87462),o=n(71002),c=n(94184),l=n.n(c),i=n(67294),s=n(53124),u=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n},p=["xs","sm","md","lg","xl","xxl"],d=i.forwardRef(function(e,t){var n,c=i.useContext(s.E_),d=c.getPrefixCls,h=c.direction,m=i.useContext(u.Z),v=m.gutter,y=m.wrap,g=m.supportFlexGap,Z=e.prefixCls,x=e.span,b=e.order,C=e.offset,j=e.push,w=e.pull,O=e.className,E=e.children,N=e.flex,A=e.style,S=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=d("col",Z),_={};p.forEach(function(t){var n,c={},l=e[t];"number"==typeof l?c.span=l:"object"===(0,o.Z)(l)&&(c=l||{}),delete S[t],_=(0,a.Z)((0,a.Z)({},_),(n={},(0,r.Z)(n,"".concat(P,"-").concat(t,"-").concat(c.span),void 0!==c.span),(0,r.Z)(n,"".concat(P,"-").concat(t,"-order-").concat(c.order),c.order||0===c.order),(0,r.Z)(n,"".concat(P,"-").concat(t,"-offset-").concat(c.offset),c.offset||0===c.offset),(0,r.Z)(n,"".concat(P,"-").concat(t,"-push-").concat(c.push),c.push||0===c.push),(0,r.Z)(n,"".concat(P,"-").concat(t,"-pull-").concat(c.pull),c.pull||0===c.pull),(0,r.Z)(n,"".concat(P,"-rtl"),"rtl"===h),n))});var k=l()(P,(n={},(0,r.Z)(n,"".concat(P,"-").concat(x),void 0!==x),(0,r.Z)(n,"".concat(P,"-order-").concat(b),b),(0,r.Z)(n,"".concat(P,"-offset-").concat(C),C),(0,r.Z)(n,"".concat(P,"-push-").concat(j),j),(0,r.Z)(n,"".concat(P,"-pull-").concat(w),w),n),O,_),G={};if(v&&v[0]>0){var R=v[0]/2;G.paddingLeft=R,G.paddingRight=R}if(v&&v[1]>0&&!g){var I=v[1]/2;G.paddingTop=I,G.paddingBottom=I}return N&&(G.flex="number"==typeof N?"".concat(N," ").concat(N," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(N)?"0 0 ".concat(N):N,!1!==y||G.minWidth||(G.minWidth=0)),i.createElement("div",(0,a.Z)({},S,{style:(0,a.Z)((0,a.Z)({},G),A),className:k,ref:t}),E)});t.Z=d},92820:function(e,t,n){var r=n(87462),a=n(4942),o=n(71002),c=n(97685),l=n(94184),i=n.n(l),s=n(67294),u=n(53124),f=n(98082),p=n(24308),d=n(93355),h=n(99134),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,r=Object.getOwnPropertySymbols(e);at.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function v(e,t){var n=s.useState("string"==typeof e?e:""),r=(0,c.Z)(n,2),a=r[0],l=r[1],i=function(){if("object"===(0,o.Z)(e))for(var n=0;n0?-(M[0]/2):void 0,z=null!=M[1]&&M[1]>0?-(M[1]/2):void 0;if(W&&(V.marginLeft=W,V.marginRight=W),Y){var $=(0,c.Z)(M,2);V.rowGap=$[1]}else z&&(V.marginTop=z,V.marginBottom=z);var q=(0,c.Z)(M,2),D=q[0],K=q[1],Q=s.useMemo(function(){return{gutter:[D,K],wrap:w,supportFlexGap:Y}},[D,K,w,Y]);return s.createElement(h.Z.Provider,{value:Q},s.createElement("div",(0,r.Z)({},O,{className:H,style:(0,r.Z)((0,r.Z)({},V),x),ref:t}),b))});t.Z=y},59096:function(e,t,n){n.r(t),n.d(t,{NameChangeModal:function(){return h}});var r=n(85893),a=n(67294),o=n(4480),c=n(38939),l=n(71577),i=n(18119),s=n(69677),u=n(91951),f=n(77466);let{Option:p}=c.Z,d=e=>{let{color:t}=e;return(0,r.jsx)("div",{style:{textAlign:"center",backgroundColor:"var(--theme-color-users-".concat(t,")"),width:"100%",height:"100%"}})},h=()=>{let e=(0,o.sJ)(f.db),t=(0,o.sJ)(f.Gt),[n,h]=(0,a.useState)(null==e?void 0:e.displayName);if(!e)return null;let{displayName:m,displayColor:v}=e,y=()=>n!==m&&""!==n&&(null==t?void 0:t.isConnected()),g=()=>{if(!y())return;let e={type:u.C.NAME_CHANGE,newName:n};t.send(e)},Z=e=>{let n={type:u.C.COLOR_CHANGE,newColor:Number(e)};t.send(n)},x=[...Array(8)].map((e,t)=>t),b=(0,r.jsx)(l.Z,{type:"primary",id:"name-change-submit",onClick:g,disabled:!y(),children:"Change name"});return(0,r.jsxs)("div",{children:["Your chat display name is what people see when you send chat messages.",(0,r.jsx)(i.Z,{onSubmitCapture:g,style:{paddingTop:"8px"},children:(0,r.jsx)(s.Z.Search,{enterButton:b,id:"name-change-field",value:n,onChange:e=>h(e.target.value),placeholder:"Your chat display name",maxLength:30,showCount:!0,defaultValue:m})}),(0,r.jsx)(i.Z.Item,{label:"Your Color",style:{paddingTop:"8px",zIndex:1e3,marginBottom:0},children:(0,r.jsx)(c.Z,{style:{width:120},onChange:Z,defaultValue:v.toString(),children:x.map(e=>(0,r.jsx)(p,{title:e,children:(0,r.jsx)(d,{color:e})},e.toString()))})}),'You can also authenticate an IndieAuth or Fediverse account via the "Authenticate" menu.']})}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/9550-db4a457e5e1bbbcf.js b/static/web/_next/static/chunks/9550-db4a457e5e1bbbcf.js deleted file mode 100644 index a5d320190..000000000 --- a/static/web/_next/static/chunks/9550-db4a457e5e1bbbcf.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9550],{82911:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(1413),o=n(67294),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 708c-22.1 0-40-17.9-40-40s17.9-40 40-40 40 17.9 40 40-17.9 40-40 40zm62.9-219.5a48.3 48.3 0 00-30.9 44.8V620c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-21.5c0-23.1 6.7-45.9 19.9-64.9 12.9-18.6 30.9-32.8 52.1-40.9 34-13.1 56-41.6 56-72.7 0-44.1-43.1-80-96-80s-96 35.9-96 80v7.6c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V420c0-39.3 17.2-76 48.4-103.3C430.4 290.4 470 276 512 276s81.6 14.5 111.6 40.7C654.8 344 672 380.7 672 420c0 57.8-38.1 109.8-97.1 132.5z"}}]},name:"question-circle",theme:"filled"},a=n(42135),i=function(t,e){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},t),{},{ref:e,icon:c}))};i.displayName="QuestionCircleFilled";var l=o.forwardRef(i)},24478:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(1413),o=n(67294),c={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6z",fill:t}},{tag:"path",attrs:{d:"M214 226.7v427.6l298 232.2 298-232.2V226.7L512 125.1 214 226.7zM632.8 328H688c6.5 0 10.3 7.4 6.5 12.7L481.9 633.4a16.1 16.1 0 01-26 0l-126.4-174c-3.8-5.3 0-12.7 6.5-12.7h55.2c5.2 0 10 2.5 13 6.6l64.7 89.1 150.9-207.8c3-4.1 7.9-6.6 13-6.6z",fill:e}},{tag:"path",attrs:{d:"M404.2 453.3c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z",fill:t}}]}},name:"safety-certificate",theme:"twotone"},a=n(42135),i=function(t,e){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},t),{},{ref:e,icon:c}))};i.displayName="SafetyCertificateTwoTone";var l=o.forwardRef(i)},84674:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(1413),o=n(67294),c={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm288.5 682.8L277.7 224C258 240 240 258 224 277.7l522.8 522.8C682.8 852.7 601 884 512 884c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372c0 89-31.3 170.8-83.5 234.8z",fill:t}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372c89 0 170.8-31.3 234.8-83.5L224 277.7c16-19.7 34-37.7 53.7-53.7l522.8 522.8C852.7 682.8 884 601 884 512c0-205.4-166.6-372-372-372z",fill:e}}]}},name:"stop",theme:"twotone"},a=n(42135),i=function(t,e){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},t),{},{ref:e,icon:c}))};i.displayName="StopTwoTone";var l=o.forwardRef(i)},15746:function(t,e,n){"use strict";var r=n(21584);e.Z=r.Z},27049:function(t,e,n){"use strict";var r=n(87462),o=n(4942),c=n(94184),a=n.n(c),i=n(67294),l=n(53124),s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);oe.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};e.Z=function(t){var e,n=i.useContext(l.E_),c=n.getPrefixCls,f=n.direction,u=t.prefixCls,p=t.type,d=void 0===p?"horizontal":p,v=t.orientation,m=void 0===v?"center":v,Z=t.orientationMargin,h=t.className,y=t.children,g=t.dashed,x=t.plain,b=s(t,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),w=c("divider",u),O=m.length>0?"-".concat(m):m,C=!!y,E="left"===m&&null!=Z,j="right"===m&&null!=Z,N=a()(w,"".concat(w,"-").concat(d),(e={},(0,o.Z)(e,"".concat(w,"-with-text"),C),(0,o.Z)(e,"".concat(w,"-with-text").concat(O),C),(0,o.Z)(e,"".concat(w,"-dashed"),!!g),(0,o.Z)(e,"".concat(w,"-plain"),!!x),(0,o.Z)(e,"".concat(w,"-rtl"),"rtl"===f),(0,o.Z)(e,"".concat(w,"-no-default-orientation-margin-left"),E),(0,o.Z)(e,"".concat(w,"-no-default-orientation-margin-right"),j),e),h),P=(0,r.Z)((0,r.Z)({},E&&{marginLeft:Z}),j&&{marginRight:Z});return i.createElement("div",(0,r.Z)({className:N},b,{role:"separator"}),y&&"vertical"!==d&&i.createElement("span",{className:"".concat(w,"-inner-text"),style:P},y))}},99134:function(t,e,n){"use strict";var r=(0,n(67294).createContext)({});e.Z=r},21584:function(t,e,n){"use strict";var r=n(4942),o=n(87462),c=n(71002),a=n(94184),i=n.n(a),l=n(67294),s=n(53124),f=n(99134),u=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);oe.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n},p=["xs","sm","md","lg","xl","xxl"],d=l.forwardRef(function(t,e){var n,a=l.useContext(s.E_),d=a.getPrefixCls,v=a.direction,m=l.useContext(f.Z),Z=m.gutter,h=m.wrap,y=m.supportFlexGap,g=t.prefixCls,x=t.span,b=t.order,w=t.offset,O=t.push,C=t.pull,E=t.className,j=t.children,N=t.flex,P=t.style,S=u(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),M=d("col",g),T={};p.forEach(function(e){var n,a={},i=t[e];"number"==typeof i?a.span=i:"object"===(0,c.Z)(i)&&(a=i||{}),delete S[e],T=(0,o.Z)((0,o.Z)({},T),(n={},(0,r.Z)(n,"".concat(M,"-").concat(e,"-").concat(a.span),void 0!==a.span),(0,r.Z)(n,"".concat(M,"-").concat(e,"-order-").concat(a.order),a.order||0===a.order),(0,r.Z)(n,"".concat(M,"-").concat(e,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,r.Z)(n,"".concat(M,"-").concat(e,"-push-").concat(a.push),a.push||0===a.push),(0,r.Z)(n,"".concat(M,"-").concat(e,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,r.Z)(n,"".concat(M,"-rtl"),"rtl"===v),n))});var z=i()(M,(n={},(0,r.Z)(n,"".concat(M,"-").concat(x),void 0!==x),(0,r.Z)(n,"".concat(M,"-order-").concat(b),b),(0,r.Z)(n,"".concat(M,"-offset-").concat(w),w),(0,r.Z)(n,"".concat(M,"-push-").concat(O),O),(0,r.Z)(n,"".concat(M,"-pull-").concat(C),C),n),E,T),L={};if(Z&&Z[0]>0){var R=Z[0]/2;L.paddingLeft=R,L.paddingRight=R}if(Z&&Z[1]>0&&!y){var A=Z[1]/2;L.paddingTop=A,L.paddingBottom=A}return N&&(L.flex="number"==typeof N?"".concat(N," ").concat(N," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(N)?"0 0 ".concat(N):N,!1!==h||L.minWidth||(L.minWidth=0)),l.createElement("div",(0,o.Z)({},S,{style:(0,o.Z)((0,o.Z)({},L),P),className:z,ref:e}),j)});e.Z=d},92820:function(t,e,n){"use strict";var r=n(87462),o=n(4942),c=n(71002),a=n(97685),i=n(94184),l=n.n(i),s=n(67294),f=n(53124),u=n(98082),p=n(24308),d=n(93355),v=n(99134),m=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(t);oe.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};function Z(t,e){var n=s.useState("string"==typeof t?t:""),r=(0,a.Z)(n,2),o=r[0],i=r[1],l=function(){if("object"===(0,c.Z)(t))for(var n=0;n0?-($[0]/2):void 0,q=null!=$[1]&&$[1]>0?-($[1]/2):void 0;if(H&&(G.marginLeft=H,G.marginRight=H),V){var D=(0,a.Z)($,2);G.rowGap=D[1]}else q&&(G.marginTop=q,G.marginBottom=q);var J=(0,a.Z)($,2),Q=J[0],K=J[1],U=s.useMemo(function(){return{gutter:[Q,K],wrap:C,supportFlexGap:V}},[Q,K,C,V]);return s.createElement(v.Z.Provider,{value:U},s.createElement("div",(0,r.Z)({},E,{className:F,style:(0,r.Z)((0,r.Z)({},G),x),ref:e}),b))});e.Z=h},71230:function(t,e,n){"use strict";var r=n(92820);e.Z=r.Z},27561:function(t,e,n){var r=n(67990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},67990:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},23279:function(t,e,n){var r=n(13218),o=n(7771),c=n(14841),a=Math.max,i=Math.min;t.exports=function(t,e,n){var l,s,f,u,p,d,v=0,m=!1,Z=!1,h=!0;if("function"!=typeof t)throw TypeError("Expected a function");function y(e){var n=l,r=s;return l=s=void 0,v=e,u=t.apply(r,n)}function g(t){var n=t-d,r=t-v;return void 0===d||n>=e||n<0||Z&&r>=f}function x(){var t,n,r,c=o();if(g(c))return b(c);p=setTimeout(x,(t=c-d,n=c-v,r=e-t,Z?i(r,f-n):r))}function b(t){return(p=void 0,h&&l)?y(t):(l=s=void 0,u)}function w(){var t,n=o(),r=g(n);if(l=arguments,s=this,d=n,r){if(void 0===p)return v=t=d,p=setTimeout(x,e),m?y(t):u;if(Z)return clearTimeout(p),p=setTimeout(x,e),y(d)}return void 0===p&&(p=setTimeout(x,e)),u}return e=c(e)||0,r(n)&&(m=!!n.leading,f=(Z="maxWait"in n)?a(c(n.maxWait)||0,e):f,h="trailing"in n?!!n.trailing:h),w.cancel=function(){void 0!==p&&clearTimeout(p),v=0,l=d=s=p=void 0},w.flush=function(){return void 0===p?u:b(o())},w}},33448:function(t,e,n){var r=n(44239),o=n(37005);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},7771:function(t,e,n){var r=n(55639);t.exports=function(){return r.Date.now()}},14841:function(t,e,n){var r=n(27561),o=n(13218),c=n(33448),a=0/0,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(c(t))return a;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=l.test(t);return n||s.test(t)?f(t.slice(2),n?2:8):i.test(t)?a:+t}}}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/access-tokens-72a12806e6f14707.js b/static/web/_next/static/chunks/pages/admin/access-tokens-72a12806e6f14707.js new file mode 100644 index 000000000..e27a13708 --- /dev/null +++ b/static/web/_next/static/chunks/pages/admin/access-tokens-72a12806e6f14707.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9882,8733],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1413),o=n(67294),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(42135),s=function(e,t){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:c}))};s.displayName="DeleteOutlined";var i=o.forwardRef(s)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),o=n(87462),c=n(71002),a=n(94184),s=n.n(a),i=n(67294),l=n(53124),u=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},d=["xs","sm","md","lg","xl","xxl"],p=i.forwardRef(function(e,t){var n,a=i.useContext(l.E_),p=a.getPrefixCls,h=a.direction,v=i.useContext(u.Z),m=v.gutter,y=v.wrap,x=v.supportFlexGap,Z=e.prefixCls,b=e.span,g=e.order,j=e.offset,w=e.push,O=e.pull,k=e.className,C=e.children,E=e.flex,S=e.style,N=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=p("col",Z),T={};d.forEach(function(t){var n,a={},s=e[t];"number"==typeof s?a.span=s:"object"===(0,c.Z)(s)&&(a=s||{}),delete N[t],T=(0,o.Z)((0,o.Z)({},T),(n={},(0,r.Z)(n,"".concat(P,"-").concat(t,"-").concat(a.span),void 0!==a.span),(0,r.Z)(n,"".concat(P,"-").concat(t,"-order-").concat(a.order),a.order||0===a.order),(0,r.Z)(n,"".concat(P,"-").concat(t,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,r.Z)(n,"".concat(P,"-").concat(t,"-push-").concat(a.push),a.push||0===a.push),(0,r.Z)(n,"".concat(P,"-").concat(t,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,r.Z)(n,"".concat(P,"-rtl"),"rtl"===h),n))});var _=s()(P,(n={},(0,r.Z)(n,"".concat(P,"-").concat(b),void 0!==b),(0,r.Z)(n,"".concat(P,"-order-").concat(g),g),(0,r.Z)(n,"".concat(P,"-offset-").concat(j),j),(0,r.Z)(n,"".concat(P,"-push-").concat(w),w),(0,r.Z)(n,"".concat(P,"-pull-").concat(O),O),n),k,T),A={};if(m&&m[0]>0){var I=m[0]/2;A.paddingLeft=I,A.paddingRight=I}if(m&&m[1]>0&&!x){var R=m[1]/2;A.paddingTop=R,A.paddingBottom=R}return E&&(A.flex="number"==typeof E?"".concat(E," ").concat(E," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(E)?"0 0 ".concat(E):E,!1!==y||A.minWidth||(A.minWidth=0)),i.createElement("div",(0,o.Z)({},N,{style:(0,o.Z)((0,o.Z)({},A),S),className:_,ref:t}),C)});t.Z=p},92820:function(e,t,n){"use strict";var r=n(87462),o=n(4942),c=n(71002),a=n(97685),s=n(94184),i=n.n(s),l=n(67294),u=n(53124),f=n(98082),d=n(24308),p=n(93355),h=n(99134),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function m(e,t){var n=l.useState("string"==typeof e?e:""),r=(0,a.Z)(n,2),o=r[0],s=r[1],i=function(){if("object"===(0,c.Z)(e))for(var n=0;n0?-(W[0]/2):void 0,L=null!=W[1]&&W[1]>0?-(W[1]/2):void 0;if(U&&(F.marginLeft=U,F.marginRight=U),H){var Q=(0,a.Z)(W,2);F.rowGap=Q[1]}else L&&(F.marginTop=L,F.marginBottom=L);var X=(0,a.Z)(W,2),Y=X[0],J=X[1],K=l.useMemo(function(){return{gutter:[Y,J],wrap:O,supportFlexGap:H}},[Y,J,O,H]);return l.createElement(h.Z.Provider,{value:K},l.createElement("div",(0,r.Z)({},k,{className:B,style:(0,r.Z)((0,r.Z)({},F),b),ref:t}),g))});t.Z=y},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},20550:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(4942),o=n(87462),c=n(97685),a=n(97937),s=n(94184),i=n.n(s),l=n(98423),u=n(67294),f=n(53124),d=n(98787),p=n(68349),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},m=RegExp("^(".concat(d.Y.join("|"),")(-inverse)?$")),y=RegExp("^(".concat(d.E.join("|"),")$")),x=u.forwardRef(function(e,t){var n,s=e.prefixCls,d=e.className,h=e.style,x=e.children,Z=e.icon,b=e.color,g=e.onClose,j=e.closeIcon,w=e.closable,O=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),k=u.useContext(f.E_),C=k.getPrefixCls,E=k.direction,S=u.useState(!0),N=(0,c.Z)(S,2),P=N[0],T=N[1];u.useEffect(function(){"visible"in O&&T(O.visible)},[O.visible]);var _=function(){return!!b&&(m.test(b)||y.test(b))},A=(0,o.Z)({backgroundColor:b&&!_()?b:void 0},h),I=_(),R=C("tag",s),M=i()(R,(n={},(0,r.Z)(n,"".concat(R,"-").concat(b),I),(0,r.Z)(n,"".concat(R,"-has-color"),b&&!I),(0,r.Z)(n,"".concat(R,"-hidden"),!P),(0,r.Z)(n,"".concat(R,"-rtl"),"rtl"===E),n),d),D=function(e){e.stopPropagation(),null==g||g(e),!e.defaultPrevented&&("visible"in O||T(!1))},G="onClick"in O||x&&"a"===x.type,H=(0,l.Z)(O,["visible"]),$=Z||null,z=$?u.createElement(u.Fragment,null,$,u.createElement("span",null,x)):x,W=u.createElement("span",(0,o.Z)({},H,{ref:t,className:M,style:A}),z,void 0!==w&&w?j?u.createElement("span",{className:"".concat(R,"-close-icon"),onClick:D},j):u.createElement(a.Z,{className:"".concat(R,"-close-icon"),onClick:D}):null);return G?u.createElement(p.Z,null,W):W});x.CheckableTag=function(e){var t,n=e.prefixCls,c=e.className,a=e.checked,s=e.onChange,l=e.onClick,d=h(e,["prefixCls","className","checked","onChange","onClick"]),p=(0,u.useContext(f.E_).getPrefixCls)("tag",n),v=i()(p,(t={},(0,r.Z)(t,"".concat(p,"-checkable"),!0),(0,r.Z)(t,"".concat(p,"-checkable-checked"),a),t),c);return u.createElement("span",(0,o.Z)({},d,{className:v,onClick:function(e){null==s||s(!a),null==l||l(e)}}))};var Z=x},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),c=n(14841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var i,l,u,f,d,p,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var n=i,r=l;return i=l=void 0,h=t,f=e.apply(r,n)}function Z(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||m&&r>=u}function b(){var e,n,r,c=o();if(Z(c))return g(c);d=setTimeout(b,(e=c-p,n=c-h,r=t-e,m?s(r,u-n):r))}function g(e){return(d=void 0,y&&i)?x(e):(i=l=void 0,f)}function j(){var e,n=o(),r=Z(n);if(i=arguments,l=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(b,t),v?x(e):f;if(m)return clearTimeout(d),d=setTimeout(b,t),x(p)}return void 0===d&&(d=setTimeout(b,t)),f}return t=c(t)||0,r(n)&&(v=!!n.leading,u=(m="maxWait"in n)?a(c(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),j.cancel=function(){void 0!==d&&clearTimeout(d),h=0,i=p=l=d=void 0},j.flush=function(){return void 0===d?f:g(o())},j}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),c=n(33448),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(c(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=i.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):s.test(e)?a:+e}},26562:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/access-tokens",function(){return n(23341)}])},23341:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(67294),c=n(84485),a=n(94199),s=n(20550),i=n(15746),l=n(32808),u=n(85402),f=n(69677),d=n(71230),p=n(71577),h=n(26713),v=n(52206),m=n(48689),y=n(58091),x=n(64777);let{Title:Z,Paragraph:b}=c.Z,g={CAN_SEND_SYSTEM_MESSAGES:{name:"System messages",description:"Can send official messages on behalf of the system.",color:"purple"},CAN_SEND_MESSAGES:{name:"User chat messages",description:"Can send chat messages on behalf of the owner of this token.",color:"green"},HAS_ADMIN_ACCESS:{name:"Has admin access",description:"Can perform administrative actions such as moderation, get server statuses, etc.",color:"red"}},j=e=>{let{onOk:t,onCancel:n,open:c}=e,[a,s]=(0,o.useState)([]),[h,v]=(0,o.useState)(""),m=Object.keys(g).map(e=>({value:e,label:g[e].description})),y={disabled:0===a.length||""===h},x=m.map(e=>(0,r.jsx)(i.Z,{span:8,children:(0,r.jsx)(l.Z,{value:e.value,children:e.label})},e.value));return(0,r.jsxs)(u.Z,{title:"Create New Access token",open:c,onOk:function(){t(h,a),s([]),v("")},onCancel:n,okButtonProps:y,children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("p",{children:"The name will be displayed as the chat user when sending messages with this access token."}),(0,r.jsx)(f.Z,{value:h,placeholder:"Name of bot, service, or integration",onChange:e=>v(e.currentTarget.value)})]}),(0,r.jsx)("p",{children:"Select the permissions this access token will have. It cannot be edited after it's created."}),(0,r.jsx)(l.Z.Group,{style:{width:"100%"},value:a,onChange:function(e){s(e)},children:(0,r.jsx)(d.Z,{children:x})}),(0,r.jsx)("p",{children:(0,r.jsx)(p.Z,{type:"primary",onClick:function(){s(Object.keys(g))},children:"Select all"})})]})},w=()=>{let[e,t]=(0,o.useState)([]),[n,c]=(0,o.useState)(!1);function i(e){console.error("error",e)}async function l(){try{let e=await (0,x.rQ)(x.ms);t(e)}catch(n){i(n)}}async function u(e){try{await (0,x.rQ)(x.Wr,{method:"POST",data:{token:e}}),l()}catch(t){i(t)}}async function d(n,r){try{let o=await (0,x.rQ)(x.IO,{method:"POST",data:{name:n,scopes:r}});t(e.concat(o))}catch(c){i(c)}}(0,o.useEffect)(()=>{l()},[]);let w=()=>{c(!0)},O=(e,t)=>{c(!1),d(e,t)},k=()=>{c(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(Z,{children:"Access Tokens"}),(0,r.jsx)(b,{children:"Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control."}),(0,r.jsxs)(b,{children:["Read more about how to use these tokens, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/integrations/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(v.Z,{rowKey:"token",columns:[{title:"",key:"delete",render:(e,t)=>(0,r.jsx)(h.Z,{size:"middle",children:(0,r.jsx)(p.Z,{onClick:()=>u(t.accessToken),icon:(0,r.jsx)(m.Z,{})})})},{title:"Name",dataIndex:"displayName",key:"displayName"},{title:"Token",dataIndex:"accessToken",key:"accessToken",render:e=>(0,r.jsx)(f.Z.Password,{size:"small",bordered:!1,value:e})},{title:"Scopes",dataIndex:"scopes",key:"scopes",render:e=>(0,r.jsx)(r.Fragment,{children:e.map(e=>(function(e){if(!e||!g[e])return null;let t=g[e];return(0,r.jsx)(a.Z,{title:t.description,children:(0,r.jsx)(s.Z,{color:t.color,children:t.name})},e)})(e))})},{title:"Last Used",dataIndex:"lastUsed",key:"lastUsed",render(e){if(!e)return"Never";let t=new Date(e);return(0,y.Z)(t,"P p")}}],dataSource:e,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(p.Z,{type:"primary",onClick:w,children:"Create Access Token"}),(0,r.jsx)(j,{open:n,onOk:O,onCancel:k})]})};t.default=w}},function(e){e.O(0,[8909,3903,4267,2206,8091,9774,2888,179],function(){return e(e.s=26562)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js b/static/web/_next/static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js deleted file mode 100644 index ccd650294..000000000 --- a/static/web/_next/static/chunks/pages/admin/access-tokens-91177ddb58bd90ee.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9882],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1413),o=n(67294),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(42135),s=function(e,t){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:c}))};s.displayName="DeleteOutlined";var i=o.forwardRef(s)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),o=n(87462),c=n(71002),a=n(94184),s=n.n(a),i=n(67294),l=n(53124),u=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},d=["xs","sm","md","lg","xl","xxl"],p=i.forwardRef(function(e,t){var n,a=i.useContext(l.E_),p=a.getPrefixCls,h=a.direction,v=i.useContext(u.Z),m=v.gutter,y=v.wrap,x=v.supportFlexGap,Z=e.prefixCls,b=e.span,g=e.order,j=e.offset,w=e.push,O=e.pull,k=e.className,C=e.children,E=e.flex,S=e.style,N=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),P=p("col",Z),T={};d.forEach(function(t){var n,a={},s=e[t];"number"==typeof s?a.span=s:"object"===(0,c.Z)(s)&&(a=s||{}),delete N[t],T=(0,o.Z)((0,o.Z)({},T),(n={},(0,r.Z)(n,"".concat(P,"-").concat(t,"-").concat(a.span),void 0!==a.span),(0,r.Z)(n,"".concat(P,"-").concat(t,"-order-").concat(a.order),a.order||0===a.order),(0,r.Z)(n,"".concat(P,"-").concat(t,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,r.Z)(n,"".concat(P,"-").concat(t,"-push-").concat(a.push),a.push||0===a.push),(0,r.Z)(n,"".concat(P,"-").concat(t,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,r.Z)(n,"".concat(P,"-rtl"),"rtl"===h),n))});var _=s()(P,(n={},(0,r.Z)(n,"".concat(P,"-").concat(b),void 0!==b),(0,r.Z)(n,"".concat(P,"-order-").concat(g),g),(0,r.Z)(n,"".concat(P,"-offset-").concat(j),j),(0,r.Z)(n,"".concat(P,"-push-").concat(w),w),(0,r.Z)(n,"".concat(P,"-pull-").concat(O),O),n),k,T),A={};if(m&&m[0]>0){var I=m[0]/2;A.paddingLeft=I,A.paddingRight=I}if(m&&m[1]>0&&!x){var R=m[1]/2;A.paddingTop=R,A.paddingBottom=R}return E&&(A.flex="number"==typeof E?"".concat(E," ").concat(E," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(E)?"0 0 ".concat(E):E,!1!==y||A.minWidth||(A.minWidth=0)),i.createElement("div",(0,o.Z)({},N,{style:(0,o.Z)((0,o.Z)({},A),S),className:_,ref:t}),C)});t.Z=p},92820:function(e,t,n){"use strict";var r=n(87462),o=n(4942),c=n(71002),a=n(97685),s=n(94184),i=n.n(s),l=n(67294),u=n(53124),f=n(98082),d=n(24308),p=n(93355),h=n(99134),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function m(e,t){var n=l.useState("string"==typeof e?e:""),r=(0,a.Z)(n,2),o=r[0],s=r[1],i=function(){if("object"===(0,c.Z)(e))for(var n=0;n0?-(W[0]/2):void 0,L=null!=W[1]&&W[1]>0?-(W[1]/2):void 0;if(U&&(F.marginLeft=U,F.marginRight=U),H){var Q=(0,a.Z)(W,2);F.rowGap=Q[1]}else L&&(F.marginTop=L,F.marginBottom=L);var X=(0,a.Z)(W,2),Y=X[0],J=X[1],K=l.useMemo(function(){return{gutter:[Y,J],wrap:O,supportFlexGap:H}},[Y,J,O,H]);return l.createElement(h.Z.Provider,{value:K},l.createElement("div",(0,r.Z)({},k,{className:B,style:(0,r.Z)((0,r.Z)({},F),b),ref:t}),g))});t.Z=y},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},20550:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(4942),o=n(87462),c=n(97685),a=n(97937),s=n(94184),i=n.n(s),l=n(98423),u=n(67294),f=n(53124),d=n(98787),p=n(68349),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},m=RegExp("^(".concat(d.Y.join("|"),")(-inverse)?$")),y=RegExp("^(".concat(d.E.join("|"),")$")),x=u.forwardRef(function(e,t){var n,s=e.prefixCls,d=e.className,h=e.style,x=e.children,Z=e.icon,b=e.color,g=e.onClose,j=e.closeIcon,w=e.closable,O=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),k=u.useContext(f.E_),C=k.getPrefixCls,E=k.direction,S=u.useState(!0),N=(0,c.Z)(S,2),P=N[0],T=N[1];u.useEffect(function(){"visible"in O&&T(O.visible)},[O.visible]);var _=function(){return!!b&&(m.test(b)||y.test(b))},A=(0,o.Z)({backgroundColor:b&&!_()?b:void 0},h),I=_(),R=C("tag",s),M=i()(R,(n={},(0,r.Z)(n,"".concat(R,"-").concat(b),I),(0,r.Z)(n,"".concat(R,"-has-color"),b&&!I),(0,r.Z)(n,"".concat(R,"-hidden"),!P),(0,r.Z)(n,"".concat(R,"-rtl"),"rtl"===E),n),d),D=function(e){e.stopPropagation(),null==g||g(e),!e.defaultPrevented&&("visible"in O||T(!1))},G="onClick"in O||x&&"a"===x.type,H=(0,l.Z)(O,["visible"]),$=Z||null,z=$?u.createElement(u.Fragment,null,$,u.createElement("span",null,x)):x,W=u.createElement("span",(0,o.Z)({},H,{ref:t,className:M,style:A}),z,void 0!==w&&w?j?u.createElement("span",{className:"".concat(R,"-close-icon"),onClick:D},j):u.createElement(a.Z,{className:"".concat(R,"-close-icon"),onClick:D}):null);return G?u.createElement(p.Z,null,W):W});x.CheckableTag=function(e){var t,n=e.prefixCls,c=e.className,a=e.checked,s=e.onChange,l=e.onClick,d=h(e,["prefixCls","className","checked","onChange","onClick"]),p=(0,u.useContext(f.E_).getPrefixCls)("tag",n),v=i()(p,(t={},(0,r.Z)(t,"".concat(p,"-checkable"),!0),(0,r.Z)(t,"".concat(p,"-checkable-checked"),a),t),c);return u.createElement("span",(0,o.Z)({},d,{className:v,onClick:function(e){null==s||s(!a),null==l||l(e)}}))};var Z=x},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),c=n(14841),a=Math.max,s=Math.min;e.exports=function(e,t,n){var i,l,u,f,d,p,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function x(t){var n=i,r=l;return i=l=void 0,h=t,f=e.apply(r,n)}function Z(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||m&&r>=u}function b(){var e,n,r,c=o();if(Z(c))return g(c);d=setTimeout(b,(e=c-p,n=c-h,r=t-e,m?s(r,u-n):r))}function g(e){return(d=void 0,y&&i)?x(e):(i=l=void 0,f)}function j(){var e,n=o(),r=Z(n);if(i=arguments,l=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(b,t),v?x(e):f;if(m)return clearTimeout(d),d=setTimeout(b,t),x(p)}return void 0===d&&(d=setTimeout(b,t)),f}return t=c(t)||0,r(n)&&(v=!!n.leading,u=(m="maxWait"in n)?a(c(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),j.cancel=function(){void 0!==d&&clearTimeout(d),h=0,i=p=l=d=void 0},j.flush=function(){return void 0===d?f:g(o())},j}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),c=n(33448),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(c(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=i.test(e);return n||l.test(e)?u(e.slice(2),n?2:8):s.test(e)?a:+e}},26562:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/access-tokens",function(){return n(23341)}])},23341:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(67294),c=n(84485),a=n(94199),s=n(20550),i=n(15746),l=n(32808),u=n(85402),f=n(69677),d=n(71230),p=n(71577),h=n(26713),v=n(52206),m=n(48689),y=n(58091),x=n(64777);let{Title:Z,Paragraph:b}=c.Z,g={CAN_SEND_SYSTEM_MESSAGES:{name:"System messages",description:"Can send official messages on behalf of the system.",color:"purple"},CAN_SEND_MESSAGES:{name:"User chat messages",description:"Can send chat messages on behalf of the owner of this token.",color:"green"},HAS_ADMIN_ACCESS:{name:"Has admin access",description:"Can perform administrative actions such as moderation, get server statuses, etc.",color:"red"}},j=e=>{let{onOk:t,onCancel:n,open:c}=e,[a,s]=(0,o.useState)([]),[h,v]=(0,o.useState)(""),m=Object.keys(g).map(e=>({value:e,label:g[e].description})),y={disabled:0===a.length||""===h},x=m.map(e=>(0,r.jsx)(i.Z,{span:8,children:(0,r.jsx)(l.Z,{value:e.value,children:e.label})},e.value));return(0,r.jsxs)(u.Z,{title:"Create New Access token",open:c,onOk:function(){t(h,a),s([]),v("")},onCancel:n,okButtonProps:y,children:[(0,r.jsxs)("p",{children:[(0,r.jsx)("p",{children:"The name will be displayed as the chat user when sending messages with this access token."}),(0,r.jsx)(f.Z,{value:h,placeholder:"Name of bot, service, or integration",onChange:e=>v(e.currentTarget.value)})]}),(0,r.jsx)("p",{children:"Select the permissions this access token will have. It cannot be edited after it's created."}),(0,r.jsx)(l.Z.Group,{style:{width:"100%"},value:a,onChange:function(e){s(e)},children:(0,r.jsx)(d.Z,{children:x})}),(0,r.jsx)("p",{children:(0,r.jsx)(p.Z,{type:"primary",onClick:function(){s(Object.keys(g))},children:"Select all"})})]})},w=()=>{let[e,t]=(0,o.useState)([]),[n,c]=(0,o.useState)(!1);function i(e){console.error("error",e)}async function l(){try{let e=await (0,x.rQ)(x.ms);t(e)}catch(n){i(n)}}async function u(e){try{await (0,x.rQ)(x.Wr,{method:"POST",data:{token:e}}),l()}catch(t){i(t)}}async function d(n,r){try{let o=await (0,x.rQ)(x.IO,{method:"POST",data:{name:n,scopes:r}});t(e.concat(o))}catch(c){i(c)}}(0,o.useEffect)(()=>{l()},[]);let w=()=>{c(!0)},O=(e,t)=>{c(!1),d(e,t)},k=()=>{c(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(Z,{children:"Access Tokens"}),(0,r.jsx)(b,{children:"Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control."}),(0,r.jsxs)(b,{children:["Read more about how to use these tokens, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/integrations/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(v.Z,{rowKey:"token",columns:[{title:"",key:"delete",render:(e,t)=>(0,r.jsx)(h.Z,{size:"middle",children:(0,r.jsx)(p.Z,{onClick:()=>u(t.accessToken),icon:(0,r.jsx)(m.Z,{})})})},{title:"Name",dataIndex:"displayName",key:"displayName"},{title:"Token",dataIndex:"accessToken",key:"accessToken",render:e=>(0,r.jsx)(f.Z.Password,{size:"small",bordered:!1,value:e})},{title:"Scopes",dataIndex:"scopes",key:"scopes",render:e=>(0,r.jsx)(r.Fragment,{children:e.map(e=>(function(e){if(!e||!g[e])return null;let t=g[e];return(0,r.jsx)(a.Z,{title:t.description,children:(0,r.jsx)(s.Z,{color:t.color,children:t.name})},e)})(e))})},{title:"Last Used",dataIndex:"lastUsed",key:"lastUsed",render(e){if(!e)return"Never";let t=new Date(e);return(0,y.Z)(t,"P p")}}],dataSource:e,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(p.Z,{type:"primary",onClick:w,children:"Create Access Token"}),(0,r.jsx)(j,{open:n,onOk:O,onCancel:k})]})};t.default=w}},function(e){e.O(0,[8909,3903,4267,2206,8091,9774,2888,179],function(){return e(e.s=26562)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/actions-9eeca8440633457f.js b/static/web/_next/static/chunks/pages/admin/actions-9eeca8440633457f.js deleted file mode 100644 index 7442cad79..000000000 --- a/static/web/_next/static/chunks/pages/admin/actions-9eeca8440633457f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5685],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),o=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},i=n(42135),c=function(e,t){return o.createElement(i.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:a}))};c.displayName="DeleteOutlined";var l=o.forwardRef(c)},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),a=n(14841),i=Math.max,c=Math.min;e.exports=function(e,t,n){var l,u,s,d,h,p,f=0,x=!1,v=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function m(t){var n=l,r=u;return l=u=void 0,f=t,d=e.apply(r,n)}function g(e){var n=e-p,r=e-f;return void 0===p||n>=t||n<0||v&&r>=s}function j(){var e,n,r,a=o();if(g(a))return w(a);h=setTimeout(j,(e=a-p,n=a-f,r=t-e,v?c(r,s-n):r))}function w(e){return(h=void 0,y&&l)?m(e):(l=u=void 0,d)}function k(){var e,n=o(),r=g(n);if(l=arguments,u=this,p=n,r){if(void 0===h)return f=e=p,h=setTimeout(j,t),x?m(e):d;if(v)return clearTimeout(h),h=setTimeout(j,t),m(p)}return void 0===h&&(h=setTimeout(j,t)),d}return t=a(t)||0,r(n)&&(x=!!n.leading,s=(v="maxWait"in n)?i(a(n.maxWait)||0,t):s,y="trailing"in n?!!n.trailing:y),k.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=u=h=void 0},k.flush=function(){return void 0===h?d:w(o())},k}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),a=n(33448),i=0/0,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return i;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||u.test(e)?s(e.slice(2),n?2:8):c.test(e)?i:+e}},54005:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/actions",function(){return n(2075)}])},2075:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(48689),a=n(84485),i=n(85402),c=n(69677),l=n(32808),u=n(26713),s=n(71577),d=n(52206),h=n(67294),p=n(39664),f=n(90745),x=n(41983),v=n(99519),y=n(37174);let{Title:m,Paragraph:g}=a.Z,j=e=>{let{onOk:t,onCancel:n,open:o}=e,[a,u]=(0,h.useState)(""),[s,d]=(0,h.useState)(""),[p,f]=(0,h.useState)(""),[x,v]=(0,h.useState)(""),[m,g]=(0,h.useState)(""),[j,w]=(0,h.useState)(!1),k={disabled:!function(){try{let e=new URL(a);if("https:"!==e.protocol)return!1}catch(t){return!1}return(0,y.Z)(a)&&""!==s}()},b=e=>{w(e.target.checked)};return(0,r.jsx)(i.Z,{title:"Create New Action",open:o,onOk:function(){t(a,s,p,x,m,j),u(""),d(""),f(""),v(""),g(""),w(!1)},onCancel:n,okButtonProps:k,children:(0,r.jsxs)("div",{children:["Add the URL for the external action you want to present."," ",(0,r.jsx)("strong",{children:"Only HTTPS urls are supported."}),(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:"https://owncast.online/thirdparty/actions/",target:"_blank",rel:"noopener noreferrer",children:"Read more about external actions."})}),(0,r.jsx)("p",{children:(0,r.jsx)(c.Z,{value:a,required:!0,placeholder:"https://myserver.com/action (required)",onChange:e=>u(e.currentTarget.value.trim()),type:"url",pattern:y.a})}),(0,r.jsx)("p",{children:(0,r.jsx)(c.Z,{value:s,required:!0,placeholder:"Your action title (required)",onChange:e=>d(e.currentTarget.value)})}),(0,r.jsx)("p",{children:(0,r.jsx)(c.Z,{value:p,placeholder:"Optional description",onChange:e=>f(e.currentTarget.value)})}),(0,r.jsx)("p",{children:(0,r.jsx)(c.Z,{value:x,placeholder:"https://myserver.com/action/icon.png (optional)",onChange:e=>v(e.currentTarget.value)})}),(0,r.jsxs)("p",{children:[(0,r.jsx)(c.Z,{type:"color",value:m,onChange:e=>g(e.currentTarget.value)}),"Optional background color of the action button."]}),(0,r.jsx)(l.Z,{checked:j,defaultChecked:j,onChange:b,children:"Open in a new tab instead of within your page."})]})})},w=()=>{let e=(0,h.useContext)(v.aC),{serverConfig:t,setFieldInConfigState:n}=e||{},{externalActions:a}=t,[i,c]=(0,h.useState)([]),[l,y]=(0,h.useState)(!1),[w,k]=(0,h.useState)(null),b=()=>{k(null),clearTimeout(null)};async function C(e){await (0,f.Si)({apiPath:f.os,data:{value:e},onSuccess(){n({fieldName:"externalActions",value:e,path:""}),k((0,x.kg)(x.zv,"Updated.")),setTimeout(b,f.sI)},onError(e){console.log(e),k((0,x.kg)(x.Un,e)),setTimeout(b,f.sI)}})}async function T(e){let t=[...i],n=i.findIndex(t=>t.url===e.url);t.splice(n,1);try{c(t),C(t)}catch(r){console.error(r)}}async function Z(e,t,n,r,o,a){try{let l=[...i],u=l.concat({url:e,title:t,description:n,icon:r,color:o,openExternally:a});c(u),await C(u)}catch(s){console.error(s)}}(0,h.useEffect)(()=>{c(a||[])},[a]);let E=()=>{y(!0)},I=(e,t,n,r,o,a)=>{y(!1),Z(e,t,n,r,o,a)},S=()=>{y(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(m,{children:"External Actions"}),(0,r.jsx)(g,{children:"External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action."}),(0,r.jsxs)(g,{children:["Read more about how to use actions, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/thirdparty/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(d.Z,{rowKey:e=>"".concat(e.title,"-").concat(e.url),columns:[{title:"",key:"delete",render:(e,t)=>(0,r.jsx)(u.Z,{size:"middle",children:(0,r.jsx)(s.Z,{onClick:()=>T(t),icon:(0,r.jsx)(o.Z,{})})})},{title:"Name",dataIndex:"title",key:"title"},{title:"Description",dataIndex:"description",key:"description"},{title:"URL",dataIndex:"url",key:"url"},{title:"Icon",dataIndex:"icon",key:"icon",render:e=>e?(0,r.jsx)("img",{style:{width:"2vw"},src:e,alt:""}):null},{title:"Color",dataIndex:"color",key:"color",render:e=>e?(0,r.jsx)("div",{style:{backgroundColor:e,height:"30px"},children:e}):null},{title:"Opens",dataIndex:"openExternally",key:"openExternally",render:e=>e?"In a new tab":"In a modal"}],dataSource:i,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(s.Z,{type:"primary",onClick:E,children:"Create New Action"}),(0,r.jsx)(p.E,{status:w}),(0,r.jsx)(j,{open:l,onOk:I,onCancel:S})]})};t.default=w}},function(e){e.O(0,[8909,3903,4267,2206,9774,2888,179],function(){return e(e.s=54005)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/actions-f6c1b7c561c1d8a0.js b/static/web/_next/static/chunks/pages/admin/actions-f6c1b7c561c1d8a0.js new file mode 100644 index 000000000..39923b0db --- /dev/null +++ b/static/web/_next/static/chunks/pages/admin/actions-f6c1b7c561c1d8a0.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5685],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(1413),l=n(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},o=n(42135),i=function(e,t){return l.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:a}))};i.displayName="DeleteOutlined";var c=l.forwardRef(i)},54005:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/actions",function(){return n(2075)}])},2075:function(e,t,n){"use strict";n.r(t);var r=n(85893),l=n(48689),a=n(86548),o=n(84485),i=n(85402),c=n(18119),s=n(69677),u=n(32808),d=n(26713),h=n(71577),p=n(52206),x=n(96486),m=n.n(x),y=n(67294),f=n(39664),v=n(90745),j=n(41983),g=n(99519),k=n(37174);let{Title:Z,Paragraph:w}=o.Z,C=e=>{let{onOk:t,onCancel:n,open:l,action:a}=e,[o,d]=(0,y.useState)(""),[h,p]=(0,y.useState)(""),[x,m]=(0,y.useState)(""),[f,v]=(0,y.useState)(""),[j,g]=(0,y.useState)(""),[Z,w]=(0,y.useState)(!1);(0,y.useEffect)(()=>{d((null==a?void 0:a.url)||""),p((null==a?void 0:a.title)||""),m((null==a?void 0:a.description)||""),v((null==a?void 0:a.icon)||""),g((null==a?void 0:a.color)||""),w((null==a?void 0:a.openExternally)||!1)},[a]);let C={disabled:!function(){try{let e=new URL(o);if("https:"!==e.protocol)return!1}catch(t){return!1}return(0,k.Z)(o)&&""!==h}()},I=e=>{w(e.target.checked)};return(0,r.jsx)(i.Z,{destroyOnClose:!0,title:null==a?"Create New Action":"Edit Action",open:l,onOk:function(){t(a,o,h,x,f,j,Z),d(""),p(""),m(""),v(""),g(""),w(!1)},onCancel:n,okButtonProps:C,children:(0,r.jsxs)(c.Z,{initialValues:a,children:["Add the URL for the external action you want to present."," ",(0,r.jsx)("strong",{children:"Only HTTPS urls are supported."}),(0,r.jsx)("p",{children:(0,r.jsx)("a",{href:"https://owncast.online/thirdparty/actions/",target:"_blank",rel:"noopener noreferrer",children:"Read more about external actions."})}),(0,r.jsx)(c.Z.Item,{name:"url",children:(0,r.jsx)(s.Z,{required:!0,placeholder:"https://myserver.com/action (required)",onChange:e=>d(e.currentTarget.value.trim()),type:"url",pattern:k.a})}),(0,r.jsx)(c.Z.Item,{name:"title",children:(0,r.jsx)(s.Z,{value:h,required:!0,placeholder:"Your action title (required)",onChange:e=>p(e.currentTarget.value)})}),(0,r.jsx)(c.Z.Item,{name:"description",children:(0,r.jsx)(s.Z,{value:x,placeholder:"Optional description",onChange:e=>m(e.currentTarget.value)})}),(0,r.jsx)(c.Z.Item,{name:"icon",children:(0,r.jsx)(s.Z,{value:f,placeholder:"https://myserver.com/action/icon.png (optional)",onChange:e=>v(e.currentTarget.value)})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(c.Z.Item,{name:"color",style:{marginBottom:"0px"},children:(0,r.jsx)(s.Z,{type:"color",value:j,onChange:e=>g(e.currentTarget.value)})}),"Optional background color of the action button."]}),(0,r.jsx)(c.Z.Item,{name:"openExternally",children:(0,r.jsx)(u.Z,{checked:Z,defaultChecked:Z,onChange:I,children:"Open in a new tab instead of within your page."})})]})})},I=()=>{let e=(0,y.useContext)(g.aC),{serverConfig:t,setFieldInConfigState:n}=e||{},{externalActions:o}=t,[i,c]=(0,y.useState)(null),[s,u]=(0,y.useState)(!1),[x,k]=(0,y.useState)(null),[I,E]=(0,y.useState)(null),b=()=>{k(null),clearTimeout(null)};async function S(e){await (0,v.Si)({apiPath:v.os,data:{value:e},onSuccess(){n({fieldName:"externalActions",value:e,path:""}),k((0,j.kg)(j.zv,"Updated.")),setTimeout(b,v.sI)},onError(e){console.log(e),k((0,j.kg)(j.Un,e)),setTimeout(b,v.sI)}})}async function _(e){let t=[...i],n=i.findIndex(t=>t.url===e.url);t.splice(n,1);try{c(t),S(t)}catch(r){console.error(r)}}async function O(e,t,n,r,l,a,o){try{let s=[...i],u={url:t,title:n,description:r,icon:l,color:a,openExternally:o},d=e?i.findIndex(t=>m().isEqual(t,e)):-1;d>=0?s[d]=u:s.push(u),c(s),await S(s)}catch(h){console.error(h)}}async function T(e){E(e),u(!0)}(0,y.useEffect)(()=>{c(o||[])},[o]);let N=()=>{E(null),u(!0)},R=(e,t,n,r,l,a,o)=>{u(!1),O(e,t,n,r,l,a,o),E(null)},U=()=>{u(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(Z,{children:"External Actions"}),(0,r.jsx)(w,{children:"External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action."}),(0,r.jsxs)(w,{children:["Read more about how to use actions, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/thirdparty/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(p.Z,{rowKey:e=>"".concat(e.title,"-").concat(e.url),columns:[{title:"",key:"delete-edit",render:(e,t)=>(0,r.jsxs)(d.Z,{size:"middle",children:[(0,r.jsx)(h.Z,{onClick:()=>_(t),icon:(0,r.jsx)(l.Z,{})}),(0,r.jsx)(h.Z,{onClick:()=>T(t),icon:(0,r.jsx)(a.Z,{})})]})},{title:"Name",dataIndex:"title",key:"title"},{title:"Description",dataIndex:"description",key:"description"},{title:"URL",dataIndex:"url",key:"url"},{title:"Icon",dataIndex:"icon",key:"icon",render:e=>e?(0,r.jsx)("img",{style:{width:"2vw"},src:e,alt:""}):null},{title:"Color",dataIndex:"color",key:"color",render:e=>e?(0,r.jsx)("div",{style:{backgroundColor:e,height:"30px"},children:e}):null},{title:"Opens",dataIndex:"openExternally",key:"openExternally",render:e=>e?"In a new tab":"In a modal"}],dataSource:i,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(h.Z,{type:"primary",onClick:N,children:"Create New Action"}),(0,r.jsx)(f.E,{status:x}),(0,r.jsx)(C,{action:I,open:s,onOk:R,onCancel:U})]})};t.default=I}},function(e){e.O(0,[3662,8909,3903,4267,2206,8733,8119,9774,2888,179],function(){return e(e.s=54005)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/chat/messages-7d8dee6aea7295a1.js b/static/web/_next/static/chunks/pages/admin/chat/messages-7d8dee6aea7295a1.js new file mode 100644 index 000000000..88a2a68bb --- /dev/null +++ b/static/web/_next/static/chunks/pages/admin/chat/messages-7d8dee6aea7295a1.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7095],{62433:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/messages",function(){return t(57533)}])},57533:function(e,s,t){"use strict";t.r(s),t.d(s,{OUTCOME_TIMEOUT:function(){return N},default:function(){return v}});var a=t(85893),i=t(67294),l=t(84485),n=t(71577),r=t(52206),c=t(89739),d=t(21640),o=t(94184),u=t.n(o),h=t(58091),m=t(64777),p=t(70241),g=t(94199),x=t(99611),w=t(90420);let y=e=>{let{isVisible:s,message:t,setMessage:l}=e;if(!t||(0,p.Qr)(t))return null;let r=null,[o,u]=(0,i.useState)(0),{id:h}=t||{},y=()=>{r=setTimeout(()=>{u(0)},N)};(0,i.useEffect)(()=>()=>{clearTimeout(r)});let f=async()=>{clearTimeout(r),u(0);let e=await (0,m.rQ)(m.hn,{auth:!0,method:"POST",data:{visible:!s,idArray:[h]}});e.success&&"changed"===e.message?(l({...t,visible:!s}),u(1)):(l({...t,visible:s}),u(-1)),y()},j=(0,a.jsx)(c.Z,{style:{color:"transparent"}});return o&&(j=o>0?(0,a.jsx)(c.Z,{style:{color:"var(--ant-success)"}}):(0,a.jsx)(d.Z,{style:{color:"var(--ant-warning)"}})),(0,a.jsxs)("div",{className:"toggle-switch ".concat(s?"":"hidden"),children:[(0,a.jsx)("span",{className:"outcome-icon",children:j}),(0,a.jsx)(g.Z,{title:"Click to ".concat(s?"hide":"show"," this message"),placement:"topRight",children:(0,a.jsx)(n.Z,{shape:"circle",size:"small",type:"text",icon:s?(0,a.jsx)(x.Z,{}):(0,a.jsx)(w.Z,{}),onClick:f})})]})};var f=t(35691);let{Title:j}=l.Z,N=3e3;function v(){let[e,s]=(0,i.useState)([]),[t,l]=(0,i.useState)([]),[o,g]=(0,i.useState)(!1),[x,w]=(0,i.useState)(null),[v,b]=(0,i.useState)(""),T=null,C=null,S=async()=>{try{let e=await (0,m.rQ)(m.WE,{auth:!0});(0,p.Qr)(e)?s([]):s(e)}catch(t){console.log("==== error",t)}};(0,i.useEffect)(()=>(S(),C=setInterval(()=>{S()},m.NE),()=>{clearTimeout(T),clearTimeout(C)}),[]);let Z=function(e){let s=e.reduce((e,s)=>{let t=s.user.id;return e.some(e=>e.text===t)||e.push({text:t,value:t}),e},[]);return s.sort((e,s)=>{let t=e.text.toUpperCase(),a=s.text.toUpperCase();return ta?1:0})}(e),_=t=>{let a=e.findIndex(e=>e.id===t.id);e.splice(a,1,t),s([...e])},k=()=>{T=setTimeout(()=>{w(null),b("")},N)},E=async i=>{g(!0);let n=await (0,m.rQ)(m.hn,{auth:!0,method:"POST",data:{visible:i,idArray:t}});if(n.success&&"changed"===n.message){w((0,a.jsx)(c.Z,{})),k();let r=[...e];t.map(s=>{let t=r.findIndex(e=>e.id===s),a={...e[t],visible:i};return r.splice(t,1,a),null}),s(r),l([])}else w((0,a.jsx)(d.Z,{})),k();g(!1)},I=()=>{b("show"),E(!0)},O=()=>{b("hide"),E(!1)},M=u()({"bulk-editor":!0,active:t.length});return(0,a.jsxs)("div",{className:"chat-messages",children:[(0,a.jsx)(j,{children:"Chat Messages"}),(0,a.jsx)("p",{children:"Manage the messages from viewers that show up on your stream."}),(0,a.jsxs)("div",{className:M,children:[(0,a.jsx)("span",{className:"label",children:"Check multiple messages to change their visibility to: "}),(0,a.jsx)(n.Z,{type:"primary",size:"small",shape:"round",className:"button",loading:"show"===v&&o,icon:"show"===v&&x,disabled:!t.length||v&&"show"!==v,onClick:I,children:"Show"}),(0,a.jsx)(n.Z,{type:"primary",size:"small",shape:"round",className:"button",loading:"hide"===v&&o,icon:"hide"===v&&x,disabled:!t.length||v&&"hide"!==v,onClick:O,children:"Hide"})]}),(0,a.jsx)(r.Z,{size:"small",className:"table-container",pagination:{defaultPageSize:100,showSizeChanger:!0},scroll:{y:540},rowClassName:e=>e.hiddenAt?"hidden":"",dataSource:e,columns:[{title:"Time",dataIndex:"timestamp",key:"timestamp",className:"timestamp-col",defaultSortOrder:"descend",render(e){let s=new Date(e);return(0,h.Z)(s,"PP pp")},sorter:(e,s)=>new Date(e.timestamp).getTime()-new Date(s.timestamp).getTime(),width:90},{title:"User",dataIndex:"user",key:"user",className:"name-col",filters:Z,onFilter:(e,s)=>s.user.id===e,sorter:(e,s)=>e.user.displayName.localeCompare(s.user.displayName),sortDirections:["ascend","descend"],ellipsis:!0,render(e){let{displayName:s}=e;return(0,a.jsx)(f.Z,{user:e,children:s})},width:110},{title:"Message",dataIndex:"body",key:"body",className:"message-col",width:320,render:e=>(0,a.jsx)("div",{className:"message-contents",dangerouslySetInnerHTML:{__html:e}})},{title:"",dataIndex:"hiddenAt",key:"hiddenAt",className:"toggle-col",filters:[{text:"Visible messages",value:!0},{text:"Hidden messages",value:!1}],onFilter:(e,s)=>s.visible===e,render:(e,s)=>(0,a.jsx)(y,{isVisible:!e,message:s,setMessage:_}),width:30}],rowKey:e=>e.id,rowSelection:{selectedRowKeys:t,onChange(e){l(e)}}})]})}}},function(e){e.O(0,[3662,8909,3903,4267,2206,8091,5938,8733,1494,9774,2888,179],function(){return e(e.s=62433)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/chat/messages-7e88922542839f8a.js b/static/web/_next/static/chunks/pages/admin/chat/messages-7e88922542839f8a.js deleted file mode 100644 index b1be9ea2c..000000000 --- a/static/web/_next/static/chunks/pages/admin/chat/messages-7e88922542839f8a.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7095],{62433:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/messages",function(){return t(57533)}])},37926:function(e,s,t){"use strict";t.d(s,{e:function(){return d}});var n=t(85893),l=t(85402),a=t(71577),r=t(21640),i=t(82911),o=t(84674),c=t(64777);let d=e=>{let{user:s,isEnabled:t,label:d,onClick:u}=e;async function m(e){let{id:s}=e;try{let n=await (0,c.rQ)(c.NM,{data:{userId:s,enabled:!t},method:"POST",auth:!0});return n.success}catch(l){console.error(l)}return!1}let h=t?"ban":"unban",x=t?(0,n.jsx)(r.Z,{style:{color:"var(--ant-error)"}}):(0,n.jsx)(i.Z,{style:{color:"var(--ant-warning)"}}),j=(0,n.jsxs)(n.Fragment,{children:["Are you sure you want to ",h," ",(0,n.jsx)("strong",{children:s.displayName}),t?" and remove their messages?":"?"]}),p=()=>{l.Z.confirm({title:"Confirm ".concat(h),content:j,onCancel(){},onOk:()=>new Promise((e,t)=>{let n=m(s);n?setTimeout(()=>{e(n),null==u||u()},3e3):t()}),okType:"danger",okText:t?"Absolutely":null,icon:x})};return(0,n.jsx)(a.Z,{onClick:p,size:"small",icon:t?(0,n.jsx)(o.Z,{twoToneColor:"#ff4d4f"}):null,className:"block-user-button",children:d||h})};d.defaultProps={label:"",onClick:null}},17388:function(e,s,t){"use strict";t.d(s,{Z:function(){return T}});var n=t(85893),l=t(67294),a=t(94199),r=t(85402),i=t(84485),o=t(71230),c=t(15746),d=t(27049),u=t(26713),m=t(45938),h=t(58091),x=t(96486),j=t(37926),p=t(71577),g=t(21640),y=t(82911),b=t(84674),f=t(24478),w=t(64777);let Z=e=>{var s;let{user:t,onClick:l}=e;async function a(e,s){let{id:t}=e;try{let n=await (0,w.rQ)(w.jr,{data:{userId:t,isModerator:s},method:"POST",auth:!0});return n.success}catch(l){console.error(l)}return!1}let i=null===(s=t.scopes)||void 0===s?void 0:s.includes("MODERATOR"),o=i?"remove moderator":"add moderator",c=i?(0,n.jsx)(g.Z,{style:{color:"var(--ant-error)"}}):(0,n.jsx)(y.Z,{style:{color:"var(--ant-warning)"}}),d=(0,n.jsxs)(n.Fragment,{children:["Are you sure you want to ",o," ",(0,n.jsx)("strong",{children:t.displayName}),"?"]}),u=()=>{r.Z.confirm({title:"Confirm ".concat(o),content:d,onCancel(){},onOk:()=>new Promise((e,s)=>{let n=a(t,!i);n?setTimeout(()=>{e(n),null==l||l()},3e3):s()}),okType:"danger",okText:i?"Yup!":null,icon:c})};return(0,n.jsx)(p.Z,{onClick:u,size:"small",icon:i?(0,n.jsx)(b.Z,{twoToneColor:"#ff4d4f"}):(0,n.jsx)(f.Z,{twoToneColor:"#22bb44"}),className:"block-user-button",children:o})};Z.defaultProps={onClick:null};var v=t(55709),N=t(70241);let T=e=>{let{user:s,connectionInfo:t,children:p}=e,[g,y]=(0,l.useState)(!1),b=()=>{y(!0)},f=()=>{y(!1)},{displayName:w,createdAt:T,previousNames:k,nameChangedAt:C,disabledAt:A}=s,{connectedAt:S,messageCount:D,userAgent:O}=t||{},P=null,E=k&&[...k];k&&k.length>1&&C&&(P=new Date(C),E.reverse());let I=new Date(T),_=(0,h.Z)(I,"PP pp"),M=P?(0,m.Z)(P):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.Z,{title:(0,n.jsxs)(n.Fragment,{children:["Created at: ",_,".",(0,n.jsx)("br",{})," Click for more info."]}),placement:"bottomLeft",children:(0,n.jsx)("button",{type:"button","aria-label":"Display more details about this user",className:"user-item-container",onClick:b,children:p})}),(0,n.jsx)(r.Z,{destroyOnClose:!0,width:600,cancelText:"Close",okButtonProps:{style:{display:"none"}},title:"User details: ".concat(w),open:g,onOk:f,onCancel:f,children:(0,n.jsxs)("div",{className:"user-details",children:[(0,n.jsx)(i.Z.Title,{level:4,children:w}),(0,n.jsxs)("p",{className:"created-at",children:["User created at ",_,"."]}),(0,n.jsxs)(o.Z,{gutter:16,children:[t&&(0,n.jsxs)(c.Z,{md:P?12:24,children:[(0,n.jsx)(i.Z.Title,{level:5,children:"This user is currently connected to Chat."}),(0,n.jsxs)("ul",{className:"connection-info",children:[(0,n.jsxs)("li",{children:[(0,n.jsx)("strong",{children:"Active for:"})," ",(0,m.Z)(new Date(S))]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("strong",{children:"Messages sent:"})," ",D]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("strong",{children:"User Agent:"}),(0,n.jsx)("br",{}),(0,N.AB)(O)]})]})]}),P&&(0,n.jsxs)(c.Z,{md:t?12:24,children:[(0,n.jsx)(i.Z.Title,{level:5,children:"This user is also seen as:"}),(0,n.jsx)("ul",{className:"previous-names-list",children:(0,x.uniq)(E).map((e,s)=>(0,n.jsxs)("li",{className:0===s?"latest":"",children:[(0,n.jsx)("span",{className:"user-name-item",children:e}),0===s?" (Changed ".concat(M," ago)"):""]}))})]})]}),(0,n.jsx)(d.Z,{}),(0,n.jsxs)(u.Z,{direction:"horizontal",children:[A?(0,n.jsxs)(n.Fragment,{children:["This user was banned on ",(0,n.jsx)("code",{children:(0,v.u)(A)}),".",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),(0,n.jsx)(j.e,{label:"Unban this user",user:s,isEnabled:!1,onClick:f})]}):(0,n.jsx)(j.e,{label:"Ban this user",user:s,isEnabled:!0,onClick:f}),(0,n.jsx)(Z,{user:s,onClick:f})]})]})})]})};T.defaultProps={connectionInfo:null}},55709:function(e,s,t){"use strict";t.d(s,{K:function(){return c},u:function(){return o}});var n=t(85893),l=t(52206),a=t(58091),r=t(17388),i=t(37926);function o(e){return(0,a.Z)(new Date(e),"MMM d H:mma")}let c=e=>{let{data:s}=e;return(0,n.jsx)(l.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"Last Known Display Name",dataIndex:"displayName",key:"displayName",render:(e,s)=>(0,n.jsx)(r.Z,{user:s,children:(0,n.jsx)("span",{className:"display-name",children:e})})},{title:"Created",dataIndex:"createdAt",key:"createdAt",render:e=>o(e),sorter:(e,s)=>new Date(e.createdAt).getTime()-new Date(s.createdAt).getTime(),sortDirections:["descend","ascend"]},{title:"Disabled at",dataIndex:"disabledAt",key:"disabledAt",defaultSortOrder:"descend",render:e=>e?o(e):null,sorter:(e,s)=>new Date(e.disabledAt).getTime()-new Date(s.disabledAt).getTime(),sortDirections:["descend","ascend"]},{title:"",key:"block",className:"actions-col",render:(e,s)=>(0,n.jsx)(i.e,{user:s,isEnabled:!s.disabledAt})}],dataSource:s,size:"small",rowKey:"id"})}},57533:function(e,s,t){"use strict";t.r(s),t.d(s,{OUTCOME_TIMEOUT:function(){return w},default:function(){return Z}});var n=t(85893),l=t(67294),a=t(84485),r=t(71577),i=t(52206),o=t(89739),c=t(21640),d=t(94184),u=t.n(d),m=t(58091),h=t(64777),x=t(70241),j=t(94199),p=t(99611),g=t(90420);let y=e=>{let{isVisible:s,message:t,setMessage:a}=e;if(!t||(0,x.Qr)(t))return null;let i=null,[d,u]=(0,l.useState)(0),{id:m}=t||{},y=()=>{i=setTimeout(()=>{u(0)},w)};(0,l.useEffect)(()=>()=>{clearTimeout(i)});let b=async()=>{clearTimeout(i),u(0);let e=await (0,h.rQ)(h.hn,{auth:!0,method:"POST",data:{visible:!s,idArray:[m]}});e.success&&"changed"===e.message?(a({...t,visible:!s}),u(1)):(a({...t,visible:s}),u(-1)),y()},f=(0,n.jsx)(o.Z,{style:{color:"transparent"}});return d&&(f=d>0?(0,n.jsx)(o.Z,{style:{color:"var(--ant-success)"}}):(0,n.jsx)(c.Z,{style:{color:"var(--ant-warning)"}})),(0,n.jsxs)("div",{className:"toggle-switch ".concat(s?"":"hidden"),children:[(0,n.jsx)("span",{className:"outcome-icon",children:f}),(0,n.jsx)(j.Z,{title:"Click to ".concat(s?"hide":"show"," this message"),placement:"topRight",children:(0,n.jsx)(r.Z,{shape:"circle",size:"small",type:"text",icon:s?(0,n.jsx)(p.Z,{}):(0,n.jsx)(g.Z,{}),onClick:b})})]})};var b=t(17388);let{Title:f}=a.Z,w=3e3;function Z(){let[e,s]=(0,l.useState)([]),[t,a]=(0,l.useState)([]),[d,j]=(0,l.useState)(!1),[p,g]=(0,l.useState)(null),[Z,v]=(0,l.useState)(""),N=null,T=null,k=async()=>{try{let e=await (0,h.rQ)(h.WE,{auth:!0});(0,x.Qr)(e)?s([]):s(e)}catch(t){console.log("==== error",t)}};(0,l.useEffect)(()=>(k(),T=setInterval(()=>{k()},h.NE),()=>{clearTimeout(N),clearTimeout(T)}),[]);let C=function(e){let s=e.reduce((e,s)=>{let t=s.user.id;return e.some(e=>e.text===t)||e.push({text:t,value:t}),e},[]);return s.sort((e,s)=>{let t=e.text.toUpperCase(),n=s.text.toUpperCase();return tn?1:0})}(e),A=t=>{let n=e.findIndex(e=>e.id===t.id);e.splice(n,1,t),s([...e])},S=()=>{N=setTimeout(()=>{g(null),v("")},w)},D=async l=>{j(!0);let r=await (0,h.rQ)(h.hn,{auth:!0,method:"POST",data:{visible:l,idArray:t}});if(r.success&&"changed"===r.message){g((0,n.jsx)(o.Z,{})),S();let i=[...e];t.map(s=>{let t=i.findIndex(e=>e.id===s),n={...e[t],visible:l};return i.splice(t,1,n),null}),s(i),a([])}else g((0,n.jsx)(c.Z,{})),S();j(!1)},O=()=>{v("show"),D(!0)},P=()=>{v("hide"),D(!1)},E=u()({"bulk-editor":!0,active:t.length});return(0,n.jsxs)("div",{className:"chat-messages",children:[(0,n.jsx)(f,{children:"Chat Messages"}),(0,n.jsx)("p",{children:"Manage the messages from viewers that show up on your stream."}),(0,n.jsxs)("div",{className:E,children:[(0,n.jsx)("span",{className:"label",children:"Check multiple messages to change their visibility to: "}),(0,n.jsx)(r.Z,{type:"primary",size:"small",shape:"round",className:"button",loading:"show"===Z&&d,icon:"show"===Z&&p,disabled:!t.length||Z&&"show"!==Z,onClick:O,children:"Show"}),(0,n.jsx)(r.Z,{type:"primary",size:"small",shape:"round",className:"button",loading:"hide"===Z&&d,icon:"hide"===Z&&p,disabled:!t.length||Z&&"hide"!==Z,onClick:P,children:"Hide"})]}),(0,n.jsx)(i.Z,{size:"small",className:"table-container",pagination:{defaultPageSize:100,showSizeChanger:!0},scroll:{y:540},rowClassName:e=>e.hiddenAt?"hidden":"",dataSource:e,columns:[{title:"Time",dataIndex:"timestamp",key:"timestamp",className:"timestamp-col",defaultSortOrder:"descend",render(e){let s=new Date(e);return(0,m.Z)(s,"PP pp")},sorter:(e,s)=>new Date(e.timestamp).getTime()-new Date(s.timestamp).getTime(),width:90},{title:"User",dataIndex:"user",key:"user",className:"name-col",filters:C,onFilter:(e,s)=>s.user.id===e,sorter:(e,s)=>e.user.displayName.localeCompare(s.user.displayName),sortDirections:["ascend","descend"],ellipsis:!0,render(e){let{displayName:s}=e;return(0,n.jsx)(b.Z,{user:e,children:s})},width:110},{title:"Message",dataIndex:"body",key:"body",className:"message-col",width:320,render:e=>(0,n.jsx)("div",{className:"message-contents",dangerouslySetInnerHTML:{__html:e}})},{title:"",dataIndex:"hiddenAt",key:"hiddenAt",className:"toggle-col",filters:[{text:"Visible messages",value:!0},{text:"Hidden messages",value:!1}],onFilter:(e,s)=>s.visible===e,render:(e,s)=>(0,n.jsx)(y,{isVisible:!e,message:s,setMessage:A}),width:30}],rowKey:e=>e.id,rowSelection:{selectedRowKeys:t,onChange(e){a(e)}}})]})}}},function(e){e.O(0,[3662,8909,3903,4267,2206,8091,5938,9550,9774,2888,179],function(){return e(e.s=62433)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/chat/users-072de9838f91e5fb.js b/static/web/_next/static/chunks/pages/admin/chat/users-072de9838f91e5fb.js deleted file mode 100644 index 4835b83f9..000000000 --- a/static/web/_next/static/chunks/pages/admin/chat/users-072de9838f91e5fb.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9522],{55583:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/users",function(){return n(46049)}])},37926:function(e,t,n){"use strict";n.d(t,{e:function(){return d}});var s=n(85893),r=n(85402),a=n(71577),l=n(21640),o=n(82911),i=n(84674),c=n(64777);let d=e=>{let{user:t,isEnabled:n,label:d,onClick:u}=e;async function m(e){let{id:t}=e;try{let s=await (0,c.rQ)(c.NM,{data:{userId:t,enabled:!n},method:"POST",auth:!0});return s.success}catch(r){console.error(r)}return!1}let h=n?"ban":"unban",x=n?(0,s.jsx)(l.Z,{style:{color:"var(--ant-error)"}}):(0,s.jsx)(o.Z,{style:{color:"var(--ant-warning)"}}),j=(0,s.jsxs)(s.Fragment,{children:["Are you sure you want to ",h," ",(0,s.jsx)("strong",{children:t.displayName}),n?" and remove their messages?":"?"]}),y=()=>{r.Z.confirm({title:"Confirm ".concat(h),content:j,onCancel(){},onOk:()=>new Promise((e,n)=>{let s=m(t);s?setTimeout(()=>{e(s),null==u||u()},3e3):n()}),okType:"danger",okText:n?"Absolutely":null,icon:x})};return(0,s.jsx)(a.Z,{onClick:y,size:"small",icon:n?(0,s.jsx)(i.Z,{twoToneColor:"#ff4d4f"}):null,className:"block-user-button",children:d||h})};d.defaultProps={label:"",onClick:null}},17388:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var s=n(85893),r=n(67294),a=n(94199),l=n(85402),o=n(84485),i=n(71230),c=n(15746),d=n(27049),u=n(26713),m=n(45938),h=n(58091),x=n(96486),j=n(37926),y=n(71577),g=n(21640),p=n(82911),f=n(84674),b=n(24478),w=n(64777);let k=e=>{var t;let{user:n,onClick:r}=e;async function a(e,t){let{id:n}=e;try{let s=await (0,w.rQ)(w.jr,{data:{userId:n,isModerator:t},method:"POST",auth:!0});return s.success}catch(r){console.error(r)}return!1}let o=null===(t=n.scopes)||void 0===t?void 0:t.includes("MODERATOR"),i=o?"remove moderator":"add moderator",c=o?(0,s.jsx)(g.Z,{style:{color:"var(--ant-error)"}}):(0,s.jsx)(p.Z,{style:{color:"var(--ant-warning)"}}),d=(0,s.jsxs)(s.Fragment,{children:["Are you sure you want to ",i," ",(0,s.jsx)("strong",{children:n.displayName}),"?"]}),u=()=>{l.Z.confirm({title:"Confirm ".concat(i),content:d,onCancel(){},onOk:()=>new Promise((e,t)=>{let s=a(n,!o);s?setTimeout(()=>{e(s),null==r||r()},3e3):t()}),okType:"danger",okText:o?"Yup!":null,icon:c})};return(0,s.jsx)(y.Z,{onClick:u,size:"small",icon:o?(0,s.jsx)(f.Z,{twoToneColor:"#ff4d4f"}):(0,s.jsx)(b.Z,{twoToneColor:"#22bb44"}),className:"block-user-button",children:i})};k.defaultProps={onClick:null};var C=n(55709),N=n(70241);let A=e=>{let{user:t,connectionInfo:n,children:y}=e,[g,p]=(0,r.useState)(!1),f=()=>{p(!0)},b=()=>{p(!1)},{displayName:w,createdAt:A,previousNames:Z,nameChangedAt:v,disabledAt:T}=t,{connectedAt:D,messageCount:I,userAgent:P}=n||{},S=null,O=Z&&[...Z];Z&&Z.length>1&&v&&(S=new Date(v),O.reverse());let _=new Date(A),E=(0,h.Z)(_,"PP pp"),M=S?(0,m.Z)(S):null;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.Z,{title:(0,s.jsxs)(s.Fragment,{children:["Created at: ",E,".",(0,s.jsx)("br",{})," Click for more info."]}),placement:"bottomLeft",children:(0,s.jsx)("button",{type:"button","aria-label":"Display more details about this user",className:"user-item-container",onClick:f,children:y})}),(0,s.jsx)(l.Z,{destroyOnClose:!0,width:600,cancelText:"Close",okButtonProps:{style:{display:"none"}},title:"User details: ".concat(w),open:g,onOk:b,onCancel:b,children:(0,s.jsxs)("div",{className:"user-details",children:[(0,s.jsx)(o.Z.Title,{level:4,children:w}),(0,s.jsxs)("p",{className:"created-at",children:["User created at ",E,"."]}),(0,s.jsxs)(i.Z,{gutter:16,children:[n&&(0,s.jsxs)(c.Z,{md:S?12:24,children:[(0,s.jsx)(o.Z.Title,{level:5,children:"This user is currently connected to Chat."}),(0,s.jsxs)("ul",{className:"connection-info",children:[(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:"Active for:"})," ",(0,m.Z)(new Date(D))]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:"Messages sent:"})," ",I]}),(0,s.jsxs)("li",{children:[(0,s.jsx)("strong",{children:"User Agent:"}),(0,s.jsx)("br",{}),(0,N.AB)(P)]})]})]}),S&&(0,s.jsxs)(c.Z,{md:n?12:24,children:[(0,s.jsx)(o.Z.Title,{level:5,children:"This user is also seen as:"}),(0,s.jsx)("ul",{className:"previous-names-list",children:(0,x.uniq)(O).map((e,t)=>(0,s.jsxs)("li",{className:0===t?"latest":"",children:[(0,s.jsx)("span",{className:"user-name-item",children:e}),0===t?" (Changed ".concat(M," ago)"):""]}))})]})]}),(0,s.jsx)(d.Z,{}),(0,s.jsxs)(u.Z,{direction:"horizontal",children:[T?(0,s.jsxs)(s.Fragment,{children:["This user was banned on ",(0,s.jsx)("code",{children:(0,C.u)(T)}),".",(0,s.jsx)("br",{}),(0,s.jsx)("br",{}),(0,s.jsx)(j.e,{label:"Unban this user",user:t,isEnabled:!1,onClick:b})]}):(0,s.jsx)(j.e,{label:"Ban this user",user:t,isEnabled:!0,onClick:b}),(0,s.jsx)(k,{user:t,onClick:b})]})]})})]})};A.defaultProps={connectionInfo:null}},55709:function(e,t,n){"use strict";n.d(t,{K:function(){return c},u:function(){return i}});var s=n(85893),r=n(52206),a=n(58091),l=n(17388),o=n(37926);function i(e){return(0,a.Z)(new Date(e),"MMM d H:mma")}let c=e=>{let{data:t}=e;return(0,s.jsx)(r.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"Last Known Display Name",dataIndex:"displayName",key:"displayName",render:(e,t)=>(0,s.jsx)(l.Z,{user:t,children:(0,s.jsx)("span",{className:"display-name",children:e})})},{title:"Created",dataIndex:"createdAt",key:"createdAt",render:e=>i(e),sorter:(e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime(),sortDirections:["descend","ascend"]},{title:"Disabled at",dataIndex:"disabledAt",key:"disabledAt",defaultSortOrder:"descend",render:e=>e?i(e):null,sorter:(e,t)=>new Date(e.disabledAt).getTime()-new Date(t.disabledAt).getTime(),sortDirections:["descend","ascend"]},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,s.jsx)(o.e,{user:t,isEnabled:!t.disabledAt})}],dataSource:t,size:"small",rowKey:"id"})}},46049:function(e,t,n){"use strict";n.r(t),n.d(t,{FETCH_INTERVAL:function(){return k},default:function(){return C}});var s=n(85893),r=n(67294),a=n(84381),l=n(99519),o=n(64777),i=n(55709),c=n(69677),d=n(52206),u=n(68795),m=n(45938),h=n(17388),x=n(37926),j=n(70241);let y=e=>{let{data:t}=e,n=[{title:"Display Name",key:"username",render(e){let{user:t,connectedAt:n,messageCount:r,userAgent:a}=e;return(0,s.jsx)(h.Z,{user:t,connectionInfo:{connectedAt:n,messageCount:r,userAgent:a},children:(0,s.jsx)("span",{className:"display-name",children:t.displayName})})},sorter:(e,t)=>t.user.displayName.localeCompare(e.user.displayName),filterIcon:(0,s.jsx)(u.Z,{}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:n,confirm:r}=e;return(0,s.jsx)("div",{style:{padding:8},children:(0,s.jsx)(c.Z,{placeholder:"Search display names...",value:n[0],onChange(e){t(e.target.value?[e.target.value]:[]),r({closeDropdown:!1})}})})},onFilter:(e,t)=>t.user.displayName.includes(e),sortDirections:["descend","ascend"]},{title:"Messages sent",dataIndex:"messageCount",key:"messageCount",className:"number-col",width:"12%",sorter:(e,t)=>e.messageCount-t.messageCount,sortDirections:["descend","ascend"],render:e=>(0,s.jsx)("div",{style:{textAlign:"center"},children:e})},{title:"Connected Time",dataIndex:"connectedAt",key:"connectedAt",defaultSortOrder:"ascend",render:e=>(0,m.Z)(new Date(e)),sorter:(e,t)=>new Date(t.connectedAt).getTime()-new Date(e.connectedAt).getTime(),sortDirections:["descend","ascend"]},{title:"User Agent",dataIndex:"userAgent",key:"userAgent",render:e=>(0,j.AB)(e)},{title:"Location",dataIndex:"geo",key:"geo",render:e=>e?"".concat(e.regionName,", ").concat(e.countryCode):"-"},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,s.jsx)(x.e,{user:t.user,isEnabled:!t.user.disabledAt})}];return(0,s.jsx)(d.Z,{className:"table-container",pagination:{hideOnSinglePage:!0},columns:n,dataSource:t,size:"small",rowKey:"id"})};var g=n(71577),p=n(58091),f=n(84674);async function b(e){try{await (0,o.rQ)(o.RB,{data:{value:e},method:"POST",auth:!0})}catch(t){console.error(t)}}let w=e=>{let{data:t}=e;return(0,s.jsx)(d.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"IP Address",dataIndex:"ipAddress",key:"ipAddress"},{title:"Reason",dataIndex:"notes",key:"notes"},{title:"Created",dataIndex:"createdAt",key:"createdAt",render:e=>(0,p.Z)(new Date(e),"MMM d H:mma"),sorter:(e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime(),sortDirections:["descend","ascend"]},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,s.jsx)(g.Z,{title:"Remove IP Address Ban",onClick:()=>b(t.ipAddress),icon:(0,s.jsx)(f.Z,{twoToneColor:"#ff4d4f"}),className:"block-user-button"})}],dataSource:t,size:"large",rowKey:"ipAddress"})},k=1e4;function C(){let e=(0,r.useContext)(l.aC),{online:t}=e||{},[n,c]=(0,r.useState)([]),[d,u]=(0,r.useState)([]),[m,h]=(0,r.useState)([]),[x,j]=(0,r.useState)([]),g=async()=>{try{let e=await (0,o.rQ)(o.qk);c(e)}catch(t){console.log("==== error",t)}try{let n=await (0,o.rQ)(o.Kp);h(n)}catch(s){console.log("==== error",s)}try{let r=await (0,o.rQ)(o.GC);j(r)}catch(a){console.error("error fetching moderators",a)}try{let l=await (0,o.rQ)(o.Bu);u(l)}catch(i){console.error("error fetching banned ips",i)}};(0,r.useEffect)(()=>{let e=null;return g(),e=setInterval(g,k),()=>{clearInterval(e)}},[t]);let p=t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y,{data:m}),(0,s.jsxs)("p",{className:"description",children:["Visit the"," ",(0,s.jsx)("a",{href:"https://owncast.online/docs/viewers/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"documentation"})," ","to configure additional details about your viewers."]})]}):(0,s.jsx)("p",{className:"description",children:"When a stream is active and chat is enabled, connected chat clients will be displayed here."}),f=(0,s.jsxs)("span",{children:["Connected ",t?"(".concat(m.length,")"):"(offline)"]}),b=(0,s.jsxs)("span",{children:["Banned Users (",n.length,")"]}),C=(0,s.jsx)(i.K,{data:n}),N=(0,s.jsxs)("span",{children:["IP Bans (",d.length,")"]}),A=(0,s.jsx)(w,{data:d}),Z=(0,s.jsxs)("span",{children:["Moderators (",x.length,")"]}),v=(0,s.jsx)(i.K,{data:x});return(0,s.jsx)(a.Z,{defaultActiveKey:"1",items:[{label:f,key:"1",children:p},{label:b,key:"2",children:C},{label:N,key:"3",children:A},{label:Z,key:"4",children:v}]})}}},function(e){e.O(0,[3662,8909,3903,4267,2206,8091,4381,5938,9550,9774,2888,179],function(){return e(e.s=55583)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/chat/users-36a8db578d16bb8b.js b/static/web/_next/static/chunks/pages/admin/chat/users-36a8db578d16bb8b.js new file mode 100644 index 000000000..23bbcf304 --- /dev/null +++ b/static/web/_next/static/chunks/pages/admin/chat/users-36a8db578d16bb8b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9522],{55583:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/chat/users",function(){return n(46049)}])},46049:function(e,t,n){"use strict";n.r(t),n.d(t,{FETCH_INTERVAL:function(){return A},default:function(){return N}});var a=n(85893),s=n(67294),r=n(84381),c=n(99519),d=n(64777),l=n(55709),o=n(69677),i=n(52206),u=n(68795),h=n(45938),m=n(35691),g=n(37926),p=n(70241);let y=e=>{let{data:t}=e,n=[{title:"Display Name",key:"username",render(e){let{user:t,connectedAt:n,messageCount:s,userAgent:r}=e;return(0,a.jsx)(m.Z,{user:t,connectionInfo:{connectedAt:n,messageCount:s,userAgent:r},children:(0,a.jsx)("span",{className:"display-name",children:t.displayName})})},sorter:(e,t)=>t.user.displayName.localeCompare(e.user.displayName),filterIcon:(0,a.jsx)(u.Z,{}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:n,confirm:s}=e;return(0,a.jsx)("div",{style:{padding:8},children:(0,a.jsx)(o.Z,{placeholder:"Search display names...",value:n[0],onChange(e){t(e.target.value?[e.target.value]:[]),s({closeDropdown:!1})}})})},onFilter:(e,t)=>t.user.displayName.includes(e),sortDirections:["descend","ascend"]},{title:"Messages sent",dataIndex:"messageCount",key:"messageCount",className:"number-col",width:"12%",sorter:(e,t)=>e.messageCount-t.messageCount,sortDirections:["descend","ascend"],render:e=>(0,a.jsx)("div",{style:{textAlign:"center"},children:e})},{title:"Connected Time",dataIndex:"connectedAt",key:"connectedAt",defaultSortOrder:"ascend",render:e=>(0,h.Z)(new Date(e)),sorter:(e,t)=>new Date(t.connectedAt).getTime()-new Date(e.connectedAt).getTime(),sortDirections:["descend","ascend"]},{title:"User Agent",dataIndex:"userAgent",key:"userAgent",render:e=>(0,p.AB)(e)},{title:"Location",dataIndex:"geo",key:"geo",render:e=>e?"".concat(e.regionName,", ").concat(e.countryCode):"-"},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,a.jsx)(g.e,{user:t.user,isEnabled:!t.user.disabledAt})}];return(0,a.jsx)(i.Z,{className:"table-container",pagination:{hideOnSinglePage:!0},columns:n,dataSource:t,size:"small",rowKey:"id"})};var x=n(71577),f=n(58091),w=n(84674);async function j(e){try{await (0,d.rQ)(d.RB,{data:{value:e},method:"POST",auth:!0})}catch(t){console.error(t)}}let k=e=>{let{data:t}=e;return(0,a.jsx)(i.Z,{pagination:{hideOnSinglePage:!0},className:"table-container",columns:[{title:"IP Address",dataIndex:"ipAddress",key:"ipAddress"},{title:"Reason",dataIndex:"notes",key:"notes"},{title:"Created",dataIndex:"createdAt",key:"createdAt",render:e=>(0,f.Z)(new Date(e),"MMM d H:mma"),sorter:(e,t)=>new Date(e.createdAt).getTime()-new Date(t.createdAt).getTime(),sortDirections:["descend","ascend"]},{title:"",key:"block",className:"actions-col",render:(e,t)=>(0,a.jsx)(x.Z,{title:"Remove IP Address Ban",onClick:()=>j(t.ipAddress),icon:(0,a.jsx)(w.Z,{twoToneColor:"#ff4d4f"}),className:"block-user-button"})}],dataSource:t,size:"large",rowKey:"ipAddress"})},A=1e4;function N(){let e=(0,s.useContext)(c.aC),{online:t}=e||{},[n,o]=(0,s.useState)([]),[i,u]=(0,s.useState)([]),[h,m]=(0,s.useState)([]),[g,p]=(0,s.useState)([]),x=async()=>{try{let e=await (0,d.rQ)(d.qk);o(e)}catch(t){console.log("==== error",t)}try{let n=await (0,d.rQ)(d.Kp);m(n)}catch(a){console.log("==== error",a)}try{let s=await (0,d.rQ)(d.GC);p(s)}catch(r){console.error("error fetching moderators",r)}try{let c=await (0,d.rQ)(d.Bu);u(c)}catch(l){console.error("error fetching banned ips",l)}};(0,s.useEffect)(()=>{let e=null;return x(),e=setInterval(x,A),()=>{clearInterval(e)}},[t]);let f=t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(y,{data:h}),(0,a.jsxs)("p",{className:"description",children:["Visit the"," ",(0,a.jsx)("a",{href:"https://owncast.online/docs/viewers/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"documentation"})," ","to configure additional details about your viewers."]})]}):(0,a.jsx)("p",{className:"description",children:"When a stream is active and chat is enabled, connected chat clients will be displayed here."}),w=(0,a.jsxs)("span",{children:["Connected ",t?"(".concat(h.length,")"):"(offline)"]}),j=(0,a.jsxs)("span",{children:["Banned Users (",n.length,")"]}),N=(0,a.jsx)(l.K,{data:n}),b=(0,a.jsxs)("span",{children:["IP Bans (",i.length,")"]}),C=(0,a.jsx)(k,{data:i}),v=(0,a.jsxs)("span",{children:["Moderators (",g.length,")"]}),I=(0,a.jsx)(l.K,{data:g});return(0,a.jsx)(r.Z,{defaultActiveKey:"1",items:[{label:w,key:"1",children:f},{label:j,key:"2",children:N},{label:b,key:"3",children:C},{label:v,key:"4",children:I}]})}}},function(e){e.O(0,[3662,8909,3903,4267,2206,8091,4381,5938,8733,1494,9774,2888,179],function(){return e(e.s=55583)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/webhooks-159f14ab8ea91104.js b/static/web/_next/static/chunks/pages/admin/webhooks-159f14ab8ea91104.js new file mode 100644 index 000000000..458408982 --- /dev/null +++ b/static/web/_next/static/chunks/pages/admin/webhooks-159f14ab8ea91104.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1234,8733],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),o=n(67294),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(42135),i=function(e,t){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:c}))};i.displayName="DeleteOutlined";var l=o.forwardRef(i)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),o=n(87462),c=n(71002),a=n(94184),i=n.n(a),l=n(67294),s=n(53124),u=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},d=["xs","sm","md","lg","xl","xxl"],p=l.forwardRef(function(e,t){var n,a=l.useContext(s.E_),p=a.getPrefixCls,h=a.direction,v=l.useContext(u.Z),m=v.gutter,y=v.wrap,b=v.supportFlexGap,x=e.prefixCls,Z=e.span,g=e.order,j=e.offset,O=e.push,w=e.pull,E=e.className,C=e.children,k=e.flex,S=e.style,P=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),N=p("col",x),T={};d.forEach(function(t){var n,a={},i=e[t];"number"==typeof i?a.span=i:"object"===(0,c.Z)(i)&&(a=i||{}),delete P[t],T=(0,o.Z)((0,o.Z)({},T),(n={},(0,r.Z)(n,"".concat(N,"-").concat(t,"-").concat(a.span),void 0!==a.span),(0,r.Z)(n,"".concat(N,"-").concat(t,"-order-").concat(a.order),a.order||0===a.order),(0,r.Z)(n,"".concat(N,"-").concat(t,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,r.Z)(n,"".concat(N,"-").concat(t,"-push-").concat(a.push),a.push||0===a.push),(0,r.Z)(n,"".concat(N,"-").concat(t,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,r.Z)(n,"".concat(N,"-rtl"),"rtl"===h),n))});var _=i()(N,(n={},(0,r.Z)(n,"".concat(N,"-").concat(Z),void 0!==Z),(0,r.Z)(n,"".concat(N,"-order-").concat(g),g),(0,r.Z)(n,"".concat(N,"-offset-").concat(j),j),(0,r.Z)(n,"".concat(N,"-push-").concat(O),O),(0,r.Z)(n,"".concat(N,"-pull-").concat(w),w),n),E,T),A={};if(m&&m[0]>0){var I=m[0]/2;A.paddingLeft=I,A.paddingRight=I}if(m&&m[1]>0&&!b){var R=m[1]/2;A.paddingTop=R,A.paddingBottom=R}return k&&(A.flex="number"==typeof k?"".concat(k," ").concat(k," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(k)?"0 0 ".concat(k):k,!1!==y||A.minWidth||(A.minWidth=0)),l.createElement("div",(0,o.Z)({},P,{style:(0,o.Z)((0,o.Z)({},A),S),className:_,ref:t}),C)});t.Z=p},92820:function(e,t,n){"use strict";var r=n(87462),o=n(4942),c=n(71002),a=n(97685),i=n(94184),l=n.n(i),s=n(67294),u=n(53124),f=n(98082),d=n(24308),p=n(93355),h=n(99134),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function m(e,t){var n=s.useState("string"==typeof e?e:""),r=(0,a.Z)(n,2),o=r[0],i=r[1],l=function(){if("object"===(0,c.Z)(e))for(var n=0;n0?-(B[0]/2):void 0,L=null!=B[1]&&B[1]>0?-(B[1]/2):void 0;if(F&&(z.marginLeft=F,z.marginRight=F),G){var Q=(0,a.Z)(B,2);z.rowGap=Q[1]}else L&&(z.marginTop=L,z.marginBottom=L);var X=(0,a.Z)(B,2),J=X[0],Y=X[1],K=s.useMemo(function(){return{gutter:[J,Y],wrap:w,supportFlexGap:G}},[J,Y,w,G]);return s.createElement(h.Z.Provider,{value:K},s.createElement("div",(0,r.Z)({},E,{className:U,style:(0,r.Z)((0,r.Z)({},z),Z),ref:t}),g))});t.Z=y},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},20550:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(4942),o=n(87462),c=n(97685),a=n(97937),i=n(94184),l=n.n(i),s=n(98423),u=n(67294),f=n(53124),d=n(98787),p=n(68349),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},m=RegExp("^(".concat(d.Y.join("|"),")(-inverse)?$")),y=RegExp("^(".concat(d.E.join("|"),")$")),b=u.forwardRef(function(e,t){var n,i=e.prefixCls,d=e.className,h=e.style,b=e.children,x=e.icon,Z=e.color,g=e.onClose,j=e.closeIcon,O=e.closable,w=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),E=u.useContext(f.E_),C=E.getPrefixCls,k=E.direction,S=u.useState(!0),P=(0,c.Z)(S,2),N=P[0],T=P[1];u.useEffect(function(){"visible"in w&&T(w.visible)},[w.visible]);var _=function(){return!!Z&&(m.test(Z)||y.test(Z))},A=(0,o.Z)({backgroundColor:Z&&!_()?Z:void 0},h),I=_(),R=C("tag",i),W=l()(R,(n={},(0,r.Z)(n,"".concat(R,"-").concat(Z),I),(0,r.Z)(n,"".concat(R,"-has-color"),Z&&!I),(0,r.Z)(n,"".concat(R,"-hidden"),!N),(0,r.Z)(n,"".concat(R,"-rtl"),"rtl"===k),n),d),M=function(e){e.stopPropagation(),null==g||g(e),!e.defaultPrevented&&("visible"in w||T(!1))},D="onClick"in w||b&&"a"===b.type,G=(0,s.Z)(w,["visible"]),H=x||null,$=H?u.createElement(u.Fragment,null,H,u.createElement("span",null,b)):b,B=u.createElement("span",(0,o.Z)({},G,{ref:t,className:W,style:A}),$,void 0!==O&&O?j?u.createElement("span",{className:"".concat(R,"-close-icon"),onClick:M},j):u.createElement(a.Z,{className:"".concat(R,"-close-icon"),onClick:M}):null);return D?u.createElement(p.Z,null,B):B});b.CheckableTag=function(e){var t,n=e.prefixCls,c=e.className,a=e.checked,i=e.onChange,s=e.onClick,d=h(e,["prefixCls","className","checked","onChange","onClick"]),p=(0,u.useContext(f.E_).getPrefixCls)("tag",n),v=l()(p,(t={},(0,r.Z)(t,"".concat(p,"-checkable"),!0),(0,r.Z)(t,"".concat(p,"-checkable-checked"),a),t),c);return u.createElement("span",(0,o.Z)({},d,{className:v,onClick:function(e){null==i||i(!a),null==s||s(e)}}))};var x=b},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),c=n(14841),a=Math.max,i=Math.min;e.exports=function(e,t,n){var l,s,u,f,d,p,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var n=l,r=s;return l=s=void 0,h=t,f=e.apply(r,n)}function x(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||m&&r>=u}function Z(){var e,n,r,c=o();if(x(c))return g(c);d=setTimeout(Z,(e=c-p,n=c-h,r=t-e,m?i(r,u-n):r))}function g(e){return(d=void 0,y&&l)?b(e):(l=s=void 0,f)}function j(){var e,n=o(),r=x(n);if(l=arguments,s=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(Z,t),v?b(e):f;if(m)return clearTimeout(d),d=setTimeout(Z,t),b(p)}return void 0===d&&(d=setTimeout(Z,t)),f}return t=c(t)||0,r(n)&&(v=!!n.leading,u=(m="maxWait"in n)?a(c(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),j.cancel=function(){void 0!==d&&clearTimeout(d),h=0,l=p=s=d=void 0},j.flush=function(){return void 0===d?f:g(o())},j}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),c=n(33448),a=0/0,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(c(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?a:+e}},67742:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/webhooks",function(){return n(72118)}])},72118:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(48689),c=n(84485),a=n(94199),i=n(20550),l=n(15746),s=n(32808),u=n(85402),f=n(69677),d=n(71230),p=n(71577),h=n(26713),v=n(52206),m=n(67294),y=n(64777),b=n(37174);let{Title:x,Paragraph:Z}=c.Z,g={CHAT:{name:"Chat messages",description:"When a user sends a chat message",color:"purple"},USER_JOINED:{name:"User joined",description:"When a user joins the chat",color:"green"},NAME_CHANGE:{name:"User name changed",description:"When a user changes their name",color:"blue"},"VISIBILITY-UPDATE":{name:"Message visibility changed",description:"When a message visibility changes, likely due to moderation",color:"red"},STREAM_STARTED:{name:"Stream started",description:"When a stream starts",color:"orange"},STREAM_STOPPED:{name:"Stream stopped",description:"When a stream stops",color:"cyan"}},j=e=>{let{onOk:t,onCancel:n,open:o}=e,[c,a]=(0,m.useState)([]),[i,h]=(0,m.useState)(""),v=Object.keys(g).map(e=>({value:e,label:g[e].description})),y={disabled:(null==c?void 0:c.length)===0||!(0,b.Z)(i)},x=v.map(e=>(0,r.jsx)(l.Z,{span:8,children:(0,r.jsx)(s.Z,{value:e.value,children:e.label})},e.value));return(0,r.jsxs)(u.Z,{title:"Create New Webhook",open:o,onOk:function(){t(i,c),h(""),a(null)},onCancel:n,okButtonProps:y,children:[(0,r.jsx)("div",{children:(0,r.jsx)(f.Z,{value:i,placeholder:"https://myserver.com/webhook",onChange:e=>h(e.currentTarget.value.trim()),type:"url",pattern:b.a})}),(0,r.jsx)("p",{children:"Select the events that will be sent to this webhook."}),(0,r.jsx)(s.Z.Group,{style:{width:"100%"},value:c,onChange:function(e){a(e)},children:(0,r.jsx)(d.Z,{children:x})}),(0,r.jsx)("p",{children:(0,r.jsx)(p.Z,{type:"primary",onClick:function(){a(Object.keys(g))},children:"Select all"})})]})},O=()=>{let[e,t]=(0,m.useState)([]),[n,c]=(0,m.useState)(!1);function l(e){console.error("error",e)}async function s(){try{let e=await (0,y.rQ)(y.XA);t(e)}catch(n){l(n)}}async function u(e){try{await (0,y.rQ)(y.M_,{method:"POST",data:{id:e}}),s()}catch(t){l(t)}}async function f(n,r){try{let o=await (0,y.rQ)(y.iG,{method:"POST",data:{url:n,events:r}});t(e.concat(o))}catch(c){l(c)}}(0,m.useEffect)(()=>{s()},[]);let d=()=>{c(!0)},b=(e,t)=>{c(!1),f(e,t)},O=()=>{c(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(x,{children:"Webhooks"}),(0,r.jsx)(Z,{children:"A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming."}),(0,r.jsxs)(Z,{children:["Read more about how to use webhooks, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/integrations/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(v.Z,{rowKey:e=>e.id,columns:[{title:"",key:"delete",render:(e,t)=>(0,r.jsx)(h.Z,{size:"middle",children:(0,r.jsx)(p.Z,{onClick:()=>u(t.id),icon:(0,r.jsx)(o.Z,{})})})},{title:"URL",dataIndex:"url",key:"url"},{title:"Events",dataIndex:"events",key:"events",render:e=>(0,r.jsx)(r.Fragment,{children:e.map(e=>(function(e){if(!e||!g[e])return null;let t=g[e];return(0,r.jsx)(a.Z,{title:t.description,children:(0,r.jsx)(i.Z,{color:t.color,children:t.name})},e)})(e))})}],dataSource:e,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(p.Z,{type:"primary",onClick:d,children:"Create Webhook"}),(0,r.jsx)(j,{open:n,onOk:b,onCancel:O})]})};t.default=O}},function(e){e.O(0,[8909,3903,4267,2206,9774,2888,179],function(){return e(e.s=67742)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js b/static/web/_next/static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js deleted file mode 100644 index 79a22b19c..000000000 --- a/static/web/_next/static/chunks/pages/admin/webhooks-c59eaaf1fe4ac78c.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1234],{48689:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(1413),o=n(67294),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(42135),i=function(e,t){return o.createElement(a.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:c}))};i.displayName="DeleteOutlined";var l=o.forwardRef(i)},15746:function(e,t,n){"use strict";var r=n(21584);t.Z=r.Z},99134:function(e,t,n){"use strict";var r=(0,n(67294).createContext)({});t.Z=r},21584:function(e,t,n){"use strict";var r=n(4942),o=n(87462),c=n(71002),a=n(94184),i=n.n(a),l=n(67294),s=n(53124),u=n(99134),f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},d=["xs","sm","md","lg","xl","xxl"],p=l.forwardRef(function(e,t){var n,a=l.useContext(s.E_),p=a.getPrefixCls,h=a.direction,v=l.useContext(u.Z),m=v.gutter,y=v.wrap,b=v.supportFlexGap,x=e.prefixCls,Z=e.span,g=e.order,j=e.offset,O=e.push,w=e.pull,E=e.className,C=e.children,k=e.flex,S=e.style,P=f(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),N=p("col",x),T={};d.forEach(function(t){var n,a={},i=e[t];"number"==typeof i?a.span=i:"object"===(0,c.Z)(i)&&(a=i||{}),delete P[t],T=(0,o.Z)((0,o.Z)({},T),(n={},(0,r.Z)(n,"".concat(N,"-").concat(t,"-").concat(a.span),void 0!==a.span),(0,r.Z)(n,"".concat(N,"-").concat(t,"-order-").concat(a.order),a.order||0===a.order),(0,r.Z)(n,"".concat(N,"-").concat(t,"-offset-").concat(a.offset),a.offset||0===a.offset),(0,r.Z)(n,"".concat(N,"-").concat(t,"-push-").concat(a.push),a.push||0===a.push),(0,r.Z)(n,"".concat(N,"-").concat(t,"-pull-").concat(a.pull),a.pull||0===a.pull),(0,r.Z)(n,"".concat(N,"-rtl"),"rtl"===h),n))});var _=i()(N,(n={},(0,r.Z)(n,"".concat(N,"-").concat(Z),void 0!==Z),(0,r.Z)(n,"".concat(N,"-order-").concat(g),g),(0,r.Z)(n,"".concat(N,"-offset-").concat(j),j),(0,r.Z)(n,"".concat(N,"-push-").concat(O),O),(0,r.Z)(n,"".concat(N,"-pull-").concat(w),w),n),E,T),A={};if(m&&m[0]>0){var I=m[0]/2;A.paddingLeft=I,A.paddingRight=I}if(m&&m[1]>0&&!b){var R=m[1]/2;A.paddingTop=R,A.paddingBottom=R}return k&&(A.flex="number"==typeof k?"".concat(k," ").concat(k," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(k)?"0 0 ".concat(k):k,!1!==y||A.minWidth||(A.minWidth=0)),l.createElement("div",(0,o.Z)({},P,{style:(0,o.Z)((0,o.Z)({},A),S),className:_,ref:t}),C)});t.Z=p},92820:function(e,t,n){"use strict";var r=n(87462),o=n(4942),c=n(71002),a=n(97685),i=n(94184),l=n.n(i),s=n(67294),u=n(53124),f=n(98082),d=n(24308),p=n(93355),h=n(99134),v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function m(e,t){var n=s.useState("string"==typeof e?e:""),r=(0,a.Z)(n,2),o=r[0],i=r[1],l=function(){if("object"===(0,c.Z)(e))for(var n=0;n0?-(B[0]/2):void 0,L=null!=B[1]&&B[1]>0?-(B[1]/2):void 0;if(F&&(z.marginLeft=F,z.marginRight=F),G){var Q=(0,a.Z)(B,2);z.rowGap=Q[1]}else L&&(z.marginTop=L,z.marginBottom=L);var X=(0,a.Z)(B,2),J=X[0],Y=X[1],K=s.useMemo(function(){return{gutter:[J,Y],wrap:w,supportFlexGap:G}},[J,Y,w,G]);return s.createElement(h.Z.Provider,{value:K},s.createElement("div",(0,r.Z)({},E,{className:U,style:(0,r.Z)((0,r.Z)({},z),Z),ref:t}),g))});t.Z=y},71230:function(e,t,n){"use strict";var r=n(92820);t.Z=r.Z},20550:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(4942),o=n(87462),c=n(97685),a=n(97937),i=n(94184),l=n.n(i),s=n(98423),u=n(67294),f=n(53124),d=n(98787),p=n(68349),h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);ot.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},m=RegExp("^(".concat(d.Y.join("|"),")(-inverse)?$")),y=RegExp("^(".concat(d.E.join("|"),")$")),b=u.forwardRef(function(e,t){var n,i=e.prefixCls,d=e.className,h=e.style,b=e.children,x=e.icon,Z=e.color,g=e.onClose,j=e.closeIcon,O=e.closable,w=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),E=u.useContext(f.E_),C=E.getPrefixCls,k=E.direction,S=u.useState(!0),P=(0,c.Z)(S,2),N=P[0],T=P[1];u.useEffect(function(){"visible"in w&&T(w.visible)},[w.visible]);var _=function(){return!!Z&&(m.test(Z)||y.test(Z))},A=(0,o.Z)({backgroundColor:Z&&!_()?Z:void 0},h),I=_(),R=C("tag",i),W=l()(R,(n={},(0,r.Z)(n,"".concat(R,"-").concat(Z),I),(0,r.Z)(n,"".concat(R,"-has-color"),Z&&!I),(0,r.Z)(n,"".concat(R,"-hidden"),!N),(0,r.Z)(n,"".concat(R,"-rtl"),"rtl"===k),n),d),M=function(e){e.stopPropagation(),null==g||g(e),!e.defaultPrevented&&("visible"in w||T(!1))},D="onClick"in w||b&&"a"===b.type,G=(0,s.Z)(w,["visible"]),H=x||null,$=H?u.createElement(u.Fragment,null,H,u.createElement("span",null,b)):b,B=u.createElement("span",(0,o.Z)({},G,{ref:t,className:W,style:A}),$,void 0!==O&&O?j?u.createElement("span",{className:"".concat(R,"-close-icon"),onClick:M},j):u.createElement(a.Z,{className:"".concat(R,"-close-icon"),onClick:M}):null);return D?u.createElement(p.Z,null,B):B});b.CheckableTag=function(e){var t,n=e.prefixCls,c=e.className,a=e.checked,i=e.onChange,s=e.onClick,d=h(e,["prefixCls","className","checked","onChange","onClick"]),p=(0,u.useContext(f.E_).getPrefixCls)("tag",n),v=l()(p,(t={},(0,r.Z)(t,"".concat(p,"-checkable"),!0),(0,r.Z)(t,"".concat(p,"-checkable-checked"),a),t),c);return u.createElement("span",(0,o.Z)({},d,{className:v,onClick:function(e){null==i||i(!a),null==s||s(e)}}))};var x=b},27561:function(e,t,n){var r=n(67990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},67990:function(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},23279:function(e,t,n){var r=n(13218),o=n(7771),c=n(14841),a=Math.max,i=Math.min;e.exports=function(e,t,n){var l,s,u,f,d,p,h=0,v=!1,m=!1,y=!0;if("function"!=typeof e)throw TypeError("Expected a function");function b(t){var n=l,r=s;return l=s=void 0,h=t,f=e.apply(r,n)}function x(e){var n=e-p,r=e-h;return void 0===p||n>=t||n<0||m&&r>=u}function Z(){var e,n,r,c=o();if(x(c))return g(c);d=setTimeout(Z,(e=c-p,n=c-h,r=t-e,m?i(r,u-n):r))}function g(e){return(d=void 0,y&&l)?b(e):(l=s=void 0,f)}function j(){var e,n=o(),r=x(n);if(l=arguments,s=this,p=n,r){if(void 0===d)return h=e=p,d=setTimeout(Z,t),v?b(e):f;if(m)return clearTimeout(d),d=setTimeout(Z,t),b(p)}return void 0===d&&(d=setTimeout(Z,t)),f}return t=c(t)||0,r(n)&&(v=!!n.leading,u=(m="maxWait"in n)?a(c(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),j.cancel=function(){void 0!==d&&clearTimeout(d),h=0,l=p=s=d=void 0},j.flush=function(){return void 0===d?f:g(o())},j}},33448:function(e,t,n){var r=n(44239),o=n(37005);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7771:function(e,t,n){var r=n(55639);e.exports=function(){return r.Date.now()}},14841:function(e,t,n){var r=n(27561),o=n(13218),c=n(33448),a=0/0,i=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(c(e))return a;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=l.test(e);return n||s.test(e)?u(e.slice(2),n?2:8):i.test(e)?a:+e}},67742:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/webhooks",function(){return n(72118)}])},72118:function(e,t,n){"use strict";n.r(t);var r=n(85893),o=n(48689),c=n(84485),a=n(94199),i=n(20550),l=n(15746),s=n(32808),u=n(85402),f=n(69677),d=n(71230),p=n(71577),h=n(26713),v=n(52206),m=n(67294),y=n(64777),b=n(37174);let{Title:x,Paragraph:Z}=c.Z,g={CHAT:{name:"Chat messages",description:"When a user sends a chat message",color:"purple"},USER_JOINED:{name:"User joined",description:"When a user joins the chat",color:"green"},NAME_CHANGE:{name:"User name changed",description:"When a user changes their name",color:"blue"},"VISIBILITY-UPDATE":{name:"Message visibility changed",description:"When a message visibility changes, likely due to moderation",color:"red"},STREAM_STARTED:{name:"Stream started",description:"When a stream starts",color:"orange"},STREAM_STOPPED:{name:"Stream stopped",description:"When a stream stops",color:"cyan"}},j=e=>{let{onOk:t,onCancel:n,open:o}=e,[c,a]=(0,m.useState)([]),[i,h]=(0,m.useState)(""),v=Object.keys(g).map(e=>({value:e,label:g[e].description})),y={disabled:(null==c?void 0:c.length)===0||!(0,b.Z)(i)},x=v.map(e=>(0,r.jsx)(l.Z,{span:8,children:(0,r.jsx)(s.Z,{value:e.value,children:e.label})},e.value));return(0,r.jsxs)(u.Z,{title:"Create New Webhook",open:o,onOk:function(){t(i,c),h(""),a(null)},onCancel:n,okButtonProps:y,children:[(0,r.jsx)("div",{children:(0,r.jsx)(f.Z,{value:i,placeholder:"https://myserver.com/webhook",onChange:e=>h(e.currentTarget.value.trim()),type:"url",pattern:b.a})}),(0,r.jsx)("p",{children:"Select the events that will be sent to this webhook."}),(0,r.jsx)(s.Z.Group,{style:{width:"100%"},value:c,onChange:function(e){a(e)},children:(0,r.jsx)(d.Z,{children:x})}),(0,r.jsx)("p",{children:(0,r.jsx)(p.Z,{type:"primary",onClick:function(){a(Object.keys(g))},children:"Select all"})})]})},O=()=>{let[e,t]=(0,m.useState)([]),[n,c]=(0,m.useState)(!1);function l(e){console.error("error",e)}async function s(){try{let e=await (0,y.rQ)(y.XA);t(e)}catch(n){l(n)}}async function u(e){try{await (0,y.rQ)(y.M_,{method:"POST",data:{id:e}}),s()}catch(t){l(t)}}async function f(n,r){try{let o=await (0,y.rQ)(y.iG,{method:"POST",data:{url:n,events:r}});t(e.concat(o))}catch(c){l(c)}}(0,m.useEffect)(()=>{s()},[]);let d=()=>{c(!0)},b=(e,t)=>{c(!1),f(e,t)},O=()=>{c(!1)};return(0,r.jsxs)("div",{children:[(0,r.jsx)(x,{children:"Webhooks"}),(0,r.jsx)(Z,{children:"A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming."}),(0,r.jsxs)(Z,{children:["Read more about how to use webhooks, with examples, at"," ",(0,r.jsx)("a",{href:"https://owncast.online/docs/integrations/?source=admin",target:"_blank",rel:"noopener noreferrer",children:"our documentation"}),"."]}),(0,r.jsx)(v.Z,{rowKey:e=>e.id,columns:[{title:"",key:"delete",render:(e,t)=>(0,r.jsx)(h.Z,{size:"middle",children:(0,r.jsx)(p.Z,{onClick:()=>u(t.id),icon:(0,r.jsx)(o.Z,{})})})},{title:"URL",dataIndex:"url",key:"url"},{title:"Events",dataIndex:"events",key:"events",render:e=>(0,r.jsx)(r.Fragment,{children:e.map(e=>(function(e){if(!e||!g[e])return null;let t=g[e];return(0,r.jsx)(a.Z,{title:t.description,children:(0,r.jsx)(i.Z,{color:t.color,children:t.name})},e)})(e))})}],dataSource:e,pagination:!1}),(0,r.jsx)("br",{}),(0,r.jsx)(p.Z,{type:"primary",onClick:d,children:"Create Webhook"}),(0,r.jsx)(j,{open:n,onOk:b,onCancel:O})]})};t.default=O}},function(e){e.O(0,[8909,3903,4267,2206,9774,2888,179],function(){return e(e.s=67742)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js b/static/web/_next/static/chunks/pages/embed/chat/readwrite-9d91f84b3d58a6e2.js similarity index 98% rename from static/web/_next/static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js rename to static/web/_next/static/chunks/pages/embed/chat/readwrite-9d91f84b3d58a6e2.js index a8366a6ab..fa8a23cbb 100644 --- a/static/web/_next/static/chunks/pages/embed/chat/readwrite-98f900d6cb9a2d39.js +++ b/static/web/_next/static/chunks/pages/embed/chat/readwrite-9d91f84b3d58a6e2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[955,1496],{30672:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/chat/readwrite",function(){return t(34986)}])},37527:function(e,n,t){"use strict";t.d(n,{h:function(){return T},Z:function(){return U}});var a=t(85893),r=t(97183),s=t(94199),l=t(20550),i=t(94184),c=t.n(i),o=t(66516),d=t(38504),h=t(71577),u=t(26713),x=t(86548),j=t(94149),m=t(38545),_=t(87547),p=t(39398),b=t(4480),f=t(67294),Z=t(49218),g=t(5152),C=t.n(g),w=t(77466),v=t(79252),k=t.n(v);let N=C()(()=>t.e(4761).then(t.bind(t,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),y=C()(()=>Promise.all([t.e(8909),t.e(8119),t.e(9096)]).then(t.bind(t,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),A=C()(()=>Promise.all([t.e(4381),t.e(5535)]).then(t.bind(t,65535)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[65535]}}),E=e=>{let{username:n}=e,[t,r]=(0,f.useState)(!1),[s,l]=(0,f.useState)(!1),[i,c]=(0,b.FV)(w.ZA),g=(0,b.sJ)(w.Q),C=()=>{c(!i)},v=()=>{r(!0)};(0,Z.y1)("c",C,{enableOnContentEditable:!1},[i]);let E=(0,b.sJ)(w.db);if(!E)return null;let{displayName:H}=E,I=(0,a.jsxs)(o.Z,{children:[(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(x.Z,{}),onClick:()=>v(),children:"Change name"},"0"),(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(j.Z,{}),onClick:()=>l(!0),children:"Authenticate"},"1"),g.chatAvailable&&(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(m.Z,{}),onClick:()=>C(),children:"Toggle chat"},"3")]});return(0,a.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,a.jsx)(d.Z,{overlay:I,trigger:["click"],children:(0,a.jsx)(h.Z,{type:"primary",icon:(0,a.jsx)(_.Z,{style:{marginRight:".5rem"}}),children:(0,a.jsxs)(u.Z,{children:[n||H,(0,a.jsx)(p.Z,{})]})})}),(0,a.jsx)(N,{title:"Change Chat Display Name",open:t,handleCancel:()=>r(!1),children:(0,a.jsx)(y,{})}),(0,a.jsx)(N,{title:"Authenticate",open:s,handleCancel:()=>l(!1),children:(0,a.jsx)(A,{})})]})};var H=t(50738),I=t(31764),J=t.n(I);let{Header:D}=r.Z,T=e=>{let{name:n="Your stream title",chatAvailable:t,chatDisabled:r}=e;return(0,a.jsxs)(D,{className:c()(["".concat(J().header)],"global-header"),children:[(0,a.jsxs)("div",{className:"".concat(J().logo),children:[(0,a.jsx)(H.C,{variant:"contrast"}),(0,a.jsx)("span",{className:"global-header-text",children:n})]}),t&&!r&&(0,a.jsx)(E,{}),!t&&!r&&(0,a.jsx)(s.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,a.jsx)(l.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var U=T},34986:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return c}});var a=t(85893),r=t(4480),s=t(94977),l=t(77466),i=t(37527);function c(){let e=(0,r.sJ)(l.db),n=(0,r.sJ)(l.pH),t=(0,r.sJ)(l.g1),{name:c,chatDisabled:o}=t;if(!e)return null;let{id:d,displayName:h,isModerator:u}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)(l.me,{}),(0,a.jsx)(i.Z,{name:c,chatAvailable:!0,chatDisabled:o}),(0,a.jsx)(s.ChatContainer,{messages:n,usernameToHighlight:h,chatUserId:d,isModerator:u,showInput:!0,height:"80vh"})]})}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}}},function(e){e.O(0,[1272,8700,3903,6395,2852,911,7466,4977,9774,2888,179],function(){return e(e.s=30672)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[955,1496],{30672:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/chat/readwrite",function(){return t(34986)}])},37527:function(e,n,t){"use strict";t.d(n,{h:function(){return T},Z:function(){return U}});var a=t(85893),r=t(97183),s=t(94199),l=t(20550),i=t(94184),c=t.n(i),o=t(66516),d=t(38504),h=t(71577),u=t(26713),x=t(86548),j=t(94149),m=t(38545),_=t(87547),p=t(39398),b=t(4480),f=t(67294),Z=t(49218),g=t(5152),C=t.n(g),w=t(77466),v=t(79252),k=t.n(v);let N=C()(()=>t.e(4761).then(t.bind(t,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),y=C()(()=>Promise.all([t.e(8909),t.e(8119),t.e(9346)]).then(t.bind(t,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),A=C()(()=>Promise.all([t.e(4381),t.e(5535)]).then(t.bind(t,65535)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[65535]}}),E=e=>{let{username:n}=e,[t,r]=(0,f.useState)(!1),[s,l]=(0,f.useState)(!1),[i,c]=(0,b.FV)(w.ZA),g=(0,b.sJ)(w.Q),C=()=>{c(!i)},v=()=>{r(!0)};(0,Z.y1)("c",C,{enableOnContentEditable:!1},[i]);let E=(0,b.sJ)(w.db);if(!E)return null;let{displayName:H}=E,I=(0,a.jsxs)(o.Z,{children:[(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(x.Z,{}),onClick:()=>v(),children:"Change name"},"0"),(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(j.Z,{}),onClick:()=>l(!0),children:"Authenticate"},"1"),g.chatAvailable&&(0,a.jsx)(o.Z.Item,{icon:(0,a.jsx)(m.Z,{}),onClick:()=>C(),children:"Toggle chat"},"3")]});return(0,a.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,a.jsx)(d.Z,{overlay:I,trigger:["click"],children:(0,a.jsx)(h.Z,{type:"primary",icon:(0,a.jsx)(_.Z,{style:{marginRight:".5rem"}}),children:(0,a.jsxs)(u.Z,{children:[n||H,(0,a.jsx)(p.Z,{})]})})}),(0,a.jsx)(N,{title:"Change Chat Display Name",open:t,handleCancel:()=>r(!1),children:(0,a.jsx)(y,{})}),(0,a.jsx)(N,{title:"Authenticate",open:s,handleCancel:()=>l(!1),children:(0,a.jsx)(A,{})})]})};var H=t(50738),I=t(31764),J=t.n(I);let{Header:D}=r.Z,T=e=>{let{name:n="Your stream title",chatAvailable:t,chatDisabled:r}=e;return(0,a.jsxs)(D,{className:c()(["".concat(J().header)],"global-header"),children:[(0,a.jsxs)("div",{className:"".concat(J().logo),children:[(0,a.jsx)(H.C,{variant:"contrast"}),(0,a.jsx)("span",{className:"global-header-text",children:n})]}),t&&!r&&(0,a.jsx)(E,{}),!t&&!r&&(0,a.jsx)(s.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,a.jsx)(l.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var U=T},34986:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return c}});var a=t(85893),r=t(4480),s=t(94977),l=t(77466),i=t(37527);function c(){let e=(0,r.sJ)(l.db),n=(0,r.sJ)(l.pH),t=(0,r.sJ)(l.g1),{name:c,chatDisabled:o}=t;if(!e)return null;let{id:d,displayName:h,isModerator:u}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)(l.me,{}),(0,a.jsx)(i.Z,{name:c,chatAvailable:!0,chatDisabled:o}),(0,a.jsx)(s.ChatContainer,{messages:n,usernameToHighlight:h,chatUserId:d,isModerator:u,showInput:!0,height:"80vh"})]})}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}}},function(e){e.O(0,[1272,8700,3903,6395,2852,911,7466,4977,9774,2888,179],function(){return e(e.s=30672)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/pages/index-08253d4ef17adb43.js b/static/web/_next/static/chunks/pages/index-50e1210cbbe7a6ab.js similarity index 99% rename from static/web/_next/static/chunks/pages/index-08253d4ef17adb43.js rename to static/web/_next/static/chunks/pages/index-50e1210cbbe7a6ab.js index 08489c1b4..3f0de3d42 100644 --- a/static/web/_next/static/chunks/pages/index-08253d4ef17adb43.js +++ b/static/web/_next/static/chunks/pages/index-50e1210cbbe7a6ab.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(6511)}])},37527:function(e,t,n){"use strict";n.d(t,{h:function(){return E},Z:function(){return M}});var o=n(85893),s=n(97183),i=n(94199),l=n(20550),a=n(94184),r=n.n(a),c=n(66516),d=n(38504),h=n(71577),u=n(26713),m=n(86548),x=n(94149),p=n(38545),f=n(87547),j=n(39398),_=n(4480),g=n(67294),w=n(49218),v=n(5152),y=n.n(v),b=n(77466),C=n(79252),k=n.n(C);let N=y()(()=>n.e(4761).then(n.bind(n,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),S=y()(()=>Promise.all([n.e(8909),n.e(8119),n.e(9096)]).then(n.bind(n,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),Z=y()(()=>Promise.all([n.e(4381),n.e(5535)]).then(n.bind(n,65535)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[65535]}}),F=e=>{let{username:t}=e,[n,s]=(0,g.useState)(!1),[i,l]=(0,g.useState)(!1),[a,r]=(0,_.FV)(b.ZA),v=(0,_.sJ)(b.Q),y=()=>{r(!a)},C=()=>{s(!0)};(0,w.y1)("c",y,{enableOnContentEditable:!1},[a]);let F=(0,_.sJ)(b.db);if(!F)return null;let{displayName:L}=F,T=(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(m.Z,{}),onClick:()=>C(),children:"Change name"},"0"),(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(x.Z,{}),onClick:()=>l(!0),children:"Authenticate"},"1"),v.chatAvailable&&(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(p.Z,{}),onClick:()=>y(),children:"Toggle chat"},"3")]});return(0,o.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,o.jsx)(d.Z,{overlay:T,trigger:["click"],children:(0,o.jsx)(h.Z,{type:"primary",icon:(0,o.jsx)(f.Z,{style:{marginRight:".5rem"}}),children:(0,o.jsxs)(u.Z,{children:[t||L,(0,o.jsx)(j.Z,{})]})})}),(0,o.jsx)(N,{title:"Change Chat Display Name",open:n,handleCancel:()=>s(!1),children:(0,o.jsx)(S,{})}),(0,o.jsx)(N,{title:"Authenticate",open:i,handleCancel:()=>l(!1),children:(0,o.jsx)(Z,{})})]})};var L=n(50738),T=n(31764),A=n.n(T);let{Header:D}=s.Z,E=e=>{let{name:t="Your stream title",chatAvailable:n,chatDisabled:s}=e;return(0,o.jsxs)(D,{className:r()(["".concat(A().header)],"global-header"),children:[(0,o.jsxs)("div",{className:"".concat(A().logo),children:[(0,o.jsx)(L.C,{variant:"contrast"}),(0,o.jsx)("span",{className:"global-header-text",children:t})]}),n&&!s&&(0,o.jsx)(F,{}),!n&&!s&&(0,o.jsx)(i.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,o.jsx)(l.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var M=E},14761:function(e,t,n){"use strict";n.r(t),n.d(t,{Modal:function(){return d}});var o=n(85893),s=n(85402),i=n(26303),l=n(11382),a=n(67294),r=n(77011),c=n.n(r);let d=e=>{let{title:t,url:n,open:r,handleOk:d,handleCancel:h,afterClose:u,height:m,width:x,children:p}=e,[f,j]=(0,a.useState)(!!n),_=n&&(0,o.jsx)("iframe",{title:t,src:n,width:"100%",height:"100%",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",frameBorder:"0",allowFullScreen:!0,onLoad:()=>j(!1)});return(0,o.jsx)(s.Z,{title:t,open:r,onOk:d,onCancel:h,afterClose:u,bodyStyle:{padding:"0px",minHeight:m,height:null!=m?m:"100%"},width:x,zIndex:999,footer:null,centered:!0,destroyOnClose:!0,children:(0,o.jsxs)(o.Fragment,{children:[f&&(0,o.jsx)(i.Z,{active:f,style:{padding:"10px"},paragraph:{rows:10}}),_&&(0,o.jsx)("div",{style:{display:f?"none":"inline"},children:_}),p&&(0,o.jsx)("div",{className:c().content,children:p}),f&&(0,o.jsx)(l.Z,{className:c().spinner,spinning:f,size:"large"})]})})};t.default=d,d.defaultProps={url:void 0,children:void 0,handleOk:void 0,handleCancel:void 0,afterClose:void 0}},51513:function(e,t,n){"use strict";n.d(t,{R:function(){return c}});var o=n(85893),s=n(27049),i=n(24019),l=n(45938),a=n(88335),r=n.n(a);let c=e=>{let t,{streamName:n,customText:a,lastLive:c,notificationsEnabled:d,fediverseAccount:h,onNotifyClick:u,onFollowClick:m}=e;return t=a||(!a&&d&&h?(0,o.jsxs)("span",{children:["This stream is offline. You can"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"be notified"})," ","the next time ",n," goes live or"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"follow"})," ",h," on the Fediverse."]}):!a&&d?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"Be notified"})," ","the next time ",n," goes live."]}):!a&&h?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"Follow"})," ",h," on the Fediverse to see the next time ",n," goes live."]}):"This stream is offline. Check back soon!"),(0,o.jsx)("div",{className:r().outerContainer,children:(0,o.jsxs)("div",{className:r().innerContainer,children:[(0,o.jsx)("div",{className:r().header,children:n}),(0,o.jsx)(s.Z,{className:r().separator}),(0,o.jsx)("div",{className:r().bodyText,children:t}),c&&(0,o.jsxs)("div",{className:r().lastLiveDate,children:[(0,o.jsx)(i.Z,{className:r().clockIcon}),"Last live ".concat((0,l.Z)(new Date(c))," ago.")]})]})})}},69357:function(e,t,n){"use strict";n.d(t,{X:function(){return d}});var o=n(85893),s=n(45938),i=n(68730),l=n(67294),a=n(31326),r=n(37970),c=n.n(r);let d=e=>{let t,{online:n,lastConnectTime:r,lastDisconnectTime:d,viewerCount:h}=e,[,u]=(0,l.useState)(new Date);(0,l.useEffect)(()=>{let e=setInterval(()=>u(new Date),1e3);return()=>{clearInterval(e)}},[]);let m="";if(n&&r){let x=function(e){let t=(0,i.Z)({start:e,end:new Date});return t.days>1?"".concat(t.days," days ").concat(t.hours," hours"):t.hours>=1?"".concat(t.hours," hours ").concat(t.minutes," minutes"):"".concat(t.minutes," minutes ").concat(t.seconds," seconds")}(new Date(r));m=n?"Live for ".concat(x):"Offline",t=h>0&&(0,o.jsxs)("div",{className:c().right,children:[(0,o.jsx)("span",{children:(0,o.jsx)(a.Z,{})}),(0,o.jsx)("span",{children:" ".concat(h)})]})}else!n&&(m="Offline",d&&(t="Last live ".concat((0,s.Z)(new Date(d))," ago.")));return(0,o.jsxs)("div",{className:c().statusbar,children:[(0,o.jsx)("div",{children:m}),(0,o.jsx)("div",{children:t})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},6511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eq}});var o=n(85893),s=n(97183),i=n(4480),l=n(9008),a=n.n(l),r=n(67294),c=n(77466),d=n(84381),h=n(11382),u=n(94184),m=n.n(u),x=n(5152),p=n.n(x),f=n(72581),j=n(67917),_=n.n(j);let g=e=>{let{version:t}=e;return(0,o.jsxs)("div",{className:_().footer,children:[(0,o.jsxs)("span",{children:["Powered by ",(0,o.jsx)("a",{href:"https://owncast.online",children:t})]}),(0,o.jsxs)("span",{className:_().links,children:[(0,o.jsx)("a",{href:"https://owncast.online/docs",target:"_blank",rel:"noreferrer",children:"Documentation"}),(0,o.jsx)("a",{href:"https://owncast.online/help",target:"_blank",rel:"noreferrer",children:"Contribute"}),(0,o.jsx)("a",{href:"https://github.com/owncast/owncast",target:"_blank",rel:"noreferrer",children:"Source"})]})]})};var w=n(10808),v=n.n(w);let y=e=>{let{content:t}=e,n=(0,i.sJ)(c.hz),s=(0,i.sJ)(c.g1),{version:l}=s;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:v().pageContentContainer,children:(0,o.jsx)("div",{className:v().customPageContent,dangerouslySetInnerHTML:{__html:t}})}),n&&(0,o.jsx)(g,{version:l})]})};var b=n(17725),C=n.n(b),k=n(87412),N=n(12341),S=n.n(N);let Z=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(2852),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),F=()=>{let e=(0,i.sJ)(c.db),t=(0,i.sJ)(c.pH);if(!e)return null;let{id:n,isModerator:s,displayName:l}=e;return(0,o.jsx)(k.ZP,{className:S().root,collapsedWidth:0,width:320,children:(0,o.jsx)(Z,{messages:t,usernameToHighlight:l,chatUserId:n,isModerator:s})})};var L=n(12270),T=n.n(L);let A=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:"".concat(T().row),children:t})};var D=n(71577),E=n(13959),M=n.n(E);let I=e=>{let{action:t,primary:n=!0,externalActionSelected:s}=e,{title:i,description:l,icon:a,color:r}=t;return(0,o.jsxs)(D.Z,{type:n?"primary":"default",className:"".concat(M().button),onClick:()=>s(t),style:{backgroundColor:r},children:[a&&(0,o.jsx)("img",{src:a,className:"".concat(M().icon),alt:l}),i]})};var H=n(51513),z=n(34447);let B=e=>{let{onClick:t,props:n}=e;return(0,o.jsx)(D.Z,{...n,type:"primary",className:M().button,icon:(0,o.jsx)(z.Z,{}),onClick:t,children:"Follow"})};var O=n(71578);let R=e=>{let{onClick:t,text:n}=e;return(0,o.jsx)(D.Z,{type:"primary",className:"".concat(M().button),icon:(0,o.jsx)(O.Z,{}),onClick:t,children:n||"Notify"})};var J=n(53731),P=n(79216),U=n(74933),G=n.n(U);let q=e=>{let{src:t}=e;return(0,o.jsx)("div",{className:G().root,children:(0,o.jsx)("div",{className:G().container,children:(0,o.jsx)(P.Z,{src:t,alt:"Logo",className:G().image,rootClassName:G().image})})})};var V=n(25675),Y=n.n(V),Q=n(573),W=n.n(Q);let K=e=>{let{links:t}=e;return(0,o.jsx)("div",{className:W().links,children:t.map(e=>(0,o.jsx)("a",{href:e.url,className:W().link,target:"_blank",rel:"noreferrer me",children:(0,o.jsx)(Y(),{src:e.icon||"/img/platformlogos/default.svg",alt:e.platform,title:e.platform,className:W().link,width:"30",height:"30"})},e.platform))})};var X=n(47900),$=n.n(X);let ee=e=>{let{name:t,title:n,summary:s,logo:i,tags:l,links:a}=e;return(0,o.jsx)("div",{className:$().root,children:(0,o.jsxs)("div",{className:$().logoTitleSection,children:[(0,o.jsx)("div",{className:$().logo,children:(0,o.jsx)(q,{src:i})}),(0,o.jsxs)("div",{className:$().titleSection,children:[(0,o.jsx)("div",{className:m()($().title,$().row,"header-title"),children:t}),(0,o.jsx)("div",{className:m()($().subtitle,$().row,"header-subtitle"),children:(0,o.jsx)(J.Z,{children:n||s})}),(0,o.jsx)("div",{className:m()($().tagList,$().row),children:l.length>0&&l.map(e=>(0,o.jsxs)("span",{children:["#",e,"\xa0"]},e))}),(0,o.jsx)("div",{className:m()($().socialLinks,$().row),children:(0,o.jsx)(K,{links:a})})]})]})})};var et=n(69357),en=n(26303),eo=n(71230),es=n(15746),ei=n(3698),el=n(24093),ea=n(69833),er=n.n(ea);let ec=e=>{let{follower:t}=e;return(0,o.jsx)("div",{className:er().follower,children:(0,o.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",children:(0,o.jsxs)(eo.Z,{wrap:!1,children:[(0,o.jsx)(es.Z,{span:6,children:(0,o.jsx)(el.C,{src:t.image,alt:"Avatar",className:er().avatar,children:(0,o.jsx)("img",{src:"/logo",alt:"Logo",className:er().placeholder})})}),(0,o.jsxs)(es.Z,{children:[(0,o.jsx)(eo.Z,{children:t.name}),(0,o.jsx)(eo.Z,{className:er().account,children:t.username})]})]})})})};var ed=n(21890),eh=n.n(ed);let eu=e=>{let{name:t,onFollowButtonClick:n}=e,[s,i]=(0,r.useState)([]),[l,a]=(0,r.useState)(0),[c,d]=(0,r.useState)(1),[h,u]=(0,r.useState)(!0),m=async()=>{try{let e=await fetch("".concat("/api/followers","?page=").concat(c)),t=await e.json(),{results:n,total:o}=t;i(n),a(o)}catch(s){console.error(s)}};(0,r.useEffect)(()=>{m()},[]),(0,r.useEffect)(()=>{m()},[c]),(0,r.useEffect)(()=>{u(!1)},[s]);let x=(0,o.jsxs)("div",{className:eh().noFollowers,children:[(0,o.jsx)("h2",{children:"Be the first follower!"}),(0,o.jsxs)("p",{children:["Owncast"!==t?t:"This server"," is a part of the"," ",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",children:"Fediverse"}),", an interconnected network of independent users and servers."]}),(0,o.jsxs)("p",{children:["By following ","Owncast"!==t?t:"this server"," you'll be able to get updates from the stream, share it with others, and and show your appreciation when it goes live, all from your own Fediverse account."]}),(0,o.jsx)(B,{onClick:n})]}),p=(0,o.jsx)(en.Z,{active:!0,paragraph:{rows:3}});return h?p:(null==s?void 0:s.length)?(0,o.jsxs)("div",{className:eh().followers,children:[(0,o.jsx)(eo.Z,{wrap:!0,gutter:[10,10],children:s.map(e=>(0,o.jsx)(es.Z,{children:(0,o.jsx)(ec,{follower:e},e.link)},e.link))}),(0,o.jsx)(ei.Z,{current:c,pageSize:24,total:Math.ceil(l/24)||1,onChange(e){d(e)},hideOnSinglePage:!0})]}):x};var em=n(14761),ex=n(66516),ep=n(38504),ef=n(49647),ej=n(60198),e_=n(89705),eg=n(97038),ew=n.n(eg);let ev="notify",ey="follow",eb=e=>{let{actions:t,externalActionSelected:n,notifyItemSelected:s,followItemSelected:i,showFollowItem:l,showNotifyItem:a}=e,r=e=>{if(e.key===ev){s();return}if(e.key===ey){i();return}let o=t.find(t=>t.url===e.key);n(o)},c=t.map(e=>({key:e.url,label:(0,o.jsxs)("span",{className:ew().item,children:[e.icon&&(0,o.jsx)("img",{className:ew().icon,src:e.icon,alt:e.title})," ",e.title]})}));l&&c.unshift({key:ey,label:(0,o.jsxs)("span",{className:ew().item,children:[(0,o.jsx)(ef.Z,{className:ew().icon})," Follow this stream"]})}),a&&c.unshift({key:ev,label:(0,o.jsxs)("span",{className:ew().item,children:[(0,o.jsx)(ej.Z,{className:ew().icon}),"Notify when live"]})});let d=(0,o.jsx)(ex.Z,{items:c,onClick:r});return(0,o.jsx)(ep.Z,{overlay:d,placement:"bottomRight",trigger:["click"],className:ew().menu,children:(0,o.jsx)("div",{className:ew().buttonWrap,children:(0,o.jsx)(D.Z,{type:"default",onClick:e=>e.preventDefault(),size:"large",icon:(0,o.jsx)(e_.Z,{size:6,style:{rotate:"90deg"}})})})})};var eC=n(26713),ek=n(14670),eN=n(69677),eS=n(66009),eZ=n.n(eS);let eF=e=>{let{handleClose:t,account:n,name:s}=e,[i,l]=(0,r.useState)(null),[a,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(null),p=e=>{l(e),function(e){let t=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}(e)?c(!0):c(!1)},f=()=>{window.open("https://owncast.online/join-fediverse","_blank")},j=async()=>{if(a){u(!0);try{let e=i.replace(/^@+/,""),n=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),o=await n.json();if(o.redirectUrl&&(window.open(o.redirectUrl,"_blank"),t()),!o.success){x(o.message),u(!1);return}if(!o.redirectUrl){x("Unable to follow."),u(!1);return}}catch(s){x(s.message)}u(!1)}};return(0,o.jsxs)(eC.Z,{direction:"vertical",children:[(0,o.jsxs)("div",{className:eZ().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"learn about the Fediverse"}),"if it's new to you."]}),(0,o.jsxs)(h.Z,{spinning:d,children:[m&&(0,o.jsx)(ek.Z,{message:"Follow Error",description:m,type:"error",showIcon:!0}),(0,o.jsxs)("div",{className:eZ().account,children:[(0,o.jsx)("img",{src:"/logo",alt:"logo",className:eZ().logo}),(0,o.jsxs)("div",{className:eZ().username,children:[(0,o.jsx)("div",{className:eZ().name,children:s}),(0,o.jsx)("div",{children:n})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:eZ().instructions,children:"Enter your username @server to follow"}),(0,o.jsx)(eN.Z,{value:i,size:"large",onChange:e=>p(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:i}),(0,o.jsx)("div",{className:eZ().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,o.jsxs)(eC.Z,{className:eZ().buttons,children:[(0,o.jsx)(D.Z,{disabled:!a,type:"primary",onClick:j,children:"Follow"}),(0,o.jsx)(D.Z,{onClick:f,type:"primary",children:"Join the Fediverse"})]})]})]})},{Content:eL}=s.Z,eT=p()(()=>n.e(6160).then(n.bind(n,66160)).then(e=>e.BrowserNotifyModal),{loadableGenerated:{webpack:()=>[66160]}}),eA=p()(()=>n.e(7815).then(n.bind(n,17815)).then(e=>e.NotifyReminderPopup),{loadableGenerated:{webpack:()=>[17815]}}),eD=p()(()=>Promise.all([n.e(2544),n.e(7902),n.e(2239),n.e(5202)]).then(n.bind(n,8888)).then(e=>e.OwncastPlayer),{loadableGenerated:{webpack:()=>[8888]}}),eE=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(2852),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),eM=e=>{let{name:t,streamTitle:n,summary:s,tags:i,socialHandles:l,extraPageContent:a,setShowFollowModal:r}=e,c=(0,o.jsx)(y,{content:a}),h=(0,o.jsx)(eu,{name:t,onFollowButtonClick:()=>r(!0)});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:C().lowerHalf,children:(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:i,links:l,logo:"/logo"})}),(0,o.jsx)("div",{className:C().lowerSection,children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[{label:"About",key:"2",children:c},{label:"Followers",key:"3",children:h}]})})]})},eI=e=>{let{name:t,streamTitle:n,summary:s,tags:i,socialHandles:l,extraPageContent:a,messages:c,currentUser:h,showChat:u,actions:x,setExternalActionToDisplay:p,setShowNotifyPopup:f,setShowFollowModal:j}=e;if(!h)return null;let _=(0,r.useRef)(),{id:g,displayName:w}=h,v=u&&(0,o.jsx)(eE,{messages:c,usernameToHighlight:w,chatUserId:g,isModerator:!1}),b=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:i,links:l,logo:"/logo"}),(0,o.jsx)(y,{content:a})]}),k=(0,o.jsx)(eu,{name:t,onFollowButtonClick:()=>j(!0)}),N="".concat(function(e){let[t,n]=(0,r.useState)(0),o=()=>{if(!e.current)return;let t=e.current.getBoundingClientRect().top,{innerHeight:o}=window;n(o-t)};return(0,r.useEffect)(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),t}(_),"px"),S=(e,t)=>(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start"},children:[(0,o.jsx)(t,{...e,style:{width:"85%"}}),(0,o.jsx)(eb,{showFollowItem:!0,showNotifyItem:!0,actions:x,externalActionSelected:p,notifyItemSelected:()=>f(!0),followItemSelected:()=>j(!0)})]});return(0,o.jsx)("div",{className:m()(C().lowerSectionMobile),ref:_,style:{height:N},children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[u&&{label:"Chat",key:"0",children:v},{label:"About",key:"2",children:b},{label:"Followers",key:"3",children:k}],renderTabBar:S})})},eH=e=>{let{externalActionToDisplay:t,setExternalActionToDisplay:n}=e,{title:s,description:i,url:l}=t;return(0,o.jsx)(em.Modal,{title:i||s,url:l,open:!!t,height:"80vh",handleCancel:()=>n(null)})},ez=()=>{let e=(0,i.sJ)(c.Q),t=(0,i.sJ)(c.g1),n=(0,i.sJ)(c.pT),s=(0,i.sJ)(c.di),l=(0,i.sJ)(c.db),[a,d]=(0,i.FV)(c.hz),u=(0,i.sJ)(c.j$),m=(0,i.sJ)(c.YW),{viewerCount:x,lastConnectTime:p,lastDisconnectTime:j,streamTitle:_}=(0,i.sJ)(c.RI),{extraPageContent:g,version:w,name:v,summary:y,socialHandles:b,tags:k,externalActions:N,offlineMessage:S,chatDisabled:Z,federation:L,notifications:T}=t,[D,E]=(0,r.useState)(!1),[M,z]=(0,r.useState)(!1),[O,J]=(0,r.useState)(!1),{account:P}=L,{browser:U}=T,{enabled:G}=U,[q,V]=(0,r.useState)(null),Y=e=>{let{openExternally:t,url:n}=e;t?window.open(n,"_blank"):V(e)},Q=N.map(e=>(0,o.jsx)(I,{action:e,externalActionSelected:Y},e.url)),W=()=>{let e=parseInt((0,f.$o)(f.dA.userVisitCount),10);Number.isNaN(e)&&(e=0),(0,f.qQ)(f.dA.userVisitCount,e+1),e>2&&!(0,f.$o)(f.dA.hasDisplayedNotificationModal)&&E(!0)},K=()=>{z(!1),E(!1),(0,f.qQ)(f.dA.hasDisplayedNotificationModal,!0)},X=()=>{let e=window.innerWidth;void 0===a&&(e<=768?d(!0):d(!1)),!a&&e<=768&&d(!0),a&&e>768&&d(!1)};(0,r.useEffect)(()=>(W(),X(),window.addEventListener("resize",X),()=>{window.removeEventListener("resize",X)}),[]);let $=!Z&&s&&n;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:C().main,children:[(0,o.jsx)(h.Z,{wrapperClassName:C().loadingSpinner,size:"large",spinning:e.appLoading,children:(0,o.jsxs)(eL,{className:C().root,children:[(0,o.jsxs)("div",{className:C().mainSection,children:[(0,o.jsxs)("div",{className:C().topSection,children:[m&&(0,o.jsx)(eD,{source:"/hls/stream.m3u8",online:m}),!m&&!e.appLoading&&(0,o.jsx)(H.R,{streamName:v,customText:S,notificationsEnabled:G,fediverseAccount:P,lastLive:j,onNotifyClick:()=>z(!0),onFollowClick:()=>J(!0)}),m&&(0,o.jsx)(et.X,{online:m,lastConnectTime:p,lastDisconnectTime:j,viewerCount:x})]}),(0,o.jsx)("div",{className:C().midSection,children:(0,o.jsxs)("div",{className:C().buttonsLogoTitleSection,children:[!a&&(0,o.jsxs)(A,{children:[Q,(0,o.jsx)(B,{size:"small",onClick:()=>J(!0)}),(0,o.jsx)(eA,{open:D,notificationClicked:()=>z(!0),notificationClosed:()=>K(),children:(0,o.jsx)(R,{onClick:()=>z(!0)})})]}),(0,o.jsx)(em.Modal,{title:"Notify",open:M,afterClose:()=>K(),handleCancel:()=>K(),children:(0,o.jsx)(eT,{})})]})}),a?(0,o.jsx)(eI,{name:v,streamTitle:_,summary:y,tags:k,socialHandles:b,extraPageContent:g,messages:u,currentUser:l,showChat:$,actions:N,setExternalActionToDisplay:Y,setShowNotifyPopup:z,setShowFollowModal:J}):(0,o.jsx)(eM,{name:v,streamTitle:_,summary:y,tags:k,socialHandles:b,extraPageContent:g,setShowFollowModal:J})]}),$&&!a&&(0,o.jsx)(F,{})]})}),!a&&!1]}),q&&(0,o.jsx)(eH,{externalActionToDisplay:q,setExternalActionToDisplay:V}),(0,o.jsx)(em.Modal,{title:"Follow ".concat(v),open:O,handleCancel:()=>J(!1),width:"550px",children:(0,o.jsx)(eF,{account:P,name:v,handleClose:()=>J(!1)})})]})};var eB=n(37527),eO=n(85402);let eR=e=>{let{title:t,message:n}=e;return(0,o.jsx)(eO.Z,{title:t,visible:!0,footer:null,closable:!1,keyboard:!1,width:900,centered:!0,className:"modal",children:(0,o.jsx)("p",{style:{fontSize:"1.3rem"},children:n})})},eJ=()=>{let e=(0,i.sJ)(c.j$),t=(0,i.sJ)(c.RI),n=!1,o="",s=()=>{n=!0,o=window.document.title},l=()=>{n=!1,window.document.title=o},a=()=>{window.addEventListener("blur",s),window.addEventListener("focus",l)};return(0,r.useEffect)(()=>(o=window.document.title,a(),()=>{window.removeEventListener("focus",l),window.removeEventListener("blur",s)}),[]),(0,r.useEffect)(()=>{let{online:e}=t;n&&e&&(window.document.title="\uD83D\uDCAC :: ".concat(o))},[e]),(0,r.useEffect)(()=>{if(!n)return;let{online:e}=t;e?window.document.title=" \uD83D\uDFE2 :: ".concat(o):e||(window.document.title=" \uD83D\uDD34 :: ".concat(o))},[c.RI]),null},eP=()=>(0,o.jsx)("script",{id:"server-side-hydration",dangerouslySetInnerHTML:{__html:"\n window.configHydration = {{.ServerConfigJSON}};\n window.statusHydration = {{.StatusJSON}};\n "}}),eU=()=>{let e=(0,i.sJ)(c.g1),{appearanceVariables:t,customStyles:n}=e,s=Object.keys(t).filter(e=>!!t[e]).map(e=>"--".concat(e,": ").concat(t[e]));return(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n :root {\n ".concat(s.join(";\n"),"\n }\n ").concat(n,"\n ")}})},eG=()=>{let[e]=(0,i.FV)(c.hz),t=(0,i.sJ)(c.g1),{name:n,title:l,customStyles:d,version:h}=t,u=(0,i.sJ)(c.di),m=(0,i.sJ)(c.ap),x=(0,r.useRef)(null),{chatDisabled:p}=t;return(0,r.useEffect)(()=>{!function(e){let t=e=>{let t=e.getAttribute("rel");e.setAttribute("rel","".concat(t," noopener noreferrer"))};e.querySelectorAll("a").forEach(e=>t(e));let n=new MutationObserver(function(e){for(let n of e)for(let o of n.addedNodes)o instanceof HTMLElement&&"a"===o.tagName.toLowerCase()&&t(o)});n.observe(e,{attributes:!1,childList:!0,subtree:!0})}(x.current)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a(),{children:[(0,o.jsx)(eP,{}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/img/favicon/apple-icon-57x57.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/img/favicon/apple-icon-60x60.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/img/favicon/apple-icon-72x72.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/img/favicon/apple-icon-76x76.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/img/favicon/apple-icon-114x114.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/img/favicon/apple-icon-120x120.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/img/favicon/apple-icon-144x144.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/img/favicon/apple-icon-152x152.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/favicon/apple-icon-180x180.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/img/favicon/android-icon-192x192.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/img/favicon/favicon-96x96.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/favicon/favicon-16x16.png"}),(0,o.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,o.jsx)("link",{href:"/api/auth/provider/indieauth"}),(0,o.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,o.jsx)("meta",{name:"msapplication-TileImage",content:"/img/favicon/ms-icon-144x144.png"}),(0,o.jsx)("meta",{name:"theme-color",content:"#ffffff"}),(0,o.jsx)("style",{children:d}),(0,o.jsx)("base",{target:"_blank"})]}),(0,o.jsxs)(a(),{children:[n?(0,o.jsx)("title",{children:n}):(0,o.jsx)("title",{children:"{{.Name}}"}),(0,o.jsx)("meta",{name:"description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:site_name",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"og:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:type",content:"video.other"}),(0,o.jsx)("meta",{property:"video:tag",content:"{{.TagsString}}"}),(0,o.jsx)("meta",{property:"og:image",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:url",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:alt",content:"{{.RequestedURL}}{{.Image}}"}),(0,o.jsx)("meta",{property:"og:video",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:secure_url",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:height",content:"315"}),(0,o.jsx)("meta",{property:"og:video:width",content:"560"}),(0,o.jsx)("meta",{property:"og:video:type",content:"text/html"}),(0,o.jsx)("meta",{property:"og:video:actor",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"twitter:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"twitter:image",content:"{{.Image}}"}),(0,o.jsx)("meta",{property:"twitter:card",content:"player"}),(0,o.jsx)("meta",{property:"twitter:player",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"twitter:player:width",content:"560"}),(0,o.jsx)("meta",{property:"twitter:player:height",content:"315"})]}),(0,o.jsx)(c.me,{}),(0,o.jsx)(eJ,{}),(0,o.jsx)(eU,{}),(0,o.jsxs)(s.Z,{ref:x,style:{minHeight:"100vh"},children:[(0,o.jsx)(eB.h,{name:l||n,chatAvailable:u,chatDisabled:p}),(0,o.jsx)(ez,{}),m&&(0,o.jsx)(eR,{title:m.title,message:m.message}),!e&&(0,o.jsx)(g,{version:h})]})]})};function eq(){return(0,o.jsx)(eG,{})}},13959:function(e){e.exports={button:"ActionButton_button__z5Z2c",icon:"ActionButton_icon__EPp7Q"}},97038:function(e){e.exports={item:"ActionButtonMenu_item__OJQdr",buttonWrap:"ActionButtonMenu_buttonWrap__WQ9kt",icon:"ActionButtonMenu_icon__edY1D",menu:"ActionButtonMenu_menu__GChDk"}},12270:function(e){e.exports={row:"ActionButtonRow_row__SiEGe"}},47900:function(e){e.exports={root:"ContentHeader_root__HaUG0",row:"ContentHeader_row__9Q8gH",logoTitleSection:"ContentHeader_logoTitleSection__Z8pUc",logo:"ContentHeader_logo__wo_HN",titleSection:"ContentHeader_titleSection___6Y15",title:"ContentHeader_title__E_DsI",subtitle:"ContentHeader_subtitle__n1Wew",tagList:"ContentHeader_tagList__rx3jY"}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}},17725:function(e){e.exports={root:"Content_root__h1mNK",mainSection:"Content_mainSection__Gk78Y",topSection:"Content_topSection__JIZi0",lowerSection:"Content_lowerSection__BZHYI",lowerSectionMobile:"Content_lowerSectionMobile__hRr0_",leftCol:"Content_leftCol__U2TDq",loadingSpinner:"Content_loadingSpinner__mDlYC",main:"Content_main__XVf63"}},10808:function(e){e.exports={pageContentContainer:"CustomPageContent_pageContentContainer__EG4tU",customPageContent:"CustomPageContent_customPageContent__Mr981",summary:"CustomPageContent_summary___Zgps"}},67917:function(e){e.exports={footer:"Footer_footer__mPuvf",links:"Footer_links__7bBxV"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}},74933:function(e){e.exports={root:"Logo_root__jKiJC",container:"Logo_container__A4UYT",image:"Logo_image__Ahkom"}},77011:function(e){e.exports={spinner:"Modal_spinner__GiSS0",content:"Modal_content__h9my9"}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},12341:function(e){e.exports={root:"Sidebar_root__8HE0A"}},573:function(e){e.exports={link:"SocialLinks_link___CcSm",links:"SocialLinks_links__gOAb7"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},21890:function(e){e.exports={followers:"FollowerCollection_followers__e_EUS",noFollowers:"FollowerCollection_noFollowers__UaCVW"}},69833:function(e){e.exports={follower:"SingleFollower_follower__EyBDI",avatar:"SingleFollower_avatar__V9jHG",account:"SingleFollower_account__Z66vo",placeholder:"SingleFollower_placeholder__CgsfJ"}}},function(e){e.O(0,[8909,3903,4267,4381,5938,6395,1082,5360,8245,4466,7466,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{48312:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n(6511)}])},37527:function(e,t,n){"use strict";n.d(t,{h:function(){return E},Z:function(){return M}});var o=n(85893),s=n(97183),i=n(94199),l=n(20550),a=n(94184),r=n.n(a),c=n(66516),d=n(38504),h=n(71577),u=n(26713),m=n(86548),x=n(94149),p=n(38545),f=n(87547),j=n(39398),_=n(4480),g=n(67294),w=n(49218),v=n(5152),y=n.n(v),b=n(77466),C=n(79252),k=n.n(C);let N=y()(()=>n.e(4761).then(n.bind(n,14761)).then(e=>e.Modal),{loadableGenerated:{webpack:()=>[14761]}}),S=y()(()=>Promise.all([n.e(8909),n.e(8119),n.e(9346)]).then(n.bind(n,59096)).then(e=>e.NameChangeModal),{loadableGenerated:{webpack:()=>[59096]}}),Z=y()(()=>Promise.all([n.e(4381),n.e(5535)]).then(n.bind(n,65535)).then(e=>e.AuthModal),{loadableGenerated:{webpack:()=>[65535]}}),F=e=>{let{username:t}=e,[n,s]=(0,g.useState)(!1),[i,l]=(0,g.useState)(!1),[a,r]=(0,_.FV)(b.ZA),v=(0,_.sJ)(b.Q),y=()=>{r(!a)},C=()=>{s(!0)};(0,w.y1)("c",y,{enableOnContentEditable:!1},[a]);let F=(0,_.sJ)(b.db);if(!F)return null;let{displayName:L}=F,T=(0,o.jsxs)(c.Z,{children:[(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(m.Z,{}),onClick:()=>C(),children:"Change name"},"0"),(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(x.Z,{}),onClick:()=>l(!0),children:"Authenticate"},"1"),v.chatAvailable&&(0,o.jsx)(c.Z.Item,{icon:(0,o.jsx)(p.Z,{}),onClick:()=>y(),children:"Toggle chat"},"3")]});return(0,o.jsxs)("div",{id:"user-menu",className:"".concat(k().root),children:[(0,o.jsx)(d.Z,{overlay:T,trigger:["click"],children:(0,o.jsx)(h.Z,{type:"primary",icon:(0,o.jsx)(f.Z,{style:{marginRight:".5rem"}}),children:(0,o.jsxs)(u.Z,{children:[t||L,(0,o.jsx)(j.Z,{})]})})}),(0,o.jsx)(N,{title:"Change Chat Display Name",open:n,handleCancel:()=>s(!1),children:(0,o.jsx)(S,{})}),(0,o.jsx)(N,{title:"Authenticate",open:i,handleCancel:()=>l(!1),children:(0,o.jsx)(Z,{})})]})};var L=n(50738),T=n(31764),A=n.n(T);let{Header:D}=s.Z,E=e=>{let{name:t="Your stream title",chatAvailable:n,chatDisabled:s}=e;return(0,o.jsxs)(D,{className:r()(["".concat(A().header)],"global-header"),children:[(0,o.jsxs)("div",{className:"".concat(A().logo),children:[(0,o.jsx)(L.C,{variant:"contrast"}),(0,o.jsx)("span",{className:"global-header-text",children:t})]}),n&&!s&&(0,o.jsx)(F,{}),!n&&!s&&(0,o.jsx)(i.Z,{title:"Chat is available when the stream is live.",placement:"left",children:(0,o.jsx)(l.Z,{style:{cursor:"pointer"},children:"Chat offline"})})]})};var M=E},14761:function(e,t,n){"use strict";n.r(t),n.d(t,{Modal:function(){return d}});var o=n(85893),s=n(85402),i=n(26303),l=n(11382),a=n(67294),r=n(77011),c=n.n(r);let d=e=>{let{title:t,url:n,open:r,handleOk:d,handleCancel:h,afterClose:u,height:m,width:x,children:p}=e,[f,j]=(0,a.useState)(!!n),_=n&&(0,o.jsx)("iframe",{title:t,src:n,width:"100%",height:"100%",sandbox:"allow-same-origin allow-scripts allow-popups allow-forms",frameBorder:"0",allowFullScreen:!0,onLoad:()=>j(!1)});return(0,o.jsx)(s.Z,{title:t,open:r,onOk:d,onCancel:h,afterClose:u,bodyStyle:{padding:"0px",minHeight:m,height:null!=m?m:"100%"},width:x,zIndex:999,footer:null,centered:!0,destroyOnClose:!0,children:(0,o.jsxs)(o.Fragment,{children:[f&&(0,o.jsx)(i.Z,{active:f,style:{padding:"10px"},paragraph:{rows:10}}),_&&(0,o.jsx)("div",{style:{display:f?"none":"inline"},children:_}),p&&(0,o.jsx)("div",{className:c().content,children:p}),f&&(0,o.jsx)(l.Z,{className:c().spinner,spinning:f,size:"large"})]})})};t.default=d,d.defaultProps={url:void 0,children:void 0,handleOk:void 0,handleCancel:void 0,afterClose:void 0}},51513:function(e,t,n){"use strict";n.d(t,{R:function(){return c}});var o=n(85893),s=n(27049),i=n(24019),l=n(45938),a=n(88335),r=n.n(a);let c=e=>{let t,{streamName:n,customText:a,lastLive:c,notificationsEnabled:d,fediverseAccount:h,onNotifyClick:u,onFollowClick:m}=e;return t=a||(!a&&d&&h?(0,o.jsxs)("span",{children:["This stream is offline. You can"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"be notified"})," ","the next time ",n," goes live or"," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"follow"})," ",h," on the Fediverse."]}):!a&&d?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:u,children:"Be notified"})," ","the next time ",n," goes live."]}):!a&&h?(0,o.jsxs)("span",{children:["This stream is offline."," ",(0,o.jsx)("span",{role:"link",tabIndex:0,className:r().actionLink,onClick:m,children:"Follow"})," ",h," on the Fediverse to see the next time ",n," goes live."]}):"This stream is offline. Check back soon!"),(0,o.jsx)("div",{className:r().outerContainer,children:(0,o.jsxs)("div",{className:r().innerContainer,children:[(0,o.jsx)("div",{className:r().header,children:n}),(0,o.jsx)(s.Z,{className:r().separator}),(0,o.jsx)("div",{className:r().bodyText,children:t}),c&&(0,o.jsxs)("div",{className:r().lastLiveDate,children:[(0,o.jsx)(i.Z,{className:r().clockIcon}),"Last live ".concat((0,l.Z)(new Date(c))," ago.")]})]})})}},69357:function(e,t,n){"use strict";n.d(t,{X:function(){return d}});var o=n(85893),s=n(45938),i=n(68730),l=n(67294),a=n(31326),r=n(37970),c=n.n(r);let d=e=>{let t,{online:n,lastConnectTime:r,lastDisconnectTime:d,viewerCount:h}=e,[,u]=(0,l.useState)(new Date);(0,l.useEffect)(()=>{let e=setInterval(()=>u(new Date),1e3);return()=>{clearInterval(e)}},[]);let m="";if(n&&r){let x=function(e){let t=(0,i.Z)({start:e,end:new Date});return t.days>1?"".concat(t.days," days ").concat(t.hours," hours"):t.hours>=1?"".concat(t.hours," hours ").concat(t.minutes," minutes"):"".concat(t.minutes," minutes ").concat(t.seconds," seconds")}(new Date(r));m=n?"Live for ".concat(x):"Offline",t=h>0&&(0,o.jsxs)("div",{className:c().right,children:[(0,o.jsx)("span",{children:(0,o.jsx)(a.Z,{})}),(0,o.jsx)("span",{children:" ".concat(h)})]})}else!n&&(m="Offline",d&&(t="Last live ".concat((0,s.Z)(new Date(d))," ago.")));return(0,o.jsxs)("div",{className:c().statusbar,children:[(0,o.jsx)("div",{children:m}),(0,o.jsx)("div",{children:t})]})};d.defaultProps={lastConnectTime:null,lastDisconnectTime:null}},6511:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eq}});var o=n(85893),s=n(97183),i=n(4480),l=n(9008),a=n.n(l),r=n(67294),c=n(77466),d=n(84381),h=n(11382),u=n(94184),m=n.n(u),x=n(5152),p=n.n(x),f=n(72581),j=n(67917),_=n.n(j);let g=e=>{let{version:t}=e;return(0,o.jsxs)("div",{className:_().footer,children:[(0,o.jsxs)("span",{children:["Powered by ",(0,o.jsx)("a",{href:"https://owncast.online",children:t})]}),(0,o.jsxs)("span",{className:_().links,children:[(0,o.jsx)("a",{href:"https://owncast.online/docs",target:"_blank",rel:"noreferrer",children:"Documentation"}),(0,o.jsx)("a",{href:"https://owncast.online/help",target:"_blank",rel:"noreferrer",children:"Contribute"}),(0,o.jsx)("a",{href:"https://github.com/owncast/owncast",target:"_blank",rel:"noreferrer",children:"Source"})]})]})};var w=n(10808),v=n.n(w);let y=e=>{let{content:t}=e,n=(0,i.sJ)(c.hz),s=(0,i.sJ)(c.g1),{version:l}=s;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:v().pageContentContainer,children:(0,o.jsx)("div",{className:v().customPageContent,dangerouslySetInnerHTML:{__html:t}})}),n&&(0,o.jsx)(g,{version:l})]})};var b=n(17725),C=n.n(b),k=n(87412),N=n(12341),S=n.n(N);let Z=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(2852),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),F=()=>{let e=(0,i.sJ)(c.db),t=(0,i.sJ)(c.pH);if(!e)return null;let{id:n,isModerator:s,displayName:l}=e;return(0,o.jsx)(k.ZP,{className:S().root,collapsedWidth:0,width:320,children:(0,o.jsx)(Z,{messages:t,usernameToHighlight:l,chatUserId:n,isModerator:s})})};var L=n(12270),T=n.n(L);let A=e=>{let{children:t}=e;return(0,o.jsx)("div",{className:"".concat(T().row),children:t})};var D=n(71577),E=n(13959),M=n.n(E);let I=e=>{let{action:t,primary:n=!0,externalActionSelected:s}=e,{title:i,description:l,icon:a,color:r}=t;return(0,o.jsxs)(D.Z,{type:n?"primary":"default",className:"".concat(M().button),onClick:()=>s(t),style:{backgroundColor:r},children:[a&&(0,o.jsx)("img",{src:a,className:"".concat(M().icon),alt:l}),i]})};var H=n(51513),z=n(34447);let B=e=>{let{onClick:t,props:n}=e;return(0,o.jsx)(D.Z,{...n,type:"primary",className:M().button,icon:(0,o.jsx)(z.Z,{}),onClick:t,children:"Follow"})};var O=n(71578);let R=e=>{let{onClick:t,text:n}=e;return(0,o.jsx)(D.Z,{type:"primary",className:"".concat(M().button),icon:(0,o.jsx)(O.Z,{}),onClick:t,children:n||"Notify"})};var J=n(53731),P=n(79216),U=n(74933),G=n.n(U);let q=e=>{let{src:t}=e;return(0,o.jsx)("div",{className:G().root,children:(0,o.jsx)("div",{className:G().container,children:(0,o.jsx)(P.Z,{src:t,alt:"Logo",className:G().image,rootClassName:G().image})})})};var V=n(25675),Y=n.n(V),Q=n(573),W=n.n(Q);let K=e=>{let{links:t}=e;return(0,o.jsx)("div",{className:W().links,children:t.map(e=>(0,o.jsx)("a",{href:e.url,className:W().link,target:"_blank",rel:"noreferrer me",children:(0,o.jsx)(Y(),{src:e.icon||"/img/platformlogos/default.svg",alt:e.platform,title:e.platform,className:W().link,width:"30",height:"30"})},e.platform))})};var X=n(47900),$=n.n(X);let ee=e=>{let{name:t,title:n,summary:s,logo:i,tags:l,links:a}=e;return(0,o.jsx)("div",{className:$().root,children:(0,o.jsxs)("div",{className:$().logoTitleSection,children:[(0,o.jsx)("div",{className:$().logo,children:(0,o.jsx)(q,{src:i})}),(0,o.jsxs)("div",{className:$().titleSection,children:[(0,o.jsx)("div",{className:m()($().title,$().row,"header-title"),children:t}),(0,o.jsx)("div",{className:m()($().subtitle,$().row,"header-subtitle"),children:(0,o.jsx)(J.Z,{children:n||s})}),(0,o.jsx)("div",{className:m()($().tagList,$().row),children:l.length>0&&l.map(e=>(0,o.jsxs)("span",{children:["#",e,"\xa0"]},e))}),(0,o.jsx)("div",{className:m()($().socialLinks,$().row),children:(0,o.jsx)(K,{links:a})})]})]})})};var et=n(69357),en=n(26303),eo=n(71230),es=n(15746),ei=n(3698),el=n(24093),ea=n(69833),er=n.n(ea);let ec=e=>{let{follower:t}=e;return(0,o.jsx)("div",{className:er().follower,children:(0,o.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",children:(0,o.jsxs)(eo.Z,{wrap:!1,children:[(0,o.jsx)(es.Z,{span:6,children:(0,o.jsx)(el.C,{src:t.image,alt:"Avatar",className:er().avatar,children:(0,o.jsx)("img",{src:"/logo",alt:"Logo",className:er().placeholder})})}),(0,o.jsxs)(es.Z,{children:[(0,o.jsx)(eo.Z,{children:t.name}),(0,o.jsx)(eo.Z,{className:er().account,children:t.username})]})]})})})};var ed=n(21890),eh=n.n(ed);let eu=e=>{let{name:t,onFollowButtonClick:n}=e,[s,i]=(0,r.useState)([]),[l,a]=(0,r.useState)(0),[c,d]=(0,r.useState)(1),[h,u]=(0,r.useState)(!0),m=async()=>{try{let e=await fetch("".concat("/api/followers","?page=").concat(c)),t=await e.json(),{results:n,total:o}=t;i(n),a(o)}catch(s){console.error(s)}};(0,r.useEffect)(()=>{m()},[]),(0,r.useEffect)(()=>{m()},[c]),(0,r.useEffect)(()=>{u(!1)},[s]);let x=(0,o.jsxs)("div",{className:eh().noFollowers,children:[(0,o.jsx)("h2",{children:"Be the first follower!"}),(0,o.jsxs)("p",{children:["Owncast"!==t?t:"This server"," is a part of the"," ",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",children:"Fediverse"}),", an interconnected network of independent users and servers."]}),(0,o.jsxs)("p",{children:["By following ","Owncast"!==t?t:"this server"," you'll be able to get updates from the stream, share it with others, and and show your appreciation when it goes live, all from your own Fediverse account."]}),(0,o.jsx)(B,{onClick:n})]}),p=(0,o.jsx)(en.Z,{active:!0,paragraph:{rows:3}});return h?p:(null==s?void 0:s.length)?(0,o.jsxs)("div",{className:eh().followers,children:[(0,o.jsx)(eo.Z,{wrap:!0,gutter:[10,10],children:s.map(e=>(0,o.jsx)(es.Z,{children:(0,o.jsx)(ec,{follower:e},e.link)},e.link))}),(0,o.jsx)(ei.Z,{current:c,pageSize:24,total:Math.ceil(l/24)||1,onChange(e){d(e)},hideOnSinglePage:!0})]}):x};var em=n(14761),ex=n(66516),ep=n(38504),ef=n(49647),ej=n(60198),e_=n(89705),eg=n(97038),ew=n.n(eg);let ev="notify",ey="follow",eb=e=>{let{actions:t,externalActionSelected:n,notifyItemSelected:s,followItemSelected:i,showFollowItem:l,showNotifyItem:a}=e,r=e=>{if(e.key===ev){s();return}if(e.key===ey){i();return}let o=t.find(t=>t.url===e.key);n(o)},c=t.map(e=>({key:e.url,label:(0,o.jsxs)("span",{className:ew().item,children:[e.icon&&(0,o.jsx)("img",{className:ew().icon,src:e.icon,alt:e.title})," ",e.title]})}));l&&c.unshift({key:ey,label:(0,o.jsxs)("span",{className:ew().item,children:[(0,o.jsx)(ef.Z,{className:ew().icon})," Follow this stream"]})}),a&&c.unshift({key:ev,label:(0,o.jsxs)("span",{className:ew().item,children:[(0,o.jsx)(ej.Z,{className:ew().icon}),"Notify when live"]})});let d=(0,o.jsx)(ex.Z,{items:c,onClick:r});return(0,o.jsx)(ep.Z,{overlay:d,placement:"bottomRight",trigger:["click"],className:ew().menu,children:(0,o.jsx)("div",{className:ew().buttonWrap,children:(0,o.jsx)(D.Z,{type:"default",onClick:e=>e.preventDefault(),size:"large",icon:(0,o.jsx)(e_.Z,{size:6,style:{rotate:"90deg"}})})})})};var eC=n(26713),ek=n(14670),eN=n(69677),eS=n(66009),eZ=n.n(eS);let eF=e=>{let{handleClose:t,account:n,name:s}=e,[i,l]=(0,r.useState)(null),[a,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(null),p=e=>{l(e),function(e){let t=e.replace(/^@+/,"");return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t).toLowerCase())}(e)?c(!0):c(!1)},f=()=>{window.open("https://owncast.online/join-fediverse","_blank")},j=async()=>{if(a){u(!0);try{let e=i.replace(/^@+/,""),n=await fetch("/api/remotefollow",{method:"POST",body:JSON.stringify({account:e})}),o=await n.json();if(o.redirectUrl&&(window.open(o.redirectUrl,"_blank"),t()),!o.success){x(o.message),u(!1);return}if(!o.redirectUrl){x("Unable to follow."),u(!1);return}}catch(s){x(s.message)}u(!1)}};return(0,o.jsxs)(eC.Z,{direction:"vertical",children:[(0,o.jsxs)("div",{className:eZ().header,children:["By following this stream you'll get notified on the Fediverse when it goes live. Now is a great time to",(0,o.jsx)("a",{href:"https://owncast.online/join-fediverse",target:"_blank",rel:"noreferrer",children:"learn about the Fediverse"}),"if it's new to you."]}),(0,o.jsxs)(h.Z,{spinning:d,children:[m&&(0,o.jsx)(ek.Z,{message:"Follow Error",description:m,type:"error",showIcon:!0}),(0,o.jsxs)("div",{className:eZ().account,children:[(0,o.jsx)("img",{src:"/logo",alt:"logo",className:eZ().logo}),(0,o.jsxs)("div",{className:eZ().username,children:[(0,o.jsx)("div",{className:eZ().name,children:s}),(0,o.jsx)("div",{children:n})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:eZ().instructions,children:"Enter your username @server to follow"}),(0,o.jsx)(eN.Z,{value:i,size:"large",onChange:e=>p(e.target.value),placeholder:"Your fediverse account @account@server",defaultValue:i}),(0,o.jsx)("div",{className:eZ().footer,children:"You'll be redirected to your Fediverse server and asked to confirm the action."})]}),(0,o.jsxs)(eC.Z,{className:eZ().buttons,children:[(0,o.jsx)(D.Z,{disabled:!a,type:"primary",onClick:j,children:"Follow"}),(0,o.jsx)(D.Z,{onClick:f,type:"primary",children:"Join the Fediverse"})]})]})]})},{Content:eL}=s.Z,eT=p()(()=>n.e(6160).then(n.bind(n,66160)).then(e=>e.BrowserNotifyModal),{loadableGenerated:{webpack:()=>[66160]}}),eA=p()(()=>n.e(7815).then(n.bind(n,17815)).then(e=>e.NotifyReminderPopup),{loadableGenerated:{webpack:()=>[17815]}}),eD=p()(()=>Promise.all([n.e(2544),n.e(7902),n.e(2239),n.e(5202)]).then(n.bind(n,8888)).then(e=>e.OwncastPlayer),{loadableGenerated:{webpack:()=>[8888]}}),eE=p()(()=>Promise.all([n.e(1272),n.e(8700),n.e(2852),n.e(4977),n.e(1496)]).then(n.bind(n,94977)).then(e=>e.ChatContainer),{loadableGenerated:{webpack:()=>[94977]}}),eM=e=>{let{name:t,streamTitle:n,summary:s,tags:i,socialHandles:l,extraPageContent:a,setShowFollowModal:r}=e,c=(0,o.jsx)(y,{content:a}),h=(0,o.jsx)(eu,{name:t,onFollowButtonClick:()=>r(!0)});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:C().lowerHalf,children:(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:i,links:l,logo:"/logo"})}),(0,o.jsx)("div",{className:C().lowerSection,children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[{label:"About",key:"2",children:c},{label:"Followers",key:"3",children:h}]})})]})},eI=e=>{let{name:t,streamTitle:n,summary:s,tags:i,socialHandles:l,extraPageContent:a,messages:c,currentUser:h,showChat:u,actions:x,setExternalActionToDisplay:p,setShowNotifyPopup:f,setShowFollowModal:j}=e;if(!h)return null;let _=(0,r.useRef)(),{id:g,displayName:w}=h,v=u&&(0,o.jsx)(eE,{messages:c,usernameToHighlight:w,chatUserId:g,isModerator:!1}),b=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ee,{name:t,title:n,summary:s,tags:i,links:l,logo:"/logo"}),(0,o.jsx)(y,{content:a})]}),k=(0,o.jsx)(eu,{name:t,onFollowButtonClick:()=>j(!0)}),N="".concat(function(e){let[t,n]=(0,r.useState)(0),o=()=>{if(!e.current)return;let t=e.current.getBoundingClientRect().top,{innerHeight:o}=window;n(o-t)};return(0,r.useEffect)(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),t}(_),"px"),S=(e,t)=>(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"start"},children:[(0,o.jsx)(t,{...e,style:{width:"85%"}}),(0,o.jsx)(eb,{showFollowItem:!0,showNotifyItem:!0,actions:x,externalActionSelected:p,notifyItemSelected:()=>f(!0),followItemSelected:()=>j(!0)})]});return(0,o.jsx)("div",{className:m()(C().lowerSectionMobile),ref:_,style:{height:N},children:(0,o.jsx)(d.Z,{defaultActiveKey:"0",items:[u&&{label:"Chat",key:"0",children:v},{label:"About",key:"2",children:b},{label:"Followers",key:"3",children:k}],renderTabBar:S})})},eH=e=>{let{externalActionToDisplay:t,setExternalActionToDisplay:n}=e,{title:s,description:i,url:l}=t;return(0,o.jsx)(em.Modal,{title:i||s,url:l,open:!!t,height:"80vh",handleCancel:()=>n(null)})},ez=()=>{let e=(0,i.sJ)(c.Q),t=(0,i.sJ)(c.g1),n=(0,i.sJ)(c.pT),s=(0,i.sJ)(c.di),l=(0,i.sJ)(c.db),[a,d]=(0,i.FV)(c.hz),u=(0,i.sJ)(c.j$),m=(0,i.sJ)(c.YW),{viewerCount:x,lastConnectTime:p,lastDisconnectTime:j,streamTitle:_}=(0,i.sJ)(c.RI),{extraPageContent:g,version:w,name:v,summary:y,socialHandles:b,tags:k,externalActions:N,offlineMessage:S,chatDisabled:Z,federation:L,notifications:T}=t,[D,E]=(0,r.useState)(!1),[M,z]=(0,r.useState)(!1),[O,J]=(0,r.useState)(!1),{account:P}=L,{browser:U}=T,{enabled:G}=U,[q,V]=(0,r.useState)(null),Y=e=>{let{openExternally:t,url:n}=e;t?window.open(n,"_blank"):V(e)},Q=N.map(e=>(0,o.jsx)(I,{action:e,externalActionSelected:Y},e.url)),W=()=>{let e=parseInt((0,f.$o)(f.dA.userVisitCount),10);Number.isNaN(e)&&(e=0),(0,f.qQ)(f.dA.userVisitCount,e+1),e>2&&!(0,f.$o)(f.dA.hasDisplayedNotificationModal)&&E(!0)},K=()=>{z(!1),E(!1),(0,f.qQ)(f.dA.hasDisplayedNotificationModal,!0)},X=()=>{let e=window.innerWidth;void 0===a&&(e<=768?d(!0):d(!1)),!a&&e<=768&&d(!0),a&&e>768&&d(!1)};(0,r.useEffect)(()=>(W(),X(),window.addEventListener("resize",X),()=>{window.removeEventListener("resize",X)}),[]);let $=!Z&&s&&n;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:C().main,children:[(0,o.jsx)(h.Z,{wrapperClassName:C().loadingSpinner,size:"large",spinning:e.appLoading,children:(0,o.jsxs)(eL,{className:C().root,children:[(0,o.jsxs)("div",{className:C().mainSection,children:[(0,o.jsxs)("div",{className:C().topSection,children:[m&&(0,o.jsx)(eD,{source:"/hls/stream.m3u8",online:m}),!m&&!e.appLoading&&(0,o.jsx)(H.R,{streamName:v,customText:S,notificationsEnabled:G,fediverseAccount:P,lastLive:j,onNotifyClick:()=>z(!0),onFollowClick:()=>J(!0)}),m&&(0,o.jsx)(et.X,{online:m,lastConnectTime:p,lastDisconnectTime:j,viewerCount:x})]}),(0,o.jsx)("div",{className:C().midSection,children:(0,o.jsxs)("div",{className:C().buttonsLogoTitleSection,children:[!a&&(0,o.jsxs)(A,{children:[Q,(0,o.jsx)(B,{size:"small",onClick:()=>J(!0)}),(0,o.jsx)(eA,{open:D,notificationClicked:()=>z(!0),notificationClosed:()=>K(),children:(0,o.jsx)(R,{onClick:()=>z(!0)})})]}),(0,o.jsx)(em.Modal,{title:"Notify",open:M,afterClose:()=>K(),handleCancel:()=>K(),children:(0,o.jsx)(eT,{})})]})}),a?(0,o.jsx)(eI,{name:v,streamTitle:_,summary:y,tags:k,socialHandles:b,extraPageContent:g,messages:u,currentUser:l,showChat:$,actions:N,setExternalActionToDisplay:Y,setShowNotifyPopup:z,setShowFollowModal:J}):(0,o.jsx)(eM,{name:v,streamTitle:_,summary:y,tags:k,socialHandles:b,extraPageContent:g,setShowFollowModal:J})]}),$&&!a&&(0,o.jsx)(F,{})]})}),!a&&!1]}),q&&(0,o.jsx)(eH,{externalActionToDisplay:q,setExternalActionToDisplay:V}),(0,o.jsx)(em.Modal,{title:"Follow ".concat(v),open:O,handleCancel:()=>J(!1),width:"550px",children:(0,o.jsx)(eF,{account:P,name:v,handleClose:()=>J(!1)})})]})};var eB=n(37527),eO=n(85402);let eR=e=>{let{title:t,message:n}=e;return(0,o.jsx)(eO.Z,{title:t,visible:!0,footer:null,closable:!1,keyboard:!1,width:900,centered:!0,className:"modal",children:(0,o.jsx)("p",{style:{fontSize:"1.3rem"},children:n})})},eJ=()=>{let e=(0,i.sJ)(c.j$),t=(0,i.sJ)(c.RI),n=!1,o="",s=()=>{n=!0,o=window.document.title},l=()=>{n=!1,window.document.title=o},a=()=>{window.addEventListener("blur",s),window.addEventListener("focus",l)};return(0,r.useEffect)(()=>(o=window.document.title,a(),()=>{window.removeEventListener("focus",l),window.removeEventListener("blur",s)}),[]),(0,r.useEffect)(()=>{let{online:e}=t;n&&e&&(window.document.title="\uD83D\uDCAC :: ".concat(o))},[e]),(0,r.useEffect)(()=>{if(!n)return;let{online:e}=t;e?window.document.title=" \uD83D\uDFE2 :: ".concat(o):e||(window.document.title=" \uD83D\uDD34 :: ".concat(o))},[c.RI]),null},eP=()=>(0,o.jsx)("script",{id:"server-side-hydration",dangerouslySetInnerHTML:{__html:"\n window.configHydration = {{.ServerConfigJSON}};\n window.statusHydration = {{.StatusJSON}};\n "}}),eU=()=>{let e=(0,i.sJ)(c.g1),{appearanceVariables:t,customStyles:n}=e,s=Object.keys(t).filter(e=>!!t[e]).map(e=>"--".concat(e,": ").concat(t[e]));return(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n :root {\n ".concat(s.join(";\n"),"\n }\n ").concat(n,"\n ")}})},eG=()=>{let[e]=(0,i.FV)(c.hz),t=(0,i.sJ)(c.g1),{name:n,title:l,customStyles:d,version:h}=t,u=(0,i.sJ)(c.di),m=(0,i.sJ)(c.ap),x=(0,r.useRef)(null),{chatDisabled:p}=t;return(0,r.useEffect)(()=>{!function(e){let t=e=>{let t=e.getAttribute("rel");e.setAttribute("rel","".concat(t," noopener noreferrer"))};e.querySelectorAll("a").forEach(e=>t(e));let n=new MutationObserver(function(e){for(let n of e)for(let o of n.addedNodes)o instanceof HTMLElement&&"a"===o.tagName.toLowerCase()&&t(o)});n.observe(e,{attributes:!1,childList:!0,subtree:!0})}(x.current)},[]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a(),{children:[(0,o.jsx)(eP,{}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"57x57",href:"/img/favicon/apple-icon-57x57.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"60x60",href:"/img/favicon/apple-icon-60x60.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"72x72",href:"/img/favicon/apple-icon-72x72.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"76x76",href:"/img/favicon/apple-icon-76x76.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"114x114",href:"/img/favicon/apple-icon-114x114.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"120x120",href:"/img/favicon/apple-icon-120x120.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"144x144",href:"/img/favicon/apple-icon-144x144.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"152x152",href:"/img/favicon/apple-icon-152x152.png"}),(0,o.jsx)("link",{rel:"apple-touch-icon",sizes:"180x180",href:"/img/favicon/apple-icon-180x180.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"192x192",href:"/img/favicon/android-icon-192x192.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"96x96",href:"/img/favicon/favicon-96x96.png"}),(0,o.jsx)("link",{rel:"icon",type:"image/png",sizes:"16x16",href:"/img/favicon/favicon-16x16.png"}),(0,o.jsx)("link",{rel:"manifest",href:"/manifest.json"}),(0,o.jsx)("link",{href:"/api/auth/provider/indieauth"}),(0,o.jsx)("meta",{name:"msapplication-TileColor",content:"#ffffff"}),(0,o.jsx)("meta",{name:"msapplication-TileImage",content:"/img/favicon/ms-icon-144x144.png"}),(0,o.jsx)("meta",{name:"theme-color",content:"#ffffff"}),(0,o.jsx)("style",{children:d}),(0,o.jsx)("base",{target:"_blank"})]}),(0,o.jsxs)(a(),{children:[n?(0,o.jsx)("title",{children:n}):(0,o.jsx)("title",{children:"{{.Name}}"}),(0,o.jsx)("meta",{name:"description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:site_name",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"og:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"og:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"og:type",content:"video.other"}),(0,o.jsx)("meta",{property:"video:tag",content:"{{.TagsString}}"}),(0,o.jsx)("meta",{property:"og:image",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:url",content:"{{.RequestedURL}}{{.Thumbnail}}"}),(0,o.jsx)("meta",{property:"og:image:alt",content:"{{.RequestedURL}}{{.Image}}"}),(0,o.jsx)("meta",{property:"og:video",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:secure_url",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"og:video:height",content:"315"}),(0,o.jsx)("meta",{property:"og:video:width",content:"560"}),(0,o.jsx)("meta",{property:"og:video:type",content:"text/html"}),(0,o.jsx)("meta",{property:"og:video:actor",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:title",content:"{{.Name}}"}),(0,o.jsx)("meta",{property:"twitter:url",content:"{{.RequestedURL}}"}),(0,o.jsx)("meta",{property:"twitter:description",content:"{{.Summary}}"}),(0,o.jsx)("meta",{property:"twitter:image",content:"{{.Image}}"}),(0,o.jsx)("meta",{property:"twitter:card",content:"player"}),(0,o.jsx)("meta",{property:"twitter:player",content:"{{.RequestedURL}}/embed/video"}),(0,o.jsx)("meta",{property:"twitter:player:width",content:"560"}),(0,o.jsx)("meta",{property:"twitter:player:height",content:"315"})]}),(0,o.jsx)(c.me,{}),(0,o.jsx)(eJ,{}),(0,o.jsx)(eU,{}),(0,o.jsxs)(s.Z,{ref:x,style:{minHeight:"100vh"},children:[(0,o.jsx)(eB.h,{name:l||n,chatAvailable:u,chatDisabled:p}),(0,o.jsx)(ez,{}),m&&(0,o.jsx)(eR,{title:m.title,message:m.message}),!e&&(0,o.jsx)(g,{version:h})]})]})};function eq(){return(0,o.jsx)(eG,{})}},13959:function(e){e.exports={button:"ActionButton_button__z5Z2c",icon:"ActionButton_icon__EPp7Q"}},97038:function(e){e.exports={item:"ActionButtonMenu_item__OJQdr",buttonWrap:"ActionButtonMenu_buttonWrap__WQ9kt",icon:"ActionButtonMenu_icon__edY1D",menu:"ActionButtonMenu_menu__GChDk"}},12270:function(e){e.exports={row:"ActionButtonRow_row__SiEGe"}},47900:function(e){e.exports={root:"ContentHeader_root__HaUG0",row:"ContentHeader_row__9Q8gH",logoTitleSection:"ContentHeader_logoTitleSection__Z8pUc",logo:"ContentHeader_logo__wo_HN",titleSection:"ContentHeader_titleSection___6Y15",title:"ContentHeader_title__E_DsI",subtitle:"ContentHeader_subtitle__n1Wew",tagList:"ContentHeader_tagList__rx3jY"}},79252:function(e){e.exports={root:"UserDropdown_root__IdxfQ","ant-space":"UserDropdown_ant-space__XJTZ3","ant-space-item":"UserDropdown_ant-space-item__w4nC2"}},66009:function(e){e.exports={header:"FollowModal_header__la1ji",buttons:"FollowModal_buttons__tt4Mc",instructions:"FollowModal_instructions__HiKFF",footer:"FollowModal_footer__AjucH",account:"FollowModal_account__cmHkm",logo:"FollowModal_logo__Ew8xK",username:"FollowModal_username__A_OTw",name:"FollowModal_name__Sf_TP"}},17725:function(e){e.exports={root:"Content_root__h1mNK",mainSection:"Content_mainSection__Gk78Y",topSection:"Content_topSection__JIZi0",lowerSection:"Content_lowerSection__BZHYI",lowerSectionMobile:"Content_lowerSectionMobile__hRr0_",leftCol:"Content_leftCol__U2TDq",loadingSpinner:"Content_loadingSpinner__mDlYC",main:"Content_main__XVf63"}},10808:function(e){e.exports={pageContentContainer:"CustomPageContent_pageContentContainer__EG4tU",customPageContent:"CustomPageContent_customPageContent__Mr981",summary:"CustomPageContent_summary___Zgps"}},67917:function(e){e.exports={footer:"Footer_footer__mPuvf",links:"Footer_links__7bBxV"}},31764:function(e){e.exports={header:"Header_header__U4Ro1",logo:"Header_logo__HLZ6Z"}},74933:function(e){e.exports={root:"Logo_root__jKiJC",container:"Logo_container__A4UYT",image:"Logo_image__Ahkom"}},77011:function(e){e.exports={spinner:"Modal_spinner__GiSS0",content:"Modal_content__h9my9"}},88335:function(e){e.exports={outerContainer:"OfflineBanner_outerContainer__3AbsB",innerContainer:"OfflineBanner_innerContainer__zTm13",bodyText:"OfflineBanner_bodyText__nNNy0",separator:"OfflineBanner_separator___j_Ss",lastLiveDate:"OfflineBanner_lastLiveDate___UZdO",clockIcon:"OfflineBanner_clockIcon__s0DB_",header:"OfflineBanner_header__Vu20o",footer:"OfflineBanner_footer__o3Zl5",actionLink:"OfflineBanner_actionLink__b4Mwa"}},12341:function(e){e.exports={root:"Sidebar_root__8HE0A"}},573:function(e){e.exports={link:"SocialLinks_link___CcSm",links:"SocialLinks_links__gOAb7"}},37970:function(e){e.exports={statusbar:"Statusbar_statusbar__AtVnB"}},21890:function(e){e.exports={followers:"FollowerCollection_followers__e_EUS",noFollowers:"FollowerCollection_noFollowers__UaCVW"}},69833:function(e){e.exports={follower:"SingleFollower_follower__EyBDI",avatar:"SingleFollower_avatar__V9jHG",account:"SingleFollower_account__Z66vo",placeholder:"SingleFollower_placeholder__CgsfJ"}}},function(e){e.O(0,[8909,3903,4267,4381,5938,6395,1082,5360,8245,4466,7466,9774,2888,179],function(){return e(e.s=48312)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/static/web/_next/static/chunks/webpack-0c4e7e2a86797101.js b/static/web/_next/static/chunks/webpack-0c4e7e2a86797101.js new file mode 100644 index 000000000..8fb393e0b --- /dev/null +++ b/static/web/_next/static/chunks/webpack-0c4e7e2a86797101.js @@ -0,0 +1 @@ +!function(){"use strict";var e,t,a,c,f,d,n,r,b,o,u,i,s={},l={};function h(e){var t=l[e];if(void 0!==t)return t.exports;var a=l[e]={id:e,loaded:!1,exports:{}},c=!0;try{s[e].call(a.exports,a,a.exports,h),c=!1}finally{c&&delete l[e]}return a.loaded=!0,a.exports}h.m=s,h.amdO={},e=[],h.O=function(t,a,c,f){if(a){f=f||0;for(var d=e.length;d>0&&e[d-1][2]>f;d--)e[d]=e[d-1];e[d]=[a,c,f];return}for(var n=1/0,d=0;d=f&&Object.keys(h.O).every(function(e){return h.O[e](a[b])})?a.splice(b--,1):(r=!1,f0&&e[d-1][2]>f;d--)e[d]=e[d-1];e[d]=[a,c,f];return}for(var n=1/0,d=0;d=f&&Object.keys(h.O).every(function(e){return h.O[e](a[b])})?a.splice(b--,1):(r=!1,fOwncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Access Tokens

Access tokens are used to allow external, 3rd party tools to perform specific actions on your Owncast server. They should be kept secure and never included in client code, instead they should be kept on a server that you control.
Read more about how to use these tokens, with examples, at our documentation.
NameTokenScopesLast Used
No data

\ No newline at end of file diff --git a/static/web/admin/actions/index.html b/static/web/admin/actions/index.html index 24e91df68..01cd1b477 100644 --- a/static/web/admin/actions/index.html +++ b/static/web/admin/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

External Actions

External action URLs are 3rd party UI you can display, embedded, into your Owncast page when a user clicks on a button to launch your action.
Read more about how to use actions, with examples, at our documentation.
NameDescriptionURLIconColorOpens
No data

\ No newline at end of file diff --git a/static/web/admin/chat/messages/index.html b/static/web/admin/chat/messages/index.html index e319fa835..55bb931b8 100644 --- a/static/web/admin/chat/messages/index.html +++ b/static/web/admin/chat/messages/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Chat Messages

Manage the messages from viewers that show up on your stream.

Check multiple messages to change their visibility to:
Time
User
Message
No data
\ No newline at end of file diff --git a/static/web/admin/chat/users/index.html b/static/web/admin/chat/users/index.html index 4da27102c..16195c7de 100644 --- a/static/web/admin/chat/users/index.html +++ b/static/web/admin/chat/users/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

When a stream is active and chat is enabled, connected chat clients will be displayed here.

\ No newline at end of file diff --git a/static/web/admin/config-chat/index.html b/static/web/admin/config-chat/index.html index 67c1fb278..3a698aad9 100644 --- a/static/web/admin/config-chat/index.html +++ b/static/web/admin/config-chat/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-federation/index.html b/static/web/admin/config-federation/index.html index 47d0d8d60..0856a07ae 100644 --- a/static/web/admin/config-federation/index.html +++ b/static/web/admin/config-federation/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/config-notify/index.html b/static/web/admin/config-notify/index.html index 2c7117a44..4fecffbbf 100644 --- a/static/web/admin/config-notify/index.html +++ b/static/web/admin/config-notify/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Notifications

Let your viewers know when you go live by supporting any of the below notification channels. Learn more about live notifications.


The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

The full url to your Owncast server is required to enable social features. Must use SSL (https). Once people start following your instance you should not change this.

Browser Alerts

Viewers can opt into being notified when you go live with their browser.

Not all browsers support this.

Enable browser notifications

The text to send when you go live.

Twitter

Let your Twitter followers know each time you go live.

Enable Twitter

The text to send when you go live.

Discord

Let your Discord channel know each time you go live.

Create a webhook under Edit Channel / Integrations on your Discord channel and provide it below.

Enable Discord

The webhook assigned to your channel.

The text to send when you go live.

Fediverse Social

Enabling the Fediverse social features will not just alert people to when you go live, but also enable other functionality.

Fediverse social features: Disabled

Custom

Build your own notifications by using custom webhooks.

\ No newline at end of file diff --git a/static/web/admin/config-public-details/index.html b/static/web/admin/config-public-details/index.html index 8fd65948b..5c1df5520 100644 --- a/static/web/admin/config-public-details/index.html +++ b/static/web/admin/config-public-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

General Settings

The following are displayed on your site to describe your stream and its content. Learn more.

Custom Page Content

Edit the content of your page by using simple Markdown syntax.


\ No newline at end of file diff --git a/static/web/admin/config-server-details/index.html b/static/web/admin/config-server-details/index.html index af40de209..e41a66b3f 100644 --- a/static/web/admin/config-server-details/index.html +++ b/static/web/admin/config-server-details/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Server Settings

You should change your stream key from the default and keep it safe. For most people it's likely the other settings will not need to be changed.

\ No newline at end of file diff --git a/static/web/admin/config-social-items/index.html b/static/web/admin/config-social-items/index.html index 6e49b7989..daa65bc3d 100644 --- a/static/web/admin/config-social-items/index.html +++ b/static/web/admin/config-social-items/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Social Items

\ No newline at end of file diff --git a/static/web/admin/config-storage/index.html b/static/web/admin/config-storage/index.html index f6fb49f42..c426e32e5 100644 --- a/static/web/admin/config-storage/index.html +++ b/static/web/admin/config-storage/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Storage

Owncast supports optionally using external storage providers to stream your video. Learn more about this by visiting our Storage Documentation.

Configuring this incorrectly will likely cause your video to be unplayable. Double check the documentation for your storage provider on how to configure the bucket you created for Owncast.

Keep in mind this is for live streaming, not for archival, recording or VOD purposes.

\ No newline at end of file diff --git a/static/web/admin/config-video/index.html b/static/web/admin/config-video/index.html index c61d5ce62..cfd796752 100644 --- a/static/web/admin/config-video/index.html +++ b/static/web/admin/config-video/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Video configuration

Before changing your video configuration visit the video documentation to learn how it impacts your stream performance. The general rule is to start conservatively by having one middle quality stream output variant and experiment with adding more of varied qualities.

Stream output

NameVideo bitrateCPU Usage
No name800 kbpsMedium

Latency Buffer

While it's natural to want to keep your latency as low as possible, you may experience reduced error tolerance and stability the lower you go. The lowest setting is not recommended.

For interactive live streams you may want to experiment with a lower latency, for non-interactive broadcasts you may want to increase it. Read to learn more.

LowestHighest

\ No newline at end of file diff --git a/static/web/admin/config/appearance/index.html b/static/web/admin/config/appearance/index.html index 148c8813d..c613c8a53 100644 --- a/static/web/admin/config/appearance/index.html +++ b/static/web/admin/config/appearance/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
Loading...
\ No newline at end of file diff --git a/static/web/admin/federation/actions/index.html b/static/web/admin/federation/actions/index.html index 5a8ae0c9d..85c2f6e9c 100644 --- a/static/web/admin/federation/actions/index.html +++ b/static/web/admin/federation/actions/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Fediverse Actions

Below is a list of actions that were taken by others in response to your posts as well as people who requested to follow you.
ActionFromWhen
No data
\ No newline at end of file diff --git a/static/web/admin/federation/followers/index.html b/static/web/admin/federation/followers/index.html index ef564319d..49e997553 100644 --- a/static/web/admin/federation/followers/index.html +++ b/static/web/admin/federation/followers/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

The following accounts get notified when you go live or send a post.

NameURL
Added
Remove
No data
\ No newline at end of file diff --git a/static/web/admin/hardware-info/index.html b/static/web/admin/hardware-info/index.html index 8314bd3cd..eb46339fe 100644 --- a/static/web/admin/hardware-info/index.html +++ b/static/web/admin/hardware-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Hardware Info


CPU
0%
Memory
0%
Disk
0%
Loading...
\ No newline at end of file diff --git a/static/web/admin/help/index.html b/static/web/admin/help/index.html index 029863461..564be5b98 100644 --- a/static/web/admin/help/index.html +++ b/static/web/admin/help/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

How can we help you?

Troubleshooting

Fix your problems

Documentation

Read the Docs

Common tasks

I want to configure my owncast instance
Help configuring my broadcasting software
I want to embed my stream into another site
I want to customize my website
I want to tweak my video output
I want to use an external storage provider

Other

I found a bug
If you found a bug, then please let us know
I have a general question
Most general questions are answered in our FAQ or exist in our discussions
I want to build add-ons for Owncast
You can build your own bots, overlays, tools and add-ons with our developer APIs. 
\ No newline at end of file diff --git a/static/web/admin/index.html b/static/web/admin/index.html index 36bd37e85..e570591f9 100644 --- a/static/web/admin/index.html +++ b/static/web/admin/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

No stream is active

You should start one.

Use your broadcasting software
Chat is disabled
Chat will continue to be disabled until you begin a live stream.
Find an audience on the Owncast Directory
List yourself in the Owncast Directory and show off your stream. Enable it in settings.
fediverse
Add your Owncast instance to the Fediverse
Enable Owncast social features to have your instance join the Fediverse, allowing people to follow, share and engage with your live stream.

News & Updates from Owncast

\ No newline at end of file diff --git a/static/web/admin/logs/index.html b/static/web/admin/logs/index.html index 0d53b2839..d5f7f1100 100644 --- a/static/web/admin/logs/index.html +++ b/static/web/admin/logs/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline
\ No newline at end of file diff --git a/static/web/admin/stream-health/index.html b/static/web/admin/stream-health/index.html index 247bdb754..cd7c86de1 100644 --- a/static/web/admin/stream-health/index.html +++ b/static/web/admin/stream-health/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Stream Performance

\ No newline at end of file diff --git a/static/web/admin/upgrade/index.html b/static/web/admin/upgrade/index.html index e5be5eed7..4bce3a699 100644 --- a/static/web/admin/upgrade/index.html +++ b/static/web/admin/upgrade/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Thu Jan 01 1970

Downloads

NameSize
No data
\ No newline at end of file diff --git a/static/web/admin/viewer-info/index.html b/static/web/admin/viewer-info/index.html index 58221886b..d887edc0b 100644 --- a/static/web/admin/viewer-info/index.html +++ b/static/web/admin/viewer-info/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Viewer Info


Max viewers last stream
0
All-time max viewers
0
User AgentLocation
Watch Time
No data
\ No newline at end of file diff --git a/static/web/admin/webhooks/index.html b/static/web/admin/webhooks/index.html index 5e741a6f2..705aff15e 100644 --- a/static/web/admin/webhooks/index.html +++ b/static/web/admin/webhooks/index.html @@ -1 +1 @@ -Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file +Owncast Admin

What is your stream about today?

What is your stream about today?
Offline

Webhooks

A webhook is a callback made to an external API in response to an event that takes place within Owncast. This can be used to build chat bots or sending automatic notifications that you've started streaming.
Read more about how to use webhooks, with examples, at our documentation.
URLEvents
No data

\ No newline at end of file diff --git a/static/web/embed/chat/readonly/index.html b/static/web/embed/chat/readonly/index.html index 845a04efd..435da30b8 100644 --- a/static/web/embed/chat/readonly/index.html +++ b/static/web/embed/chat/readonly/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/chat/readwrite/index.html b/static/web/embed/chat/readwrite/index.html index 5547cad7e..a05eea5f1 100644 --- a/static/web/embed/chat/readwrite/index.html +++ b/static/web/embed/chat/readwrite/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/static/web/embed/video/index.html b/static/web/embed/video/index.html index 0e92a8e08..e5467cd58 100644 --- a/static/web/embed/video/index.html +++ b/static/web/embed/video/index.html @@ -1 +1 @@ -
This stream is offline. Check back soon!
\ No newline at end of file +
This stream is offline. Check back soon!
\ No newline at end of file diff --git a/static/web/index.html b/static/web/index.html index e58192f0b..41634cb76 100644 --- a/static/web/index.html +++ b/static/web/index.html @@ -1,9 +1,9 @@ {{.Name}}
{{.Name}}
Logo
Preview
\ No newline at end of file +
Logo
Preview
\ No newline at end of file