Files
owncast/static/web/_next/static/chunks/3286-a15aa91d3d2fc97f.js
2022-10-05 06:05:36 +00:00

1 line
9.3 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3286],{54907:function(e,n,t){t.d(n,{Z:function(){return T}});var o=t(87462),a=t(4942),r=t(18073),l=t(94184),i=t.n(l),c=t(74902),s=t(15671),d=t(43144),p=t(60136),u=t(33643),v=t(71002),f=t(67294),m=t(96774),y=t.n(m),C=t(50344),h=t(62874),Z=t(97685),x=f.forwardRef((function(e,n){var t,o=e.prefixCls,r=e.forceRender,l=e.className,c=e.style,s=e.children,d=e.isActive,p=e.role,u=f.useState(d||r),v=(0,Z.Z)(u,2),m=v[0],y=v[1];return f.useEffect((function(){(r||d)&&y(!0)}),[r,d]),m?f.createElement("div",{ref:n,className:i()("".concat(o,"-content"),(t={},(0,a.Z)(t,"".concat(o,"-content-active"),d),(0,a.Z)(t,"".concat(o,"-content-inactive"),!d),t),l),style:c,role:p},f.createElement("div",{className:"".concat(o,"-content-box")},s)):null}));x.displayName="PanelContent";var b=x,k=function(e){(0,p.Z)(t,e);var n=(0,u.Z)(t);function t(){var e;(0,s.Z)(this,t);for(var o=arguments.length,a=new Array(o),r=0;r<o;r++)a[r]=arguments[r];return(e=n.call.apply(n,[this].concat(a))).onItemClick=function(){var n=e.props,t=n.onItemClick,o=n.panelKey;"function"===typeof t&&t(o)},e.handleKeyPress=function(n){"Enter"!==n.key&&13!==n.keyCode&&13!==n.which||e.onItemClick()},e.renderIcon=function(){var n=e.props,t=n.showArrow,o=n.expandIcon,a=n.prefixCls,r=n.collapsible;if(!t)return null;var l="function"===typeof o?o(e.props):f.createElement("i",{className:"arrow"});return l&&f.createElement("div",{className:"".concat(a,"-expand-icon"),onClick:"header"===r?e.onItemClick:null},l)},e.renderTitle=function(){var n=e.props,t=n.header,o=n.prefixCls,a=n.collapsible;return f.createElement("span",{className:"".concat(o,"-header-text"),onClick:"header"===a?e.onItemClick:null},t)},e}return(0,d.Z)(t,[{key:"shouldComponentUpdate",value:function(e){return!y()(this.props,e)}},{key:"render",value:function(){var e,n,t=this.props,r=t.className,l=t.id,c=t.style,s=t.prefixCls,d=t.headerClass,p=t.children,u=t.isActive,v=t.destroyInactivePanel,m=t.accordion,y=t.forceRender,C=t.openMotion,Z=t.extra,x=t.collapsible,k="disabled"===x,E="header"===x,N=i()((e={},(0,a.Z)(e,"".concat(s,"-item"),!0),(0,a.Z)(e,"".concat(s,"-item-active"),u),(0,a.Z)(e,"".concat(s,"-item-disabled"),k),e),r),g={className:i()("".concat(s,"-header"),(n={},(0,a.Z)(n,d,d),(0,a.Z)(n,"".concat(s,"-header-collapsible-only"),E),n)),"aria-expanded":u,"aria-disabled":k,onKeyPress:this.handleKeyPress};E||(g.onClick=this.onItemClick,g.role=m?"tab":"button",g.tabIndex=k?-1:0);var P=null!==Z&&void 0!==Z&&"boolean"!==typeof Z;return f.createElement("div",{className:N,style:c,id:l},f.createElement("div",g,this.renderIcon(),this.renderTitle(),P&&f.createElement("div",{className:"".concat(s,"-extra")},Z)),f.createElement(h.Z,(0,o.Z)({visible:u,leavedClassName:"".concat(s,"-content-hidden")},C,{forceRender:y,removeOnLeave:v}),(function(e,n){var t=e.className,o=e.style;return f.createElement(b,{ref:n,prefixCls:s,className:t,style:o,isActive:u,forceRender:y,role:m?"tabpanel":null},p)})))}}]),t}(f.Component);k.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var E=k;function N(e){var n=e;if(!Array.isArray(n)){var t=(0,v.Z)(n);n="number"===t||"string"===t?[n]:[]}return n.map((function(e){return String(e)}))}var g=function(e){(0,p.Z)(t,e);var n=(0,u.Z)(t);function t(e){var o;(0,s.Z)(this,t),(o=n.call(this,e)).onClickItem=function(e){var n=o.state.activeKey;if(o.props.accordion)n=n[0]===e?[]:[e];else{var t=(n=(0,c.Z)(n)).indexOf(e);t>-1?n.splice(t,1):n.push(e)}o.setActiveKey(n)},o.getNewChild=function(e,n){if(!e)return null;var t=o.state.activeKey,a=o.props,r=a.prefixCls,l=a.openMotion,i=a.accordion,c=a.destroyInactivePanel,s=a.expandIcon,d=a.collapsible,p=e.key||String(n),u=e.props,v=u.header,m=u.headerClass,y=u.destroyInactivePanel,C=u.collapsible,h=null!==C&&void 0!==C?C:d,Z={key:p,panelKey:p,header:v,headerClass:m,isActive:i?t[0]===p:t.indexOf(p)>-1,prefixCls:r,destroyInactivePanel:null!==y&&void 0!==y?y:c,openMotion:l,accordion:i,children:e.props.children,onItemClick:"disabled"===h?null:o.onClickItem,expandIcon:s,collapsible:h};return"string"===typeof e.type?e:(Object.keys(Z).forEach((function(e){"undefined"===typeof Z[e]&&delete Z[e]})),f.cloneElement(e,Z))},o.getItems=function(){var e=o.props.children;return(0,C.Z)(e).map(o.getNewChild)},o.setActiveKey=function(e){"activeKey"in o.props||o.setState({activeKey:e}),o.props.onChange(o.props.accordion?e[0]:e)};var a=e.activeKey,r=e.defaultActiveKey;return"activeKey"in e&&(r=a),o.state={activeKey:N(r)},o}return(0,d.Z)(t,[{key:"shouldComponentUpdate",value:function(e,n){return!y()(this.props,e)||!y()(this.state,n)}},{key:"render",value:function(){var e,n=this.props,t=n.prefixCls,o=n.className,r=n.style,l=n.accordion,c=i()((e={},(0,a.Z)(e,t,!0),(0,a.Z)(e,o,!!o),e));return f.createElement("div",{className:c,style:r,role:l?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(e){var n={};return"activeKey"in e&&(n.activeKey=N(e.activeKey)),n}}]),t}(f.Component);g.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},g.Panel=E;var P=g,I=(g.Panel,t(98423)),w=t(53124),K=t(33603),O=t(96159),A=function(e){var n,t=f.useContext(w.E_),l=t.getPrefixCls,c=t.direction,s=e.prefixCls,d=e.className,p=void 0===d?"":d,u=e.bordered,v=void 0===u||u,m=e.ghost,y=e.expandIconPosition,h=void 0===y?"start":y,Z=l("collapse",s),x=f.useMemo((function(){return"left"===h?"start":"right"===h?"end":h}),[h]),b=i()("".concat(Z,"-icon-position-").concat(x),(n={},(0,a.Z)(n,"".concat(Z,"-borderless"),!v),(0,a.Z)(n,"".concat(Z,"-rtl"),"rtl"===c),(0,a.Z)(n,"".concat(Z,"-ghost"),!!m),n),p),k=(0,o.Z)((0,o.Z)({},K.ZP),{motionAppear:!1,leavedClassName:"".concat(Z,"-content-hidden")});return f.createElement(P,(0,o.Z)({openMotion:k},e,{expandIcon:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.expandIcon,o=t?t(n):f.createElement(r.Z,{rotate:n.isActive?90:void 0});return(0,O.Tm)(o,(function(){return{className:i()(o.props.className,"".concat(Z,"-arrow"))}}))},prefixCls:Z,className:b}),function(){var n=e.children;return(0,C.Z)(n).map((function(e,n){var t;if(null===(t=e.props)||void 0===t?void 0:t.disabled){var a=e.key||String(n),r=e.props,l=r.disabled,i=r.collapsible,c=(0,o.Z)((0,o.Z)({},(0,I.Z)(e.props,["disabled"])),{key:a,collapsible:null!==i&&void 0!==i?i:l?"disabled":void 0});return(0,O.Tm)(e,c)}return e}))}())};A.Panel=function(e){var n=f.useContext(w.E_).getPrefixCls,t=e.prefixCls,r=e.className,l=void 0===r?"":r,c=e.showArrow,s=void 0===c||c,d=n("collapse",t),p=i()((0,a.Z)({},"".concat(d,"-no-arrow"),!s),l);return f.createElement(P.Panel,(0,o.Z)({},e,{prefixCls:d,className:p}))};var T=A},65360:function(e,n,t){t.d(n,{Z:function(){return E}});var o=t(87462),a=t(97685),r=t(21640),l=t(94184),i=t.n(l),c=t(21770),s=t(15105),d=t(67294),p=t(53124),u=t(55241),v=t(96159),f=t(71577),m=t(6134),y=t(86743),C=t(23715),h=t(6213),Z=t(81643),x=function(e){var n=e.prefixCls,t=e.okButtonProps,a=e.cancelButtonProps,r=e.title,l=e.cancelText,i=e.okText,c=e.okType,s=e.icon,u=e.showCancel,v=void 0===u||u,x=e.close,b=e.onConfirm,k=e.onCancel,E=d.useContext(p.E_).getPrefixCls;return d.createElement(C.Z,{componentName:"Popconfirm",defaultLocale:h.Z.Popconfirm},(function(e){return d.createElement("div",{className:"".concat(n,"-inner-content")},d.createElement("div",{className:"".concat(n,"-message")},s,d.createElement("div",{className:"".concat(n,"-message-title")},(0,Z.Z)(r))),d.createElement("div",{className:"".concat(n,"-buttons")},v&&d.createElement(f.Z,(0,o.Z)({onClick:k,size:"small"},a),null!==l&&void 0!==l?l:e.cancelText),d.createElement(y.Z,{buttonProps:(0,o.Z)((0,o.Z)({size:"small"},(0,m.n)(c)),t),actionFn:b,close:x,prefixCls:E("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},null!==i&&void 0!==i?i:e.okText)))}))},b=void 0,k=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},E=d.forwardRef((function(e,n){var t=d.useContext(p.E_).getPrefixCls,l=(0,c.Z)(!1,{value:void 0!==e.open?e.open:e.visible,defaultValue:void 0!==e.defaultOpen?e.defaultOpen:e.defaultVisible}),f=(0,a.Z)(l,2),m=f[0],y=f[1],C=function(n,t){var o,a;y(n,!0),null===(o=e.onVisibleChange)||void 0===o||o.call(e,n,t),null===(a=e.onOpenChange)||void 0===a||a.call(e,n,t)},h=e.prefixCls,Z=e.placement,E=void 0===Z?"top":Z,N=e.trigger,g=void 0===N?"click":N,P=e.okType,I=void 0===P?"primary":P,w=e.icon,K=void 0===w?d.createElement(r.Z,null):w,O=e.children,A=e.overlayClassName,T=k(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName"]),S=t("popover",h),_=t("popconfirm",h),R=i()(_,A);return d.createElement(u.Z,(0,o.Z)({},T,{trigger:g,prefixCls:S,placement:E,onOpenChange:function(n){var t=e.disabled;void 0!==t&&t||C(n)},open:m,ref:n,overlayClassName:R,_overlay:d.createElement(x,(0,o.Z)({okType:I,icon:K},e,{prefixCls:S,close:function(e){C(!1,e)},onConfirm:function(n){var t;return null===(t=e.onConfirm)||void 0===t?void 0:t.call(b,n)},onCancel:function(n){var t;C(!1,n),null===(t=e.onCancel)||void 0===t||t.call(b,n)}}))}),(0,v.Tm)(O,{onKeyDown:function(e){var n,t;d.isValidElement(O)&&(null===(t=null===O||void 0===O?void 0:(n=O.props).onKeyDown)||void 0===t||t.call(n,e)),function(e){e.keyCode===s.Z.ESC&&m&&C(!1,e)}(e)}}))}))}}]);