1 line
20 KiB
JavaScript
Vendored
1 line
20 KiB
JavaScript
Vendored
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[490],{24308:function(e,t,n){"use strict";n.d(t,{c4:function(){return o}});var r=n(4942),a=n(87462),o=["xxl","xl","lg","md","sm","xs"],i={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},s=new Map,c=-1,l={};t.ZP={matchHandlers:{},dispatch:function(e){return l=e,s.forEach(function(e){return e(l)}),s.size>=1},subscribe:function(e){return s.size||this.register(),c+=1,s.set(c,e),e(l),c},unsubscribe:function(e){s.delete(e),s.size||this.unregister()},unregister:function(){var e=this;Object.keys(i).forEach(function(t){var n=i[t],r=e.matchHandlers[n];null==r||r.mql.removeListener(null==r?void 0:r.listener)}),s.clear()},register:function(){var e=this;Object.keys(i).forEach(function(t){var n=i[t],o=function(n){var o=n.matches;e.dispatch((0,a.Z)((0,a.Z)({},l),(0,r.Z)({},t,o)))},s=window.matchMedia(n);s.addListener(o),e.matchHandlers[n]={mql:s,listener:o},o(s)})}}},27049:function(e,t,n){"use strict";var r=n(87462),a=n(4942),o=n(94184),i=n.n(o),s=n(67294),c=n(53124),l=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);a<r.length;a++)0>t.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=s.useContext(c.E_),o=n.getPrefixCls,d=n.direction,u=e.prefixCls,f=e.type,p=void 0===f?"horizontal":f,m=e.orientation,v=void 0===m?"center":m,h=e.orientationMargin,x=e.className,g=e.children,b=e.dashed,w=e.plain,y=l(e,["prefixCls","type","orientation","orientationMargin","className","children","dashed","plain"]),Z=o("divider",u),C=v.length>0?"-".concat(v):v,j=!!g,E="left"===v&&null!=h,N="right"===v&&null!=h,k=i()(Z,"".concat(Z,"-").concat(p),(t={},(0,a.Z)(t,"".concat(Z,"-with-text"),j),(0,a.Z)(t,"".concat(Z,"-with-text").concat(C),j),(0,a.Z)(t,"".concat(Z,"-dashed"),!!b),(0,a.Z)(t,"".concat(Z,"-plain"),!!w),(0,a.Z)(t,"".concat(Z,"-rtl"),"rtl"===d),(0,a.Z)(t,"".concat(Z,"-no-default-orientation-margin-left"),E),(0,a.Z)(t,"".concat(Z,"-no-default-orientation-margin-right"),N),t),x),O=(0,r.Z)((0,r.Z)({},E&&{marginLeft:h}),N&&{marginRight:h});return s.createElement("div",(0,r.Z)({className:k},y,{role:"separator"}),g&&"vertical"!==p&&s.createElement("span",{className:"".concat(Z,"-inner-text"),style:O},g))}},26303:function(e,t,n){"use strict";n.d(t,{Z:function(){return Z}});var r=n(4942),a=n(87462),o=n(71002),i=n(94184),s=n.n(i),c=n(67294),l=n(53124),d=n(98423),u=function(e){var t,n,o=e.prefixCls,i=e.className,l=e.style,d=e.size,u=e.shape,f=s()((t={},(0,r.Z)(t,"".concat(o,"-lg"),"large"===d),(0,r.Z)(t,"".concat(o,"-sm"),"small"===d),t)),p=s()((n={},(0,r.Z)(n,"".concat(o,"-circle"),"circle"===u),(0,r.Z)(n,"".concat(o,"-square"),"square"===u),(0,r.Z)(n,"".concat(o,"-round"),"round"===u),n)),m=c.useMemo(function(){return"number"==typeof d?{width:d,height:d,lineHeight:"".concat(d,"px")}:{}},[d]);return c.createElement("span",{className:s()(o,f,p,i),style:(0,a.Z)((0,a.Z)({},m),l)})},f=n(1413),p={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},m=n(42135),v=function(e,t){return c.createElement(m.Z,(0,f.Z)((0,f.Z)({},e),{},{ref:t,icon:p}))};v.displayName="DotChartOutlined";var h=c.forwardRef(v),x=n(74902),g=function(e){var t=function(t){var n=e.width,r=e.rows;return Array.isArray(n)?n[t]:(void 0===r?2:r)-1===t?n:void 0},n=e.prefixCls,r=e.className,a=e.style,o=e.rows,i=(0,x.Z)(Array(o)).map(function(e,n){return c.createElement("li",{key:n,style:{width:t(n)}})});return c.createElement("ul",{className:s()(n,r),style:a},i)},b=function(e){var t=e.prefixCls,n=e.className,r=e.width,o=e.style;return c.createElement("h3",{className:s()(t,n),style:(0,a.Z)({width:r},o)})};function w(e){return e&&"object"===(0,o.Z)(e)?e:{}}var y=function(e){var t=e.prefixCls,n=e.loading,o=e.className,i=e.style,d=e.children,f=e.avatar,p=void 0!==f&&f,m=e.title,v=void 0===m||m,h=e.paragraph,x=void 0===h||h,y=e.active,Z=e.round,C=c.useContext(l.E_),j=C.getPrefixCls,E=C.direction,N=j("skeleton",t);if(n||!("loading"in e)){var k=!!p,O=!!v,z=!!x;if(k){var _=(0,a.Z)((0,a.Z)({prefixCls:"".concat(N,"-avatar")},O&&!z?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),w(p));S=c.createElement("div",{className:"".concat(N,"-header")},c.createElement(u,(0,a.Z)({},_)))}if(O||z){if(O){var P,S,A,R,D,I=(0,a.Z)((0,a.Z)({prefixCls:"".concat(N,"-title")},!k&&z?{width:"38%"}:k&&z?{width:"50%"}:{}),w(v));R=c.createElement(b,(0,a.Z)({},I))}if(z){var q,L=(0,a.Z)((0,a.Z)({prefixCls:"".concat(N,"-paragraph")},(q={},k&&O||(q.width="61%"),!k&&O?q.rows=3:q.rows=2,q)),w(x));D=c.createElement(g,(0,a.Z)({},L))}A=c.createElement("div",{className:"".concat(N,"-content")},R,D)}var M=s()(N,(P={},(0,r.Z)(P,"".concat(N,"-with-avatar"),k),(0,r.Z)(P,"".concat(N,"-active"),y),(0,r.Z)(P,"".concat(N,"-rtl"),"rtl"===E),(0,r.Z)(P,"".concat(N,"-round"),Z),P),o);return c.createElement("div",{className:M,style:i},S,A)}return void 0!==d?d:null};y.Button=function(e){var t,n=e.prefixCls,o=e.className,i=e.active,f=e.block,p=e.size,m=(0,c.useContext(l.E_).getPrefixCls)("skeleton",n),v=(0,d.Z)(e,["prefixCls"]),h=s()(m,"".concat(m,"-element"),(t={},(0,r.Z)(t,"".concat(m,"-active"),i),(0,r.Z)(t,"".concat(m,"-block"),void 0!==f&&f),t),o);return c.createElement("div",{className:h},c.createElement(u,(0,a.Z)({prefixCls:"".concat(m,"-button"),size:void 0===p?"default":p},v)))},y.Avatar=function(e){var t=e.prefixCls,n=e.className,o=e.active,i=e.shape,f=e.size,p=(0,c.useContext(l.E_).getPrefixCls)("skeleton",t),m=(0,d.Z)(e,["prefixCls","className"]),v=s()(p,"".concat(p,"-element"),(0,r.Z)({},"".concat(p,"-active"),o),n);return c.createElement("div",{className:v},c.createElement(u,(0,a.Z)({prefixCls:"".concat(p,"-avatar"),shape:void 0===i?"circle":i,size:void 0===f?"default":f},m)))},y.Input=function(e){var t,n=e.prefixCls,o=e.className,i=e.active,f=e.block,p=e.size,m=(0,c.useContext(l.E_).getPrefixCls)("skeleton",n),v=(0,d.Z)(e,["prefixCls"]),h=s()(m,"".concat(m,"-element"),(t={},(0,r.Z)(t,"".concat(m,"-active"),i),(0,r.Z)(t,"".concat(m,"-block"),f),t),o);return c.createElement("div",{className:h},c.createElement(u,(0,a.Z)({prefixCls:"".concat(m,"-input"),size:void 0===p?"default":p},v)))},y.Image=function(e){var t=e.prefixCls,n=e.className,a=e.style,o=e.active,i=(0,c.useContext(l.E_).getPrefixCls)("skeleton",t),d=s()(i,"".concat(i,"-element"),(0,r.Z)({},"".concat(i,"-active"),o),n);return c.createElement("div",{className:d},c.createElement("div",{className:s()("".concat(i,"-image"),n),style:a},c.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(i,"-image-svg")},c.createElement("path",{d:"M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",className:"".concat(i,"-image-path")}))))},y.Node=function(e){var t=e.prefixCls,n=e.className,a=e.style,o=e.active,i=e.children,d=(0,c.useContext(l.E_).getPrefixCls)("skeleton",t),u=s()(d,"".concat(d,"-element"),(0,r.Z)({},"".concat(d,"-active"),o),n),f=null!=i?i:c.createElement(h,null);return c.createElement("div",{className:u},c.createElement("div",{className:s()("".concat(d,"-image"),n),style:a},f))};var Z=y},89281:function(e,t,n){"use strict";var r=n(75263).default,a=n(64836).default;t.Z=void 0;var o=a(n(10434)),i=a(n(94184)),s=r(n(67294)),c=n(31929),l=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);a<r.length;a++)0>t.indexOf(r[a])&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};t.Z=function(e){return s.createElement(c.ConfigConsumer,null,function(t){var n=t.getPrefixCls,r=e.prefixCls,a=e.className,c=e.avatar,d=e.title,u=e.description,f=l(e,["prefixCls","className","avatar","title","description"]),p=n("card",r),m=(0,i.default)("".concat(p,"-meta"),a),v=c?s.createElement("div",{className:"".concat(p,"-meta-avatar")},c):null,h=d?s.createElement("div",{className:"".concat(p,"-meta-title")},d):null,x=u?s.createElement("div",{className:"".concat(p,"-meta-description")},u):null,g=h||x?s.createElement("div",{className:"".concat(p,"-meta-detail")},h,x):null;return s.createElement("div",(0,o.default)({},f,{className:m}),v,g)})}},20640:function(e,t,n){"use strict";var r=n(11742),a={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,o,i,s,c,l,d,u,f=!1;t||(t={}),i=t.debug||!1;try{if(c=r(),l=document.createRange(),d=document.getSelection(),(u=document.createElement("span")).textContent=e,u.ariaHidden="true",u.style.all="unset",u.style.position="fixed",u.style.top=0,u.style.clip="rect(0, 0, 0, 0)",u.style.whiteSpace="pre",u.style.webkitUserSelect="text",u.style.MozUserSelect="text",u.style.msUserSelect="text",u.style.userSelect="text",u.addEventListener("copy",function(n){if(n.stopPropagation(),t.format){if(n.preventDefault(),void 0===n.clipboardData){i&&console.warn("unable to use e.clipboardData"),i&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var r=a[t.format]||a.default;window.clipboardData.setData(r,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e)}t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(u),l.selectNodeContents(u),d.addRange(l),!document.execCommand("copy"))throw Error("copy command was unsuccessful");f=!0}catch(r){i&&console.error("unable to copy using execCommand: ",r),i&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(r){i&&console.error("unable to copy using clipboardData: ",r),i&&console.error("falling back to prompt"),n="message"in t?t.message:"Copy to clipboard: #{key}, Enter",o=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C",s=n.replace(/#{\s*key\s*}/g,o),window.prompt(s,e)}}finally{d&&("function"==typeof d.removeRange?d.removeRange(l):d.removeAllRanges()),u&&document.body.removeChild(u),c()}return f}},54779:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/help",function(){return n(44130)}])},44130:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var r=n(85893),a=n(71230),o=n(15746),i=n(33859),s=n(71577),c=n(27049),l=n(59652),d=n(89281),u=n(11700);n(67294);var f=n(5152),p=n.n(f),m=n(6960);let v=p()(()=>n.e(2424).then(n.t.bind(n,32424,23)),{loadableGenerated:{webpack:()=>[32424]},ssr:!1}),h=p()(()=>n.e(4143).then(n.t.bind(n,14143,23)),{loadableGenerated:{webpack:()=>[14143]},ssr:!1}),x=p()(()=>n.e(6460).then(n.t.bind(n,36460,23)),{loadableGenerated:{webpack:()=>[36460]},ssr:!1}),g=p()(()=>n.e(7118).then(n.t.bind(n,87118,23)),{loadableGenerated:{webpack:()=>[87118]},ssr:!1}),b=p()(()=>n.e(3436).then(n.t.bind(n,3436,23)),{loadableGenerated:{webpack:()=>[3436]},ssr:!1}),w=p()(()=>n.e(4829).then(n.t.bind(n,4829,23)),{loadableGenerated:{webpack:()=>[4829]},ssr:!1}),y=p()(()=>n.e(8864).then(n.t.bind(n,38864,23)),{loadableGenerated:{webpack:()=>[38864]},ssr:!1}),Z=p()(()=>n.e(6802).then(n.t.bind(n,36802,23)),{loadableGenerated:{webpack:()=>[36802]},ssr:!1}),C=p()(()=>n.e(2711).then(n.t.bind(n,2711,23)),{loadableGenerated:{webpack:()=>[2711]},ssr:!1}),j=p()(()=>n.e(1010).then(n.t.bind(n,71010,23)),{loadableGenerated:{webpack:()=>[71010]},ssr:!1});function E(){let e=[{icon:(0,r.jsx)(C,{style:{fontSize:"24px"}}),title:"I want to configure my owncast instance",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/configuration/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})},{icon:(0,r.jsx)(x,{style:{fontSize:"24px"}}),title:"Help configuring my broadcasting software",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/broadcasting/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})},{icon:(0,r.jsx)(w,{style:{fontSize:"24px"}}),title:"I want to embed my stream into another site",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/embed/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})},{icon:(0,r.jsx)(b,{style:{fontSize:"24px"}}),title:"I want to customize my website",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/website/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})},{icon:(0,r.jsx)(j,{style:{fontSize:"24px"}}),title:"I want to tweak my video output",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/encoding/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})},{icon:(0,r.jsx)(g,{style:{fontSize:"24px"}}),title:"I want to use an external storage provider",content:(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:"https://owncast.online/docs/storage/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[(0,r.jsx)(y,{})," Learn more"]})})}],t=[{icon:(0,r.jsx)(h,{style:{fontSize:"24px"}}),title:"I found a bug",content:(0,r.jsxs)("div",{children:["If you found a bug, then please",(0,r.jsxs)("a",{href:"https://github.com/owncast/owncast/issues/new/choose",target:"_blank",rel:"noopener noreferrer",children:[" ","let us know"]})]})},{icon:(0,r.jsx)(Z,{style:{fontSize:"24px"}}),title:"I have a general question",content:(0,r.jsxs)("div",{children:["Most general questions are answered in our",(0,r.jsxs)("a",{href:"https://owncast.online/faq/?source=admin",target:"_blank",rel:"noopener noreferrer",children:[" ","FAQ"]})," ","or exist in our"," ",(0,r.jsx)("a",{href:"https://github.com/owncast/owncast/discussions",target:"_blank",rel:"noopener noreferrer",children:"discussions"})]})},{icon:(0,r.jsx)(v,{style:{fontSize:"24px"}}),title:"I want to build add-ons for Owncast",content:(0,r.jsxs)("div",{children:["You can build your own bots, overlays, tools and add-ons with our",(0,r.jsx)("a",{href:"https://owncast.online/thirdparty?source=admin",target:"_blank",rel:"noopener noreferrer",children:"\xa0developer APIs.\xa0"})]})}];return(0,r.jsxs)("div",{className:"help-page",children:[(0,r.jsx)(u.Z,{style:{textAlign:"center"},children:"How can we help you?"}),(0,r.jsxs)(a.Z,{gutter:[16,16],justify:"space-around",align:"middle",children:[(0,r.jsxs)(o.Z,{xs:24,lg:12,style:{textAlign:"center"},children:[(0,r.jsx)(i.ZP,{status:"500"}),(0,r.jsx)(u.Z,{level:2,children:"Troubleshooting"}),(0,r.jsx)(s.Z,{target:"_blank",rel:"noopener noreferrer",href:"https://owncast.online/docs/troubleshooting/?source=admin",icon:(0,r.jsx)(y,{}),type:"primary",children:"Fix your problems"})]}),(0,r.jsxs)(o.Z,{xs:24,lg:12,style:{textAlign:"center"},children:[(0,r.jsx)(i.ZP,{status:"404"}),(0,r.jsx)(u.Z,{level:2,children:"Documentation"}),(0,r.jsx)(s.Z,{target:"_blank",rel:"noopener noreferrer",href:"https://owncast.online/docs?source=admin",icon:(0,r.jsx)(y,{}),type:"primary",children:"Read the Docs"})]})]}),(0,r.jsx)(c.Z,{}),(0,r.jsx)(u.Z,{level:2,children:"Common tasks"}),(0,r.jsx)(a.Z,{gutter:[16,16],children:e.map(e=>(0,r.jsx)(o.Z,{xs:24,lg:12,children:(0,r.jsx)(l.Z,{children:(0,r.jsx)(d.Z,{avatar:e.icon,title:e.title,description:e.content})})},e.title))}),(0,r.jsx)(c.Z,{}),(0,r.jsx)(u.Z,{level:2,children:"Other"}),(0,r.jsx)(a.Z,{gutter:[16,16],children:t.map(e=>(0,r.jsx)(o.Z,{xs:24,lg:12,children:(0,r.jsx)(l.Z,{children:(0,r.jsx)(d.Z,{avatar:e.icon,title:e.title,description:e.content})})},e.title))})]})}E.getLayout=function(e){return(0,r.jsx)(m.l,{page:e})}},60057:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(4942),a=n(1413),o=n(97685),i=n(45987),s=n(67294),c=n(81263),l=n(94184),d=n.n(l),u={adjustX:1,adjustY:1},f=[0,0],p={topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:f},topCenter:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:f},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:f},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:f},bottomCenter:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:f},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:f}},m=n(15105),v=n(75164),h=n(88603),x=m.Z.ESC,g=m.Z.TAB,b=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus"],w=s.forwardRef(function(e,t){var n,l,u,f,m,w,y,Z,C,j,E,N,k,O,z,_,P=e.arrow,S=void 0!==P&&P,A=e.prefixCls,R=void 0===A?"rc-dropdown":A,D=e.transitionName,I=e.animation,q=e.align,L=e.placement,M=e.placements,T=e.getPopupContainer,G=e.showAction,H=e.hideAction,V=e.overlayClassName,F=e.overlayStyle,U=e.visible,B=e.trigger,X=void 0===B?["hover"]:B,W=e.autoFocus,Y=(0,i.Z)(e,b),Q=s.useState(),J=(0,o.Z)(Q,2),K=J[0],$=J[1],ee="visible"in e?U:K,et=s.useRef(null);s.useImperativeHandle(t,function(){return et.current}),u=(l={visible:ee,setTriggerVisible:$,triggerRef:et,onVisibleChange:e.onVisibleChange,autoFocus:W}).visible,f=l.setTriggerVisible,m=l.triggerRef,w=l.onVisibleChange,y=l.autoFocus,Z=s.useRef(!1),C=function(){if(u&&m.current){var e,t,n,r;null===(e=m.current)||void 0===e||null===(t=e.triggerRef)||void 0===t||null===(n=t.current)||void 0===n||null===(r=n.focus)||void 0===r||r.call(n),f(!1),"function"==typeof w&&w(!1)}},j=function(){var e,t,n,r,a=(0,h.tS)(null===(e=m.current)||void 0===e?void 0:null===(t=e.popupRef)||void 0===t?void 0:null===(n=t.current)||void 0===n?void 0:null===(r=n.getElement)||void 0===r?void 0:r.call(n))[0];return null!=a&&!!a.focus&&(a.focus(),Z.current=!0,!0)},E=function(e){switch(e.keyCode){case x:C();break;case g:var t=!1;Z.current||(t=j()),t?e.preventDefault():C()}},s.useEffect(function(){return u?(window.addEventListener("keydown",E),y&&(0,v.Z)(j,3),function(){window.removeEventListener("keydown",E),Z.current=!1}):function(){Z.current=!1}},[u]);var en=function(){var t=e.overlay;return"function"==typeof t?t():t},er=function(){var e=en();return s.createElement(s.Fragment,null,S&&s.createElement("div",{className:"".concat(R,"-arrow")}),e)},ea=H;return ea||-1===X.indexOf("contextMenu")||(ea=["click"]),s.createElement(c.Z,(0,a.Z)((0,a.Z)({builtinPlacements:void 0===M?p:M},Y),{},{prefixCls:R,ref:et,popupClassName:d()(V,(0,r.Z)({},"".concat(R,"-show-arrow"),S)),popupStyle:F,action:X,showAction:G,hideAction:ea||[],popupPlacement:void 0===L?"bottomLeft":L,popupAlign:q,popupTransitionName:D,popupAnimation:I,popupVisible:ee,stretch:(N=e.minOverlayWidthMatchTrigger,k=e.alignPoint,"minOverlayWidthMatchTrigger"in e?N:!k)?"minWidth":"",popup:"function"==typeof e.overlay?er:er(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;$(t),"function"==typeof n&&n(t)},onPopupClick:function(t){var n=e.onOverlayClick;$(!1),n&&n(t)},getPopupContainer:T}),(z=(O=e.children).props?O.props:{},_=d()(z.className,void 0!==(n=e.openClassName)?n:"".concat(R,"-open")),ee&&O?s.cloneElement(O,{className:_}):O))})},11742:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}}},function(e){e.O(0,[2074,173,164,2744,9637,4931,5402,2231,492,7524,9915,6306,5101,2928,4377,3859,180,6960,9774,2888,179],function(){return e(e.s=54779)}),_N_E=e.O()}]); |