mirror of
https://github.com/owncast/owncast.git
synced 2024-12-22 17:20:37 +03:00
1 line
No EOL
44 KiB
JavaScript
Vendored
1 line
No EOL
44 KiB
JavaScript
Vendored
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4261,2979],{57520:function(e,t,n){"use strict";n.d(t,{E:function(){return i}});var a=n(85893);n(67294);var r=n(94184),s=n.n(r);let i=e=>{let{status:t}=e,{type:n,icon:r,message:i}=t||{},o=s()({"status-container":!0,["status-".concat(n)]:n,empty:!i});return(0,a.jsxs)("span",{className:o,children:[r?(0,a.jsx)("span",{className:"status-icon",children:r}):null,i?(0,a.jsx)("span",{className:"status-message",children:i}):null]})};t.Z=i},67032:function(e,t,n){"use strict";n.d(t,{A8:function(){return m},Kx:function(){return f},Sk:function(){return g},mG:function(){return p},nv:function(){return y},xA:function(){return x}});var a=n(85893),r=n(67294),s=n(94184),i=n.n(s),o=n(51024),l=n(97538),c=n(8799),u=n(65400),d=n(57520),h=n(24044);let f="default",m="password",p="numeric",g="textarea",x="url",y=e=>{let{className:t,disabled:n,fieldName:s,label:f,maxLength:y,onBlur:b,onChange:v,onPressEnter:w,onHandleSubmit:j,pattern:k,placeholder:P,required:L,status:N,tip:C,type:S,useTrim:E,value:O,hasComplexityRequirements:T}=e,[F,A]=(0,r.useState)(!1),[M,G]=(0,r.useState)(!1),[_]=l.default.useForm(),U=e=>{if(v){let t=S===p?e:e.target.value;G(!0),T&&h.Uq.test(t)?A(!0):A(!1),v({fieldName:s,value:E?t.trim():t})}};(0,r.useEffect)(()=>{_.setFieldsValue({inputFieldPassword:O})},[O]);let R=e=>{let t=e.target.value;b&&b({value:t})},I=()=>{w&&w()},D=[],Q=o.default,q={};S===g?(Q=o.default.TextArea,q={autoSize:!0}):S===m?(h.RQ.forEach(e=>{D.push(e)}),Q=o.default.Password,q={visibilityToggle:!0}):S===p?(Q=c.Z,q={type:"number",min:1,max:10**y-1}):S===x&&(q={type:"url",pattern:k});let B="field-".concat(s),{type:H}=N||{},z=i()({"formfield-container":!0,"textfield-container":!0,["type-".concat(S)]:!0,required:L,["status-".concat(H)]:N});return(0,a.jsxs)("div",{className:z,children:[f?(0,a.jsx)("div",{className:"label-side",children:(0,a.jsx)("label",{htmlFor:B,className:"formfield-label",children:f})}):null,T?(0,a.jsx)("div",{className:"input-side",children:(0,a.jsx)("div",{className:"input-group",children:(0,a.jsxs)(l.default,{name:"basic",form:_,initialValues:{inputFieldPassword:O},style:{width:"100%"},children:[(0,a.jsx)(l.default.Item,{name:"inputFieldPassword",rules:D,children:(0,a.jsx)(o.default.Password,{id:B,className:"field ".concat(t," ").concat(B),onChange:U,onBlur:R,placeholder:P,onPressEnter:I,disabled:n,value:O})}),M&&(0,a.jsx)("div",{style:{display:"flex",flexDirection:"row-reverse"},children:(0,a.jsx)(u.default,{type:"primary",size:"small",className:"submit-button",onClick:j,disabled:!F,children:"Update"})}),(0,a.jsx)(d.E,{status:N}),(0,a.jsx)("p",{className:"field-tip",children:C})]})})}):(0,a.jsxs)("div",{className:"input-side",children:[(0,a.jsx)("div",{className:"input-group",children:(0,a.jsx)(Q,{id:B,className:"field ".concat(t," ").concat(B),...q,...S!==p&&{allowClear:!0},placeholder:P,maxLength:y,onChange:U,onBlur:R,onPressEnter:I,disabled:n,value:O})}),(0,a.jsx)(d.E,{status:N}),(0,a.jsx)("p",{className:"field-tip",children:C})]})]})};y.defaultProps={className:"",disabled:!1,label:"",maxLength:255,placeholder:"",required:!1,status:null,tip:"",type:f,value:"",pattern:"",useTrim:!1,useTrimLead:!1,hasComplexityRequirements:!1,onSubmit:()=>{},onBlur:()=>{},onChange:()=>{},onPressEnter:()=>{},onHandleSubmit:()=>{}}},78353:function(e,t,n){"use strict";n.d(t,{$7:function(){return p},Sk:function(){return f},xA:function(){return m}});var a=n(85893),r=n(65400),s=n(94184),i=n.n(s),o=n(67294),l=n(24044),c=n(91332),u=n(38631),d=n(57520),h=n(67032);let f="textarea",m="url",p=e=>{let{apiPath:t,configPath:n="",initialValue:s,useTrim:f,useTrimLead:m,...p}=e,[g,x]=(0,o.useState)(null),[y,b]=(0,o.useState)(!1),v=(0,o.useContext)(u.a),{setFieldInConfigState:w}=v||{},j=null,{fieldName:k,required:P,tip:L,status:N,value:C,hasComplexityRequirements:S,onChange:E,onSubmit:O}=p,T=()=>{x(null),b(!1),clearTimeout(j),j=null};(0,o.useEffect)(()=>{P&&(""===C||null===C)||C===s?b(!1):(T(),b(!0))},[C]);let F=async()=>{(P&&""!==C||C!==s)&&(x((0,c.kg)(c.Jk)),await (0,l.Si)({apiPath:t,data:{value:C},onSuccess:()=>{w({fieldName:k,value:C,path:n}),x((0,c.kg)(c.zv))},onError:e=>{x((0,c.kg)(c.Un,"There was an error: ".concat(e)))}}),j=setTimeout(T,l.sI),O&&O())},A=i()({"textfield-with-submit-container":!0,submittable:y});return(0,a.jsxs)("div",{className:A,children:[(0,a.jsx)("div",{className:"textfield-component",children:(0,a.jsx)(h.nv,{...p,onSubmit:null,onBlur:e=>{let{value:t}=e;E&&P&&""===t&&E({fieldName:k,value:s})},onChange:e=>{let{fieldName:t,value:n}=e;if(E){let e=n;f?e=n.trim():m&&(e=n.replace(/^\s+/g,"")),E({fieldName:t,value:e})}},onHandleSubmit:F})}),(0,a.jsxs)("div",{className:"formfield-container lower-container",children:[(0,a.jsx)("p",{className:"label-spacer"}),(0,a.jsxs)("div",{className:"lower-content",children:[(0,a.jsx)("div",{className:"field-tip",children:L}),(0,a.jsx)(d.E,{status:N||g}),(0,a.jsx)("div",{className:"update-button-container",children:!S&&(0,a.jsx)(r.default,{type:"primary",size:"small",className:"submit-button",onClick:F,disabled:!y,children:"Update"})})]})]})]})};p.defaultProps={configPath:"",initialValue:""}},42099:function(e,t,n){"use strict";n.d(t,{C:function(){return l}});var a=n(85893);n(67294);var r=n(94184),s=n.n(r),i=n(57361),o=n.n(i);let l=e=>{let{variant:t="simple",className:n=""}=e,r=s()(o().root,{[o().simple]:"simple"===t,[o().contrast]:"contrast"===t});return(0,a.jsx)("div",{className:"".concat(r," ").concat(n),children:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 95.68623352050781 104.46271514892578",className:"logo-svg",children:(0,a.jsx)("g",{transform:"matrix(1 0 0 1 -37.08803939819336 -18.940391540527344)",children:(0,a.jsx)("g",{children:(0,a.jsxs)("g",{children:[(0,a.jsx)("g",{children:(0,a.jsxs)("g",{transform:"matrix(1.0445680396949917 0 0 1.0445679172996596 36.34559138380523 18.877718021903796)",children:[(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient120",gradientTransform:"rotate(-90 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#1f2022",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#635e69",stopOpacity:"1"})]})}),(0,a.jsx)("path",{fill:"url(#gradient120)",d:"M91.5 75.35Q93.05 71.15 91.65 67.7 90.35 64.5 86.65 62.3 83.2 60.3 78.3 59.4 73.85 58.6 68.6 58.7 63.55 58.85 58.8 59.8 54.25 60.75 50.8 62.2 47.4 63.65 45.5 65.35 43.6 67.15 43.5 69.05 43.35 71.3 45.8 73.9 48.05 76.3 52.1 78.6 56.15 80.9 61.05 82.55 66.3 84.3 71.4 84.8 74.7 85.1 77.55 84.9 80.65 84.6 83.3 83.6 86.15 82.5 88.15 80.55 90.4 78.4 91.5 75.35M70.6 67.5Q72.3 68.4 73.1 69.7 73.9 71.15 73.45 73 73.1 74.3 72.3 75.25 71.55 76.1 70.3 76.6 69.25 77.05 67.75 77.25 66.3 77.4 64.85 77.3 62.3 77.15 59.25 76.3 56.6 75.5 54.15 74.3 51.9 73.2 50.45 72 49.05 70.75 49.1 69.8 49.2 69 50.25 68.25 51.3 67.55 53.15 67 55 66.4 57.25 66.1 59.8 65.8 62.1 65.8 64.65 65.85 66.7 66.2 68.9 66.65 70.6 67.5Z"})]}),(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient121",gradientTransform:"rotate(-180 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#2087e2",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#b63fff",stopOpacity:"1"})]})}),(0,a.jsx)("path",{fill:"url(#gradient121)",d:"M66.6 15.05Q66.4 9.65 63.9 6.05 61.25 2.1 56.1 0.65 54.95 0.3 53.65 0.15 52.5 0 51.3 0.1 50.2 0.1 49.1 0.35 48.15 0.55 47 1 43.3 2.45 40.3 6.1 37.5 9.4 35.5 14.3 33.75 18.45 32.7 23.4 31.7 28.05 31.35 32.85 31.05 37.2 31.3 41.2 31.6 45.15 32.4 48.35 34 54.9 37.3 56.4 37.6 56.55 37.9 56.65L39.2 56.85Q39.45 56.85 39.95 56.8 42.05 56.6 44.7 55.05 47.25 53.5 50.05 50.8 53.05 47.9 55.85 44.05 58.8 40.05 61.1 35.6 63.8 30.35 65.25 25.3 66.75 19.75 66.6 15.05M47.55 23.15Q48.05 23.25 48.4 23.4 52.45 24.8 52.55 29.85 52.6 34 50 39.4 47.85 43.9 44.85 47.3 42.05 50.5 40.15 50.7L39.9 50.75 39.45 50.7 39.2 50.6Q37.8 49.95 37.25 46.35 36.7 42.7 37.3 38 37.95 32.75 39.75 28.8 41.9 24.1 45.05 23.25 45.6 23.1 45.85 23.1 46.25 23.05 46.65 23.05 47.05 23.05 47.55 23.15Z"})]}),(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient122",gradientTransform:"rotate(-90 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#100f0f",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#49261F",stopOpacity:"1"})]})}),(0,a.jsx)("path",{fill:"url(#gradient122)",d:"M2.7 33.6Q2.1 34.4 1.7 35.35 1.25 36.5 1.05 37.7 0 42.6 2.2 47.2 4 51 8 54.35 11.55 57.3 16 59.15 20.5 61 23.85 60.85 24.5 60.85 25.25 60.7 26 60.55 26.5 60.3 27 60.05 27.45 59.65 27.9 59.25 28.15 58.75 29.35 56.45 27.5 51.65 25.6 47 21.75 42.1 17.75 37 13.4 34.05 8.7 30.9 5.45 31.7 4.65 31.9 3.95 32.4 3.25 32.85 2.7 33.6M10.1 43.55Q10.35 43.1 10.6 42.85 10.85 42.6 11.2 42.4 11.6 42.25 11.9 42.2 13.5 41.9 15.95 43.6 18.15 45.05 20.35 47.7 22.35 50.1 23.55 52.4 24.7 54.75 24.25 55.7 24.15 55.9 24 56 23.85 56.2 23.65 56.25 23.55 56.35 23.25 56.4L22.7 56.5Q21.1 56.6 18.55 55.6 16.05 54.6 13.85 52.95 11.5 51.2 10.35 49.15 9.05 46.8 9.75 44.45 9.9 43.95 10.1 43.55Z"})]}),(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient123",gradientTransform:"rotate(-180 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#222020",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#49261F",stopOpacity:"1"})]})}),(0,a.jsx)("path",{fill:"url(#gradient123)",d:"M34.95 74.2L34.75 74.2Q33.2 74.15 31.9 75.25 30.7 76.3 29.85 78.25 29.1 80 28.8 82.2 28.5 84.4 28.7 86.65 29.1 91.4 31.5 94.7 34.3 98.5 39.3 99.7L39.4 99.7 39.7 99.8 39.85 99.8Q45.3 100.85 47.15 97.75 48 96.3 48 94.05 47.95 91.9 47.2 89.35 46.45 86.75 45.1 84.15 43.75 81.5 42.05 79.35 40.25 77.1 38.45 75.75 36.55 74.35 34.95 74.2M33.55 80.4Q34.35 78.2 35.6 78.3L35.65 78.3Q36.9 78.45 38.6 80.9 40.3 83.35 41.15 86.05 42.1 89 41.55 90.75 40.9 92.6 38.35 92.25L38.3 92.25 38.25 92.2 38.1 92.2Q35.6 91.7 34.25 89.6 33.1 87.7 32.95 85 32.8 82.35 33.55 80.4Z"})]}),(0,a.jsxs)("g",{transform:"matrix(0.9999999999999999 0 0 1 0 5.684341886080802e-14)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient124",gradientTransform:"rotate(-180 .5 .5)",children:[" ",(0,a.jsx)("stop",{offset:"0",stopColor:"#1e1c1c",stopOpacity:"1"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#49261F",stopOpacity:"1"})]})}),(0,a.jsx)("path",{fill:"url(#gradient124)",d:"M22.7 69.65Q22.25 69.3 21.6 69.05 20.95 68.8 20.25 68.7 19.6 68.55 18.85 68.5 16.7 68.45 14.65 69.15 12.65 69.8 11.4 71.1 10.15 72.5 10.2 74.2 10.25 76.05 11.95 78.2 12.4 78.75 13.05 79.4 13.55 79.9 14.2 80.3 14.7 80.6 15.3 80.85 16 81.1 16.4 81.1 18.2 81.35 19.9 80.35 21.55 79.4 22.75 77.65 24 75.85 24.3 73.95 24.6 71.85 23.55 70.5 23.15 70 22.7 69.65M21.7 71.7Q22.15 72.3 21.9 73.3 21.7 74.25 21 75.25 20.3 76.2 19.4 76.75 18.45 77.35 17.55 77.25L17 77.15Q16.7 77.05 16.45 76.85 16.25 76.75 15.9 76.45 15.7 76.25 15.4 75.9 14.5 74.75 14.7 73.8 14.8 72.95 15.75 72.3 16.6 71.7 17.8 71.4 19 71.1 20.1 71.15L20.65 71.2 21.1 71.3Q21.3 71.4 21.45 71.5L21.7 71.7Z"})]}),(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient125",gradientTransform:"rotate(-360 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#FFFFFF",stopOpacity:"0.5"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#FFFFFF",stopOpacity:"0.2"})]})}),(0,a.jsx)("path",{fill:"url(#gradient125)",d:"M52.6 19.25Q59.6 19.25 66.2 20.95 66.7 17.8 66.6 15.05 66.4 9.65 63.9 6.05 61.25 2.1 56.1 0.65 54.95 0.3 53.65 0.15 52.5 0 51.3 0.1 50.2 0.1 49.1 0.35 48.15 0.55 47 1 43.3 2.45 40.3 6.1 37.5 9.4 35.5 14.3 33.85 18.3 32.8 22.85 42.25 19.25 52.6 19.25Z"})]}),(0,a.jsxs)("g",{transform:"matrix(1 0 0 1 0 0)",children:[(0,a.jsx)("defs",{children:(0,a.jsxs)("linearGradient",{x1:"0",y1:"0",x2:"0",y2:"1",id:"gradient126",gradientTransform:"rotate(-360 .5 .5)",children:[(0,a.jsx)("stop",{offset:"0",stopColor:"#FFFFFF",stopOpacity:"0.5"}),(0,a.jsx)("stop",{offset:"1",stopColor:"#FFFFFF",stopOpacity:"0.2"})]})}),(0,a.jsx)("path",{fill:"url(#gradient126)",d:"M1.05 37.7Q0 42.6 2.2 47.2 2.95 48.8 4.05 50.25 7.55 41.65 14.4 34.75 14 34.45 13.4 34.05 8.7 30.9 5.45 31.7 4.65 31.9 3.95 32.4 3.25 32.85 2.7 33.6 2.1 34.4 1.7 35.35 1.25 36.5 1.05 37.7Z"})]})]})}),(0,a.jsx)("g",{transform:"matrix(1.219512230276127 0 0 1.2195122143630526 32.82519274395008 88.56945194723018)",children:(0,a.jsx)("path",{fill:"#000000",fillOpacity:"1",d:""})})]})})})})})}},34261:function(e,t,n){"use strict";n.d(t,{l:function(){return W}});var a=n(85893),r=n(38631),s=n(91762),i=n(67294),o=n(41664),l=n.n(o),c=n(9008),u=n.n(c),d=n(11699),h=n(11163),f=n(16373),m=n(12386),p=n(4863),g=n(65400),x=n(74048),y=n(94055),b=n(94184),v=n.n(b),w=n(5152),j=n.n(w),k=n(81453),P=n(37135),L=n(42099),N=n(78353),C=n(24044),S=n(51024),E=n(56697),O=n(91332);let{TextArea:T}=S.default,F=e=>{let{open:t,handleClose:n}=e,[r,s]=(0,i.useState)(""),[o,l]=(0,i.useState)(!1),[c,u]=(0,i.useState)(null);function d(){l(!1),u(null),n()}async function h(){l(!0);try{await (0,k.rQ)(k.e_,{data:{value:r},method:"POST",auth:!0}),u(O.zv),setTimeout(d,1e3)}catch(e){console.error(e),u(O.Un)}l(!1)}return(0,a.jsxs)(E.default,{destroyOnClose:!0,width:600,title:"Post to Followers",open:t,onCancel:n,footer:[(0,a.jsx)(g.default,{onClick:()=>n(),children:"Cancel"}),(0,a.jsx)(g.default,{type:"primary",onClick:h,disabled:o||c,loading:o,children:(null==c?void 0:c.toUpperCase())||"Post"})],children:[(0,a.jsx)("h3",{children:"Tell the world about your future streaming plans or let your followers know to tune in."}),(0,a.jsx)(T,{placeholder:"I'm still live, come join me!",size:"large",showCount:!0,maxLength:500,style:{height:"150px",width:"100%"},onChange:function(e){s(e.target.value)}})]})};var A=n(12979);let M=j()(()=>n.e(1264).then(n.t.bind(n,63126,23)),{loadableGenerated:{webpack:()=>[63126]},ssr:!1}),G=j()(()=>n.e(863).then(n.t.bind(n,50863,23)),{loadableGenerated:{webpack:()=>[50863]},ssr:!1}),_=j()(()=>n.e(9073).then(n.t.bind(n,99073,23)),{loadableGenerated:{webpack:()=>[99073]},ssr:!1}),U=j()(()=>n.e(7090).then(n.t.bind(n,87090,23)),{loadableGenerated:{webpack:()=>[87090]},ssr:!1}),R=j()(()=>n.e(4927).then(n.t.bind(n,64927,23)),{loadableGenerated:{webpack:()=>[64927]},ssr:!1}),I=j()(()=>n.e(7434).then(n.t.bind(n,27434,23)),{loadableGenerated:{webpack:()=>[27434]},ssr:!1}),D=j()(()=>Promise.resolve().then(n.t.bind(n,3840,23)),{loadableGenerated:{webpack:()=>[3840]},ssr:!1}),Q=j()(()=>n.e(5672).then(n.t.bind(n,65672,23)),{loadableGenerated:{webpack:()=>[65672]},ssr:!1}),q=j()(()=>n.e(5258).then(n.t.bind(n,85258,23)),{loadableGenerated:{webpack:()=>[85258]},ssr:!1}),B=j()(()=>n.e(775).then(n.t.bind(n,10775,23)),{loadableGenerated:{webpack:()=>[10775]},ssr:!1}),H=j()(()=>n.e(3594).then(n.bind(n,83594)),{loadableGenerated:{webpack:()=>[83594]},ssr:!1}),z=e=>{let{children:t}=e,n=(0,i.useContext)(r.a),{serverConfig:o,online:c,broadcaster:b,versionNumber:w,error:j}=n||{},{instanceDetails:S,chatDisabled:E,federation:O}=o,{enabled:T}=O,[z,W]=(0,i.useState)(""),[V,Z]=(0,i.useState)(!1),$=(0,i.useContext)(s.k),K=(0,h.useRouter)(),{route:X}=K||{},{Header:J,Footer:Y,Content:ee,Sider:et}=f.default,[en,ea]=(0,i.useState)(""),er=async()=>{try{let e=await (0,k.GR)(w);ea(e)}catch(e){console.log("==== error",e)}};(0,i.useEffect)(()=>{er()},[w]),(0,i.useEffect)(()=>{W(S.streamTitle)},[S]);let es=v()({"app-container":!0,online:c}),ei=en?["utilities-menu"]:[],eo=$.message?(0,a.jsx)(p.default,{message:$.message,afterClose:()=>{$.setMessage(null)},banner:!0,closable:!0}):null,el=b?(0,P.wS)((0,d.Z)(new Date,new Date(b.time))):"",ec=c?(0,a.jsx)(R,{}):(0,a.jsx)(I,{}),eu=c?"Online ".concat(el):"Offline",ed=(0,a.jsxs)("div",{className:"online-status-indicator",children:[(0,a.jsx)("span",{className:"status-label",children:eu}),(0,a.jsx)("span",{className:"status-icon",children:ec})]}),eh=[{label:(0,a.jsx)(l(),{href:"/admin/webhooks",children:"Webhooks"}),key:"/admin/webhooks"},{label:(0,a.jsx)(l(),{href:"/admin/access-tokens",children:"Access Tokens"}),key:"/admin/access-tokens"},{label:(0,a.jsx)(l(),{href:"/admin/actions",children:"External Actions"}),key:"/admin/actions"}],ef=[{label:(0,a.jsx)(l(),{href:"/admin/chat/messages",children:"Messages"}),key:"/admin/chat/messages"},{label:(0,a.jsx)(l(),{href:"/admin/chat/users",children:"Users"}),key:"/admin/chat/users"},{label:(0,a.jsx)(l(),{href:"/admin/chat/emojis",children:"Emojis"}),key:"/admin/chat/emojis"}],em=[{label:(0,a.jsx)(l(),{href:"/admin/hardware-info",children:"Hardware"}),key:"/admin/hardware-info"},{label:(0,a.jsx)(l(),{href:"/admin/stream-health",children:"Stream Health"}),key:"/admin/stream-health"},{label:(0,a.jsx)(l(),{href:"/admin/logs",children:"Logs"}),key:"/admin/logs"},T&&{label:(0,a.jsx)(l(),{href:"/admin/federation/actions",children:"Social Actions"}),key:"/admin/federation/actions"}],ep=[{label:(0,a.jsx)(l(),{href:"/admin/config/general",children:"General"}),key:"/admin/config/general"},{label:(0,a.jsx)(l(),{href:"/admin/config/server",children:"Server Setup"}),key:"/admin/config/server"},{label:(0,a.jsx)(l(),{href:"/admin/config-video",children:"Video"}),key:"/admin/config-video"},{label:(0,a.jsx)(l(),{href:"/admin/config-chat",children:"Chat"}),key:"/admin/config-chat"},{label:(0,a.jsx)(l(),{href:"/admin/config-federation",children:"Social"}),key:"/admin/config-federation"},{label:(0,a.jsx)(l(),{href:"/admin/config-notify",children:"Notifications"}),key:"/admin/config-notify"}],eg=[{label:(0,a.jsx)(l(),{href:"/admin",children:"Home"}),icon:(0,a.jsx)(G,{}),key:"/admin"},{label:(0,a.jsx)(l(),{href:"/admin/viewer-info",children:"Viewers"}),icon:(0,a.jsx)(_,{}),key:"/admin/viewer-info"},!E&&{label:(0,a.jsx)("span",{children:"Chat & Users"}),icon:(0,a.jsx)(Q,{}),children:ef,key:"chat-and-users"},T&&{key:"/admin/federation/followers",label:(0,a.jsx)(l(),{href:"/admin/federation/followers",children:"Followers"}),icon:(0,a.jsx)("span",{role:"img","aria-label":"message",className:"anticon anticon-message ant-menu-item-icon",children:(0,a.jsx)(H,{})})},{key:"configuration",label:"Configuration",icon:(0,a.jsx)(M,{}),children:ep},{key:"utilities",label:"Utilities",icon:(0,a.jsx)(U,{}),children:em},{key:"integrations",label:"Integrations",icon:(0,a.jsx)(q,{}),children:eh},en&&{key:"/admin/upgrade",label:(0,a.jsx)(l(),{href:"/admin/upgrade",children:"Upgrade to v".concat("".concat(en)||"")})},{key:"/admin/help",label:(0,a.jsx)(l(),{href:"/admin/help",children:"Help"}),icon:(0,a.jsx)(D,{})}],[ex,ey]=(0,i.useState)(ei);return(0,i.useEffect)(()=>{eg.forEach(e=>{var t;return null==e?void 0:null===(t=e.children)||void 0===t?void 0:t.forEach(t=>{(null==t?void 0:t.key)===X&&ey([...ei,e.key])})})},[]),(0,a.jsxs)(f.default,{id:"admin-page",className:es,children:[(0,a.jsxs)(u(),{children:[(0,a.jsx)("title",{children:"Owncast Admin"}),(0,a.jsx)("link",{rel:"icon",type:"image/png",sizes:"32x32",href:"/img/favicon/favicon-32x32.png"})]}),(null==j?void 0:j.type)==="OWNCAST_SERVICE_UNREACHABLE"&&(0,a.jsx)(A.FatalErrorStateModal,{title:"Server Unreachable",message:j.msg}),(0,a.jsxs)(et,{width:240,className:"side-nav",children:[(0,a.jsxs)("h1",{className:"owncast-title",children:[(0,a.jsx)("span",{className:"logo-container",children:(0,a.jsx)(L.C,{variant:"simple"})}),(0,a.jsx)("span",{className:"title-label",children:"Owncast Admin"})]}),(0,a.jsx)(m.default,{mode:"inline",className:"menu-container",items:eg,selectedKeys:[X||"/admin"],openKeys:ex,onOpenChange:e=>{ey(e)}})]}),(0,a.jsxs)(f.default,{className:"layout-main",children:[(0,a.jsxs)(J,{className:"layout-header",children:[(0,a.jsx)(x.default,{direction:"horizontal",children:(0,a.jsx)(y.default,{title:"Compose post to your social followers",children:(0,a.jsx)(g.default,{type:"link",icon:(0,a.jsx)(B,{}),size:"small",onClick:()=>{Z(!0)},style:{display:T?"block":"none",margin:"10px"},children:"Compose Post"})})}),(0,a.jsx)("div",{className:"global-stream-title-container",children:(0,a.jsx)(N.$7,{fieldName:"streamTitle",...C.$t,placeholder:"What are you streaming now? (Stream title)",value:z,initialValue:S.streamTitle,onChange:e=>{let{value:t}=e;W(t)}})}),(0,a.jsx)(x.default,{direction:"horizontal",children:ed})]}),eo,(0,a.jsx)(ee,{className:"main-content-container",children:t}),(0,a.jsx)(Y,{className:"footer-container",children:(0,a.jsxs)("a",{href:"https://owncast.online/?source=admin",target:"_blank",rel:"noopener noreferrer",children:["About Owncast v",w]})})]}),(0,a.jsx)(F,{open:V,handleClose:()=>Z(!1)})]})},W=e=>{let{page:t}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/main-layout.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/form-textfields.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/config-socialhandles.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/config-storage.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/config-edit-string-tags.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/config-video-variants.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/config-public-details.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/home.css"}),(0,a.jsx)("link",{rel:"stylesheet",href:"/styles/admin/chat.css"}),(0,a.jsx)(r.Z,{children:(0,a.jsx)(s.Z,{children:(0,a.jsx)(z,{children:t})})})]})}},12979:function(e,t,n){"use strict";n.r(t),n.d(t,{FatalErrorStateModal:function(){return s}});var a=n(85893),r=n(56697);let s=e=>{let{title:t,message:n}=e;return(0,a.jsx)(r.default,{title:t,visible:!0,footer:null,closable:!1,keyboard:!1,width:900,centered:!0,className:"modal",children:(0,a.jsx)("p",{style:{fontSize:"1.3rem"},children:n})})}},91762:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var a=n(85893),r=n(67294);let s=r.createContext({message:null,setMessage:e=>null});t.Z=e=>{let{children:t}=e,[n,i]=(0,r.useState)("");return(0,a.jsx)(s.Provider,{value:{message:n,setMessage:i},children:t})}},81453:function(e,t,n){"use strict";n.d(t,{$i:function(){return M},$l:function(){return z},Bu:function(){return x},E8:function(){return U},Ff:function(){return C},GC:function(){return v},GR:function(){return $},HP:function(){return _},IO:function(){return O},Kp:function(){return m},Kt:function(){return V},M_:function(){return F},N$:function(){return Q},NE:function(){return l},NM:function(){return g},Q_:function(){return c},Qc:function(){return N},RB:function(){return y},UJ:function(){return B},WB:function(){return i},WE:function(){return P},WQ:function(){return k},Wr:function(){return E},XA:function(){return T},Y9:function(){return R},a_:function(){return f},ao:function(){return d},bl:function(){return u},e_:function(){return G},hn:function(){return L},iG:function(){return A},iV:function(){return h},jr:function(){return b},kb:function(){return I},kg:function(){return W},ms:function(){return S},nx:function(){return w},op:function(){return D},qk:function(){return p},rQ:function(){return H},sG:function(){return j},um:function(){return q}});var a=n(34155);let r=a.env.NEXT_PUBLIC_ADMIN_USERNAME,s=a.env.NEXT_PUBLIC_ADMIN_STREAMKEY,i="/",o="".concat(i,"api/admin/"),l=15e3,c="".concat(o,"status"),u="".concat(o,"serverconfig"),d="".concat(o,"config"),h="".concat(o,"viewersOverTime"),f="".concat(o,"viewers"),m="".concat(o,"chat/clients"),p="".concat(o,"chat/users/disabled"),g="".concat(o,"chat/users/setenabled"),x="".concat(o,"chat/users/ipbans"),y="".concat(o,"chat/users/ipbans/remove"),b="".concat(o,"chat/users/setmoderator"),v="".concat(o,"chat/users/moderators"),w="".concat(o,"hardwarestats"),j="".concat(o,"logs"),k="".concat(o,"logs/warnings"),P="".concat(o,"chat/messages"),L="/api/admin/chat/messagevisibility",N="".concat(o,"emoji/upload"),C="".concat(o,"emoji/delete"),S="".concat(o,"accesstokens"),E="".concat(o,"accesstokens/delete"),O="".concat(o,"accesstokens/create"),T="".concat(o,"webhooks"),F="".concat(o,"webhooks/delete"),A="".concat(o,"webhooks/create"),M="".concat(i,"api/socialplatforms"),G="".concat(o,"federation/send"),_="".concat(o,"followers"),U="".concat(o,"followers/pending"),R="".concat(o,"followers/blocked"),I="".concat(o,"followers/approve"),D="".concat(o,"federation/actions"),Q="".concat(o,"metrics/video"),q="".concat(o,"config/streamkeys"),B="".concat(o,"yp/reset");async function H(e,t){let{data:n,method:a="GET",auth:i=!0}=t||{},o={method:a};if(n&&(o.body=JSON.stringify(n)),i&&r&&s){let e=btoa("".concat(r,":").concat(s));o.headers={Authorization:"Basic ".concat(e)},o.mode="cors",o.credentials="include"}let l=await fetch(e,o),c=await l.json();if(!l.ok){let e=c.message||"An error has occurred: ".concat(l.status);throw Error(e)}return c}async function z(e,t){let n={method:"GET",auth:!1,...t};return H(e,n)}async function W(e){try{let t=await fetch(e,{referrerPolicy:"no-referrer",referrer:""});if(!t.ok){let e="An error has occured: ".concat(t.status);throw Error(e)}let n=await t.json();return n}catch(e){console.log(e)}return{}}async function V(){return W("https://api.github.com/repos/owncast/owncast/releases/latest")}let Z=/^\d+(\.\d+){0,2}$/;async function $(e){let t=await V(),n=t.tag_name;return("v"===n.substr(0,1)&&(n=n.substr(1)),!function(e,t){if(!e||!t||0===e.length||0===t.length)return!1;if(e===t)return!0;if(Z.test(e)&&Z.test(t)){let n=e.split(".");for(;n.length<3;)n.push("0");let a=t.split(".");for(;a.length<3;)a.push("0");for(let e=0;e<3;e++){let t=parseInt(n[e],10),r=parseInt(a[e],10);if(t!==r)return t>r}return!0}return e>=t}(e,n))?n:null}},24044:function(e,t,n){"use strict";n.d(t,{$t:function(){return P},$w:function(){return c},AA:function(){return i},AN:function(){return W},AP:function(){return m},BF:function(){return K},B_:function(){return Y},CJ:function(){return p},CQ:function(){return y},Dg:function(){return z},EY:function(){return U},FE:function(){return $},FIELD_PROPS_TAGS:function(){return _},HM:function(){return eo},I$:function(){return ec},IX:function(){return C},JZ:function(){return l},KB:function(){return O},Kl:function(){return V},LC:function(){return Z},ME:function(){return M},P:function(){return R},RE:function(){return k},RQ:function(){return eg},SS:function(){return ei},Si:function(){return j},TEXTFIELD_PROPS_LOGO:function(){return S},Uq:function(){return ex},Xc:function(){return X},Xq:function(){return ea},_X:function(){return I},bJ:function(){return u},c9:function(){return d},cf:function(){return g},cj:function(){return A},d$:function(){return o},dL:function(){return et},dR:function(){return ee},dj:function(){return H},gX:function(){return Q},i3:function(){return eu},il:function(){return D},jU:function(){return G},kB:function(){return B},lT:function(){return F},mv:function(){return ep},nm:function(){return en},os:function(){return x},oy:function(){return em},pE:function(){return w},rE:function(){return T},rd:function(){return N},rs:function(){return L},sI:function(){return s},sv:function(){return h},t$:function(){return el},tQ:function(){return E},vv:function(){return f},wC:function(){return ed},x8:function(){return er},yC:function(){return es},yi:function(){return J},yj:function(){return q},z_:function(){return eh},zm:function(){return ef}});var a=n(81453),r=n(53899);let s=3e3,i="/pagecontent",o="/customstyles",l="/customjavascript",c="/s3",u="/offlinemessage",d="/socialhandles",h="/video/streamlatencylevel",f="/video/streamoutputvariants",m="/directoryenabled",p="/chat/forbiddenusernames",g="/chat/suggestedusernames",x="/externalactions",y="/video/codec",b="/serverurl",v="/nsfw",w="/federation/blockdomains";async function j(e){let{apiPath:t,data:n,onSuccess:r,onError:s}=e,i=await (0,a.rQ)("".concat(a.ao).concat(t),{data:n,method:"POST",auth:!0});i.success&&r?r(i.message):s&&s(i.message)}let k={apiPath:"/name",configPath:"instanceDetails",maxLength:255,placeholder:"Owncast site name",label:"Name",tip:"The name of your Owncast server",required:!0,useTrimLead:!0},P={apiPath:"/streamtitle",configPath:"instanceDetails",maxLength:100,placeholder:"Doing cool things...",label:"Stream Title",tip:"What is your stream about today?"},L={apiPath:"/serversummary",configPath:"instanceDetails",maxLength:500,placeholder:"",label:"About",tip:"A brief blurb about you, your server, or what your stream is about."},N={apiPath:u,configPath:"instanceDetails",maxLength:2500,placeholder:"An optional message you can leave people when your stream is not live.",label:"Offline Message",tip:"An optional message you can leave people when your stream is not live."},C={apiPath:"/welcomemessage",configPath:"instanceDetails",maxLength:2500,placeholder:"",label:"Welcome Message",tip:"A system chat message sent to viewers when they first connect to chat. Leave blank to disable."},S={apiPath:"/logo",configPath:"instanceDetails",maxLength:255,placeholder:"/img/mylogo.png",label:"Logo",tip:"Upload your logo if you have one (max size 2 MB). We recommend that you use a square image that is at least 256x256. SVGs are discouraged as they cannot be displayed on all social media platforms."},E={apiPath:"/adminpass",configPath:"",maxLength:255,placeholder:"abc123",label:"Admin Password",tip:"Save this password somewhere safe, you will need it to login to the admin dashboard!",required:!0,hasComplexityRequirements:!0},O={apiPath:"/ffmpegpath",configPath:"",maxLength:255,placeholder:"/usr/local/bin/ffmpeg",label:"FFmpeg Path",tip:"Absolute file path of the FFMPEG application on your server",required:!0,hasComplexityRequirements:!1},T={apiPath:"/webserverport",configPath:"",maxLength:6,placeholder:"8080",label:"Owncast port",tip:"What port is your Owncast web server listening? Default is 8080",required:!0,hasComplexityRequirements:!1},F={apiPath:"/rtmpserverport",configPath:"",maxLength:6,placeholder:"1935",label:"RTMP port",tip:"What port should accept inbound broadcasts? Default is 1935",required:!0,hasComplexityRequirements:!1},A={apiPath:b,configPath:"yp",maxLength:255,placeholder:"https://owncast.mysite.com",label:"Server URL",tip:"The full url to your Owncast server.",type:"url",pattern:r.ax,useTrim:!0},M={apiPath:"/sockethostoverride",configPath:"",maxLength:255,placeholder:"https://owncast.mysite.com",label:"Websocket host override",tip:"The direct URL of your Owncast server.",type:"url",pattern:r.ax,useTrim:!0},G={apiPath:"/videoservingendpoint",fieldName:"videoServingEndpoint",label:"Serving Endpoint",maxLength:255,placeholder:"http://cdn.provider.endpoint.com",tip:"Optional URL that video content should be accessed from instead of the default. Used with CDNs and specific storage providers. Generally not required.",type:"url",pattern:r.ax,useTrim:!0},_={apiPath:"/tags",configPath:"instanceDetails",maxLength:24,placeholder:"Add a new tag",required:!0,label:"",tip:""},U={apiPath:v,configPath:"instanceDetails",label:"NSFW?",tip:"Turn this ON if you plan to stream explicit or adult content. Please respectfully set this flag so unexpected eyes won't accidentally see it in the Directory."},R={apiPath:m,configPath:"yp",label:"Enable directory",tip:"Turn this ON to request to show up in the directory."},I={apiPath:"/hideviewercount",configPath:"",label:"Hide viewer count",tip:"Turn this ON to hide the viewer count on the web page."},D={apiPath:"/disablesearchindexing",configPath:"",label:"Disable search engine indexing",tip:"Turn this ON to to tell search engines not to index this site."},Q={framerate:24,videoPassthrough:!1,videoBitrate:1200,audioPassthrough:!0,audioBitrate:0,cpuUsageLevel:2,scaledHeight:null,scaledWidth:null,name:""},q={apiPath:"/chat/disable",configPath:"",label:"Chat",tip:"Turn the chat functionality on/off on your Owncast server.",useSubmit:!0},B={apiPath:"/chat/joinmessagesenabled",configPath:"",label:"Join Messages",tip:"Show when a viewer joins the chat.",useSubmit:!0},H={apiPath:"/chat/establishedusermode",configPath:"",label:"Established users only",tip:"Only users who have previously been established for some time may chat.",useSubmit:!0},z={apiPath:p,placeholder:"username",label:"Forbidden usernames",tip:"A list of words in chat usernames you disallow."},W={apiPath:g,placeholder:"username",label:"Default usernames",tip:"An optional list of chat usernames that new users get assigned. If the list holds less then 10 items, random names will be generated. Users can change their usernames afterwards and the same username may be given out multple times.",min_not_reached:"At least 10 items are required for this feature.",no_entries:"The default name generator is used."},V={apiPath:"/federation/enable",configPath:"federation",label:"Enable Social Features",tip:"Send and receive activities on the Fediverse.",useSubmit:!0},Z={apiPath:"/federation/private",configPath:"federation",label:"Private",tip:"Follow requests will require approval and only followers will see your activity.",useSubmit:!0},$={apiPath:"/federation/showengagement",configPath:"showEngagement",label:"Show engagement",tip:"Following, liking and sharing will appear in the chat feed.",useSubmit:!0},K={apiPath:"/federation/livemessage",configPath:"federation",maxLength:500,placeholder:"My stream has started, tune in!",label:"Now Live message",tip:"The message sent announcing that your live stream has begun. Tags will be automatically added. Leave blank to disable."},X={apiPath:"/federation/username",configPath:"federation",maxLength:10,placeholder:"owncast",default:"owncast",label:"Username",tip:'The username used for sending and receiving activities from the Fediverse. For example, if you use "bob" as a username you would send messages to the fediverse from @bob@yourserver. Once people start following your instance you should not change this.'},J={apiPath:b,configPath:"yp",maxLength:255,placeholder:"https://owncast.mysite.com",label:"Server URL",tip:"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.",type:"url",pattern:r.ax,useTrim:!0},Y={apiPath:v,configPath:"instanceDetails",label:"Potentially NSFW",tip:"Turn this ON if you plan to stream explicit or adult content so previews of your stream can be marked as potentially sensitive."},ee={apiPath:w,configPath:"federation",label:"Blocked domains",placeholder:"bad.domain.biz",tip:"You can block specific domains from interacting with you."},et={audioBitrate:{min:600,max:1200,defaultValue:800,unit:"kbps",incrementBy:100,tip:"nothing to see here"},videoPassthrough:{tip:"If enabled, all other settings will be disabled. Otherwise configure as desired."},audioPassthrough:{tip:"If No is selected, then you should set your desired Audio Bitrate."},scaledWidth:{fieldName:"scaledWidth",label:"Resized Width",maxLength:4,placeholder:"1280",tip:"Optionally resize this content's width."},scaledHeight:{fieldName:"scaledHeight",label:"Resized Height",maxLength:4,placeholder:"720",tip:"Optionally resize this content's height."}},en={min:24,max:120,defaultValue:24,unit:"fps",incrementBy:null,tip:"Reducing your framerate will decrease the amount of video that needs to be encoded and sent to your viewers, saving CPU and bandwidth at the expense of smoothness. A lower value is generally is fine for most content."},ea={[en.min]:"".concat(en.min," ").concat(en.unit),25:" ",30:" ",50:" ",60:" ",90:" ",[en.max]:"".concat(en.max," ").concat(en.unit)},er={[en.min]:"".concat(en.min,"fps - Good for film, presentations, music, low power/bandwidth servers."),25:"25fps - Good for film, presentations, music, low power/bandwidth servers.",30:"30fps - Good for slow/casual games, chat, general purpose.",50:"50fps - Good for fast/action games, sports, HD video.",60:"60fps - Good for fast/action games, sports, HD video.",90:"90fps - Good for newer fast games and hardware.",[en.max]:"".concat(en.max,"fps - Experimental, use at your own risk!")},es={min:400,max:6e3,defaultValue:1200,unit:"kbps",incrementBy:100,tip:"The overall quality of your stream is generally impacted most by bitrate."},ei={fieldName:"name",label:"Name",maxLength:15,placeholder:"HD or Low",tip:"Human-readable name for for displaying in the player."},eo={[es.min]:{style:{marginLeft:"24px"},label:"".concat(es.min," ").concat(es.unit)},3e3:3e3,4500:4500,[es.max]:{style:{marginLeft:"-10px"},label:"".concat(es.max," ").concat(es.unit)}},el={0:{style:{marginLeft:"15px"},label:"lowest"},1:" ",2:" ",3:" ",4:{style:{marginLeft:"-15px"},label:"highest"}},ec={0:"Lowest hardware usage - lowest quality video",1:"Low hardware usage - low quality video",2:"Medium hardware usage - average quality video",3:"High hardware usage - high quality video",4:"Highest hardware usage - higher quality video"},eu={VIDEO_HEIGHT:1080,VIDEO_BITRATE:3e3,HELP_TEXT:"You have only set one video quality variant. If your server has the computing resources, consider adding another, lower-quality variant, so more people can view your content!"},ed={url:"",platform:""},eh="OTHER_SOCIAL_HANDLE_OPTION",ef={accessKey:{fieldName:"accessKey",label:"Access Key",maxLength:255,placeholder:"access key 123",tip:""},acl:{fieldName:"acl",label:"ACL",maxLength:255,placeholder:"",tip:"Optional specific access control value to add to your content. Generally not required."},bucket:{fieldName:"bucket",label:"Bucket",maxLength:255,placeholder:"bucket 123",tip:"Create a new bucket for each Owncast instance you may be running."},endpoint:{fieldName:"endpoint",label:"Endpoint",maxLength:255,placeholder:"https://your.s3.provider.endpoint.com",tip:'The full URL (with "https://") endpoint from your storage provider.',useTrim:!0,type:"url",pattern:r.ax},region:{fieldName:"region",label:"Region",maxLength:255,placeholder:"region 123",tip:""},secret:{fieldName:"secret",label:"Secret key",type:"password",maxLength:255,placeholder:"your secret key",tip:""},forcePathStyle:{fieldName:"forcePathStyle",label:"Force path-style",tip:"If your S3 provider doesn't support virtual-hosted-style URLs set this to ON (i.e. Oracle Cloud Object Storage)"}},em={webhookUrl:{fieldName:"webhook",label:"Webhook URL",maxLength:255,placeholder:"https://discord.com/api/webhooks/837/jf38-6iNEv",tip:"The webhook assigned to your channel.",type:"url",pattern:r.ax,useTrim:!0},goLiveMessage:{fieldName:"goLiveMessage",label:"Go Live Text",maxLength:300,tip:"The text to send when you go live.",placeholder:"I've gone live! Come watch!"}},ep={goLiveMessage:{fieldName:"goLiveMessage",label:"Go Live Text",maxLength:200,tip:"The text to send when you go live.",placeholder:"I've gone live! Come watch!"}},eg=[{min:8,message:"- minimum 8 characters"},{max:192,message:"- maximum 192 characters"},{pattern:/^(?=.*[a-z])/,message:"- at least one lowercase letter"},{pattern:/^(?=.*[A-Z])/,message:"- at least one uppercase letter"},{pattern:/\d/,message:"- at least one digit"},{pattern:/^(?=.*?[#?!@$%^&*-])/,message:"- at least one special character: !@#$%^&*"}],ex=/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@#$%^&*]).{8,192}$/},37135:function(e,t,n){"use strict";n.d(t,{AB:function(){return c},Qr:function(){return i},t5:function(){return s},wS:function(){return l}});var a=n(42238),r=n.n(a);function s(e){let t=e.split(":");t[t.length-1]="";let n=t.join(":");return"[::1]"===(n=n.slice(0,n.length-1))||"127.0.0.1"===n?"Localhost":n}function i(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function o(e,t,n){return String(t.repeat(n)+e).slice(-n)}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=Number.isFinite(+e)?Math.abs(e):0,n=Math.floor(t/86400),a=n>0?"".concat(n," day").concat(n>1?"s":""," "):"",r=Math.floor(t/3600%24),s=r||n?o("".concat(r,":"),"0",3):"",i=o("".concat(Math.floor(t/60%60),":"),"0",3),l=o("".concat(Math.floor(t%60)),"0",2);return a+s+i+l}function c(e){let t=r()(e),{device:n,os:a,browser:s}=t,{major:i,name:o}=s,{version:l,name:c}=a,{model:u,type:d}=n;if("libmpv"===e)return"mpv media player";if(!o||!i||!c)return e;let h=u||d?" (".concat(u||d,")"):"";return"".concat(o," ").concat(i," on ").concat(c," ").concat(l,"\n ").concat(h)}},91332:function(e,t,n){"use strict";n.d(t,{Jk:function(){return d},Un:function(){return u},dG:function(){return f},kg:function(){return g},zv:function(){return h}});var a=n(85893),r=n(5152),s=n.n(r);let i=s()(()=>Promise.resolve().then(n.t.bind(n,37431,23)),{loadableGenerated:{webpack:()=>[37431]},ssr:!1}),o=s()(()=>Promise.resolve().then(n.t.bind(n,42461,23)),{loadableGenerated:{webpack:()=>[42461]},ssr:!1}),l=s()(()=>Promise.resolve().then(n.t.bind(n,628,23)),{loadableGenerated:{webpack:()=>[628]},ssr:!1}),c=s()(()=>n.e(7282).then(n.t.bind(n,97282,23)),{loadableGenerated:{webpack:()=>[97282]},ssr:!1}),u="error",d="proessing",h="success",f="warning",m="invalid",p={[h]:{type:h,icon:(0,a.jsx)(i,{style:{color:"green"}}),message:"Success!"},[u]:{type:u,icon:(0,a.jsx)(o,{style:{color:"red"}}),message:"An error occurred."},[m]:{type:m,icon:(0,a.jsx)(o,{style:{color:"red"}}),message:"An error occurred."},[d]:{type:d,icon:(0,a.jsx)(l,{}),message:""},[f]:{type:f,icon:(0,a.jsx)(c,{style:{color:"#fc0"}}),message:""}};function g(e,t){return e&&p[e]?t?{type:e,icon:p[e].icon,message:t}:p[e]:null}},38631:function(e,t,n){"use strict";n.d(t,{a:function(){return c}});var a=n(85893),r=n(67294),s=n(81453),i=n(24044);let o={streamKeys:[],streamKeyOverridden:!1,adminPassword:"",instanceDetails:{customStyles:"",customJavascript:"",extraPageContent:"",logo:"",name:"",nsfw:!1,socialHandles:[],streamTitle:"",summary:"",tags:[],title:"",welcomeMessage:"",offlineMessage:"",appearanceVariables:{}},ffmpegPath:"",rtmpServerPort:"",webServerPort:"",socketHostOverride:null,videoServingEndpoint:"",s3:{accessKey:"",acl:"",bucket:"",enabled:!1,endpoint:"",region:"",secret:"",forcePathStyle:!1},yp:{enabled:!1,instanceUrl:""},videoSettings:{latencyLevel:4,cpuUsageLevel:3,videoQualityVariants:[i.gX]},federation:{enabled:!1,isPrivate:!1,username:"",goLiveMessage:"",showEngagement:!0,blockedDomains:[]},notifications:{browser:{enabled:!1,goLiveMessage:""},discord:{enabled:!1,webhook:"",goLiveMessage:""}},externalActions:[],supportedCodecs:[],videoCodec:"",forbiddenUsernames:[],suggestedUsernames:[],chatDisabled:!1,chatJoinMessagesEnabled:!0,chatEstablishedUserMode:!1,hideViewerCount:!1,disableSearchIndexing:!1},l={broadcastActive:!1,broadcaster:null,currentBroadcast:null,online:!1,viewerCount:0,sessionMaxViewerCount:0,sessionPeakViewerCount:0,overallPeakViewerCount:0,versionNumber:"0.0.0",streamTitle:"",chatDisabled:!1,health:{healthy:!0,healthPercentage:100,message:"",representation:0},error:{type:null,msg:null}},c=r.createContext({...l,serverConfig:o,setFieldInConfigState:e=>null});t.Z=e=>{let{children:t}=e,[n,i]=(0,r.useState)(l),[u,d]=(0,r.useState)(o),h=async()=>{try{let e=await (0,s.rQ)(s.Q_);if(e instanceof Error)throw e;i({...e,error:{type:null,msg:null}})}catch(e){i(e=>({...e,error:{type:"OWNCAST_SERVICE_UNREACHABLE",msg:"Cannot connect to the Owncast service. Please check you are connected to the internet and the Owncast server is running."}}))}},f=async()=>{try{let e=await (0,s.rQ)(s.bl);if(e instanceof Error)throw e;d(e)}catch(e){console.error(e)}};(0,r.useEffect)(()=>{let e=null;return h(),e=setInterval(h,s.NE),f(),()=>{clearInterval(e)}},[]);let m={...n,serverConfig:u,setFieldInConfigState:e=>{let{fieldName:t,value:n,path:a}=e,r=a?{...u,[a]:{...u[a],[t]:n}}:{...u,[t]:n};d(r)}};return(0,a.jsx)(c.Provider,{value:m,children:t})}},53899:function(e,t,n){"use strict";n.d(t,{Kf:function(){return s},ME:function(){return o},ax:function(){return a},bu:function(){return i},jv:function(){return r}});let a="https?://.*";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["http:","https:"];try{let n=new URL(e);if(""===n.protocol||""===n.hostname||!t.includes(n.protocol))return!1}catch(e){return!1}return!0}function s(e,t){e.startsWith("@")&&(e=e.slice(1));let n=e.split(/:|@/),[a,r,s]=n;return a===t&&3===n.length&&!!a&&!!r&&!!s}function i(e){e.startsWith("matrix:")&&(e=e.slice(7)),e.startsWith("@")&&(e=e.slice(1));let t=e.split(":"),[n,a]=t;return 2===t.length&&!!n&&!!a}function o(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())}},57361:function(e){e.exports={root:"OwncastLogo_root__oCX4o",contrast:"OwncastLogo_contrast__2iRoV",simple:"OwncastLogo_simple__ZU5CD"}}}]); |