"use strict";(globalThis.webpackChunk_elliemae_pui_app_sdk=globalThis.webpackChunk_elliemae_pui_app_sdk||[]).push([[9401],{"./node_modules/.pnpm/@elliemae+ds-form-layout-blocks@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-form-layout-blocks/dist/esm/form-layout-block-item/DSFormLayoutBlockItem.js":(W,y,e)=>{e.d(y,{U:()=>B});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),b=e("./node_modules/.pnpm/@elliemae+ds-grid@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-grid/dist/esm/Grid.js"),F=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/describe.js"),C=e("./node_modules/.pnpm/uid@2.0.2/node_modules/uid/dist/index.mjs"),P=e("./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/AlertsSmallFill.js"),T=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/globalAttributesPropTypes.js"),N=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/xstyledPropTypes.js"),J=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propsPerSlot/getPropsPerSlotPropTypes.js"),u=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/PropTypes.js"),X=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/helpers.js");const A="DSFormlayoutblockitem",_={CONTAINER:"container",LABEL:"label",MESSAGE:"message",ERROR_MESSAGE:"error-message",COUNTER:"counter",MARK:"mark"},ie=(0,X.lD)(A,_),Z={isGroup:!1},U={...T.P,...N.w,...(0,J.Y)(A,_),children:u.A.node.isRequired.description("Input component. "),label:u.A.string.description("Label property for the input component. This property is required for accesibility purposes."),inputID:u.A.string.description("String that matches the input component's id. This property is required for accesibility purposes."),maxCharCounter:u.A.number.description("Max of characters allowed."),currentChar:u.A.number.description("Current counter of input text area"),feedbackMessage:u.A.string.description("Feedback message to show below the input component."),validationMessage:u.A.string.description("Validation message to show below the input component. It requires hasError property set to true to be visible."),hasError:u.A.bool.description("Helper boolean property for the validation message."),required:u.A.bool.description("Adds required extra styling."),optional:u.A.bool.description("Adds optional extra styling."),fitContent:u.A.bool.description("Set the width of the layout to the input component."),leftLabel:u.A.bool.description("Adds the label at the left of the input component."),hideLabel:u.A.bool.description("Hides the input label. It still requires label and labelFor property for accesibility purposes"),withHighlight:u.A.bool.description("Adds highlight extra styling. It requires extra spacing, please check withHighlight explanation tab."),isGroup:u.A.bool.description("Sets the HTML elements as fieldset and legend. This should be used when you want to group more than one input."),iconError:u.A.bool.description("Adds icon error extra styling.")};var O=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/styled.js"),Y=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/xStyledWrapper.js"),Q=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/system.js");const q=(0,O.I)("div",{name:A,slot:_.CONTAINER})`
  position: relative;
  padding: 0;
  margin: 0;
  display: grid;
  ${Y.L1}
  ${({fitContent:s})=>s?"width: fit-content;":void 0}
  ${({isGroup:s})=>s?"border: none":""};
  ${({leftLabel:s,hideLabel:a})=>s&&!a?"grid-template-columns: auto 1fr;":void 0}
  align-items: center;
  ${({theme:s,withHighlight:a})=>a?`
  &::after {
        position: absolute;
        content: '';
        left: -${s.space.xxs};
        top: -${s.space.xxxs};
        z-index: -1;
        width: calc(100% + ${s.space.xs});
        height: calc(100%  + ${s.space.xxs});
        background-color: #FEFBEE;
        border : 1px solid #8F6326;
        border-radius : 4px;
        box-shadow: 0 1px 3px 0 rgba(0,0,0,0.35);
        }
        &:hover, 
        &:focus-within {
          &::after {
            position: absolute;
            content: '';
            left: -${s.space.xxs};
            top: -${s.space.xxxs};
            z-index: -1;
            width: calc(100% + ${s.space.xs});
            height: calc(100%  + ${s.space.xxs});
            background-color: #FFF9D3;
            border : 2px solid #8F6326;
            border-radius : 4px;
            box-shadow: 0 6px 10px 0 rgba(0,0,0,0.30);
          }
        }
  `:void 0}
