owncast/static/web/_next/static/chunks/8469-0ae1393ba29d3839.js
2023-07-10 01:36:23 +00:00

1 line
No EOL
7.6 KiB
JavaScript
Vendored

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8469],{22741:function(e,t,n){var a=n(75263).default,r=n(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(10434)),o=r(n(38416)),c=r(n(67638)),i=r(n(94184)),s=r(n(16538)),d=a(n(67294)),u=r(n(45598)),f=r(n(18475)),p=n(31929),v=r(n(53683)),m=n(47419);r(n(13594));var h=r(n(61602)),y=function(e){var t,n,a=d.useContext(p.ConfigContext),r=a.getPrefixCls,h=a.direction,y=e.prefixCls,C=e.className,x=e.bordered,b=e.ghost,k=e.expandIconPosition,I=void 0===k?"start":k,N=r("collapse",y),Z=d.useMemo(function(){return"left"===I?"start":"right"===I?"end":I},[I]),P=(0,i.default)("".concat(N,"-icon-position-").concat(Z),(n={},(0,o.default)(n,"".concat(N,"-borderless"),!(void 0===x||x)),(0,o.default)(n,"".concat(N,"-rtl"),"rtl"===h),(0,o.default)(n,"".concat(N,"-ghost"),!!b),n),void 0===C?"":C),E=(0,l.default)((0,l.default)({},v.default),{motionAppear:!1,leavedClassName:"".concat(N,"-content-hidden")});return d.createElement(s.default,(0,l.default)({openMotion:E},e,{expandIcon:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.expandIcon,a=n?n(t):d.createElement(c.default,{rotate:t.isActive?90:void 0});return(0,m.cloneElement)(a,function(){return{className:(0,i.default)(a.props.className,"".concat(N,"-arrow"))}})},prefixCls:N,className:P}),(t=e.children,(0,u.default)(t).map(function(e,t){var n;if(null===(n=e.props)||void 0===n?void 0:n.disabled){var a=e.key||String(t),r=e.props,o=r.disabled,c=r.collapsible,i=(0,l.default)((0,l.default)({},(0,f.default)(e.props,["disabled"])),{key:a,collapsible:null!=c?c:o?"disabled":void 0});return(0,m.cloneElement)(e,i)}return e})))};y.Panel=h.default,t.default=y},61602:function(e,t,n){var a=n(75263).default,r=n(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=r(n(10434)),o=r(n(38416)),c=r(n(94184)),i=r(n(16538)),s=a(n(67294)),d=n(31929);r(n(13594)),t.default=function(e){var t=s.useContext(d.ConfigContext).getPrefixCls,n=e.prefixCls,a=e.className,r=e.showArrow,u=t("collapse",n),f=(0,c.default)((0,o.default)({},"".concat(u,"-no-arrow"),!(void 0===r||r)),void 0===a?"":a);return s.createElement(i.default.Panel,(0,l.default)({},e,{prefixCls:u,className:f}))}},68469:function(e,t,n){var a=n(64836).default;t.default=void 0;var r=a(n(22741)).default;t.default=r},16538:function(e,t,n){n.r(t),n.d(t,{Panel:function(){return E},default:function(){return P}});var a=n(4942),r=n(74902),l=n(15671),o=n(43144),c=n(32531),i=n(73568),s=n(71002),d=n(94184),u=n.n(d),f=n(50344),p=n(67294),v=n(96774),m=n.n(v),h=n(87462),y=n(45987),C=n(82225),x=n(97685),b=p.forwardRef(function(e,t){var n,r=e.prefixCls,l=e.forceRender,o=e.className,c=e.style,i=e.children,s=e.isActive,d=e.role,f=p.useState(s||l),v=(0,x.Z)(f,2),m=v[0],h=v[1];return(p.useEffect(function(){(l||s)&&h(!0)},[l,s]),m)?p.createElement("div",{ref:t,className:u()("".concat(r,"-content"),(n={},(0,a.Z)(n,"".concat(r,"-content-active"),s),(0,a.Z)(n,"".concat(r,"-content-inactive"),!s),n),o),style:c,role:d},p.createElement("div",{className:"".concat(r,"-content-box")},i)):null});b.displayName="PanelContent";var k=["className","id","style","prefixCls","headerClass","children","isActive","destroyInactivePanel","accordion","forceRender","openMotion","extra","collapsible"],I=function(e){(0,c.Z)(n,e);var t=(0,i.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var a=arguments.length,r=Array(a),o=0;o<a;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))).onItemClick=function(){var t=e.props,n=t.onItemClick,a=t.panelKey;"function"==typeof n&&n(a)},e.handleKeyPress=function(t){("Enter"===t.key||13===t.keyCode||13===t.which)&&e.onItemClick()},e.renderIcon=function(){var t=e.props,n=t.showArrow,a=t.expandIcon,r=t.prefixCls,l=t.collapsible;if(!n)return null;var o="function"==typeof a?a(e.props):p.createElement("i",{className:"arrow"});return o&&p.createElement("div",{className:"".concat(r,"-expand-icon"),onClick:"header"===l||"icon"===l?e.onItemClick:null},o)},e.renderTitle=function(){var t=e.props,n=t.header,a=t.prefixCls,r=t.collapsible;return p.createElement("span",{className:"".concat(a,"-header-text"),onClick:"header"===r?e.onItemClick:null},n)},e}return(0,o.Z)(n,[{key:"shouldComponentUpdate",value:function(e){return!m()(this.props,e)}},{key:"render",value:function(){var e,t,n=this.props,r=n.className,l=n.id,o=n.style,c=n.prefixCls,i=n.headerClass,s=n.children,d=n.isActive,f=n.destroyInactivePanel,v=n.accordion,m=n.forceRender,x=n.openMotion,I=n.extra,N=n.collapsible,Z=(0,y.Z)(n,k),P="disabled"===N,E="header"===N,g="icon"===N,K=u()((e={},(0,a.Z)(e,"".concat(c,"-item"),!0),(0,a.Z)(e,"".concat(c,"-item-active"),d),(0,a.Z)(e,"".concat(c,"-item-disabled"),P),e),r),A={className:u()("".concat(c,"-header"),(t={},(0,a.Z)(t,i,i),(0,a.Z)(t,"".concat(c,"-header-collapsible-only"),E),(0,a.Z)(t,"".concat(c,"-icon-collapsible-only"),g),t)),"aria-expanded":d,"aria-disabled":P,onKeyPress:this.handleKeyPress};E||g||(A.onClick=this.onItemClick,A.role=v?"tab":"button",A.tabIndex=P?-1:0);var w=null!=I&&"boolean"!=typeof I;return delete Z.header,delete Z.panelKey,delete Z.onItemClick,delete Z.showArrow,delete Z.expandIcon,p.createElement("div",(0,h.Z)({},Z,{className:K,style:o,id:l}),p.createElement("div",A,this.renderIcon(),this.renderTitle(),w&&p.createElement("div",{className:"".concat(c,"-extra")},I)),p.createElement(C.default,(0,h.Z)({visible:d,leavedClassName:"".concat(c,"-content-hidden")},x,{forceRender:m,removeOnLeave:f}),function(e,t){var n=e.className,a=e.style;return p.createElement(b,{ref:t,prefixCls:c,className:n,style:a,isActive:d,forceRender:m,role:v?"tabpanel":null},s)}))}}]),n}(p.Component);function N(e){var t=e;if(!Array.isArray(t)){var n=(0,s.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map(function(e){return String(e)})}I.defaultProps={showArrow:!0,isActive:!1,onItemClick:function(){},headerClass:"",forceRender:!1};var Z=function(e){(0,c.Z)(n,e);var t=(0,i.Z)(n);function n(e){(0,l.Z)(this,n),(a=t.call(this,e)).onClickItem=function(e){var t=a.state.activeKey;if(a.props.accordion)t=t[0]===e?[]:[e];else{var n=(t=(0,r.Z)(t)).indexOf(e);n>-1?t.splice(n,1):t.push(e)}a.setActiveKey(t)},a.getNewChild=function(e,t){if(!e)return null;var n=a.state.activeKey,r=a.props,l=r.prefixCls,o=r.openMotion,c=r.accordion,i=r.destroyInactivePanel,s=r.expandIcon,d=r.collapsible,u=e.key||String(t),f=e.props,v=f.header,m=f.headerClass,h=f.destroyInactivePanel,y=f.collapsible,C=!1;C=c?n[0]===u:n.indexOf(u)>-1;var x=null!=y?y:d,b={key:u,panelKey:u,header:v,headerClass:m,isActive:C,prefixCls:l,destroyInactivePanel:null!=h?h:i,openMotion:o,accordion:c,children:e.props.children,onItemClick:"disabled"===x?null:a.onClickItem,expandIcon:s,collapsible:x};return"string"==typeof e.type?e:(Object.keys(b).forEach(function(e){void 0===b[e]&&delete b[e]}),p.cloneElement(e,b))},a.getItems=function(){var e=a.props.children;return(0,f.Z)(e).map(a.getNewChild)},a.setActiveKey=function(e){"activeKey"in a.props||a.setState({activeKey:e}),a.props.onChange(a.props.accordion?e[0]:e)};var a,o=e.activeKey,c=e.defaultActiveKey;return"activeKey"in e&&(c=o),a.state={activeKey:N(c)},a}return(0,o.Z)(n,[{key:"shouldComponentUpdate",value:function(e,t){return!m()(this.props,e)||!m()(this.state,t)}},{key:"render",value:function(){var e,t=this.props,n=t.prefixCls,r=t.className,l=t.style,o=t.accordion,c=u()((e={},(0,a.Z)(e,n,!0),(0,a.Z)(e,r,!!r),e));return p.createElement("div",{className:c,style:l,role:o?"tablist":null},this.getItems())}}],[{key:"getDerivedStateFromProps",value:function(e){var t={};return"activeKey"in e&&(t.activeKey=N(e.activeKey)),t}}]),n}(p.Component);Z.defaultProps={prefixCls:"rc-collapse",onChange:function(){},accordion:!1,destroyInactivePanel:!1},Z.Panel=I;var P=Z,E=Z.Panel}}]);