1"use strict";(globalThis.webpackChunkcenterpiece_ui=globalThis.webpackChunkcenterpiece_ui||[]).push([[873],{2585(e,t,n){n.d(t,{A:()=>y});var r=n(9950),s=n(7111),a=n(4156),o=n(2022),i=n(5234),l=n(8182),c=n(2211),d=n(4590),u=n(2203),p=n(4043),f=n(7788),m=n(8282),h=n(4414);const y=e=>{let{onSave:t,onSaveCopy:n,onNew:y,onOpen:v,onRename:g,onDelete:x,onSetDocName:b,currentDocName:j,docList:C,customOptions:w,hasUnsavedChanges:A,docStatus:N}=e;const[k,O]=(0,r.useState)(C),[S,T]=(0,r.useState)(!0),[z,P]=(0,r.useState)(!1),[E,R]=(0,r.useState)(!1),[D,_]=(0,r.useState)(!1),[L,I]=(0,r.useState)(""),[B,M]=(0,r.useState)(!1),[F,W]=(0,r.useState)("");(0,r.useEffect)(()=>{O(C)},[C]);const V=()=>{if(!j)throw new Error("fs-log: No document name set");try{P(!0),t(e=>{e&&(s.A.show({content:"Document saved successfully",duration:2,style:{marginTop:"20px"}}),T(!1),E&&R(!1)),P(!1)})}catch(e){try{(new m.A).log({event:"failed_doc_io",event_detail:"ToolHeader - save",resource_id:j,err_message:e.message||"n/a"})}catch{}throw P(!1),e}},H=()=>{S&&b(""),R(!1)},$=()=>{W(""),M(!1)},U=()=>{W(""),_(!1)},G=()=>{I("")};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(a.A,{justify:"space-between",align:"middle",className:"tool-header "+(z?"_loading":""),children:[(0,h.jsx)(o.A,{span:8,children:(0,h.jsxs)(i.A,{size:16,className:"buttons",children:[(0,h.jsxs)(l.A,{size:"small",onClick:y,disabled:S&&!A,title:"New study",children:["New ",(0,h.jsx)("i",{className:"fa-regular fa-plus"})]}),(0,h.jsx)(c.A,{disabled:!C||0===C.length,trigger:"hover",overlay:(0,h.jsxs)("ul",{className:"_menu study",children:[(0,h.jsx)("li",{style:{padding:"12px"},children:(0,h.jsx)(d.A,{placeholder:"e.g. Study 1",size:"small",label:"Search study",onChange:e=>{const t=e.target.value;if(!t)return void O(C);const n=null===C||void 0===C?void 0:C.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()));O(n)},onClick:e=>{e.preventDefault(),e.stopPropagation()}})}),null===k||void 0===k?void 0:k.map(e=>(0,h.jsx)("li",{children:(0,h.jsxs)(l.A,{type:"link",onClick:()=>{var t;t=e.id,A&&!window.confirm("You have unsaved changes. Discard changes and continue?")||(b(t),v(t),T(!1))},style:{display:"flex",justifyContent:"space-between"},children:[(0,h.jsxs)(i.A,{size:4,className:"studies",children:[(0,h.jsx)(u.A,{size:"12",type:"regular",icon:"fa-file"}),e.name]}),(0,h.jsx)("span",{style:{color:"#CC1F25"},title:"Delete study",children:(0,h.jsx)(u.A,{size:"10",type:"solid",icon:"fa-trash",onClick:t=>{t.preventDefault(),t.stopPropagation(),I(e.id)}})})]})},e.id))]}),children:(0,h.jsxs)(l.A,{size:"small",type:"alternative",title:"Open saved studies",children:["Open ",(0,h.jsx)(u.A,{size:"14",type:"regular",icon:"fa-chevron-down"})]})}),(0,h.jsxs)(i.A,{size:4,children:[(0,h.jsxs)(l.A,{disabled:z,size:"small",type:"link",onClick:()=>{j?V():R(!0)},title:"Save study",children:[(0,h.jsx)(u.A,{size:"14",type:"solid",icon:"fa-floppy-disk"})," Save"]}),(0,h.jsx)("span",{className:"v-divider",children:(0,h.jsx)(u.A,{type:"regular",size:"10",icon:"fa-pipe"})}),(0,h.jsxs)(l.A,{size:"small",type:"link",disabled:z||S,onClick:()=>{A?s.A.show({content:"Please save your changes before creating a copy.",type:"info",duration:2,style:{marginTop:"20px"}}):M(!0)},title:"Duplicate study",children:[(0,h.jsx)(u.A,{size:"14",type:"solid",icon:"fa-floppy-disks"}),"Duplicate"]})]})]})}),(0,h.jsx)(o.A,{span:8,style:{display:"flex",justifyContent:"center"},children:(0,h.jsxs)("span",{className:"study-name",children:[N||null,A&&(0,h.jsx)("span",{children:"*"}),S?(0,h.jsx)("span",{children:"Untitled"}):(0,h.jsx)("span",{children:j||""}),S?null:(0,h.jsx)(l.A,{type:"link",disabled:z,onClick:()=>{A?s.A.show({content:"Please save your changes before renaming.",type:"info",duration:2,style:{marginTop:"20px"}}):_(!0)},title:"Rename study",children:(0,h.jsx)(u.A,{type:"solid",size:"12",icon:"fa-pen-to-square"})})]})}),(0,h.jsx)(o.A,{span:8,style:{textAlign:"right"},children:(0,h.jsx)("div",{children:w})}),(0,h.jsx)("div",{className:"border-line"})]}),(0,h.jsx)(p.A,{width:380,visible:E,destroyOnClose:!0,footer:null,onCancel:H,children:(0,h.jsxs)(i.A,{direction:"vertical",size:24,style:{width:"100%"},children:[(0,h.jsx)(i.A,{direction:"vertical",size:8,children:(0,h.jsx)("h3",{children:"Save your study"})}),(0,h.jsx)(f.A,{placeholder:"e.g. Study 1",disabled:z,value:j,onChange:e=>{b(e.target.value)}}),(0,h.jsxs)(i.A,{direction:"vertical",size:12,children:[(0,h.jsx)(l.A,{block:!0,onClick:async()=>{z||(j?V():s.A.show({content:"Please provide a document name.",type:"info",duration:2,style:{marginTop:"20px"}}))},disabled:z,loading:z,children:"Save"}),(0,h.jsx)(l.A,{block:!0,type:"link",onClick:H,disabled:z,children:"Cancel"})]})]})}),(0,h.jsx)(p.A,{width:380,visible:B,destroyOnClose:!0,footer:null,onCancel:$,children:(0,h.jsxs)(i.A,{direction:"vertical",size:24,style:{width:"100%"},children:[(0,h.jsx)(i.A,{direction:"vertical",size:8,children:(0,h.jsx)("h3",{children:"Duplicate study"})}),(0,h.jsx)(f.A,{placeholder:"e.g. Study 1 Backup ",disabled:z,value:F,onChange:e=>{W(e.target.value)}}),(0,h.jsxs)(i.A,{direction:"vertical",size:12,children:[(0,h.jsx)(l.A,{block:!0,onClick:async()=>
1{if(F!==j){if(j&&F&&n&&!z&&!A){P(!0);const e=await n(j,F);P(!1),e&&(M(!1),W(""),s.A.show({content:"Study copied successfully.",duration:2,type:"success",style:{marginTop:"20px"}}))}}else s.A.show({content:"Please provide a new name for the study.",duration:2,type:"info",style:{marginTop:"20px"}})},disabled:z,loading:z,children:"Save Duplicate"}),(0,h.jsx)(l.A,{block:!0,type:"link",onClick:$,disabled:z,children:"Cancel"})]})]})}),(0,h.jsx)(p.A,{width:380,visible:D,destroyOnClose:!0,footer:null,onCancel:U,children:(0,h.jsxs)(i.A,{direction:"vertical",size:24,style:{width:"100%"},children:[(0,h.jsx)(i.A,{direction:"vertical",size:8,children:(0,h.jsx)("h3",{children:"Rename your study"})}),(0,h.jsx)(f.A,{placeholder:"e.g. Study 1",disabled:z,value:F,onChange:e=>{W(e.target.value)}}),(0,h.jsxs)(i.A,{direction:"vertical",size:12,children:[(0,h.jsx)(l.A,{block:!0,onClick:async()=>{if(F!==j){if(j&&F&&g&&!z){P(!0);const e=await g(j,F);P(!1),e&&(b(F),_(!1),W(""),s.A.show({content:"Study renamed successfully",duration:2,type:"success",style:{marginTop:"20px"}}))}}else s.A.show({content:"Please provide a new name for the study.",duration:2,type:"info",style:{marginTop:"20px"}})},disabled:z,loading:z,children:"Rename"}),(0,h.jsx)(l.A,{block:!0,type:"link",onClick:U,disabled:z,children:"Cancel"})]})]})}),(0,h.jsx)(p.A,{width:380,footer:null,visible:L,destroyOnClose:!0,onCancel:G,children:(0,h.jsxs)(i.A,{direction:"vertical",size:24,style:{width:"100%"},children:[(0,h.jsxs)(i.A,{direction:"vertical",size:8,children:[(0,h.jsx)("h3",{style:{color:"#CC1F25"},children:(0,h.jsx)(i.A,{children:(0,h.jsx)("span",{children:"Delete study"})})}),(0,h.jsxs)("p",{children:["Are you sure you want to proceed with deleting"," ",(0,h.jsx)("span",{style:{fontWeight:600},children:L}),"?"]}),(0,h.jsx)("p",{children:"Please note that once you delete a study, it cannot be recovered."})]}),(0,h.jsxs)(i.A,{direction:"vertical",size:12,children:[(0,h.jsxs)(l.A,{color:"danger",block:!0,onClick:async()=>{try{if(L&&x&&!z){P(!0);await x(L)&&s.A.show({content:"Study deleted successfully",duration:2,type:"success",style:{marginTop:"20px"}})}}finally{I(""),P(!1)}},disabled:z,loading:z,children:[(0,h.jsx)(u.A,{type:"solid",size:"12",icon:"fa-trash"})," Delete"]}),(0,h.jsx)(l.A,{color:"neutral",block:!0,type:"link",onClick:G,disabled:z,children:"Cancel"})]})]})})]})}},4065(e,t,n){n.d(t,{v:()=>c});var r=n(9950),s=n(8182),a=n(2203),o=n(5234),i=n(4043),l=n(4414);const c=e=>{let{tourTitle:t,tourText:n,iframeSrc:c,iframeTitle:d,iframeHeight:u,tourImage:p,localStorageKey:f}=e;const[m,h]=(0,r.useState)({}),[y,v]=(0,r.useState)(!1),g=(0,r.useRef)(void 0),[x,b]=(0,r.useState)(!1),[j,C]=(0,r.useState)(!1),[w,A]=(0,r.useState)(!1);(0,r.useEffect)(()=>{const e=setTimeout(()=>{v(!0)},3e3);return()=>clearTimeout(e)},[]),(0,r.useEffect)(()=>{if(!j){h({animation:"slideUpFadeOut 500ms ease-in-out"});const e=setTimeout(()=>{h({animation:"slideUpFadeOut 300ms ease-in-out",visibility:"hidden",display:"none",opacity:0})},400);return()=>clearTimeout(e)}h({})},[j]);(0,r.useEffect)(()=>{void 0!==g.current&&clearTimeout(g.current),g.current=window.setTimeout(()=>{C(!1)},15e3);const e=setTimeout(()=>{localStorage.getItem(f)||C(!0)},2e3);return()=>{void 0!==g.current&&clearTimeout(g.current),clearTimeout(e)}},[f]),(0,r.useEffect)(()=>{if(x){A(!0);const e=setTimeout(()=>{A(!1)},1e4);return()=>clearTimeout(e)}},[x]);return(0,l.jsxs)("div",{className:"tour-button-wrapper",children:[(0,l.jsxs)(s.A,{title:"Start Tour",size:"small",type:"link",onClick:()=>{localStorage.setItem(f,"true"),b(!0),C(!1)},children:[(0,l.jsx)(a.A,{type:"regular",size:"14",icon:"fa-presentation-screen"})," Tour"]}),(0,l.jsx)("div",{className:"tour-button-wrapper",children:(0,l.jsxs)("div",{className:"tour-popover-modal",children:[y&&(0,l.jsxs)("div",{className:"tour-popover "+(j&&!x?"show":""),onMouseEnter:()=>{clearTimeout(g.current)},onMouseLeave:()=>{void 0!==g.current&&clearTimeout(g.current),g.current=window.setTimeout(()=>{C(!1)},3e3)},style:m,children:[(0,l.jsx)("div",{className:"img",children:(0,l.jsx)("img",{src:p,alt:t})}),(0,l.jsxs)(o.A,{direction:"vertical",size:0,children:[(0,l.jsx)("h3",{children:t}),(0,l.jsx)("p",{children:n})]}),(0,l.jsxs)(o.A,{direction:"vertical",size:12,children:[(0,l.jsxs)(s.A,{color:"white",onClick:()=>{localStorage.setItem(f,"true"),b(!0),C(!1)},block:!0,children:["Start Tour"," ",(0,l.jsx)(a.A,{size:"16",type:"regular",icon:"fa-arrow-right"})]}),(0,l.jsx)(s.A,{size:"small",color:"white",type:"link",block:!0,onClick:()=>{localStorage.setItem(f,"true"),C(!1)},children:"Dismiss"})]})]}),(0,l.jsxs)(i.A,{centered:!0,className:"tour-modal",width:1100,visible:x,onCancel:()=>b(!1),footer:null,style:{padding:0,overflow:"hidden"},title:t,destroyOnClose:!0,children:[w?(0,l.jsx)("div",{className:"loading",children:(0,l.jsx)(a.A,{type:"regular",size:"36",icon:"fa-spinner"})}):null,(0,l.jsx)("iframe",{title:d,style:{border:0,width:"100%",overflow:"hidden"},height:u,src:c})]})]})})]})}},2022(e,t,n){n.d(t,{A:()=>u});var r=n(9950),s=n(9398),a=n(6744),o=n(8390),i=(n(7119),globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n});var l=["xs","sm","md","lg","xl","xxl"],c=r.forwardRef(function(e,t){var n,s=r.useContext(a.k),c=s.getPrefixCls,d=s.direction,u=r.useContext(o.R),p=u.gutter,f=u.wrap,m=u.supportFlexGap,h=e.prefixCls,y=e.span,v=e.order,g=e.offset,x=e.push,b=e.pull,j=e.className,C=e.children,w=e.flex,A=e.style,N=i(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),k=c("col",h),O={};l.forEach(function(t){var n,r={},s=e[t];"number"==typeof s?r.span=s:"object"===(0,a.i)(s)&&(r=s||{}),delete N[t],O=(0,a.g)((0,a.g)({},O),(n={},(0,a.a)(n,"".concat(k,"-").concat(t,"-").concat(r.span),void 0!==r.span),(0,a.a)(n,"".concat(k,"-").concat(t,"-order-").concat(r.order),r.order||0===r.order),(0,a.a)(n,"".concat(k,"-").concat(t,"-offset-").concat(r.offset),r.offset||0===r.offset),(0,a.a)(n,"".concat(k,"-").concat(t,"-push-").concat(r.push),r.push||0===r.push),(0,a.a)(n,"".concat(k,"-").concat(t,"-pull-").concat(r.pull),r.pull||0===r.pull),(0,a.a)(n,"".concat(k,"-rtl"),"rtl"===d),n))});var S=(0,a.c)(k,(n={},(0,a.a)(n,"".concat(k,"-").concat(y),void 0!==y),(0,a.a)(n,"".concat(k,"-order-").concat(v),v),(0,a.a)(n,"".concat(k,"-offset-").concat(g),g),(0,a.a)(n,"".concat(k,"-push-").concat(x),x),(0,a.a)(n,"".concat(k,"-pull-").concat(b),b),n),j,O),T={};if(p&&p[0]>0){var z=p[0]/2;T.paddingLeft=z,T.paddingRight=z}if(p&&p[1]>0&&!m){var P=p[1]/2;T.paddingTop=P,T.paddingBottom=P}return w&&(T.flex=function(e){return"number"==typeof e?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}(w),!1===f&&!T.minWidth&&(T.minWidth=0)),r.createElement("div",(0,a.g)({},N,{style:(0,a.g)((0,a.g)({},T),A),className:S,ref:t}),C)});c.displayName="Col";const d=c;class u extends r.Component{render(){const{children:e,...t}=this.props;return(0,s.j)(d,{...t,children:e})}}},2211(e,t,n){n.d(t,{A:()=>
1o});var r=n(9950),s=n(9398),a=n(1892);n(7119);class o extends r.Component{render(){const{children:e,size:t,...n}=this.props;return(0,s.j)("span",{className:"st-dropdown-wrapper",children:(0,s.j)(a.D,{overlayClassName:"st-dropdown-menu "+("large"===t?"large":""),...n,children:e})})}}},9947(e,t,n){n.d(t,{E:()=>i});var r=n(6744),s=n(9950);const a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};var o=function(e,t){return s.createElement(r.A,(0,r.l)((0,r.l)({},e),{},{ref:t,icon:a}))};o.displayName="EllipsisOutlined";const i=s.forwardRef(o)},4156(e,t,n){n.d(t,{A:()=>f});var r=n(9950),s=n(9398),a=n(6744),o=n(8390),i=n(4483),l=n(932),c=n(2577),d=(n(7119),globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n});(0,i.t)("top","middle","bottom","stretch"),(0,i.t)("start","end","center","space-around","space-between");var u=r.forwardRef(function(e,t){var n,s=e.prefixCls,i=e.justify,u=e.align,p=e.className,f=e.style,m=e.children,h=e.gutter,y=void 0===h?0:h,v=e.wrap,g=d(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),x=r.useContext(a.k),b=x.getPrefixCls,j=x.direction,C=r.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),w=(0,a._)(C,2),A=w[0],N=w[1],k=(0,c.u)(),O=r.useRef(y);r.useEffect(function(){var e=l.R.subscribe(function(e){var t=O.current||0;(!Array.isArray(t)&&"object"===(0,a.i)(t)||Array.isArray(t)&&("object"===(0,a.i)(t[0])||"object"===(0,a.i)(t[1])))&&N(e)});return function(){return l.R.unsubscribe(e)}},[]);var S=b("row",s),T=function(){var e=[0,0];return(Array.isArray(y)?y:[y,0]).forEach(function(t,n){if("object"===(0,a.i)(t))for(var r=0;r<l.r.length;r++){var s=l.r[r];if(A[s]&&void 0!==t[s]){e[n]=t[s];break}}else e[n]=t||0}),e}(),z=(0,a.c)(S,(n={},(0,a.a)(n,"".concat(S,"-no-wrap"),!1===v),(0,a.a)(n,"".concat(S,"-").concat(i),i),(0,a.a)(n,"".concat(S,"-").concat(u),u),(0,a.a)(n,"".concat(S,"-rtl"),"rtl"===j),n),p),P={},E=T[0]>0?T[0]/-2:void 0,R=T[1]>0?T[1]/-2:void 0;if(E&&(P.marginLeft=E,P.marginRight=E),k){var D=(0,a._)(T,2);P.rowGap=D[1]}else R&&(P.marginTop=R,P.marginBottom=R);var _=(0,a._)(T,2),L=_[0],I=_[1],B=r.useMemo(function(){return{gutter:[L,I],wrap:v,supportFlexGap:k}},[L,I,v,k]);return r.createElement(o.R.Provider,{value:B},r.createElement("div",(0,a.g)({},g,{className:z,style:(0,a.g)((0,a.g)({},P),f),ref:t}),m))});u.displayName="Row";const p=u;class f extends r.Component{render(){const{children:e,...t}=this.props;return(0,s.j)(p,{...t,children:e})}}},8390(e,t,n){n.d(t,{R:()=>r});const r=(0,n(9950).createContext)({})},4590(e,t,n){n.d(t,{A:()=>d});var r=n(9950),s=n(9398),a=n(4613);n(7119);const o="default",i="positive",l="warning",c="danger";class d extends r.Component{getSizeClassName(e){switch(e){case"small":return"st-search-sm";case"medium":default:return"st-search-md";case"large":return"st-search-lg";case"xlarge":return"st-search-xl"}}getClassName(e){switch(e){case o:return"st-search-default";case i:return"st-search-positive";case l:return"st-search-warning";case c:return"st-search-danger";default:return"st-search-default"}}getWrapperClassName(e){switch(e){case o:return"st-search-default-wrapper";case i:return"st-search-positive-wrapper";case l:return"st-search-warning-wrapper";case c:return"st-search-danger-wrapper";default:return"st-search-default-wrapper"}}render(){const{type:e,label:t,suffix:n,enterButton:r,message:o,className:i,size:l,...c}=this.props,d=n?r||!0:r;return(0,s.a)("span",{className:`st-search-wrapper ${this.getWrapperClassName(e)} ${i||""}`,children:[t&&(0,s.j)("small",{className:"input-label",children:t}),(0,s.j)(a.I.Search,{...c,suffix:n||void 0,enterButton:d||void 0,className:`${this.getClassName(e)}
1 ${this.getSizeClassName(l)} ${d?"":"icononly"}`}),o&&(0,s.j)("small",{className:"input-caption",children:o})]})}}},1892(e,t,n){n.d(t,{D:()=>C});var r=n(6744),s=n(9950),a=n(4001),o=n(6378),i=n(9947),l=n(1376),c=n(4483),d=n(5789),u={adjustX:1,adjustY:1},p=[0,0],f={topLeft:{points:["bl","tl"],overflow:u,offset:[0,-4],targetOffset:p},topCenter:{points:["bc","tc"],overflow:u,offset:[0,-4],targetOffset:p},topRight:{points:["br","tr"],overflow:u,offset:[0,-4],targetOffset:p},bottomLeft:{points:["tl","bl"],overflow:u,offset:[0,4],targetOffset:p},bottomCenter:{points:["tc","bc"],overflow:u,offset:[0,4],targetOffset:p},bottomRight:{points:["tr","br"],overflow:u,offset:[0,4],targetOffset:p}},m=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger"];function h(e,t){var n=e.arrow,o=void 0!==n&&n,i=e.prefixCls,l=void 0===i?"rc-dropdown":i,c=e.transitionName,d=e.animation,u=e.align,p=e.placement,h=void 0===p?"bottomLeft":p,y=e.placements,v=void 0===y?f:y,g=e.getPopupContainer,x=e.showAction,b=e.hideAction,j=e.overlayClassName,C=e.overlayStyle,w=e.visible,A=e.trigger,N=void 0===A?["hover"]:A,k=(0,r.z)(e,m),O=s.useState(),S=(0,r._)(O,2),T=S[0],z=S[1],P="visible"in e?w:T,E=s.useRef(null);s.useImperativeHandle(t,function(){return E.current});var R=function(){var t=e.overlay;return"function"==typeof t?t():t},D=function(t){var n=e.onOverlayClick,r=R().props;z(!1),n&&n(t),r.onClick&&r.onClick(t)},_=function(){var e=R(),t={prefixCls:"".concat(l,"-menu"),onClick:D};return"string"==typeof e.type&&delete t.prefixCls,s.createElement(s.Fragment,null,o&&s.createElement("div",{className:"".concat(l,"-arrow")}),s.cloneElement(e,t))},L=b;return!L&&-1!==N.indexOf("contextMenu")&&(L=["click"]),s.createElement(a.T,(0,r.l)((0,r.l)({builtinPlacements:v},k),{},{prefixCls:l,ref:E,popupClassName:(0,r.c)(j,(0,r.a)({},"".concat(l,"-show-arrow"),o)),popupStyle:C,action:N,showAction:x,hideAction:L||[],popupPlacement:h,popupAlign:u,popupTransitionName:c,popupAnimation:d,popupVisible:P,stretch:function(){var t=e.minOverlayWidthMatchTrigger,n=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?t:!n}()?"minWidth":"",popup:"function"==typeof e.overlay?_:_(),onPopupVisibleChange:function(t){var n=e.onVisibleChange;z(t),"function"==typeof n&&n(t)},getPopupContainer:g}),function(){var t=e.children,n=t.props?t.props:{},a=(0,r.c)(n.className,function(){var t=e.openClassName;return void 0!==t?t:"".concat(l,"-open")}());return P&&t?s.cloneElement(t,{className:a}):t}())}const y=s.forwardRef(h);var v=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n},g=l.B.Group,x=function(e){var t=s.useContext(r.k),n=t.getPopupContainer,a=t.getPrefixCls,o=t.direction,c=e.prefixCls,d=e.type,u=void 0===d?"default":d,p=e.disabled,f=e.loading,m=e.onClick,h=e.htmlType,y=e.children,x=e.className,b=e.overlay,j=e.trigger,w=e.align,A=e.visible,N=e.onVisibleChange,k=e.placement,O=e.getPopupContainer,S=e.href,T=e.icon,z=void 0===T?s.createElement(i.E,null):T,P=e.title,E=e.buttonsRender,R=void 0===E?function(e){return e}:E,D=e.mouseEnterDelay,_=e.mouseLeaveDelay,L=e.overlayClassName,I=e.overlayStyle,B=e.destroyPopupOnHide,M=v(e,["prefixCls","type","disabled","loading","onClick","htmlType","children","className","overlay","trigger","align","visible","onVisibleChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide"]),F=a("dropdown-button",c),W={align:w,overlay:b,disabled:p,trigger:p?[]:j,onVisibleChange:N,getPopupContainer:O||n,mouseEnterDelay:D,mouseLeaveDelay:_,overlayClassName:L,overlayStyle:I,destroyPopupOnHide:B};"visible"in e&&(W.visible=A),W.placement="placement"in e?k:"rtl"===o?"bottomLeft":"bottomRight";var V=R([s.createElement(l.B,{type:u,disabled:p,loading:f,onClick:m,htmlType:h,href:S,title:P},y),s.createElement(l.B,{type:u,icon:z})]),H=(0,r._)(V,2),$=H[0],U=H[1];return s.createElement(g,(0,r.g)({},M,{className:(0,r.c)(F,x)}),$,s.createElement(C,W,U))};x.__ANT_BUTTON=!0;const b=x;(0,c.t)("topLeft","topCenter","topRight","bottomLeft","bottomCenter","bottomRight");var j=function(e){var t,n=s.useContext(r.k),a=n.getPopupContainer,i=n.getPrefixCls,l=n.direction,c=e.arrow,u=e.prefixCls,p=e.children,f=e.trigger,m=e.disabled,h=e.getPopupContainer,v=e.overlayClassName,g=i("dropdown",u),x=s.Children.only(p),b=(0,d.c)(x,{className:(0,r.c)("".concat(g,"-trigger"),(0,r.a)({},"".concat(g,"-rtl"),"rtl"===l),x.props.className),disabled:m}),j=(0,r.c)(v,(0,r.a)({},"".concat(g,"-rtl"),"rtl"===l)),C=m?[]:f;return C&&-1!==C.indexOf("contextMenu")&&(t=!0),s.createElement(y,(0,r.g)({arrow:c,alignPoint:t},e,{overlayClassName:j,prefixCls:g,getPopupContainer:h||a,transitionName:function(){var t=i(),n=e.placement,r=void 0===n?"":n,s=e.transitionName;return void 0!==s?s:r.indexOf("top")>=0?"".concat(t,"-slide-down"):"".concat(t,"-slide-up")}(),trigger:C,overlay:function(){return function(t){var n,a=e.overlay;n="function"==typeof a?a():a;
1var i=(n=s.Children.only("string"==typeof n?s.createElement("span",null,n):n)).props;(0,r.j)(!i.mode||"vertical"===i.mode,"Dropdown",'mode="'.concat(i.mode,"\" is not supported for Dropdown's Menu."));var l=i.selectable,c=void 0!==l&&l,u=i.expandIcon,p=typeof u<"u"&&s.isValidElement(u)?u:s.createElement("span",{className:"".concat(t,"-menu-submenu-arrow")},s.createElement(o.R,{className:"".concat(t,"-menu-submenu-arrow-icon")}));return"string"==typeof n.type?n:(0,d.c)(n,{mode:"vertical",selectable:c,expandIcon:p})}(g)},placement:function(){var t=e.placement;return void 0!==t?t:"rtl"===l?"bottomRight":"bottomLeft"}()}),b)};j.Button=b,j.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1};const C=j}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.