`,ee=(0,O.I)("label",{name:A,slot:_.LABEL})`
  display: flex;
  ${({theme:s,leftLabel:a})=>a?`padding-right: ${s.space.xxxs};`:void 0}
  ${({hideLabel:s})=>s?`position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
  `:void 0}
`,V=(0,Q.AH)`
  font-size: ${({theme:s})=>s.fontSizes.microText[200]};
  text-align: right;
  line-height: 1.231rem;
  @media (max-width: ${({theme:s})=>s.breakpoints.small}) {
    line-height: 1rem;
  }
  min-height: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: ${({theme:s,hasError:a})=>a?s.colors.danger[900]:s.colors.neutral[500]};
  ${({leftLabel:s,hideLabel:a})=>s&&!a?"grid-column: 1/3;":void 0}
  font-style: normal;
`,se=(0,O.I)("div",{name:A,slot:_.MESSAGE})`
  ${V}
`,H=(0,O.I)("div",{name:A,slot:_.ERROR_MESSAGE})`
  ${V}
`,oe=(0,O.I)("span",{name:A,slot:_.MARK})`
  margin-left: ${({theme:s})=>s.space.xxxs};
  ${({theme:s,required:a})=>a?`
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1rem;
  font-size: 1.5rem;
  :after {
    content: '*';
    color: ${s.colors.danger[900]};
  }
  `:`
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid ${s.colors.brand[600]};
  `}
`,$=O.I.div`
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
`,te=(0,O.I)("span",{name:A,slot:_.COUNTER})`
  justify-self: flex-end;
  margin-left: 16px;
  color: ${({theme:s,hasError:a})=>a?s.colors.danger[900]:s.colors.neutral[500]};
`;var le=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/validation/typescriptValidator.js"),ne=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/defaultProps/useMemoMergePropsWithDefault.js"),re=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/useGetGlobalAttributes.js"),r=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/useGetXstyledProps.js");const K=s=>{(0,le.D)(s,U,A);const a=(0,ne.b)(s,Z),t=(0,re.u)(a),l=(0,r.d)(a);return i.useMemo(()=>({globalAttributes:t,xstyledProps:l,propsWithDefault:a}),[t,l,a])},B=s=>{const{globalAttributes:a,xstyledProps:t,propsWithDefault:l}=K(s),{label:n,feedbackMessage:d,maxCharCounter:p,currentChar:h,validationMessage:f,inputID:m,children:x,hasError:c,leftLabel:g,required:E,optional:M,hideLabel:v,fitContent:S,withHighlight:w,isGroup:j}=l,{className:D,label:R,...I}=a,L=(0,i.useMemo)(()=>m??`form_layout_block_item_${(0,C.L)(6)}`,[m]),de=(0,i.useMemo)(()=>p!==void 0?["1fr","auto"]:["1fr"],[p]),k=(0,i.useCallback)(()=>l,[l]),z=(0,i.useCallback)(()=>({}),[]);return(0,o.jsxs)(q,{leftLabel:g,fitContent:S,hideLabel:v,withHighlight:w,as:j?"fieldset":"div",isGroup:j,className:D,...t,...I,getOwnerProps:k,getOwnerPropsArguments:z,children:[(0,o.jsxs)(b.Ay,{cols:de,gutter:"xxs","aria-live":"polite",id:`${L}_remaining_characters`,children:[n?(0,o.jsxs)(ee,{id:`${L}_block_label`,htmlFor:L,leftLabel:g,hideLabel:v,"aria-hidden":j,getOwnerProps:k,getOwnerPropsArguments:z,children:[n,(E||M)&&(0,o.jsx)(oe,{required:E,children:M?(0,o.jsx)($,{children:"Optional"}):null})]}):null,p!==void 0&&h!==void 0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(te,{hasError:h>p,getOwnerProps:k,getOwnerPropsArguments:z,children:`${h}/${p}`}),(0,o.jsx)($,{children:h<p?`${p-h} characters remaining`:""})]}):null]}),j&&(0,o.jsx)($,{as:"legend",children:`${n}. ${c&&f||!c&&d||""}`}),x,d&&!c?(0,o.jsx)(se,{"aria-live":"polite",leftLabel:g,hideLabel:v,"aria-hidden":j,id:`${L}_feedback_message`,getOwnerProps:k,getOwnerPropsArguments:z,children:d}):(0,o.jsx)($,{id:`${L}_feedback_message`}),f&&c?(0,o.jsxs)(H,{hasError:c,leftLabel:g,hideLabel:v,role:"alert",id:`${L}_error_message`,getOwnerProps:k,getOwnerPropsArguments:z,children:[(0,o.jsx)(P.A,{width:8,height:8,color:["danger","900"],style:{marginBottom:"2px"}}),"\xA0",`${f}`]}):(0,o.jsx)($,{id:`${L}_error_message`})]})};B.displayName="DSFormLayoutBlockItem";const G=(0,F.A)(B);G.propTypes=U},"./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/AlertsSmallFill.js":(W,y,e)=>{e.d(y,{A:()=>C});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),b=e("./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/utils/SvgIcon.js"),C=P=>(0,o.jsx)(b.Ah,{width:12,height:13,...P,viewBox:"0 0 12 13",children:(0,o.jsx)("path",{d:"M 7.2154 1.2771 L 11.8239 10.2545 C 12.1984 10.9839 11.956 11.904 11.2826 12.3096 C 11.0752 12.4345 10.8419 12.5 10.6046 12.5 L 1.3952 12.5 C 0.6246 12.5 0 11.8234 0 10.9889 C 0 10.7322 0.0603 10.4798 0.1753 10.2555 L 4.7762 1.278 C 5.1502 0.5483 5.9995 0.2851 6.6732 0.6902 C 6.901 0.8271 7.0888 1.0304 7.2154 1.2771 Z"})})},"./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/ChevronRight.js":(W,y,e)=>{e.d(y,{A:()=>b});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/utils/createIcon.js"),b=(0,o.w)({paths:["M 11.531 8.5 C 11.531 8.605 11.498 8.711 11.431 8.8 L 5.431 16.8 C 5.265 17.021 4.952 17.066 4.731 16.9 S 4.465 16.421 4.63 16.2 L 10.405 8.5 L 4.63 0.8 C 4.465 0.58 4.51 0.267 4.731 0.1 C 4.952 -0.065 5.265 -0.02 5.431 0.201 L 11.431 8.201 C 11.497 8.29 11.531 8.395 11.531 8.501 Z"],height:17,width:16})},"./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/ChevronSmallDown.js":(W,y,e)=>{e.d(y,{A:()=>C});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),b=e("./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/utils/SvgIcon.js"),C=P=>(0,o.jsx)(b.Ah,{...P,viewBox:"0 0 20 20",children:(0,o.jsx)("path",{d:"M9.5 13a.503.503 0 0 1-.313-.109l-5-4a.5013.5013 0 0 1-.078-.703c.173-.214.488-.25.703-.078L9.5 11.86l4.688-3.75c.218-.172.531-.136.703.078.172.216.138.53-.078.703l-5 4A.501.501 0 0 1 9.5 13z"})})},"./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/CloseMedium.js":(W,y,e)=>{e.d(y,{A:()=>b});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/@elliemae+ds-icons@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-icons/dist/esm/utils/createIcon.js"),b=(0,o.w)({paths:["M16 4.706L15.294 4 10 9.294 4.706 4 4 4.706 9.294 10 4 15.294l.706.706L10 10.706 15.294 16l.706-.706L10.706 10z"],height:20,width:20})},"./node_modules/.pnpm/@elliemae+ds-popperjs@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-popperjs/dist/esm/index.js":(W,y,e)=>{e.d(y,{B2:()=>G});var i=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"),o=e("./node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"),b=e("./node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js"),F=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/describe.js"),C=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/styled.js");const P=18,T=18,N=C.I.div`
  position: absolute;
  width: ${P}px;
  height: ${T}px;
  pointer-events: none;
  background-color: transparent;
  & .stroke {
    fill: neutral-500;
    fill-opacity: 0.4;
  }
  & .fill {
    fill: neutral-000;
  }

  &[data-placement^='top'] {
    svg {
      transform: rotateZ(180deg);
    }
    bottom: -${T}px;
  }
  &[data-placement^='right'] {
    svg {
      transform: rotateZ(-90deg);
    }
    left: -${P}px;
  }
  &[data-placement^='bottom'] {
    top: -${T}px;
  }
  &[data-placement^='left'] {
    svg {
      transform: rotateZ(90deg);
    }
    right: -${P}px;
  }
  margin-left: ${t=>t["data-placement"].startsWith("top")||t["data-placement"].startsWith("bottom")?`-${P/2}px;`:"0;"};
  margin-top: ${t=>t["data-placement"].startsWith("left")||t["data-placement"].startsWith("right")?`-${T/2}px;`:"0;"};
`,J=({placement:t,style:l,arrowElementRef:n})=>(0,o.jsx)(N,{"data-placement":t,style:l,innerRef:n,"data-testid":"ds-tooltip-arrow","aria-hidden":"true",children:(0,o.jsxs)("svg",{viewBox:"0 0 30 30",children:[(0,o.jsx)("path",{className:"stroke",d:`M23.7,27.1L17,19.9C16.5,19.3,15.8,19,15,19s-1.6,0.3-2.1,0.9l-6.6,7.2C5.3,28.1,3.4,29,2,29h26
        C26.7,29,24.6,28.1,23.7,27.1z`}),(0,o.jsx)("path",{className:"fill",d:"M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"})]})},"popper-arrow");var u=e("./node_modules/.pnpm/styled-components@5.3.11_react-dom@18.3.1_react@18.3.1/node_modules/styled-components/dist/styled-components.browser.esm.js"),X=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/xStyledWrapper.js"),A=e("./node_modules/.pnpm/@elliemae+ds-system@3.54.6_@elliemae+pui-theme@2.13.0_lodash-es@4.17.21/node_modules/@elliemae/ds-system/dist/esm/styled/system.js");const _=(0,u.i7)`
    from {
      opacity: 0;
      transform: scale(0.8);
    }

    to {
      opacity: 1;
      transform: scale(1);
      visibility: visible;
    }
`,ie=(0,u.i7)`
    from {
      opacity: 1;
      transform: scale(1);
    }

    to {
      opacity: 0;
      transform: scale(0.8);
      visibility: hidden;
    }
`,Z=(0,C.I)("div")`
  z-index: ${({theme:t,zIndex:l})=>l??t.zIndex.popper};
  ${X.L1}
`,U=C.I.div`
  box-shadow:
    0 0 0 1px rgba(16, 22, 26, 0.1),
    0 2px 4px rgba(16, 22, 26, 0.2),
    0 8px 24px rgba(16, 22, 26, 0.2);

  ${({showPopover:t,animationDuration:l,withoutAnimation:n})=>!n&&(0,A.AH)`
      animation: ${t?_:ie} ${l}ms ease-in;
    `}
`,O=({setPopperElement:t,popperStyles:l,popperAttributes:n,children:d,showPopover:p,setArrowElement:h,setIsAnimating:f,arrowStyle:m,withoutArrow:x,withoutAnimation:c,animationDuration:g,zIndex:E,globalAttrs:M,xStyledAttrs:v})=>{const S=(0,i.useCallback)(()=>{!p&&!c&&f(!1)},[p,c,f]),w=(0,i.useMemo)(()=>(0,o.jsxs)(o.Fragment,{children:[d,x===!1?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(J,{arrowElementRef:h,style:m,placement:n?n["data-popper-placement"]:"bottom"}),(0,o.jsx)("div",{ref:h,style:m})]}):null]}),[d,x,m,n,h]);return(0,o.jsx)(Z,{innerRef:t,role:"region","aria-label":"popover menu",style:l,...n,...M,...v,zIndex:E,children:(0,o.jsx)(U,{showPopover:p,animationDuration:g,withoutAnimation:c,onAnimationEnd:S,children:w})})};var Y=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/useGetGlobalAttributes.js"),Q=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/useGetXstyledProps.js"),q=e("./node_modules/.pnpm/react-popper@2.3.0_@popperjs+core@2.11.8/node_modules/react-popper/lib/esm/usePopper.js");function ee(t,l){(0,i.useEffect)(()=>{const n=d=>{!t||t?.contains?.(d.target)||l(d)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[t,l])}var V=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/defaultProps/useMemoMergePropsWithDefault.js");const se=({props:t,arrowElement:l,defaultProps:n})=>{const{boundaryElement:d,withoutArrow:p=!1,placementOrderPreference:h=["top","bottom","left","right"],customOffset:f=void 0}=t,m=(0,i.useMemo)(()=>{const c=[];if(c.push({name:"hide",enabled:!0}),c.push({name:"flip",options:{fallbackPlacements:h}}),!p||f){const g=f||n.customOffset;c.push({name:"offset",enabled:!0,options:{offset:g}})}return p||c.push({name:"arrow",options:{element:l,padding:18}}),d&&c.push({name:"preventOverflow",options:{boundary:d}}),c},[l,n,d,p,h,f]),{modifiers:x=m}=t;return(0,i.useMemo)(()=>({modifiers:x}),[x])},H=()=>{},oe={},$=({props:t,arrowElement:l})=>{const n=(0,i.useMemo)(()=>({referenceElement:null,showPopover:!1,closeContextMenu:H,onClickOutside:H,withoutPortal:!1,withoutArrow:!1,withoutAnimation:!1,animationDuration:100,portalDOMContainer:document.body,startPlacementPreference:"top",placementOrderPreference:["top","bottom","left","right"],extraPopperStyles:oe,customOffset:[0,14]}),[]),{modifiers:d}=se({props:t,arrowElement:l,defaultProps:n});return(0,i.useMemo)(()=>({...n,modifiers:d}),[d,n])},te=({props:t,arrowElement:l})=>{const n=$({props:t,arrowElement:l});return(0,V.b)(t,n)},le=t=>{const[l,n]=(0,i.useState)(null),[d,p]=(0,i.useState)(null),[h,f]=(0,i.useState)(!1),m=te({props:t,arrowElement:d}),{referenceElement:x,closeContextMenu:c,onClickOutside:g,modifiers:E,startPlacementPreference:M}=m,v=(0,i.useMemo)(()=>({placement:M,modifiers:E}),[E,M]),S=(0,q.E)(x,l,v),{showPopover:w,withoutAnimation:j}=m;(0,i.useEffect)(()=>{w&&!j&&f(!0)},[w,j]),(0,i.useEffect)(()=>{m.actionRef&&(m.actionRef.current.update=S.update)},[m.actionRef,S.update]),ee(l,I=>{x?.contains?.(I?.target)||(g(I),c())});const D=(0,Y.u)(m),R=(0,Q.d)(m);return(0,i.useMemo)(()=>({props:m,popperElement:l,setPopperElement:n,arrowElement:d,setArrowElement:p,popoverHelper:S,isAnimating:h,setIsAnimating:f,globalAttrs:D,xStyledAttrs:R}),[m,l,d,S,h,D,R])};var ne=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/globalProps/globalAttributesPropTypes.js"),re=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/xstyledProps/xstyledPropTypes.js"),r=e("./node_modules/.pnpm/@elliemae+ds-props-helpers@3.54.6_@elliemae+pui-theme@2.13.0/node_modules/@elliemae/ds-props-helpers/dist/esm/propTypes/PropTypes.js");const K=["top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],B={...ne.P,...re.w,children:r.A.node.description("The content of the popper").isRequired,referenceElement:r.A.oneOfType([r.A.node,r.A.oneOf([null])]).description("The DOM element that needs to be used as a reference for positioning the popper.").isRequired,showPopover:r.A.bool.description("whether or not to show the popper content").isRequired,closeContextMenu:r.A.func.description('Callback to close the context menu, used for "on click outside", if not provided click outside will not trigger anything').defaultValue("() => {}"),withoutPortal:r.A.bool.description("Whether or not the popper content should appear in a DOM portal or not").defaultValue(!0),withoutArrow:r.A.bool.description("Whether or not the popper context menu should print the arrow").defaultValue(!1),withoutAnimation:r.A.bool.description("Whether or not the popper context menu should be animated").defaultValue(!1),animationDuration:r.A.number.description("Popper context menus Animation duration in ms").defaultValue(100),startPlacementPreference:r.A.oneOf(K).description("start placement preferences, as per popperjs placement option").defaultValue("'top'"),placementOrderPreference:r.A.arrayOf(r.A.oneOf(K)).description('Array of placement preferences, as per popperjs "flip" placement option').defaultValue("['top', 'bottom', 'left', 'right']"),zIndex:r.A.number.description("popperjs content z-index").defaultValue("theme.zIndex.popper"),customOffset:r.A.arrayOf(r.A.number).description("placement offset array").defaultValue("[0,14]"),extraPopperStyles:r.A.object.description("Extra object styles to attach to the popper element").defaultValue({}),onClickOutside:r.A.func.description("Callback triggered when clicking outside the popper").defaultValue(()=>null),boundaryElement:r.A.oneOfType([r.A.node,r.A.oneOf([null])]).description('Bounding element to calculate upon, defaults to "clippingParents",which are the scrolling containers that may cause element to be partially or fully cut off'),portalDOMContainer:r.A.oneOfType([r.A.node,r.A.oneOf([null])]).description("When using portal, the container in which to append the DOM content, defaults to document body"),modifiers:r.A.array.description('If you provide the modifiers array for full-custom override in popper.js, it means you are responsible for completely overwriting all the existing modifiers. This includes the modifiers that control "boundaryElement," "withoutArrow," "placementOrderPreference," and "customOffset".For more detailed information, please refer to the documentation at https://popper.js.org/docs/v2/modifiers/.'),actionRef:r.A.object.description("Ref object to access the popperjs instance methods")},G=t=>{const{props:{showPopover:l,withoutAnimation:n,animationDuration:d,withoutPortal:p,withoutArrow:h,portalDOMContainer:f,zIndex:m,extraPopperStyles:x},globalAttrs:c,xStyledAttrs:g,setPopperElement:E,setArrowElement:M,setIsAnimating:v,popoverHelper:S,isAnimating:w}=le(t),{children:j}=t,{styles:D,attributes:R}=S,I=(0,i.useMemo)(()=>(0,o.jsx)(O,{setPopperElement:E,popperStyles:{...D.popper,...x},popperAttributes:R.popper,setArrowElement:M,arrowStyle:D.arrow,withoutArrow:h,withoutAnimation:n,animationDuration:d,zIndex:m,showPopover:l,setIsAnimating:v,globalAttrs:c,xStyledAttrs:g,children:j}),[R.popper,j,v,l,x,M,E,D.arrow,D.popper,h,n,d,m,c,g]);if(l||w){if(p===!0)return I;if(f&&p===!1)return(0,o.jsx)(o.Fragment,{children:(0,b.createPortal)(I,f)})}return null};G.displayName="DSPopperJS";const s=(0,F.A)(G).description("A dimsum custom styling wrapper on top of popperjs");s.propTypes=B;var a=null}}]);
