@dialpad/dialtone 9.13.2 → 9.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,4 +2,4 @@
2
2
  background-size: ${this.backgroundSize};`}},mounted(){this.important&&this.focusFirstElement()},methods:{trapFocus(t){this.important&&this.focusTrappedTabPress(t)}}},ua=["role","aria-labelledby","aria-describedby"];function ha(t,a,n,r,i,o){const s=e.resolveComponent("dt-notice-icon"),d=e.resolveComponent("dt-notice-content"),l=e.resolveComponent("dt-notice-action");return e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(o.bannerClass),style:e.normalizeStyle(o.bannerBackgroundImage),onKeydown:a[1]||(a[1]=e.withKeys((...u)=>o.trapFocus&&o.trapFocus(...u),["tab"]))},[e.createElementVNode("div",{class:e.normalizeClass(["d-banner__dialog",n.dialogClass]),role:o.role,"aria-labelledby":n.titleId,"aria-describedby":n.contentId},[n.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,{key:0,kind:n.kind},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["kind"])),e.createVNode(d,{"title-id":n.titleId,"content-id":n.contentId,title:n.title},{titleOverride:e.withCtx(()=>[e.renderSlot(t.$slots,"titleOverride")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["title-id","content-id","title"]),e.createVNode(l,{"hide-close":n.hideClose,"close-button-props":n.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:a[0]||(a[0]=u=>t.$emit("close"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"action")]),_:3},8,["hide-close","close-button-props","visually-hidden-close","visually-hidden-close-label"])],10,ua)],38)}const ma=c._export_sfc(ca,[["render",ha]]),Zt="d-breadcrumbs__item--selected",Xt="d-breadcrumbs--inverted",fa={name:"DtBreadcrumbItem",components:{DtLink:_.DtLink},inheritAttrs:!1,props:{inverted:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},label:{type:String,default:""}},data(){return{BREADCRUMB_ITEM_SELECTED_MODIFIER:Zt}},computed:{linkKind(){return this.inverted?m.INVERTED:m.MUTED},ariaCurrent(){return this.selected?"location":void 0}}};function pa(t,a,n,r,i,o){const s=e.resolveComponent("dt-link");return e.openBlock(),e.createElementBlock("li",{"data-qa":"dt-breadcrumb-item",class:e.normalizeClass(["d-breadcrumbs__item",{[i.BREADCRUMB_ITEM_SELECTED_MODIFIER]:n.selected}])},[e.createVNode(s,e.mergeProps({kind:o.linkKind,"aria-current":o.ariaCurrent,"data-qa":"breadcrumb-item"},t.$attrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),_:3},16,["kind","aria-current"])],2)}const Jt=c._export_sfc(fa,[["render",pa]]),ga={name:"DtBreadcrumbs",components:{DtBreadcrumbItem:Jt},props:{breadcrumbs:{type:Array,default:()=>[],validate(t){return t.every(({href:a,label:n})=>a!==void 0&&n!==void 0)}},inverted:{type:Boolean,default:!1},ariaLabel:{type:String,default:"breadcrumb"}},data(){return{BREADCRUMBS_INVERTED_MODIFIER:Xt}},methods:{getBreadcrumbItemKey(t){return`breadcrumbs-item-${t}-${c.utils.getUniqueString()}`}}},_a=["aria-label"];function ba(t,a,n,r,i,o){const s=e.resolveComponent("dt-breadcrumb-item");return e.openBlock(),e.createElementBlock("nav",{"aria-label":n.ariaLabel,"data-qa":"dt-breadcrumbs",class:e.normalizeClass(["d-breadcrumbs",{[i.BREADCRUMBS_INVERTED_MODIFIER]:n.inverted}])},[e.createElementVNode("ol",null,[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.breadcrumbs,(d,l)=>(e.openBlock(),e.createBlock(s,e.mergeProps({key:o.getBreadcrumbItemKey(l),inverted:n.inverted},d),null,16,["inverted"]))),128))])])],10,_a)}const va=c._export_sfc(ga,[["render",ba]]),tt={start:"d-btn-group--start",end:"d-btn-group--end","space-between":"d-btn-group--space-between"},ya={name:"DtButtonGroup",props:{alignment:{type:String,default:"start",validator:t=>Object.keys(tt).includes(t)}},data(){return{BUTTON_GROUP_ALIGNMENT:tt}}};function Sa(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-btn-group",i.BUTTON_GROUP_ALIGNMENT[n.alignment]]),role:"group"},[e.renderSlot(t.$slots,"default")],2)}const Ca=c._export_sfc(ya,[["render",Sa]]),ka={name:"DtCard",props:{maxHeight:{type:String,default:null},containerClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""}},data(){return{hasSlotContent:c.hasSlotContent}}};function wa(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-card",n.containerClass]),"data-qa":"dt-card"},[i.hasSlotContent(t.$slots.header)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-card__header",n.headerClass])},[e.renderSlot(t.$slots,"header")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["d-card__content",n.contentClass]),style:e.normalizeStyle({"max-height":n.maxHeight})},[e.renderSlot(t.$slots,"content")],6),i.hasSlotContent(t.$slots.footer)?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-card__footer",n.footerClass])},[e.renderSlot(t.$slots,"footer")],2)):e.createCommentVNode("",!0)],2)}const en=c._export_sfc(ka,[["render",wa]]),Ea={name:"DtCodeblock",props:{text:{type:String,required:!0}}},Ia={class:"d-codeblock"};function Da(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("pre",null,[e.createTextVNode(" "),e.createElementVNode("code",Ia,e.toDisplayString(n.text),1),e.createTextVNode(`
3
3
  `)])}const Ta=c._export_sfc(Ea,[["render",Da]]),Oa={methods:{scrollElementIntoViewIfNeeded(t,a,n,r){t.scrollIntoViewIfNeeded?this.scrollIntoViewIfNeeded(t,a,n,r):this.scrollIntoView(t,"bottom",!1,n,r)},scrollElementIntoView(t,a,n,r){if(a==="center"){this.scrollIntoView(t,"center",!1,n,r);return}a===!1?this.scrollIntoView(t,"bottom",!1,n,r):this.scrollIntoView(t,"top",!1,n,r)},scrollIntoViewIfNeeded(t,a,n,r){const i=a?"center":void 0;this.scrollIntoView(t,i,!0,n,r)},scrollIntoView(t,a,n,r,i){if(!t||!t.parentElement)return;const o=t.offsetTop,s=i||t.parentElement,d=this._getScrollBounds(s),l=d.bottom-d.top,u=this._getElementHeight(t),f=o+u;let h=-1;switch(a){case"top":h=o;break;case"center":h=o+(u-l)/2;break;case"bottom":h=h=f-l;break;default:o-d.top<=l/2?h=o:h=f-l;break}this._setScrollTop(s,h,d,o,f,n,r)},_setScrollTop(t,a,n,r,i,o,s){n=n||this._getScrollBounds(t);const d=n.bottom-n.top;if(o&&this._inScrollBounds(r,i,n))if(r<n.top)a=r;else if(i>n.bottom)a=i-d;else return;s?t.scrollTo({top:a,behavior:s}):t.scrollTop=a},_getElementHeight(t){return t.getBoundingClientRect().height},_getScrollBounds(t){const a=this._getElementHeight(t),n=t.scrollTop;return{top:n,bottom:n+a}},_inScrollBounds(t,a,n){const r=a-t;return a<=n.bottom+3*r/4&&t>=n.top-r/4}}},Ba="listElementKey is required or the referenced element doesn't exist. Received listElement: ",bt=({listItemRole:t="option",indexKey:a="highlightIndex",idKey:n="highlightId",listElementKey:r="listRef",activeItemKey:i="",openMethod:o=null,afterHighlightMethod:s=null,beginningOfListMethod:d=null,endOfListMethod:l=null,scrollToOnHighlight:u=!0,focusOnKeyboardNavigation:f=!1}={})=>({mixins:[Oa],data(){return{[a]:-1,[n]:"",scrollToOnHighlight:u,focusOnKeyboardNavigation:f}},provide(){return{highlightId:()=>this[n]}},methods:{_getListElement(){var h;return((h=this[r]())==null?void 0:h.$el)||this[r]()},_itemsLength(){const h=this._getListItemNodes();return h===null?0:h.length},_getListItemNodes(){const h=this._getListElement();return h?Array.from(h.querySelectorAll(`[role="${t}"], #sr-only-close-button`)):(console.error(Ba,h),null)},onUpKey(){o&&this[o](!0),this[a]>0?this.setHighlightIndex(this[a]-1):d&&this[d](),this.scrollActiveItemIntoViewIfNeeded(),this.focusActiveItemIfNeeded()},onDownKey(){o&&this[o](!0),this[a]<this._itemsLength()-1?this.setHighlightIndex(this[a]+1):l&&this[l](),this.scrollActiveItemIntoViewIfNeeded(),this.focusActiveItemIfNeeded()},onHomeKey(){this.jumpToBeginning(),this.scrollActiveItemIntoViewIfNeeded(),this.focusActiveItemIfNeeded()},onEndKey(){this.jumpToEnd(),this.scrollActiveItemIntoViewIfNeeded(),this.focusActiveItemIfNeeded()},onNavigationKey(h){const p=this._getListItemNodes(),g=p.filter(y=>y.textContent.trim().toLowerCase().startsWith(h.toLowerCase()));if(g.length<=0)return;const b=g.findIndex(y=>this[a]===p.indexOf(y)),T=p.indexOf(b<g.length-1?g[b+1]:g[0]);this.setHighlightIndex(T),this.scrollActiveItemIntoViewIfNeeded(),this.focusActiveItemIfNeeded()},isValidLetter(h){return h.length>1?!1:h>="a"&&h<="z"||h>="A"&&h<="Z"},jumpToBeginning(){this.setHighlightIndex(0)},jumpToEnd(){this.setHighlightIndex(this._itemsLength()-1)},setHighlightIndex(h){this[a]=h,this[n]=this._getItemId(h),this._itemsLength()&&s&&this[s](h)},setHighlightId(h){this[n]=h,this[a]=this._getItemIndex(h),this._itemsLength()&&s&&this[s](this._getItemIndex(h))},_getItemIndex(h){const p=this._getListElement();return p?Array.from(p.querySelectorAll(`[role="${t}"], #sr-only-close-button`)).indexOf(p.querySelector(`#${h}`)):void 0},_getItemId(h){var g;const p=this._getListElement();if(p)return(g=p.querySelectorAll(`[role="${t}"], #sr-only-close-button`)[h])==null?void 0:g.id},scrollActiveItemIntoViewIfNeeded(){if(!this.scrollToOnHighlight)return;const h=this[i];if(h){const p=this._getListElement();this.scrollElementIntoViewIfNeeded(h,null,null,p)}},focusActiveItemIfNeeded(){if(!this.focusOnKeyboardNavigation)return;const h=this[i];h&&h.focus()}}}),Na={name:"ComboboxLoadingList",components:{DtListItem:_.DtListItem,DtSkeleton:m.DtSkeleton}},La={class:"d-combobox__loading-list","aria-busy":"true"};function Aa(t,a,n,r,i,o){const s=e.resolveComponent("dt-skeleton"),d=e.resolveComponent("dt-list-item");return e.openBlock(),e.createElementBlock("ol",La,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,l=>e.createVNode(d,{key:l,role:"option","navigation-type":"none"},{default:e.withCtx(()=>[e.createVNode(s,{"text-option":{type:"body"},offset:0})]),_:2},1024)),64))])}const tn=c._export_sfc(Na,[["render",Aa]]),xa={name:"ComboboxEmptyList",components:{DtListItem:_.DtListItem},props:{message:{type:String,required:!0},itemClass:{type:[String,Object,Array],default:""}}},Ma={class:"d-combobox__empty-list","data-qa":"dt-combobox-empty-list"};function Pa(t,a,n,r,i,o){const s=e.resolveComponent("dt-list-item");return e.openBlock(),e.createElementBlock("ol",Ma,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(s,{role:"option","navigation-type":"none",type:"custom",class:e.normalizeClass(["dt-empty-list-item",n.itemClass])},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(n.message),1)]),_:1},8,["class"])])])}const nn=c._export_sfc(xa,[["render",Pa]]),vt={EXTRA_SMALL:"xs",SMALL:"sm",DEFAULT:"md",LARGE:"lg",EXTRA_LARGE:"xl"},Va={name:"DtCombobox",components:{ComboboxLoadingList:tn,ComboboxEmptyList:nn},mixins:[bt({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl"})],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:t=>Object.values(vt).includes(t)},description:{type:String,default:""},listId:{type:String,default(){return c.getUniqueString()}},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},showList:{type:Boolean,default:!1},listRenderedOutside:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},emptyStateClass:{type:[String,Object,Array],default:""},clickOnSelect:{type:Boolean,default:!1}},emits:["select","escape","highlight","opened"],data(){return{outsideRenderedListRef:null,hasSlotContent:c.hasSlotContent}},computed:{inputProps(){return{label:this.label,labelVisible:this.labelVisible,size:this.size,description:this.description,role:"combobox","aria-label":this.label,"aria-expanded":this.showList.toString(),"aria-owns":this.listId,"aria-haspopup":"listbox","aria-activedescendant":this.activeItemId,"aria-controls":this.listId}},listProps(){return{role:"listbox",id:this.listId,class:"d-ps-relative","aria-label":this.label}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemId(){if(!(!this.showList||this.highlightIndex<0||this.loading))return this.highlightId},activeItemEl(){return this.highlightId?this.getListElement().querySelector("#"+this.highlightId):""}},watch:{showList(t){this.listRenderedOutside||(this.setInitialHighlightIndex(),this.$emit("opened",t)),!t&&this.outsideRenderedListRef&&(this.outsideRenderedListRef.removeEventListener("mousemove",this.onMouseHighlight),this.outsideRenderedListRef=null)},loading(t){this.$nextTick(()=>{this.setInitialHighlightIndex()})},$props:{deep:!0,immediate:!0,handler(){this.validateEmptyListProps()}}},created(){this.validateEmptyListProps()},methods:{onMouseHighlight(t){if(this.loading)return;const a=t.target.closest("li");a&&this.highlightId!==a.id&&this.setHighlightId(a.id)},getListElement(){var t;return this.outsideRenderedListRef??((t=this.$refs.listWrapper)==null?void 0:t.querySelector(`#${this.listId}`))},clearHighlightIndex(){this.showList&&this.setHighlightIndex(-1)},afterHighlight(){this.loading||this.$emit("highlight",this.highlightIndex)},onEnterKey(){var t;this.loading||this.emptyList||this.highlightIndex>=0&&(this.$emit("select",this.highlightIndex),this.clickOnSelect&&((t=this.activeItemEl)==null||t.click()))},onEscapeKey(){this.$emit("escape")},onOpen(t,a){var n;this.outsideRenderedListRef=a,(n=this.outsideRenderedListRef)==null||n.addEventListener("mousemove",this.onMouseHighlight),this.$emit("opened",t),t&&this.setInitialHighlightIndex()},onKeyValidation(t,a){!this.showList||!this.getListElement()||this[a](t)},setInitialHighlightIndex(){this.showList&&this.$nextTick(()=>{this.setHighlightIndex(this.loading?-1:0)})},validateEmptyListProps(){this.$slots.emptyListItem||(this.emptyList&&!this.emptyStateMessage||!this.emptyList&&this.emptyStateMessage)&&console.error(`Invalid props: you must pass both props emptyList and emptyStateMessage to show the
4
4
  empty message.`)}}},Ra={"data-qa":"dt-combobox-input-wrapper"};function $a(t,a,n,r,i,o){const s=e.resolveComponent("combobox-loading-list"),d=e.resolveComponent("combobox-empty-list");return e.openBlock(),e.createElementBlock("div",{onKeydown:[a[3]||(a[3]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onEscapeKey"),["stop"]),["esc"])),a[4]||(a[4]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onEnterKey"),["exact"]),["enter"])),a[5]||(a[5]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onUpKey"),["stop","prevent"]),["up"])),a[6]||(a[6]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onDownKey"),["stop","prevent"]),["down"])),a[7]||(a[7]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onHomeKey"),["stop","prevent"]),["home"])),a[8]||(a[8]=e.withKeys(e.withModifiers(l=>o.onKeyValidation(l,"onEndKey"),["stop","prevent"]),["end"]))]},[e.createElementVNode("div",Ra,[e.renderSlot(t.$slots,"input",{inputProps:o.inputProps})]),n.showList?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"listWrapper","data-qa":"dt-combobox-list-wrapper",onMouseleave:a[0]||(a[0]=(...l)=>o.clearHighlightIndex&&o.clearHighlightIndex(...l)),onFocusout:a[1]||(a[1]=(...l)=>o.clearHighlightIndex&&o.clearHighlightIndex(...l)),onMousemoveCapture:a[2]||(a[2]=(...l)=>o.onMouseHighlight&&o.onMouseHighlight(...l))},[n.loading&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(s,e.normalizeProps(e.mergeProps({key:0},o.listProps)),null,16)):n.emptyList&&(n.emptyStateMessage||i.hasSlotContent(t.$slots.emptyListItem))&&!n.listRenderedOutside?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1},o.listProps,{message:n.emptyStateMessage,"item-class":n.emptyStateClass}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"emptyListItem")]),_:3},16,["message","item-class"])):e.renderSlot(t.$slots,"list",{key:2,listProps:o.listProps,opened:o.onOpen,clearHighlightIndex:o.clearHighlightIndex})],544)):e.createCommentVNode("",!0)],32)}const an=c._export_sfc(Va,[["render",$a]]),za={name:"DtCollapsibleLazyShow",inheritAttrs:!1,props:{show:{type:Boolean,default:null},appear:{type:Boolean,default:!1},elementType:{type:String,default:"div"}},data(){return{initialized:!!this.show}},computed:{isCSSEnabled(){return process.env.NODE_ENV!=="test"}},watch:{show:function(t){!t||this.initialized||(this.initialized=!0)}},methods:{beforeEnter(t){requestAnimationFrame(()=>{t.style.height||(t.style.height="0px")})},enter(t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.style.height=`${t.scrollHeight}px`})})},afterEnter(t){t.style.height=null},beforeLeave(t){requestAnimationFrame(()=>{t.style.height||(t.style.height=`${t.offsetHeight}px`)})},leave(t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t.style.height="0px"})})},afterLeave(t){t.style.height=null}}};function Fa(t,a,n,r,i,o){return e.openBlock(),e.createBlock(e.Transition,e.mergeProps({appear:n.appear,"enter-active-class":"enter-active","leave-active-class":"leave-active"},t.$attrs,{css:o.isCSSEnabled,onBeforeEnter:o.beforeEnter,onEnter:o.enter,onAfterEnter:o.afterEnter,onBeforeLeave:o.beforeLeave,onLeave:o.leave,onAfterLeave:o.afterLeave}),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.elementType),e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>[i.initialized?e.renderSlot(t.$slots,"default",{key:0}):e.createCommentVNode("",!0)]),_:3},16)),[[e.vShow,n.show]])]),_:3},16,["appear","css","onBeforeEnter","onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])}const qa=c._export_sfc(za,[["render",Fa]]),Ha={name:"DtCollapsible",components:{DtButton:m.DtButton,DtCollapsibleLazyShow:qa,DtLazyShow:c.DtLazyShow,DtIcon:m.DtIcon},props:{anchorText:{type:String,default:null},open:{type:Boolean,default:null},id:{type:String,default(){return c.getUniqueString()}},elementType:{type:String,default:"div"},contentElementType:{type:String,default:"div"},anchorClass:{type:[String,Array,Object],default:null},contentClass:{type:[String,Array,Object],default:null},maxWidth:{type:String,default:null},maxHeight:{type:String,default:null},ariaLabel:{type:String,default:null},ariaLabelledBy:{type:String,default:null}},emits:["update:open","opened"],data(){return{isOpen:!0}},computed:{labelledBy(){return this.ariaLabelledBy||!this.ariaLabel&&c.getUniqueString("DtCollapsible__anchor")},collapsibleListeners(){return c.extractVueListeners(this.$attrs)}},watch:{open:{handler:function(t){t!==null&&(this.isOpen=t)},immediate:!0}},created(){this.validateProperAnchor()},methods:{onLeaveTransitionComplete(){this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},onEnterTransitionComplete(){this.$emit("opened",!0,this.$refs.content),this.open!==null&&this.$emit("update:open",!0)},defaultToggleOpen(){this.open===null&&this.toggleOpen()},toggleOpen(){this.isOpen=!this.isOpen},validateProperAnchor(){!this.anchorText&&!c.hasSlotContent(this.$slots.anchor)&&console.error("anchor text and anchor slot content cannot both be falsy")}}},Ua=["id"],Wa=["title"];function Ka(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("dt-collapsible-lazy-show");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.elementType),e.mergeProps({ref:"collapsible"},e.toHandlers(o.collapsibleListeners)),{default:e.withCtx(()=>[e.createElementVNode("div",{id:!n.ariaLabelledBy&&o.labelledBy,ref:"anchor",class:e.normalizeClass(n.anchorClass)},[e.renderSlot(t.$slots,"anchor",{attrs:{"aria-controls":n.id,"aria-expanded":i.isOpen.toString(),role:"button"}},()=>[e.createVNode(d,{importance:"clear",kind:"muted","aria-controls":n.id,"aria-expanded":`${i.isOpen}`,style:e.normalizeStyle({width:n.maxWidth}),onClick:o.defaultToggleOpen},{default:e.withCtx(()=>[e.createVNode(s,{name:i.isOpen?"chevron-down":"chevron-right",class:"d-collapsible__icon",size:"300"},null,8,["name"]),e.createElementVNode("span",{class:"d-collapsible__anchor-text",title:n.anchorText},e.toDisplayString(n.anchorText),9,Wa)]),_:1},8,["aria-controls","aria-expanded","style","onClick"])])],10,Ua),e.createVNode(l,e.mergeProps({id:n.id,ref:"contentWrapper","aria-hidden":`${!i.isOpen}`,"aria-labelledby":o.labelledBy,"aria-label":n.ariaLabel,show:i.isOpen,"element-type":n.contentElementType,class:n.contentClass,style:{"max-height":n.maxHeight,"max-width":n.maxWidth},"data-qa":"dt-collapsible--content",tabindex:"-1",appear:""},e.toHandlers(o.collapsibleListeners),{onAfterLeave:o.onLeaveTransitionComplete,onAfterEnter:o.onEnterTransitionComplete}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"content")]),_:3},16,["id","aria-hidden","aria-labelledby","aria-label","show","element-type","class","style","onAfterLeave","onAfterEnter"])]),_:3},16)}const on=c._export_sfc(Ha,[["render",Ka]]),rn=["row","column"],ja=t=>t.term?typeof t.term=="string":!1,Ya=t=>t.description?typeof t.description=="string":!1,Ga=t=>Array.isArray(t)?t.every(a=>!(typeof a!="object"||!ja(a)||!Ya(a))):!1,Qa={name:"DtDescriptionList",props:{direction:{type:String,default:"row",validator:t=>rn.includes(t)},items:{type:Array,default:()=>[],validator:t=>Ga(t),required:!0},gap:{type:String,default:"400",validator:t=>_.DT_STACK_GAP.includes(t)},termClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""}},computed:{dtClass(){return["dt-description-list__term",this.termClass]},ddClass(){return["dt-description-list__description",this.descriptionClass]},getDirectionClass(){return`dt-description-list--${this.direction}`},getGapClass(){return`dt-description-list--gap-${this.gap}`}}};function Za(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("dl",{class:e.normalizeClass(["dt-description-list",o.getDirectionClass,o.getGapClass])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.items,s=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:s.term},[e.createElementVNode("dt",{class:e.normalizeClass(o.dtClass)},e.toDisplayString(s.term),3),e.createElementVNode("dd",{class:e.normalizeClass(o.ddClass)},e.toDisplayString(s.description),3)],64))),128))],2)}const Xa=c._export_sfc(Qa,[["render",Za]]),de={none:void 0,small:"d-py0",large:"d-py4"},Ja={name:"DtDropdown",components:{DtPopover:_.DtPopover,SrOnlyCloseButton:_.SrOnlyCloseButton},mixins:[bt({indexKey:"highlightIndex",idKey:"highlightId",listElementKey:"getListElement",listItemRole:"menuitem",afterHighlightMethod:"afterHighlight",beginningOfListMethod:"beginningOfListMethod",endOfListMethod:"endOfListMethod",activeItemKey:"activeItemEl",focusOnKeyboardNavigation:!0}),_.SrOnlyCloseButtonMixin],inheritAttrs:!1,props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},padding:{type:String,default:"small",validator:t=>Object.keys(de).some(a=>a===t)},modal:{type:Boolean,default:!0},contentWidth:{type:String,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},listId:{type:String,default(){return c.getUniqueString()}},navigationType:{type:String,default:_.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS,validator:t=>Object.values(_.LIST_ITEM_NAVIGATION_TYPES).includes(t)},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom"},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},listClass:{type:[String,Array,Object],default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement},tether:{type:Boolean,default:!0},transition:{type:String,default:"fade"}},emits:["keydown","highlight","update:open","opened","update:open"],data(){return{LIST_ITEM_NAVIGATION_TYPES:_.LIST_ITEM_NAVIGATION_TYPES,DROPDOWN_PADDING_CLASSES:de,EVENT_KEYNAMES:c.EVENT_KEYNAMES,openedWithKeyboard:!1,isOpen:null}},computed:{dropdownListeners(){return{opened:t=>{this.updateInitialHighlightIndex(t)},keydown:t=>{switch(t.code){case c.EVENT_KEYNAMES.up:case c.EVENT_KEYNAMES.arrowup:this.onUpKeyPress(t),t.stopPropagation(),t.preventDefault();break;case c.EVENT_KEYNAMES.down:case c.EVENT_KEYNAMES.arrowdown:this.onDownKeyPress(t),t.stopPropagation(),t.preventDefault();break;case c.EVENT_KEYNAMES.space:case c.EVENT_KEYNAMES.spacebar:this.onSpaceKey();break;case c.EVENT_KEYNAMES.enter:this.onEnterKey();break;case c.EVENT_KEYNAMES.home:this.onHomeKeyPress(t),t.stopPropagation(),t.preventDefault();break;case c.EVENT_KEYNAMES.end:this.onEndKeyPress(t),t.stopPropagation(),t.preventDefault();break;default:this.onKeyPress(t);break}this.$emit("keydown",t)}}},beginningOfListMethod(){return this.onBeginningOfList||this.jumpToEnd},endOfListMethod(){return this.onEndOfList||this.jumpToBeginning},activeItemEl(){return this.getListElement().querySelector("#"+this.highlightId)},isArrowKeyNav(){return this.navigationType===this.LIST_ITEM_NAVIGATION_TYPES.ARROW_KEYS},listClasses(){return["d-dropdown-list",de[this.padding],this.listClass,{"d-context-menu-list":this.openOnContext}]},shouldOpenWithArrowKeys(){return!this.openOnContext}},methods:{onMouseHighlight(t){const a=t.target.closest("li");a&&a.role&&this.highlightId!==a.id&&(this.setHighlightId(a.id),a.focus())},getListElement(){return this.$refs.listWrapper},clearHighlightIndex(){this.setHighlightIndex(-1)},afterHighlight(){this.visuallyHiddenClose&&this.highlightIndex===this._itemsLength()-1||this.$emit("highlight",this.highlightIndex)},updateInitialHighlightIndex(t){this.isOpen=t,t?(this.openedWithKeyboard&&this.isArrowKeyNav&&this.setHighlightIndex(0),this.$emit("opened",!0)):(this.clearHighlightIndex(),this.openedWithKeyboard=!1,this.$emit("opened",!1))},onSpaceKey(){this.open||(this.openedWithKeyboard=!0)},onEnterKey(){this.open||(this.openedWithKeyboard=!0)},onUpKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onUpKey()},onDownKeyPress(){if(!this.isOpen){this.openedWithKeyboard=!0;return}if(this.isArrowKeyNav)return this.onDownKey()},onHomeKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onHomeKey()},onEndKeyPress(){if(!(!this.isOpen||!this.isArrowKeyNav))return this.onEndKey()},onKeyPress(t){if(!(!this.isOpen||!this.isArrowKeyNav||!this.isValidLetter(t.key)))return t.stopPropagation(),t.preventDefault(),this.onNavigationKey(t.key)}}},eo=["id"];function to(t,a,n,r,i,o){const s=e.resolveComponent("sr-only-close-button"),d=e.resolveComponent("dt-popover");return e.openBlock(),e.createBlock(d,e.mergeProps({ref:"popover","content-width":n.contentWidth,open:n.open,placement:n.placement,"initial-focus-element":i.openedWithKeyboard?"first":"dialog","fallback-placements":n.fallbackPlacements,padding:"none",role:"menu","append-to":n.appendTo,modal:n.modal,"max-height":n.maxHeight,"max-width":n.maxWidth,"open-with-arrow-keys":o.shouldOpenWithArrowKeys,"open-on-context":n.openOnContext},t.$attrs,{tether:n.tether,transition:n.transition},e.toHandlers(o.dropdownListeners)),{anchor:e.withCtx(({attrs:l})=>[e.renderSlot(t.$slots,"anchor",e.mergeProps({ref:"anchor"},l))]),content:e.withCtx(({close:l})=>[e.createElementVNode("ul",{id:n.listId,ref:"listWrapper",class:e.normalizeClass(o.listClasses),"data-qa":"dt-dropdown-list-wrapper",onMouseleave:a[0]||(a[0]=(...u)=>o.clearHighlightIndex&&o.clearHighlightIndex(...u)),onMousemoveCapture:a[1]||(a[1]=(...u)=>o.onMouseHighlight&&o.onMouseHighlight(...u))},[e.renderSlot(t.$slots,"list",{close:l}),t.showVisuallyHiddenClose?(e.openBlock(),e.createBlock(s,{key:0,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,tabindex:o.isArrowKeyNav?-1:0,onClose:l},null,8,["visually-hidden-close-label","tabindex","onClose"])):e.createCommentVNode("",!0)],42,eo)]),_:3},16,["content-width","open","placement","initial-focus-element","fallback-placements","append-to","modal","max-height","max-width","open-with-arrow-keys","open-on-context","tether","transition"])}const sn=c._export_sfc(Ja,[["render",to]]),no={name:"DtDropdownSeparator"},ao={"aria-hidden":"true",class:"dt-list-separator"};function oo(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("li",ao)}const ro=c._export_sfc(no,[["render",oo]]),io=function(){const t=e.ref(null);let a,n,r=null,i=null;function o(l){if(i){const u=Date.now()-r+100;a&&clearTimeout(a),i!==l&&(a=setTimeout(()=>{t.value!==null&&(r=Date.now()),t.value=null},u),n&&clearTimeout(n),n=setTimeout(()=>{t.value=l,i=l},u))}else n=setTimeout(()=>{t.value=l,i=l},c.TOOLTIP_DELAY_MS)}function s(){n&&(clearTimeout(n),n=null),r=Date.now(),a=setTimeout(()=>{t.value=null,i=null},c.TOOLTIP_DELAY_MS)}let d=null;return()=>(d===null&&(d={current:t,enter:o,leave:s}),d)}(),so={__name:"hovercard",props:{transition:{type:Boolean,default:!1},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"top-start",validator(t){return c.TOOLTIP_DIRECTIONS.includes(t)}},padding:{type:String,default:"large",validator:t=>Object.keys(_.POPOVER_PADDING_CLASSES).some(a=>a===t)},offset:{type:Array,default:()=>[0,16]},id:{type:String,default(){return c.getUniqueString()}},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""},dialogClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement}},emits:["opened"],setup(t){const a=e.reactive(io());return(n,r)=>(e.openBlock(),e.createBlock(e.unref(_.DtPopover),{id:t.id,placement:t.placement,"content-class":t.contentClass,"fallback-placements":t.fallbackPlacements,padding:t.padding,transition:t.transition?"fade":null,offset:t.offset,modal:!1,"initial-focus-element":"none","header-class":t.headerClass,"footer-class":t.footerClass,"append-to":t.appendTo,hovercard:!0,timer:a,"data-qa":"dt-hovercard",onOpened:r[0]||(r[0]=i=>n.$emit("opened",i))},{anchor:e.withCtx(({attrs:i})=>[e.renderSlot(n.$slots,"anchor",e.normalizeProps(e.guardReactiveProps(i)))]),content:e.withCtx(()=>[e.renderSlot(n.$slots,"content")]),headerContent:e.withCtx(()=>[e.renderSlot(n.$slots,"headerContent")]),footerContent:e.withCtx(()=>[e.renderSlot(n.$slots,"footerContent")]),_:3},8,["id","placement","content-class","fallback-placements","padding","transition","offset","header-class","footer-class","append-to","timer"]))}},lo={name:"DtImageViewer",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},mixins:[_.Modal],props:{open:{type:Boolean,default:null},imageSrc:{type:String,required:!0},imageAlt:{type:String,required:!0},imageButtonClass:{type:String,required:!1,default:""},ariaLabel:{type:String,required:!0},closeAriaLabel:{type:String,required:!0}},emits:["opened","update:open"],data(){return{showCloseButton:!0,isOpen:!1}},computed:{modalListeners(){return{click:t=>{t.target===t.currentTarget&&this.close()},keydown:t=>{switch(t.code){case c.EVENT_KEYNAMES.esc:case c.EVENT_KEYNAMES.escape:this.close();break;case c.EVENT_KEYNAMES.tab:this.trapFocus(t);break}}}}},watch:{isOpen:{immediate:!0,handler(t){var a;t?this.previousActiveElement=document.activeElement:((a=this.previousActiveElement)==null||a.focus(),this.previousActiveElement=null)}},open:{handler:function(t){t!==null&&(this.isOpen=t)},immediate:!0}},methods:{openModal(){this.open===null&&(this.isOpen=!0,this.showCloseButton=!0,this.$emit("opened",!0),setTimeout(()=>{this.focusAfterOpen()}))},close(){this.isOpen=!1,this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},focusAfterOpen(){var t;(t=this.$refs.closeImage)==null||t.$el.focus()},trapFocus(t){this.isOpen&&this.focusTrappedTabPress(t)}}},co=["src","alt"],uo=["aria-hidden"],ho={"data-qa":"dt-image-viewer-full",class:"d-image-viewer__full",role:"dialog","aria-modal":"true"},mo=["src","alt"];function fo(t,a,n,r,i,o){const s=e.resolveComponent("dt-button"),d=e.resolveComponent("dt-icon");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(s,{"data-qa":"dt-image-viewer-preview",class:"d-image-viewer__preview-button","aria-label":n.ariaLabel,importance:"clear",onClick:o.openModal},{default:e.withCtx(()=>[e.createElementVNode("img",{class:e.normalizeClass(n.imageButtonClass),src:n.imageSrc,alt:n.imageAlt},null,10,co)]),_:1},8,["aria-label","onClick"]),i.isOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createElementVNode("div",e.mergeProps({"aria-hidden":i.isOpen?"false":"true",class:"d-modal","data-qa":"dt-modal"},e.toHandlers(o.modalListeners,!0),{onMouseover:a[0]||(a[0]=l=>i.showCloseButton=!0),onMouseleave:a[1]||(a[1]=l=>i.showCloseButton=!1),onFocusin:a[2]||(a[2]=l=>i.showCloseButton=!0),onFocusout:a[3]||(a[3]=l=>i.showCloseButton=!1)}),[e.createElementVNode("div",ho,[e.createElementVNode("img",{class:"d-image-viewer__full__image",src:n.imageSrc,alt:n.imageAlt},null,8,mo)]),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.showCloseButton?(e.openBlock(),e.createBlock(s,{key:0,ref:"closeImage","data-qa":"dt-image-viewer-close-btn",class:"d-modal__close",circle:"",size:"lg",importance:"clear",kind:"inverted","aria-label":n.closeAriaLabel,onClick:o.close},{icon:e.withCtx(()=>[e.createVNode(d,{class:"d-image-viewer__close-button",name:"close",size:"400"})]),_:1},8,["aria-label","onClick"])):e.createCommentVNode("",!0)]),_:1})],16,uo)])):e.createCommentVNode("",!0)])}const ln=c._export_sfc(lo,[["render",fo]]),dn={components:{DtValidationMessages:m.DtValidationMessages},provide(){return{groupContext:this.provideObj,setGroupValue:this.setGroupValue}},props:{id:{type:String,default(){return c.getUniqueString()}},value:{type:[String,Number,Boolean,Object],default:null},name:{type:String,required:!0},legend:{type:String,default:""},disabled:{type:Boolean,default:!1},messages:{type:Array,default:()=>[],validator:t=>m.validationMessageValidator(t)},showMessages:{type:Boolean,default:!0},legendClass:{type:[String,Array,Object],default:""},messagesClass:{type:[String,Array,Object],default:""},legendChildProps:{type:Object,default:()=>({})},messagesChildProps:{type:Object,default:()=>({})}},emits:["input"],data(){const t=c.formatMessages(this.messages);return{provideObj:{name:this.name,disabled:this.disabled,validationState:c.getValidationState(t)}}},computed:{formattedMessages(){return c.formatMessages(this.messages)},validationState(){return c.getValidationState(this.formattedMessages)}},watch:{disabled(t){this.provideObj.disabled=t},validationState(t){this.provideObj.validationState=t}},methods:{setGroupValue(t){this.internalValue=t,this.$emit("input",t)}},mounted(){!this.legend&&!this.$slots.legend&&!this.$attrs["aria-label"]&&e.warn("It is expected that an aria-label is provided when there is no legend.",this)}},po={name:"DtInputGroup",components:{DtValidationMessages:m.DtValidationMessages},mixins:[dn],props:{dataQaGroup:{type:String,default:"input-group"},dataQaGroupLegend:{type:String,default:"input-group-legend"},dataQaGroupMessages:{type:String,default:"input-group-messages"}},data(){return{internalValue:this.value,hasSlotContent:c.hasSlotContent}},watch:{value(t){this.internalValue=t},internalValue:{immediate:!0,handler(t){this.provideObj.value=t}}},methods:{getMessageKey(t,a){return`input-group-message-${t}-${a}-${this.id}`}}},go=["data-qa"],_o=["data-qa"];function bo(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("fieldset",{class:"d-input-group__fieldset","data-qa":n.dataQaGroup},[i.hasSlotContent(t.$slots.legend)||t.legend?(e.openBlock(),e.createElementBlock("legend",e.mergeProps({key:0,class:["d-label",t.legendClass]},t.legendChildProps,{"data-qa":n.dataQaGroupLegend}),[e.renderSlot(t.$slots,"legend",{},()=>[e.createTextVNode(e.toDisplayString(t.legend),1)])],16,_o)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default"),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass,"data-qa":n.dataQaGroupMessages},t.messagesChildProps),null,16,["validation-messages","show-messages","class","data-qa"])],8,go)}const yt=c._export_sfc(po,[["render",bo]]),nt={default:"",danger:"d-modal--danger"},at={default:"",full:"d-modal--full"},ot={error:"d-modal__banner--critical",info:"d-modal__banner--info",success:"d-modal__banner--success",warning:"d-modal__banner--warning",base:"d-modal__banner--general"},vo={name:"DtModal",components:{DtLazyShow:c.DtLazyShow,DtButton:m.DtButton,DtIcon:m.DtIcon,SrOnlyCloseButton:_.SrOnlyCloseButton},mixins:[_.Modal,_.SrOnlyCloseButtonMixin],props:{closeButtonProps:{type:Object,required:!0,validator:t=>!!t.ariaLabel},copy:{type:String,default:""},describedById:{type:String,default:""},labelledById:{type:String,default:function(){return c.getUniqueString()}},show:{type:Boolean,default:!1},title:{type:String,default:""},bannerTitle:{type:String,default:""},kind:{type:String,default:"default",validator:t=>Object.keys(nt).includes(t)},size:{type:String,default:"default",validator:t=>Object.keys(at).includes(t)},modalClass:{type:[String,Object,Array],default:""},dialogClass:{type:[String,Object,Array],default:""},contentClass:{type:[String,Object,Array],default:""},bannerKind:{type:String,default:"warning",validate(t){return ue.includes(t)}},bannerClass:{type:[String,Object,Array],default:""},hideClose:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},fixedHeaderFooter:{type:Boolean,default:!0}},emits:["click","keydown","update:show"],data(){return{MODAL_KIND_MODIFIERS:nt,MODAL_SIZE_MODIFIERS:at,MODAL_BANNER_KINDS:ot,EVENT_KEYNAMES:c.EVENT_KEYNAMES,hasSlotContent:c.hasSlotContent}},computed:{modalListeners(){return{click:t=>{this.closeOnClick&&(t.target===t.currentTarget&&this.close(),this.$emit("click",t))},keydown:t=>{switch(t.code){case c.EVENT_KEYNAMES.esc:case c.EVENT_KEYNAMES.escape:this.close();break;case c.EVENT_KEYNAMES.tab:this.trapFocus(t);break}this.$emit("keydown",t)},"after-enter":t=>{t.target===t.currentTarget&&this.setFocusAfterTransition()}}},open(){return`${!this.show}`},hasFooterSlot(){return!!this.$slots.footer},bannerKindClass(){return ot[this.bannerKind]}},watch:{show:{immediate:!0,handler(t){var a;t?this.previousActiveElement=document.activeElement:((a=this.previousActiveElement)==null||a.focus(),this.previousActiveElement=null)}},$props:{immediate:!0,deep:!0,handler(){this.validateProps()}}},methods:{close(){this.$emit("update:show",!1)},setFocusAfterTransition(){this.focusFirstElement()},trapFocus(t){this.show&&this.focusTrappedTabPress(t)},validateProps(){this.hideClose&&!this.visuallyHiddenClose&&console.error(`If hideClose prop is true, visuallyHiddenClose and visuallyHiddenCloseLabel props
5
- need to be set so the component always includes a close button`)}}},yo=["aria-describedby","aria-labelledby"],So=["id"],Co=["id"],ko={key:4,class:"d-modal__footer"};function wo(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("sr-only-close-button"),u=e.resolveComponent("dt-lazy-show");return e.openBlock(),e.createBlock(u,e.mergeProps({transition:"d-zoom",show:n.show,class:["d-modal",i.MODAL_KIND_MODIFIERS[n.kind],i.MODAL_SIZE_MODIFIERS[n.size],n.modalClass],"data-qa":"dt-modal","aria-hidden":o.open},e.toHandlers(o.modalListeners)),{default:e.withCtx(()=>[n.show&&(i.hasSlotContent(t.$slots.banner)||n.bannerTitle)?(e.openBlock(),e.createElementBlock("div",{key:0,"data-qa":"dt-modal-banner",class:e.normalizeClass(["d-modal__banner",n.bannerClass,o.bannerKindClass])},[e.renderSlot(t.$slots,"banner",{},()=>[e.createTextVNode(e.toDisplayString(n.bannerTitle),1)])],2)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{appear:"",name:"d-modal__dialog"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["d-modal__dialog",{"d-modal__dialog--scrollable":n.fixedHeaderFooter},n.dialogClass]),role:"dialog","aria-modal":"true","aria-describedby":n.describedById,"aria-labelledby":n.labelledById},[i.hasSlotContent(t.$slots.header)?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.labelledById,class:"d-modal__header","data-qa":"dt-modal-title"},[e.renderSlot(t.$slots,"header")],8,So)):(e.openBlock(),e.createElementBlock("h2",{key:1,id:n.labelledById,class:"d-modal__header","data-qa":"dt-modal-title"},e.toDisplayString(n.title),9,Co)),i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-modal__content",n.contentClass]),"data-qa":"dt-modal-copy"},[e.renderSlot(t.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("p",{key:3,class:e.normalizeClass(["d-modal__content",n.contentClass]),"data-qa":"dt-modal-copy"},e.toDisplayString(n.copy),3)),o.hasFooterSlot?(e.openBlock(),e.createElementBlock("footer",ko,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0),n.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,e.mergeProps({key:5,class:"d-modal__close",circle:"",size:"lg",importance:"clear","aria-label":n.closeButtonProps.ariaLabel},n.closeButtonProps,{onClick:o.close}),{icon:e.withCtx(()=>[e.createVNode(s,{name:"close",size:"400"})]),_:1},16,["aria-label","onClick"])),t.showVisuallyHiddenClose?(e.openBlock(),e.createBlock(l,{key:6,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:o.close},null,8,["visually-hidden-close-label","onClose"])):e.createCommentVNode("",!0)],10,yo),[[e.vShow,n.show]])]),_:3})]),_:3},16,["show","class","aria-hidden"])}const Eo=c._export_sfc(vo,[["render",wo]]),Io={name:"DtListItemGroup",props:{id:{type:String,default(){return c.getUniqueString()}},heading:{type:String,default:""},headingClass:{type:[String,Array,Object],default:""},listClass:{type:[String,Array,Object],default:""}}},Do=["id","aria-labelledby"],To=["id"];function Oo(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("ul",{id:n.id,class:e.normalizeClass(["d-list-item-group",n.listClass]),role:"group","data-qa":"dt-dropdown-list-wrapper","aria-labelledby":`${n.id}-heading`},[n.heading?(e.openBlock(),e.createElementBlock("li",{key:0,id:`${n.id}-heading`,role:"presentation","data-qa":"dt-dropdown-list-heading",class:e.normalizeClass(["dt-dropdown-list--header",n.headingClass])},[e.renderSlot(t.$slots,"headingSlot",{},()=>[e.createTextVNode(e.toDisplayString(n.heading),1)])],10,To)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")],10,Do)}const Bo=c._export_sfc(Io,[["render",Oo]]),No={name:"DtPagination",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},props:{ariaLabel:{type:String,required:!0},totalPages:{type:Number,required:!0},prevAriaLabel:{type:String,required:!0},nextAriaLabel:{type:String,required:!0},pageNumberAriaLabel:{type:Function,required:!0},activePage:{type:Number,default:1},maxVisible:{type:Number,default:5}},emits:["change"],data(){return{currentPage:this.activePage}},computed:{isFirstPage(){return this.currentPage===1},isLastPage(){return this.currentPage===this.totalPages},pages(){if(this.maxVisible===0)return[];if(this.totalPages<=this.maxVisible)return this.range(1,this.totalPages);const t=this.maxVisible-1,a=this.totalPages-t+1;if(this.currentPage<t)return[...this.range(1,t),"...",this.totalPages];if(this.currentPage>a)return[1,"...",...this.range(a,this.totalPages)];const n=this.maxVisible-(3-this.maxVisible%2),r=Math.floor(n/2),i=this.currentPage-r,o=this.currentPage+r;return[1,"...",...this.range(i,o),"...",this.totalPages]}},methods:{range(t,a){const n=[];t=t>0?t:1;for(let r=t;r<=a;r++)n.push(r);return n},changePage(t){this.currentPage=t,this.$emit("change",this.currentPage)}}},Lo=["aria-label"],Ao={key:0,class:"d-pagination__separator-icon","data-qa":"dt-pagination-separator"};function xo(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("nav",{"aria-label":n.ariaLabel,class:"d-pagination"},[e.createVNode(d,{class:e.normalizeClass(["d-pagination__button",o.isFirstPage?"d-fc-black-300 d-bgc-transparent":"d-fc-tertiary"]),"data-qa":"dt-pagination-prev","aria-label":n.prevAriaLabel,kind:o.isFirstPage?"default":"muted",importance:o.isFirstPage?"primary":"clear",disabled:o.isFirstPage,onClick:a[0]||(a[0]=l=>o.changePage(i.currentPage-1))},{icon:e.withCtx(()=>[e.createVNode(s,{name:"chevron-left",size:"300"})]),_:1},8,["aria-label","kind","importance","disabled","class"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.pages,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:`page-${l}-${u}`,class:e.normalizeClass({"d-pagination__separator":isNaN(Number(l))})},[isNaN(Number(l))?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode(s,{name:"more-horizontal",size:"300"})])):(e.openBlock(),e.createBlock(d,{key:1,"aria-label":n.pageNumberAriaLabel(l),kind:i.currentPage===l?"default":"muted",importance:i.currentPage===l?"primary":"clear","label-class":"",onClick:f=>o.changePage(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1032,["aria-label","kind","importance","onClick"]))],2))),128)),e.createVNode(d,{class:e.normalizeClass(["d-pagination__button",o.isLastPage?"d-fc-black-300 d-bgc-transparent":"d-fc-tertiary"]),"data-qa":"dt-pagination-next","aria-label":n.nextAriaLabel,disabled:o.isLastPage,kind:"muted",importance:o.isLastPage?"primary":"clear",onClick:a[1]||(a[1]=l=>o.changePage(i.currentPage+1))},{icon:e.withCtx(()=>[e.createVNode(s,{name:"chevron-right",size:"300"})]),_:1},8,["aria-label","disabled","importance","class"])],8,Lo)}const Mo=c._export_sfc(No,[["render",xo]]),cn={warning:"d-radio--warning",error:"d-radio--error",success:"d-radio--success"},Po={name:"DtRadio",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.InputMixin,m.CheckableMixin,m.GroupableMixin,m.MessagesMixin],inheritAttrs:!1,props:{value:{type:[String,Number],default:""}},emits:["input","focus","focusin","focusout","click"],data(){return{hasSlotContent:c.hasSlotContent}},computed:{inputValidationClass(){return cn[this.internalValidationState]},radioGroupValue(){var t;return(t=this.groupContext)==null?void 0:t.selectedValue},inputListeners(){return{input:()=>{},focusin:t=>this.$emit("focusin",t),focusout:t=>this.$emit("focusout",t),change:t=>this.emitValue(t.target.value)}}},watch:{radioGroupValue:{immediate:!0,handler(t){this.hasGroup&&(this.internalChecked=t===this.value)}}},methods:{emitValue(t){t!==this.radioGroupValue&&(this.setGroupValue(t),this.$emit("input",t))}}},Vo={class:"d-radio__input"},Ro=["checked","name","value","disabled"],$o={class:"d-radio__copy d-radio__label","data-qa":"radio-label-description-container"};function zo(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[e.createElementVNode("div",{class:e.normalizeClass(["d-radio-group",{"d-radio-group--disabled":t.internalDisabled}])},[e.createElementVNode("div",Vo,[e.createElementVNode("input",e.mergeProps({checked:t.internalChecked,name:t.internalName,value:n.value,disabled:t.internalDisabled,type:"radio",class:["d-radio",o.inputValidationClass,t.inputClass]},t.$attrs,e.toHandlers(o.inputListeners,!0)),null,16,Ro)]),e.createElementVNode("div",$o,[e.createElementVNode("div",e.mergeProps({class:t.labelClass},t.labelChildProps,{"data-qa":"radio-label"}),[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],16),t.$slots.description||t.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:["d-description",t.descriptionClass]},t.descriptionChildProps,{"data-qa":"radio-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],16)):e.createCommentVNode("",!0),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-radio-validation-messages"}),null,16,["validation-messages","show-messages","class"])])],2)])])}const Fo=c._export_sfc(Po,[["render",zo]]),qo={name:"DtRadioGroup",extends:yt,props:{value:{type:[String,Number],default:""},dataQaGroup:{type:String,default:"radio-group"},dataQaGroupLegend:{type:String,default:"radio-group-legend"},dataQaGroupMessages:{type:String,default:"radio-group-messages"}},emits:["input"],data(){return{internalValue:this.value}},watch:{value(t){this.internalValue=t},internalValue:{immediate:!0,handler(t){this.provideObj.selectedValue=t}}},methods:{setGroupValue(t){this.$emit("input",t)},getMessageKey(t,a){return`radio-group-message-${t}-${a}-${this.id}`}}},Ho={name:"DtTabPanel",mixins:[_.Modal],inject:["groupContext"],props:{id:{type:String,required:!0},tabId:{type:String,required:!0},hidden:{type:Boolean,default:!1},tabPanelClass:{type:[String,Array,Object],default:""}},data(){return{isFirstElementFocusable:!1}},computed:{hidePanel(){return this.groupContext.selected!==this.id||this.hidden}},async mounted(){const t=await this.getFirstFocusableElement(this.$el);t?this.isFirstElementFocusable=this.isFirstElementOfPanel(t):this.isFirstElementFocusable=!1},methods:{isFirstElementOfPanel(t){let a=t,n=!0;for(;a;){if(a.previousElementSibling!==null){n=!1;break}a=a.parentNode!==this.$el?a.parentNode:null}return n}}},Uo=["id","tabindex","aria-labelledby","aria-hidden"];function Wo(t,a,n,r,i,o){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{id:`dt-panel-${n.id}`,role:"tabpanel",tabindex:i.isFirstElementFocusable?-1:0,"aria-labelledby":`dt-tab-${n.tabId}`,"aria-hidden":`${o.hidePanel}`,class:e.normalizeClass(n.tabPanelClass),"data-qa":"dt-tab-panel"},[e.renderSlot(t.$slots,"default")],10,Uo)),[[e.vShow,!o.hidePanel]])}const Ko=c._export_sfc(Ho,[["render",Wo]]),jo={error:"d-checkbox--error",warning:"d-checkbox--warning",success:"d-checkbox--success"},Yo={name:"DtCheckbox",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.InputMixin,m.CheckableMixin,m.GroupableMixin,m.MessagesMixin],inheritAttrs:!1,emits:["input","focusin","focusout"],computed:{inputValidationClass(){return jo[this.internalValidationState]},checkboxGroupValueChecked(){var t,a;return((a=(t=this.groupContext)==null?void 0:t.selectedValues)==null?void 0:a.includes(this.value))??!1},hasLabel(){return!!(this.$slots.default||this.label)},hasDescription(){return!!(this.$slots.description||this.description)},hasLabelOrDescription(){return this.hasLabel||this.hasDescription},inputListeners(){return{input:()=>{},focusin:t=>this.$emit("focusin",t),focusout:t=>this.$emit("focusout",t),change:t=>this.emitValue(t.target)}}},watch:{checkboxGroupValueChecked:{immediate:!0,handler(t){this.hasGroup&&(this.internalChecked=t)}}},mounted(){this.runValidations()},methods:{emitValue(t){let{value:a,checked:n}=t;this.internalIndeterminate&&(n=!1,this.internalIndeterminate=!1,t.checked=!1),this.setGroupValue(a,n),this.$emit("input",n)},runValidations(){this.validateInputLabels(this.hasLabel,this.$attrs["aria-label"])}}},Go={class:"d-checkbox__input"},Qo=["checked","name","value","disabled",".indeterminate"],Zo={key:0,class:"d-checkbox__copy d-checkbox__label","data-qa":"checkbox-label-description-container"};function Xo(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[e.createElementVNode("div",{class:e.normalizeClass(["d-checkbox-group",{"d-checkbox-group--disabled":t.internalDisabled}])},[e.createElementVNode("div",Go,[e.createElementVNode("input",e.mergeProps({type:"checkbox",checked:t.internalChecked,name:t.internalName,value:t.value,disabled:t.internalDisabled,class:["d-checkbox",o.inputValidationClass,t.inputClass]},t.$attrs,{".indeterminate":t.internalIndeterminate},e.toHandlers(o.inputListeners,!0)),null,16,Qo)]),o.hasLabelOrDescription?(e.openBlock(),e.createElementBlock("div",Zo,[o.hasLabel?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:t.labelClass},t.labelChildProps,{"data-qa":"checkbox-label"}),[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],16)):e.createCommentVNode("",!0),o.hasDescription?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:["d-description",t.descriptionClass]},t.descriptionChildProps,{"data-qa":"checkbox-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],16)):e.createCommentVNode("",!0),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-checkbox-validation-messages"}),null,16,["validation-messages","show-messages","class"])])):e.createCommentVNode("",!0)],2)])])}const Jo=c._export_sfc(Yo,[["render",Xo]]),er={name:"DtCheckboxGroup",extends:yt,model:{prop:"selectedValues"},props:{value:{type:[],default:null,validator:t=>t?(e.warn("Component uses selectedValues to initialize the model, value is not supported by this component",void 0),!1):!0},selectedValues:{type:Array,default(){return[]}},dataQaGroup:{type:String,default:"checkbox-group"},dataQaGroupLegend:{type:String,default:"checkbox-group-legend"},dataQaGroupMessages:{type:String,default:"checkbox-group-messages"}},emits:["input"],data(){return{internalValue:this.selectedValues}},watch:{selectedValues(t){this.internalValue=t},internalValue:{immediate:!0,handler(t){this.provideObj.selectedValues=t}}},methods:{setGroupValue(t,a){a?this.internalValue.includes(t)||this.internalValue.push(t):this.internalValue=this.internalValue.filter(n=>n!==t),this.$emit("input",this.internalValue)},getMessageKey(t,a){return`checkbox-group-message-${t}-${a}-${this.id}`}}},rt={xs:"d-chip__label--xs",sm:"d-chip__label--sm",md:""},un={xs:"d-chip__close--xs",sm:"d-chip__close--sm",md:""},hn={xs:"200",sm:"200",md:"200"},tr={name:"DtChip",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},props:{closeButtonProps:{type:Object,default:function(){return{ariaLabel:"close"}},validator:t=>!!t.ariaLabel},hideClose:{type:Boolean,default:!1},size:{type:String,default:"md",validator:t=>Object.keys(rt).includes(t)},interactive:{type:Boolean,default:!0},id:{type:String,default:function(){return c.getUniqueString()}},ariaLabel:{type:String,default:""},contentClass:{type:[String,Array,Object],default:""},labelClass:{type:[String,Array,Object],default:""}},emits:["click","close","keyup"],data(){return{isActive:!1,hasSlotContent:c.hasSlotContent}},computed:{chipListeners(){return{click:t=>{this.interactive&&this.$emit("click",t)},keyup:t=>{var a;((a=t.code)==null?void 0:a.toLowerCase())==="delete"?this.onClose():this.$emit("keyup",t)}}},closeButtonIconSize(){return hn[this.size]}},methods:{chipClasses(){return[this.$attrs["grouped-chip"]?"d-chip":"d-chip__label",rt[this.size],this.labelClass]},chipCloseButtonClasses(){return["d-chip__close",un[this.size]]},onClose(){this.hideClose||this.$emit("close")}}},nr={class:"d-chip"},ar={key:0,"data-qa":"dt-chip-icon",class:"d-chip__icon"},or={key:1,"data-qa":"dt-chip-avatar"},rr=["id"];function ir(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("span",nr,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.interactive?"button":"span"),e.mergeProps({id:n.id,type:n.interactive&&"button",class:o.chipClasses(),"data-qa":"dt-chip","aria-labelledby":n.ariaLabel?void 0:`${n.id}-content`,"aria-label":n.ariaLabel},e.toHandlers(o.chipListeners)),{default:e.withCtx(()=>[i.hasSlotContent(t.$slots.icon)?(e.openBlock(),e.createElementBlock("span",ar,[e.renderSlot(t.$slots,"icon")])):i.hasSlotContent(t.$slots.avatar)?(e.openBlock(),e.createElementBlock("span",or,[e.renderSlot(t.$slots,"avatar")])):e.createCommentVNode("",!0),i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("span",{key:2,id:`${n.id}-content`,"data-qa":"dt-chip-label",class:e.normalizeClass(["d-chip__text",n.contentClass])},[e.renderSlot(t.$slots,"default")],10,rr)):e.createCommentVNode("",!0)]),_:3},16,["id","type","class","aria-labelledby","aria-label"])),n.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,e.mergeProps({key:0},n.closeButtonProps,{class:o.chipCloseButtonClasses(),"data-qa":"dt-chip-close","aria-label":n.closeButtonProps.ariaLabel,onClick:a[0]||(a[0]=l=>t.$emit("close"))}),{icon:e.withCtx(()=>[e.createVNode(s,{name:"close",size:o.closeButtonIconSize},null,8,["size"])]),_:1},16,["class","aria-label"]))])}const St=c._export_sfc(tr,[["render",ir]]),it={xs:"d-select--xs",sm:"d-select--sm",md:"",lg:"d-select--lg",xl:"d-select--xl"},mn={error:"d-select__input--error",warning:"d-select__input--warning",success:"d-select__input--success"},sr=t=>!t.index||typeof t.index=="number",lr=t=>t.value?typeof t.value=="string"||typeof t.value=="number":!1,dr=t=>t.label?typeof t.label=="string":!1,cr=t=>t?t.every(a=>!(!sr(a)||!lr(a)||!dr(a))):!0,ur={name:"DtSelectMenu",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.MessagesMixin],inheritAttrs:!1,props:{label:{type:String,default:""},description:{type:String,default:""},options:{type:Array,default:()=>[],validator:t=>cr(t)},size:{type:String,default:"md",validator:t=>Object.keys(it).includes(t)},labelClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""},selectClass:{type:[String,Array,Object],default:""},optionClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})},optionChildProps:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},emits:["input","change"],data(){return{LABEL_SIZE_MODIFIERS:c.LABEL_SIZE_MODIFIERS,DESCRIPTION_SIZE_MODIFIERS:c.DESCRIPTION_SIZE_MODIFIERS,SELECT_SIZE_MODIFIERS:it,SELECT_STATE_MODIFIERS:mn,hasSlotContent:c.hasSlotContent}},computed:{selectListeners(){return{input:()=>{},change:t=>this.emitValue(t.target.value,t)}},state(){return c.getValidationState(this.formattedMessages)},selectKey(){return c.getUniqueString()},descriptionKey(){return`select-${this.selectKey}-description`},labelAriaDetails(){return this.$slots.description||this.description?this.descriptionKey:this.$attrs["aria-details"]}},watch:{options(){this.$nextTick(()=>{this.emitValue(this.$refs.selectElement.value,null)})}},mounted(){this.emitValue(this.$refs.selectElement.value,null),this.validateOptionsPresence()},beforeUpdate(){this.validateOptionsPresence()},methods:{emitValue(t,a){this.$emit("input",t,a),this.$emit("change",t,a)},getOptionKey(t){return`select-${this.selectKey}-option-${t}`},validateOptionsPresence(){var t;((t=this.options)==null?void 0:t.length)<1&&!this.$slots.default&&e.warn("Options are expected to be provided via prop or slot",this)}}},hr=["aria-details"],mr=["id"],fr=["disabled"],pr=["value"];function gr(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[i.hasSlotContent(t.$slots.label)||n.label?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,"aria-details":o.labelAriaDetails,class:["d-label",i.LABEL_SIZE_MODIFIERS[n.size],n.labelClass]},n.labelChildProps,{"data-qa":"dt-select-label"}),[e.renderSlot(t.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],16,hr)):e.createCommentVNode("",!0),i.hasSlotContent(t.$slots.description)||n.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,id:o.descriptionKey,class:["d-description",i.DESCRIPTION_SIZE_MODIFIERS[n.size],n.descriptionClass]},n.descriptionChildProps,{"data-qa":"dt-select-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])],16,mr)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["d-select",i.SELECT_SIZE_MODIFIERS[n.size],n.selectClass,{"d-select--disabled":n.disabled}]),"data-qa":"dt-select-wrapper"},[e.createElementVNode("select",e.mergeProps({ref:"selectElement",class:["d-select__input",i.SELECT_STATE_MODIFIERS[o.state]]},t.$attrs,{"data-qa":"dt-select",disabled:n.disabled},e.toHandlers(o.selectListeners,!0)),[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,d=>(e.openBlock(),e.createElementBlock("option",e.mergeProps({key:o.getOptionKey(d.value),value:d.value,class:n.optionClass},n.optionChildProps),e.toDisplayString(d.label),17,pr))),128))])],16,fr)],2)]),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-select-messages"}),null,16,["validation-messages","show-messages","class"])])}const _r=c._export_sfc(ur,[["render",gr]]),fn=["status","alert"],st=6e3,br={name:"DtToast",components:{DtNoticeIcon:xe,DtNoticeContent:Me,DtNoticeAction:Pe},mixins:[_.SrOnlyCloseButtonMixin],props:{titleId:{type:String,default(){return c.utils.getUniqueString()}},contentId:{type:String,default(){return c.utils.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:t=>fn.includes(t)},kind:{type:String,default:"base",validator:t=>ue.includes(t)},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},duration:{type:Number,default:null,validator:t=>t>=st}},emits:["close","click","update:show"],data(){return{isShown:!1,minDuration:st}},computed:{kindClass(){return{error:"d-toast--error",info:"d-toast--info",success:"d-toast--success",warning:"d-toast--warning",base:"d-toast--base"}[this.kind]},shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration}},watch:{show:{handler:function(t){this.isShown=t,t?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},unmounted(){clearTimeout(this.displayTimer)},methods:{closeToast(t){this.$emit("update:show",!1),this.$emit("close",t)},setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit("update:show",!1)},this.duration))}}},vr=["aria-hidden"],yr={class:"d-toast__dialog"};function Sr(t,a,n,r,i,o){const s=e.resolveComponent("dt-notice-icon"),d=e.resolveComponent("dt-notice-content"),l=e.resolveComponent("dt-notice-action");return i.isShown?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-toast",o.kindClass,{"d-toast--important":n.important}]),"data-qa":"dt-toast","aria-hidden":(!i.isShown).toString()},[e.createElementVNode("div",yr,[e.createVNode(s,{kind:n.kind},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["kind"]),e.createVNode(d,{"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},{titleOverride:e.withCtx(()=>[e.renderSlot(t.$slots,"titleOverride")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.message),1)])]),_:3},8,["title-id","content-id","title","role"]),e.createVNode(l,{"hide-close":n.hideClose,"close-button-props":n.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:o.closeToast},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"action")]),_:3},8,["hide-close","close-button-props","visually-hidden-close","visually-hidden-close-label","onClose"])])],10,vr)):e.createCommentVNode("",!0)}const Cr=c._export_sfc(br,[["render",Sr]]),lt={sm:"d-toggle--small",md:""},pn=[!1,!0,"mixed"],kr={name:"DtToggle",inheritAttrs:!1,model:{prop:"checked",event:"change"},props:{id:{type:String,default(){return c.getUniqueString()}},disabled:{type:Boolean,default:!1},checked:{type:[Boolean,String],default:!1,validator:t=>pn.includes(t)},toggleOnClick:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.keys(lt).includes(t)},showIcon:{type:Boolean,default:!0},labelClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})}},emits:["change"],data(){return{internalChecked:this.checked,hasSlotContent:c.hasSlotContent}},computed:{inputListeners(){return{...this.$attrs,onClick:t=>this.toggleCheckedValue()}},isIndeterminate(){return this.internalChecked==="mixed"},toggleRole(){return this.isIndeterminate?"checkbox":"switch"},toggleClasses(){return["d-toggle",lt[this.size],{"d-toggle--checked":this.internalChecked===!0,"d-toggle--disabled":this.disabled,"d-toggle--indeterminate":this.isIndeterminate}]}},watch:{checked(t){this.internalChecked=t}},mounted(){this.runValidations()},methods:{toggleCheckedValue(){this.$emit("change",!this.internalChecked),this.toggleOnClick&&(this.internalChecked=!this.internalChecked)},hasSlotLabel(){return!!this.$slots.default},runValidations(){this.validateInputLabels(this.hasSlotLabel(),this.$attrs["aria-label"])},validateInputLabels(t,a){!t&&!a&&e.warn("You must provide an aria-label when there is no label passed",this)}}},wr={class:"d-toggle-wrapper"},Er=["for"],Ir=["id","role","aria-checked","disabled","aria-disabled"],Dr={key:0,class:"d-toggle__inner"};function Tr(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",wr,[i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("label",e.mergeProps({key:0,class:n.labelClass,for:n.id},n.labelChildProps,{"data-qa":"toggle-label"}),[e.renderSlot(t.$slots,"default")],16,Er)):e.createCommentVNode("",!0),e.createElementVNode("button",e.mergeProps({id:n.id,role:o.toggleRole,type:"button","aria-checked":i.internalChecked.toString(),disabled:n.disabled,"aria-disabled":n.disabled.toString(),class:o.toggleClasses},o.inputListeners),[n.showIcon?(e.openBlock(),e.createElementBlock("span",Dr)):e.createCommentVNode("",!0)],16,Ir)])}const Or=c._export_sfc(kr,[["render",Tr]]),le={"{win}":"layout-grid","{arrow-right}":"arrow-right","{arrow-left}":"arrow-left","{arrow-up}":"arrow-up","{arrow-down}":"arrow-down","{cmd}":"command"},gn={"{plus}":"plus"},Br=Object.keys(le),Nr={name:"DtKeyboardShortcut",components:{DtIcon:m.DtIcon},props:{inverted:{type:Boolean,default:!1},shortcut:{type:String,required:!0},screenReaderText:{type:String,default:null}},data(){return{SHORTCUTS_ICON_ALIASES:le,separator:/\+/gi}},computed:{icons(){return{...le,...gn}},shortcutWithSeparator(){return this.shortcut.replace(this.separator,"{plus}")},formattedShortcut(){return Object.keys(le).reduce((t,a)=>t.replace(new RegExp("{"+a+"}","gi"),le[a]),this.shortcutWithSeparator)},formattedShortcutSplit(){const t=Object.keys(this.icons).join("|"),a=new RegExp(`(${t})`,"gi");return this.formattedShortcut.split(a).filter(Boolean)}}},Lr={key:0,class:"sr-only"},Ar=["innerHTML"];function xr(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return e.openBlock(),e.createElementBlock("kbd",{class:e.normalizeClass(["d-keyboard-shortcut",{"d-keyboard-shortcut--inverted":n.inverted}])},[n.screenReaderText?(e.openBlock(),e.createElementBlock("span",Lr,e.toDisplayString(n.screenReaderText),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formattedShortcutSplit,(d,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.icons[d]?(e.openBlock(),e.createBlock(s,{key:`${l}-${d}`,name:o.icons[d],size:"100","aria-hidden":"true",class:e.normalizeClass(["d-keyboard-shortcut__icon",{"d-keyboard-shortcut__icon--inverted":n.inverted}])},null,8,["name","class"])):(e.openBlock(),e.createElementBlock("span",{key:`${l}-${d}`,"aria-hidden":"true",class:e.normalizeClass(["d-keyboard-shortcut__item",{"d-keyboard-shortcut__item--inverted":n.inverted}]),innerHTML:d},null,10,Ar))],64))),256))],2)}const Mr=c._export_sfc(Nr,[["render",xr]]),dt={LEFT:"left",RIGHT:"right"},_n=["sm","md","lg",null],Pr={name:"DtRootLayout",props:{fixed:{type:Boolean,default:!0},headerClass:{type:[String,Array,Object],default:""},headerHeight:{type:String,default:"64px"},headerSticky:{type:Boolean,default:!1},bodyClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},sidebarClass:{type:[String,Array,Object],default:""},sidebarWidth:{type:String,default:"256px"},sidebarPosition:{type:String,default:"left",validator:t=>Object.values(dt).includes(t)},footerClass:{type:[String,Array,Object],default:""},footerHeight:{type:String,default:"64px"},responsiveBreakpoint:{type:String,default:null,validator:t=>_n.includes(t)}},computed:{isInverted(){return this.sidebarPosition===dt.RIGHT}}};function Vr(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["root-layout","d-root-layout",{"d-root-layout--fixed":n.fixed,"d-root-layout--inverted":o.isInverted,[`d-root-layout__responsive--${n.responsiveBreakpoint}`]:!!n.responsiveBreakpoint}]),"data-qa":"dt-root-layout"},[e.createElementVNode("header",{class:e.normalizeClass(["d-root-layout__header",{"d-root-layout__header--sticky":n.headerSticky},n.headerClass]),"data-qa":"dt-root-layout-header"},[e.renderSlot(t.$slots,"header")],2),e.createElementVNode("aside",{ref:"root-layout-sidebar",tabindex:"0",class:e.normalizeClass(["d-root-layout__sidebar",n.sidebarClass]),"data-qa":"dt-root-layout-sidebar"},[e.renderSlot(t.$slots,"sidebar")],2),e.createElementVNode("main",{ref:"root-layout-content",class:e.normalizeClass(["d-root-layout__content",n.contentClass]),"data-qa":"dt-root-layout-content",tabindex:"0"},[e.renderSlot(t.$slots,"default")],2),e.createElementVNode("footer",{class:e.normalizeClass(["d-root-layout__footer",n.footerClass]),"data-qa":"dt-root-layout-footer"},[e.renderSlot(t.$slots,"footer")],2)],2)}const Rr=c._export_sfc(Pr,[["render",Vr]]),bn={__name:"core_scroller",props:{items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},buffer:{type:Number,default:200},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["user-position"],setup(t,{expose:a,emit:n}){const r=t,i=n,o=e.reactive(new Map),s=e.reactive(new Map),d=e.ref([]),l=e.ref(null),u=e.ref(!1),f=e.ref(null),h=e.ref("top");let p=0,g=0,b=!1,T=0,y=null,v=null,L=0,R=0;const X=e.computed(()=>{if(r.itemSize===null){const k={"-1":{accumulator:0}},I=r.items,w=r.sizeField,H=r.minItemSize;let V=1e4,j=0,N;for(let $=0,fe=I.length;$<fe;$++)N=I[$][w]||H,N<V&&(V=N),j+=N,k[$]={accumulator:j,size:N};return v=V,k}return[]}),We=e.computed(()=>r.items.length&&typeof r.items[0]!="object"),J=e.computed(()=>{const k={};for(let I=0,w=r.items.length;I<w;I++)k[r.items[I][r.keyField]]=I;return k});e.watch(X,()=>{ie(!1)},{deep:!0}),e.onMounted(()=>{e.nextTick(()=>{ie(!0),u.value=!0})});const K=(k,I,w,H,V)=>{const j=e.markRaw({id:R++,index:I,used:!0,key:H,type:V}),N=e.shallowReactive({item:w,position:0,nr:j});return k.value.push(N),N},ee=(k,I=!1)=>{const w=s,H=k.nr.type;let V=w.get(H);V||(V=[],w.set(H,V)),V.push(k),I||(k.nr.used=!1,k.position=-9999)},me=()=>{const k=r.direction==="vertical";let I;return k?I={start:f.value.scrollTop,end:f.value.scrollTop+f.value.clientHeight}:I={start:f.value.scrollLeft,end:f.value.scrollLeft+f.value.clientWidth},I},re=()=>{throw setTimeout(()=>{console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",f),console.error("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},Ke=()=>{d.value.sort((k,I)=>k.nr.index-I.nr.index)},ie=(k,I=!1)=>{var Lt,At,xt,Mt,Pt,Vt,Rt,$t;const w=r.itemSize,H=v,V=We.value?null:r.keyField,j=r.items,N=j.length,$=X.value,fe=o,Bt=s,ke=d,Hn=J;let z,M,we,U,Y;if(!N)z=M=U=Y=we=0;else{const O=me();if(I){let A=O.start-T.value;if(A<0&&(A=-A),w===null&&A<H.value||A<w)return{continuous:!0}}T=O.start;const F=r.buffer;if(O.start-=F,O.end+=F,w===null){let A,pe=0,zt=N-1,q=~~(N/2),Ft;do Ft=q,A=(Lt=$[q])==null?void 0:Lt.accumulator,A<O.start?pe=q:q<N-1&&((At=$[q+1])==null?void 0:At.accumulator)>O.start&&(zt=q),q=~~((pe+zt)/2);while(q!==Ft);for(q<0&&(q=0),z=q,we=(xt=$[N-1])==null?void 0:xt.accumulator,M=q;M<N&&((Mt=$[M])==null?void 0:Mt.accumulator)<O.end;M++);for(M===-1?M=j.length-1:(M++,M>N&&(M=N)),U=p;U<N&&((Pt=$[U])==null?void 0:Pt.accumulator)<O.start;U++);for(Y=U;Y<N&&((Vt=$[Y])==null?void 0:Vt.accumulator)<O.end;Y++);}else{z=~~(O.start/w);const A=z%1;z-=A,M=Math.ceil(O.end/w),U=Math.max(0,Math.floor(O.start/w)),Y=Math.floor(O.end/w),z<0&&(z=0),M>N&&(M=N),U<0&&(U=0),Y>N&&(Y=N),we=Math.ceil(N/1)*w}}M-z>1e3&&re(),L=we;let E;const Ee=z<=g&&M>=z;if(Ee)for(let O=0,F=ke.value.length;O<F;O++)E=ke.value[O],E!=null&&E.nr.used&&(k&&(E.nr.index=Hn[E.item[V]]),(E.nr.index==null||E.nr.index<z||E.nr.index>=M)&&ee(E));const Nt=Ee?null:new Map;let W,G,Ie;for(let O=z;O<M;O++){W=j[O];const F=V?W==null?void 0:W[V]:W;if(F==null)throw new Error(`Key is ${F} on item (keyField is '${V}')`);if(E=fe.get(F),!w&&!((Rt=$[O])!=null&&Rt.size)){E&&ee(E);continue}G=W.type;let A=Bt.get(G);if(!E)Ee?A&&A.length?E=A.pop():E=K(ke,O,W,F,G):(Ie=Nt.get(G)||0,(!A||Ie>=A.length)&&(E=K(ke,O,W,F,G),ee(E,!0),A=Bt.get(G)),E=A[Ie],Nt.set(G,Ie+1)),fe.delete(E.nr.key),E.nr.used=!0,E.nr.index=O,E.nr.key=F,E.nr.type=G,fe.set(F,E);else if(!E.nr.used&&(E.nr.used=!0,A)){const pe=A.indexOf(E);pe!==-1&&A.splice(pe,1)}E.item=W,w===null?(E.position=($t=$[O-1])==null?void 0:$t.accumulator,E.offset=0):(E.position=Math.floor(O)*w,E.offset=O%1*w)}return p=z,g=M,clearTimeout(y),y=setTimeout(Ke,300),{continuous:Ee}},je=k=>{const I=r.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"},w=f.value,H=I.scroll;w[H]=k},Ye=k=>{var w;let I;r.itemSize===null?I=k>0?(w=X.value[k-1])==null?void 0:w.accumulator:0:I=Math.floor(k)*r.itemSize,je(I)},P=()=>{const k=f.value;h.value!=="middle"&&(h.value="middle",i("user-position","middle")),k.scrollTop===0&&(h.value="top",i("user-position","top")),k.scrollTop+k.clientHeight===k.scrollHeight&&(h.value="bottom",i("user-position","bottom")),b||(b=!0,requestAnimationFrame(()=>{b=!1,ie(!1,!0)}))};return a({scrollToItem:Ye,_updateVisibleItems:ie}),(k,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scroller",ref:f,class:e.normalizeClass(["vue-recycle-scroller",{ready:u.value,[`direction-${t.direction}`]:!0}]),onScrollPassive:P},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.listTag),{ref:"wrapper",style:e.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:`${e.unref(L)}px`}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",t.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,w=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.itemTag),e.mergeProps({key:w.nr.id,style:u.value?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${w.position}px) translate${t.direction==="vertical"?"X":"Y"}(${w.offset}px)`,width:void 0,height:void 0}:null,class:["vue-recycle-scroller__item-view",[t.itemClass,{hover:!t.skipHover&&l.value===w.nr.key}]]},e.toHandlers(t.skipHover?{}:{mouseenter:()=>{l.value=w.nr.key},mouseleave:()=>{l.value=null}})),{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default",{item:w.item,index:w.nr.index,active:w.nr.used})]),_:2},1040,["style","class"]))),128))]),_:3},8,["style","class"]))],34))}},$r={name:"DtScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},tag:{type:String,default:"div"}},computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,a){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[a],r=this.vscrollData.sizes[t];n!=null&&n!==r&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver))for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate)},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const a=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(a,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,a){const n=~~(this.vscrollParent.direction==="vertical"?a:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,a,n){this.id===t&&this.applyWidthHeight(a,n)}},render(){return e.h(this.tag,this.$slots.default())}},zr={name:"DynamicScroller",components:{CoreScroller:bn,DtScrollerItem:$r},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const a of t)if(a.target&&a.target.$_vs_onResize){let n,r;if(a.borderBoxSize){const i=a.borderBoxSize[0];n=i.inlineSize,r=i.blockSize}else n=a.contentRect.width,r=a.contentRect.height;a.target.$_vs_onResize(a.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{items:{type:Array,required:!0},dynamic:{type:Boolean,default:!1},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},minItemSize:{type:[Number,String]}},data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray(){return this.items.length&&typeof this.items[0]!="object"},itemsWithSize(){const t=[],{items:a,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,o=a.length;for(let s=0;s<o;s++){const d=a[s],l=r?s:d[n];let u=i[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),t.push({item:d,[n]:l,size:u})}return t}},watch:{simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},itemsWithSize(t,a){const n=this.$el.scrollTop;let r=0,i=0;const o=Math.min(t.length,a.length);for(let d=0;d<o&&!(r>=n);d++)r+=a[d].size||this.minItemSize,i+=t[d].size||this.minItemSize;const s=i-r;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},methods:{dynamicScrollerUpdateItems(){const t=this.$refs.scroller;t&&t._updateVisibleItems(!0)},dynamicScrollerUpdateItemsFromBottom(){const t=this.$refs.scroller;t&&t._updateVisibleItems(!1,!0)},scrollToItem(t){const a=this.$refs.scroller;a&&a.scrollToItem(t)},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const a=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(a)})};requestAnimationFrame(a)})}}};function Fr(t,a,n,r,i,o){const s=e.resolveComponent("dt-scroller-item"),d=e.resolveComponent("core-scroller");return e.openBlock(),e.createBlock(d,e.mergeProps({ref:"scroller",items:o.itemsWithSize,"min-item-size":n.minItemSize,direction:n.direction,"key-field":n.keyField,"list-tag":n.listTag,"item-tag":n.itemTag},t.$attrs),{default:e.withCtx(({item:l,index:u,active:f})=>[e.createVNode(s,{item:l,active:f,"size-dependencies":[l.message],"data-index":u},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({item:l.item,index:u,active:f,itemWithSize:l})))]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:3},16,["items","min-item-size","direction","key-field","list-tag","item-tag"])}const qr=c._export_sfc(zr,[["render",Fr]]),Hr={__name:"DtScroller",props:{direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},dynamic:{type:Boolean,default:!1},itemSize:{type:Number,default:null},itemTag:{type:String,default:"div"},items:{type:Array,required:!0},keyField:{type:String,default:"id"},listTag:{type:String,default:"div"},minItemSize:{type:[Number,String],default:null},scrollerHeight:{type:[String,Number],default:"100%"},scrollerWidth:{type:[String,Number],default:"100%"}},emits:["user-position"],setup(t,{expose:a,emit:n}){const r=t,i=n;e.provide("emit",i);const o=e.ref(null),s=e.computed(()=>({width:typeof r.scrollerWidth=="number"?`${r.scrollerWidth}px`:r.scrollerWidth,height:typeof r.scrollerHeight=="number"?`${r.scrollerHeight}px`:r.scrollerHeight}));e.watch(r,()=>{h()},{deep:!0,immediate:!0});function d(){o.value&&o.value.scrollToBottom()}function l(p){o.value&&o.value.scrollToItem(p)}function u(){o.value&&(r.dynamic?o.value.dynamicScrollerUpdateItems():o.value._updateVisibleItems(!0))}function f(){o.value&&(r.dynamic?o.value.dynamicScrollerUpdateItemsFromBottom():o.value._updateVisibleItems(!1,!0))}function h(){r.dynamic&&!r.minItemSize&&console.error("scroller error: 'minItemSize' is required on 'dynamic' mode."),!r.dynamic&&!r.itemSize&&console.error("scroller error: 'itemSize' is required.")}return a({scrollToBottom:d,scrollToItem:l,updateItems:u,updateItemsFromBottom:f}),(p,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dynamic?qr:bn),{ref_key:"scroller",ref:o,"data-qa":"dt-scroller",items:t.items,"item-size":t.itemSize,"min-item-size":t.minItemSize,direction:t.direction,"key-field":t.keyField,"list-tag":t.listTag,"item-tag":t.itemTag,style:e.normalizeStyle(s.value),tabindex:"0",onUserPosition:g[0]||(g[0]=b=>p.$emit("user-position",b))},{default:e.withCtx(({item:b,index:T,active:y})=>[e.renderSlot(p.$slots,"default",e.normalizeProps(e.guardReactiveProps({item:b,index:T,active:y})))]),_:3},40,["items","item-size","min-item-size","direction","key-field","list-tag","item-tag","style"]))}},vn=0,Ur="MMMM",Ge="long";function ce(t){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ce(t)}function B(t){if(t===null||t===!0||t===!1)return NaN;var a=Number(t);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function S(t,a){if(a.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+a.length+" present")}function C(t){S(1,arguments);var a=Object.prototype.toString.call(t);return t instanceof Date||ce(t)==="object"&&a==="[object Date]"?new Date(t.getTime()):typeof t=="number"||a==="[object Number]"?new Date(t):((typeof t=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function he(t,a){S(2,arguments);var n=C(t),r=B(a);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Ve(t,a){S(2,arguments);var n=C(t),r=B(a);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function ge(t,a){if(S(2,arguments),!a||ce(a)!=="object")return new Date(NaN);var n=a.years?B(a.years):0,r=a.months?B(a.months):0,i=a.weeks?B(a.weeks):0,o=a.days?B(a.days):0,s=a.hours?B(a.hours):0,d=a.minutes?B(a.minutes):0,l=a.seconds?B(a.seconds):0,u=C(t),f=r||n?Ve(u,r+n*12):u,h=o||i?he(f,o+i*7):f,p=d+s*60,g=l+p*60,b=g*1e3,T=new Date(h.getTime()+b);return T}function Wr(t,a){S(2,arguments);var n=C(t).getTime(),r=B(a);return new Date(n+r)}var Kr={};function oe(){return Kr}function ct(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.weekStartsOn)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=C(t),g=p.getDay(),b=(g<h?7:0)+g-h;return p.setDate(p.getDate()-b),p.setHours(0,0,0,0),p}function ye(t){var a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),t.getTime()-a.getTime()}function Oe(t){S(1,arguments);var a=C(t);return a.setHours(0,0,0,0),a}var jr=864e5;function Yr(t,a){S(2,arguments);var n=Oe(t),r=Oe(a),i=n.getTime()-ye(n),o=r.getTime()-ye(r);return Math.round((i-o)/jr)}function ne(t,a){S(2,arguments);var n=C(t),r=C(a),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var Gr=6e4,Qr=36e5;function yn(t,a){S(2,arguments);var n=Oe(t),r=Oe(a);return n.getTime()===r.getTime()}function Zr(t){return S(1,arguments),t instanceof Date||ce(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Xr(t){if(S(1,arguments),!Zr(t)&&typeof t!="number")return!1;var a=C(t);return!isNaN(Number(a))}function Jr(t,a){S(2,arguments);var n=C(t),r=C(a),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function ei(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getFullYear()-r.getFullYear()}function qt(t,a){var n=t.getFullYear()-a.getFullYear()||t.getMonth()-a.getMonth()||t.getDate()-a.getDate()||t.getHours()-a.getHours()||t.getMinutes()-a.getMinutes()||t.getSeconds()-a.getSeconds()||t.getMilliseconds()-a.getMilliseconds();return n<0?-1:n>0?1:n}function ti(t,a){S(2,arguments);var n=C(t),r=C(a),i=qt(n,r),o=Math.abs(Yr(n,r));n.setDate(n.getDate()-i*o);var s=+(qt(n,r)===-i),d=i*(o-s);return d===0?0:d}function Ct(t,a){return S(2,arguments),C(t).getTime()-C(a).getTime()}var Ht={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},ni="trunc";function kt(t){return t?Ht[t]:Ht[ni]}function ai(t,a,n){S(2,arguments);var r=Ct(t,a)/Qr;return kt(n==null?void 0:n.roundingMethod)(r)}function oi(t,a,n){S(2,arguments);var r=Ct(t,a)/Gr;return kt(n==null?void 0:n.roundingMethod)(r)}function ri(t){S(1,arguments);var a=C(t);return a.setHours(23,59,59,999),a}function Sn(t){S(1,arguments);var a=C(t),n=a.getMonth();return a.setFullYear(a.getFullYear(),n+1,0),a.setHours(23,59,59,999),a}function ii(t){S(1,arguments);var a=C(t);return ri(a).getTime()===Sn(a).getTime()}function Cn(t,a){S(2,arguments);var n=C(t),r=C(a),i=ne(n,r),o=Math.abs(Jr(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var d=ne(n,r)===-i;ii(C(t))&&o===1&&ne(t,r)===1&&(d=!1),s=i*(o-Number(d))}return s===0?0:s}function kn(t,a,n){S(2,arguments);var r=Ct(t,a)/1e3;return kt(n==null?void 0:n.roundingMethod)(r)}function si(t,a){S(2,arguments);var n=C(t),r=C(a),i=ne(n,r),o=Math.abs(ei(n,r));n.setFullYear(1584),r.setFullYear(1584);var s=ne(n,r)===-i,d=i*(o-Number(s));return d===0?0:d}function li(t){S(1,arguments);var a=C(t);return a.setDate(1),a.setHours(0,0,0,0),a}function di(t,a){S(2,arguments);var n=B(a);return Wr(t,-n)}var ci=864e5;function ui(t){S(1,arguments);var a=C(t),n=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var r=a.getTime(),i=n-r;return Math.floor(i/ci)+1}function Be(t){S(1,arguments);var a=1,n=C(t),r=n.getUTCDay(),i=(r<a?7:0)+r-a;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function wn(t){S(1,arguments);var a=C(t),n=a.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Be(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var s=Be(o);return a.getTime()>=i.getTime()?n+1:a.getTime()>=s.getTime()?n:n-1}function hi(t){S(1,arguments);var a=wn(t),n=new Date(0);n.setUTCFullYear(a,0,4),n.setUTCHours(0,0,0,0);var r=Be(n);return r}var mi=6048e5;function fi(t){S(1,arguments);var a=C(t),n=Be(a).getTime()-hi(a).getTime();return Math.round(n/mi)+1}function Ne(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.weekStartsOn)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=C(t),g=p.getUTCDay(),b=(g<h?7:0)+g-h;return p.setUTCDate(p.getUTCDate()-b),p.setUTCHours(0,0,0,0),p}function En(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=C(t),h=f.getUTCFullYear(),p=oe(),g=B((n=(r=(i=(o=a==null?void 0:a.firstWeekContainsDate)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:p.firstWeekContainsDate)!==null&&r!==void 0?r:(l=p.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(h+1,0,g),b.setUTCHours(0,0,0,0);var T=Ne(b,a),y=new Date(0);y.setUTCFullYear(h,0,g),y.setUTCHours(0,0,0,0);var v=Ne(y,a);return f.getTime()>=T.getTime()?h+1:f.getTime()>=v.getTime()?h:h-1}function pi(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.firstWeekContainsDate)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=En(t,a),g=new Date(0);g.setUTCFullYear(p,0,h),g.setUTCHours(0,0,0,0);var b=Ne(g,a);return b}var gi=6048e5;function _i(t,a){S(1,arguments);var n=C(t),r=Ne(n,a).getTime()-pi(n,a).getTime();return Math.round(r/gi)+1}function D(t,a){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<a;)r="0"+r;return n+r}var bi={y:function(a,n){var r=a.getUTCFullYear(),i=r>0?r:1-r;return D(n==="yy"?i%100:i,n.length)},M:function(a,n){var r=a.getUTCMonth();return n==="M"?String(r+1):D(r+1,2)},d:function(a,n){return D(a.getUTCDate(),n.length)},a:function(a,n){var r=a.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(a,n){return D(a.getUTCHours()%12||12,n.length)},H:function(a,n){return D(a.getUTCHours(),n.length)},m:function(a,n){return D(a.getUTCMinutes(),n.length)},s:function(a,n){return D(a.getUTCSeconds(),n.length)},S:function(a,n){var r=n.length,i=a.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return D(o,n.length)}};const Q=bi;var se={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vi={G:function(a,n,r){var i=a.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(a,n,r){if(n==="yo"){var i=a.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Q.y(a,n)},Y:function(a,n,r,i){var o=En(a,i),s=o>0?o:1-o;if(n==="YY"){var d=s%100;return D(d,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):D(s,n.length)},R:function(a,n){var r=wn(a);return D(r,n.length)},u:function(a,n){var r=a.getUTCFullYear();return D(r,n.length)},Q:function(a,n,r){var i=Math.ceil((a.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return D(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(a,n,r){var i=Math.ceil((a.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return D(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(a,n,r){var i=a.getUTCMonth();switch(n){case"M":case"MM":return Q.M(a,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(a,n,r){var i=a.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return D(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(a,n,r,i){var o=_i(a,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):D(o,n.length)},I:function(a,n,r){var i=fi(a);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):D(i,n.length)},d:function(a,n,r){return n==="do"?r.ordinalNumber(a.getUTCDate(),{unit:"date"}):Q.d(a,n)},D:function(a,n,r){var i=ui(a);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):D(i,n.length)},E:function(a,n,r){var i=a.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(a,n,r,i){var o=a.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return D(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(a,n,r,i){var o=a.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return D(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(a,n,r){var i=a.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return D(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(a,n,r){var i=a.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(a,n,r){var i=a.getUTCHours(),o;switch(i===12?o=se.noon:i===0?o=se.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(a,n,r){var i=a.getUTCHours(),o;switch(i>=17?o=se.evening:i>=12?o=se.afternoon:i>=4?o=se.morning:o=se.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(a,n,r){if(n==="ho"){var i=a.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Q.h(a,n)},H:function(a,n,r){return n==="Ho"?r.ordinalNumber(a.getUTCHours(),{unit:"hour"}):Q.H(a,n)},K:function(a,n,r){var i=a.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):D(i,n.length)},k:function(a,n,r){var i=a.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):D(i,n.length)},m:function(a,n,r){return n==="mo"?r.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):Q.m(a,n)},s:function(a,n,r){return n==="so"?r.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):Q.s(a,n)},S:function(a,n){return Q.S(a,n)},X:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return Wt(s);case"XXXX":case"XX":return te(s);case"XXXXX":case"XXX":default:return te(s,":")}},x:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"x":return Wt(s);case"xxxx":case"xx":return te(s);case"xxxxx":case"xxx":default:return te(s,":")}},O:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Ut(s,":");case"OOOO":default:return"GMT"+te(s,":")}},z:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Ut(s,":");case"zzzz":default:return"GMT"+te(s,":")}},t:function(a,n,r,i){var o=i._originalDate||a,s=Math.floor(o.getTime()/1e3);return D(s,n.length)},T:function(a,n,r,i){var o=i._originalDate||a,s=o.getTime();return D(s,n.length)}};function Ut(t,a){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=a||"";return n+String(i)+s+D(o,2)}function Wt(t,a){if(t%60===0){var n=t>0?"-":"+";return n+D(Math.abs(t)/60,2)}return te(t,a)}function te(t,a){var n=a||"",r=t>0?"-":"+",i=Math.abs(t),o=D(Math.floor(i/60),2),s=D(i%60,2);return r+o+n+s}const yi=vi;var Kt=function(a,n){switch(a){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},In=function(a,n){switch(a){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Si=function(a,n){var r=a.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Kt(a,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Kt(i,n)).replace("{{time}}",In(o,n))},Ci={p:In,P:Si};const ki=Ci;var wi=["D","DD"],Ei=["YY","YYYY"];function Ii(t){return wi.indexOf(t)!==-1}function Di(t){return Ei.indexOf(t)!==-1}function jt(t,a,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ti={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Oi=function(a,n,r){var i,o=Ti[a];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const Bi=Oi;function Qe(t){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=a.width?String(a.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var Ni={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Li={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ai={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xi={date:Qe({formats:Ni,defaultWidth:"full"}),time:Qe({formats:Li,defaultWidth:"full"}),dateTime:Qe({formats:Ai,defaultWidth:"full"})};const Mi=xi;var Pi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Vi=function(a,n,r,i){return Pi[a]};const Ri=Vi;function _e(t){return function(a,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var d=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[d]}var u=t.argumentCallback?t.argumentCallback(a):a;return i[u]}}var $i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zi={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fi={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qi={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Hi={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ui={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wi=function(a,n){var r=Number(a),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ki={ordinalNumber:Wi,era:_e({values:$i,defaultWidth:"wide"}),quarter:_e({values:zi,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:_e({values:Fi,defaultWidth:"wide"}),day:_e({values:qi,defaultWidth:"wide"}),dayPeriod:_e({values:Hi,defaultWidth:"wide",formattingValues:Ui,defaultFormattingWidth:"wide"})};const ji=Ki;function be(t){return function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=a.match(i);if(!o)return null;var s=o[0],d=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(d)?Gi(d,function(h){return h.test(s)}):Yi(d,function(h){return h.test(s)}),u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var f=a.slice(s.length);return{value:u,rest:f}}}function Yi(t,a){for(var n in t)if(t.hasOwnProperty(n)&&a(t[n]))return n}function Gi(t,a){for(var n=0;n<t.length;n++)if(a(t[n]))return n}function Qi(t){return function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.match(t.matchPattern);if(!r)return null;var i=r[0],o=a.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var d=a.slice(i.length);return{value:s,rest:d}}}var Zi=/^(\d+)(th|st|nd|rd)?/i,Xi=/\d+/i,Ji={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},es={any:[/^b/i,/^(a|c)/i]},ts={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ns={any:[/1/i,/2/i,/3/i,/4/i]},as={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},os={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},rs={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},is={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ss={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ls={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ds={ordinalNumber:Qi({matchPattern:Zi,parsePattern:Xi,valueCallback:function(a){return parseInt(a,10)}}),era:be({matchPatterns:Ji,defaultMatchWidth:"wide",parsePatterns:es,defaultParseWidth:"any"}),quarter:be({matchPatterns:ts,defaultMatchWidth:"wide",parsePatterns:ns,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:be({matchPatterns:as,defaultMatchWidth:"wide",parsePatterns:os,defaultParseWidth:"any"}),day:be({matchPatterns:rs,defaultMatchWidth:"wide",parsePatterns:is,defaultParseWidth:"any"}),dayPeriod:be({matchPatterns:ss,defaultMatchWidth:"any",parsePatterns:ls,defaultParseWidth:"any"})};const cs=ds;var us={code:"en-US",formatDistance:Bi,formatLong:Mi,formatRelative:Ri,localize:ji,match:cs,options:{weekStartsOn:0,firstWeekContainsDate:1}};const wt=us;var hs=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ms=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fs=/^'([^]*?)'?$/,ps=/''/g,gs=/[a-zA-Z]/;function Dn(t,a,n){var r,i,o,s,d,l,u,f,h,p,g,b,T,y,v,L,R,X;S(2,arguments);var We=String(a),J=oe(),K=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:J.locale)!==null&&r!==void 0?r:wt,ee=B((o=(s=(d=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&d!==void 0?d:J.firstWeekContainsDate)!==null&&s!==void 0?s:(h=J.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(ee>=1&&ee<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var me=B((g=(b=(T=(y=n==null?void 0:n.weekStartsOn)!==null&&y!==void 0?y:n==null||(v=n.locale)===null||v===void 0||(L=v.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&T!==void 0?T:J.weekStartsOn)!==null&&b!==void 0?b:(R=J.locale)===null||R===void 0||(X=R.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&g!==void 0?g:0);if(!(me>=0&&me<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!K.localize)throw new RangeError("locale must contain localize property");if(!K.formatLong)throw new RangeError("locale must contain formatLong property");var re=C(t);if(!Xr(re))throw new RangeError("Invalid time value");var Ke=ye(re),ie=di(re,Ke),je={firstWeekContainsDate:ee,weekStartsOn:me,locale:K,_originalDate:re},Ye=We.match(ms).map(function(P){var k=P[0];if(k==="p"||k==="P"){var I=ki[k];return I(P,K.formatLong)}return P}).join("").match(hs).map(function(P){if(P==="''")return"'";var k=P[0];if(k==="'")return _s(P);var I=yi[k];if(I)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Di(P)&&jt(P,a,String(t)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ii(P)&&jt(P,a,String(t)),I(ie,P,K.localize,je);if(k.match(gs))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return P}).join("");return Ye}function _s(t){var a=t.match(fs);return a?a[1].replace(ps,"'"):t}function Tn(t,a){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);return t}function bs(t){return Tn({},t)}var Yt=1440,vs=2520,Ze=43200,ys=86400;function Ss(t,a,n){var r,i;S(2,arguments);var o=oe(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:wt;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var d=ne(t,a);if(isNaN(d))throw new RangeError("Invalid time value");var l=Tn(bs(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:d}),u,f;d>0?(u=C(a),f=C(t)):(u=C(t),f=C(a));var h=kn(f,u),p=(ye(f)-ye(u))/1e3,g=Math.round((h-p)/60),b;if(g<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):g===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",g,l);if(g<45)return s.formatDistance("xMinutes",g,l);if(g<90)return s.formatDistance("aboutXHours",1,l);if(g<Yt){var T=Math.round(g/60);return s.formatDistance("aboutXHours",T,l)}else{if(g<vs)return s.formatDistance("xDays",1,l);if(g<Ze){var y=Math.round(g/Yt);return s.formatDistance("xDays",y,l)}else if(g<ys)return b=Math.round(g/Ze),s.formatDistance("aboutXMonths",b,l)}if(b=Cn(f,u),b<12){var v=Math.round(g/Ze);return s.formatDistance("xMonths",v,l)}else{var L=b%12,R=Math.floor(b/12);return L<3?s.formatDistance("aboutXYears",R,l):L<9?s.formatDistance("overXYears",R,l):s.formatDistance("almostXYears",R+1,l)}}var Cs=["years","months","weeks","days","hours","minutes","seconds"];function ks(t,a){var n,r,i,o,s;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var d=oe(),l=(n=(r=a==null?void 0:a.locale)!==null&&r!==void 0?r:d.locale)!==null&&n!==void 0?n:wt,u=(i=a==null?void 0:a.format)!==null&&i!==void 0?i:Cs,f=(o=a==null?void 0:a.zero)!==null&&o!==void 0?o:!1,h=(s=a==null?void 0:a.delimiter)!==null&&s!==void 0?s:" ";if(!l.formatDistance)return"";var p=u.reduce(function(g,b){var T="x".concat(b.replace(/(^.)/,function(v){return v.toUpperCase()})),y=t[b];return typeof y=="number"&&(f||t[b])?g.concat(l.formatDistance(T,y)):g},[]).join(h);return p}function Et(t){S(1,arguments);var a=C(t),n=a.getDate();return n}function Le(t){S(1,arguments);var a=C(t),n=a.getDay();return n}function ws(t){S(1,arguments);var a=C(t),n=a.getFullYear(),r=a.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function De(t){S(1,arguments);var a=C(t),n=a.getMonth();return n}function ut(t){return S(1,arguments),C(t).getFullYear()}function Es(t){S(1,arguments);var a=C(t.start),n=C(t.end);if(isNaN(a.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw new RangeError("End Date is invalid");var r={};r.years=Math.abs(si(n,a));var i=ne(n,a),o=ge(a,{years:i*r.years});r.months=Math.abs(Cn(n,o));var s=ge(o,{months:i*r.months});r.days=Math.abs(ti(n,s));var d=ge(s,{days:i*r.days});r.hours=Math.abs(ai(n,d));var l=ge(d,{hours:i*r.hours});r.minutes=Math.abs(oi(n,l));var u=ge(l,{minutes:i*r.minutes});return r.seconds=Math.abs(kn(n,u)),r}function Is(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getTime()===r.getTime()}function Ds(t,a,n){S(2,arguments);var r=ct(t,n),i=ct(a,n);return r.getTime()===i.getTime()}function Ts(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getFullYear()===r.getFullYear()}function Os(t,a){return S(1,arguments),Ds(t,Date.now(),a)}function Bs(t){return S(1,arguments),Ts(t,Date.now())}function Ns(t){return S(1,arguments),yn(t,Date.now())}function Ls(t,a){S(2,arguments);var n=B(a);return he(t,-n)}function As(t){return S(1,arguments),yn(t,Ls(Date.now(),1))}function xs(t,a){S(2,arguments);var n=C(t),r=B(a),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var d=ws(s);return n.setMonth(r,Math.min(o,d)),n}function Ms(t,a){if(S(2,arguments),ce(a)!=="object"||a===null)throw new RangeError("values parameter must be an object");var n=C(t);return isNaN(n.getTime())?new Date(NaN):(a.year!=null&&n.setFullYear(a.year),a.month!=null&&(n=xs(n,a.month)),a.date!=null&&n.setDate(B(a.date)),a.hours!=null&&n.setHours(B(a.hours)),a.minutes!=null&&n.setMinutes(B(a.minutes)),a.seconds!=null&&n.setSeconds(B(a.seconds)),a.milliseconds!=null&&n.setMilliseconds(B(a.milliseconds)),n)}function On(t,a){S(2,arguments);var n=B(a);return Ve(t,-n)}const ht=t=>t?new Date(t):new Date,Ps=(t,a,n)=>{const r=ht(JSON.parse(JSON.stringify(t))),i=[];for(let o=0;o<7;o++){const s=he(r,o),d=De(s)!==a;i.push({text:s.getDate(),value:s,currentMonth:!d,isFirstDayOfMonth:s.getDate()===1&&!d,selected:n?s.getDate()===n&&!d:!1})}return i},Vs=(t,a)=>!t||!a?!1:Is(t,a),Rs=(t,a,n)=>{const r=[],i=ht(new Date(a,t)),o=ht(new Date(a,t+1,0)),d=ct(i,{weekStartsOn:vn}),l=u=>{const f=Ps(u,t,n);if(r.push({days:f}),!r[r.length-1].days.some(h=>Vs(h.value,o))){const h=he(u,7);l(h)}};return l(d),r},$s=(t,a)=>{const n=[1,2,3,4,5,6,7].map(o=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${o}T00:00:00+00:00`)).slice(0,2)),r=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...r)},zs=(t,a,n)=>new Intl.DateTimeFormat(n,{month:a}).format(new Date(2e3,t,1)),Fs=t=>{const a=new Date(t),n=Le(a),r=Ve(a,1),i=li(r),o=Le(i),s=(n-o+7)%7,d=he(i,s);return Et(d)},qs=t=>{const a=new Date(t),n=Le(a);let i=Sn(On(a,1));for(;Le(i)!==n;)i=he(i,-1);return Et(i)};function Hs(t,a){const n=e.ref(De(t.selectedDate)),r=e.ref(ut(t.selectedDate)),i=e.ref(null),o=e.ref(0),s=e.ref([]),d=e.computed(()=>Rs(n.value,r.value,i.value)),l=e.computed(()=>(v,L,R)=>zs(v,L,R));e.watch(n,()=>{p(),a("calendar-days",d.value)},{immediate:!0}),e.watch(r,()=>{p(),a("calendar-days",d.value)},{immediate:!0});function u(v){s.value.includes(v)||s.value.push(v)}function f(){s.value[0].$el.focus()}function h(v){switch(v.key){case"ArrowLeft":v.preventDefault(),o.value===0?(o.value=3,s.value[o.value].$el.focus()):(o.value--,s.value[o.value].$el.focus());break;case"ArrowRight":v.preventDefault(),o.value===3?(o.value=0,s.value[o.value].$el.focus()):(o.value++,s.value[o.value].$el.focus());break;case"ArrowDown":v.preventDefault(),a("focus-first-day");break;case"Tab":v.preventDefault(),a("focus-first-day");break;case"Escape":a("close-datepicker");break}}function p(){const v=ut(t.selectedDate),L=De(t.selectedDate);v!==r.value||L!==n.value?i.value=null:i.value=Et(t.selectedDate)}function g(v){(n.value===0&&v===-1||n.value===11&&v===1)&&(r.value+=v);const L=Ms(t.selectedDate,{month:n.value,year:r.value}),R=v===1?Ve(L,1):On(L,1);n.value=De(R)}function b(v){r.value=r.value+v}function T(){g(1)}function y(){g(-1)}return{selectMonth:n,selectYear:r,formattedMonth:l,setDayRef:u,focusMonthYearPicker:f,handleKeyDown:h,changeMonth:g,changeYear:b,goToNextMonth:T,goToPrevMonth:y}}const Us={id:"calendar-heading",class:"d-datepicker__month-year-title"},Ws={__name:"month-year-picker",props:{locale:{type:String,required:!0},prevMonthLabel:{type:String,required:!0},nextMonthLabel:{type:String,required:!0},prevYearLabel:{type:String,required:!0},nextYearLabel:{type:String,required:!0},changeToLabel:{type:String,required:!0},selectedDate:{type:Date,required:!0}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],setup(t,{expose:a,emit:n}){const r=t,i=n,{selectMonth:o,selectYear:s,formattedMonth:d,setDayRef:l,focusMonthYearPicker:u,handleKeyDown:f,changeMonth:h,changeYear:p,goToNextMonth:g,goToPrevMonth:b}=Hs(r,i);return e.onMounted(()=>{u()}),a({focusMonthYearPicker:u,goToNextMonth:g,goToPrevMonth:b}),(T,y)=>(e.openBlock(),e.createBlock(e.unref(_.DtStack),{direction:"row",class:"d-datepicker__month-year",gap:"300"},{default:e.withCtx(()=>[e.createVNode(e.unref(_.DtStack),{as:"nav",direction:"row",gap:"200",class:"d-datepicker__nav"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.DtTooltip),{message:t.prevYearLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"prevYearButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.prevYearLabel} ${e.unref(s)-1}`,onClick:y[0]||(y[0]=v=>e.unref(p)(-1)),onKeydown:y[1]||(y[1]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevrons-left",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"]),e.createVNode(e.unref(c.DtTooltip),{message:t.prevMonthLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"prevMonthButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.prevMonthLabel} ${e.unref(d)(e.unref(o)-1,e.unref(Ge),t.locale)}`,onClick:y[2]||(y[2]=v=>e.unref(h)(-1)),onKeydown:y[3]||(y[3]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevron-left",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])]),_:1}),e.createElementVNode("div",Us,e.toDisplayString(e.unref(d)(e.unref(o),e.unref(Ge),t.locale))+" "+e.toDisplayString(e.unref(s)),1),e.createVNode(e.unref(_.DtStack),{as:"nav",direction:"row",gap:"200",class:"d-datepicker__nav"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.DtTooltip),{message:t.nextMonthLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"nextMonthButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.nextMonthLabel} ${e.unref(d)(e.unref(o)+1,e.unref(Ge),t.locale)}`,onClick:y[4]||(y[4]=v=>e.unref(h)(1)),onKeydown:y[5]||(y[5]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevron-right",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"]),e.createVNode(e.unref(c.DtTooltip),{message:t.nextYearLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"nextYearButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.nextYearLabel} ${e.unref(s)+1}`,onClick:y[6]||(y[6]=v=>e.unref(p)(1)),onKeydown:y[7]||(y[7]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevrons-right",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])]),_:1})]),_:1}))}};function Ks(t,a){const n=e.ref(null),r=e.ref(0),i=e.ref([]),o=e.computed(()=>$s(t.locale,vn));e.watch(()=>t.calendarDays,()=>{r.value=0,i.value=[],n.value=null});function s(p){return`${t.selectDayLabel} ${p.text} ${Dn(p.value,Ur)} ${ut(p.value)}`}function d(p,g){!i.value.some(b=>b.el===p)&&g.currentMonth&&i.value.push({el:p,day:g})}function l(p){switch(p.key){case"ArrowUp":p.preventDefault(),r.value-=7;try{i.value[r.value].el.$el.focus()}catch{const b=qs(i.value[r.value+7].day.value);a("go-to-prev-month"),e.nextTick(()=>{i.value[b-1].el.$el.focus(),r.value+=b-1})}break;case"ArrowDown":p.preventDefault(),r.value+=7;try{i.value[r.value].el.$el.focus()}catch{const b=Fs(i.value[r.value-7].day.value);a("go-to-next-month"),e.nextTick(()=>{i.value[b-1].el.$el.focus(),r.value+=b-1})}break;case"ArrowLeft":p.preventDefault(),r.value>0?(r.value-=1,i.value[r.value].el.$el.focus()):(a("go-to-prev-month"),f());break;case"ArrowRight":p.preventDefault(),r.value<i.value.length-1?(r.value+=1,i.value[r.value].el.$el.focus()):(a("go-to-next-month"),u());break;case"Tab":p.preventDefault(),a("focus-month-year-picker");break;case"Escape":a("close-datepicker");break}}function u(){r.value=0,e.nextTick(()=>{i.value[r.value].el.$el.focus()})}function f(){e.nextTick(()=>{r.value=i.value.length-1,i.value[r.value].el.$el.focus()})}function h(p){p.currentMonth&&(n.value=p.text,a("select-date",p.value))}return{selectedDay:n,weekDays:o,dayAriaLabel:s,setDayRef:d,handleKeyDown:l,focusFirstDay:u,selectDay:h}}const js={class:"d-datepicker__calendar","aria-labelledby":"calendar-heading"},Ys=["title","aria-label"],Gs={__name:"calendar",props:{calendarDays:{type:Array,required:!0},locale:{type:String,required:!0},selectDayLabel:{type:String,required:!0}},emits:["select-date","focus-month-year-picker","close-datepicker","go-to-next-month","go-to-prev-month"],setup(t,{expose:a,emit:n}){const r=t,i=n,{selectedDay:o,weekDays:s,dayAriaLabel:d,setDayRef:l,handleKeyDown:u,focusFirstDay:f,selectDay:h}=Ks(r,i);return a({focusFirstDay:f}),(p,g)=>(e.openBlock(),e.createElementBlock("table",js,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),b=>(e.openBlock(),e.createElementBlock("th",{key:b,scope:"col",class:"d-datepicker__cell d-datepicker__cell--header"},[e.createElementVNode("span",{class:"d-datepicker__weekday",title:b,"aria-label":b},e.toDisplayString(b),9,Ys)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calendarDays,(b,T)=>(e.openBlock(),e.createElementBlock("tr",{key:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.days,(y,v)=>(e.openBlock(),e.createElementBlock("td",{key:T+v,class:"d-datepicker__cell"},[e.createVNode(e.unref(m.DtButton),{ref_for:!0,ref:L=>{L&&e.unref(l)(L,y)},class:e.normalizeClass(["d-datepicker__day",{"d-datepicker__day--disabled":!y.currentMonth,"d-datepicker__day--selected":e.unref(o)?y.text===e.unref(o)&&y.currentMonth:y.selected}]),circle:!0,size:"sm",importance:"clear",disabled:!y.currentMonth,type:"button","aria-selected":e.unref(o)?y.text===e.unref(o)&&y.currentMonth:y.selected,"aria-label":e.unref(d)(y),onClick:L=>e.unref(h)(y),onKeydown:g[0]||(g[0]=L=>e.unref(u)(L))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.text),1)]),_:2},1032,["disabled","class","aria-selected","aria-label","onClick"])]))),128))]))),128))])]))}},Qs={class:"d-datepicker__hd"},Zs={class:"d-datepicker__bd"},Xs={__name:"datepicker",props:{prevMonthLabel:{type:String,required:!0},nextMonthLabel:{type:String,required:!0},prevYearLabel:{type:String,required:!0},nextYearLabel:{type:String,required:!0},selectDayLabel:{type:String,required:!0},changeToLabel:{type:String,required:!0},locale:{type:String,default:"en-US"},selectedDate:{type:Date,default:()=>new Date}},emits:["selected-date","close-datepicker"],setup(t){const a=e.ref([]);function n(r){a.value=r}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(_.DtStack),{class:"d-datepicker",gap:"400"},{default:e.withCtx(()=>[e.createElementVNode("div",Qs,[e.createVNode(Ws,{ref:"monthYearPicker",locale:t.locale,"prev-month-label":t.prevMonthLabel,"next-month-label":t.nextMonthLabel,"prev-year-label":t.prevYearLabel,"next-year-label":t.nextYearLabel,"change-to-label":t.changeToLabel,"selected-date":t.selectedDate,onCalendarDays:n,onFocusFirstDay:i[0]||(i[0]=o=>r.$refs.calendar.focusFirstDay()),onFocusLastDay:i[1]||(i[1]=o=>r.$refs.calendar.focusLastDay()),onCloseDatepicker:i[2]||(i[2]=o=>r.$emit("close-datepicker"))},null,8,["locale","prev-month-label","next-month-label","prev-year-label","next-year-label","change-to-label","selected-date"])]),e.createElementVNode("div",Zs,[e.createVNode(Gs,{ref:"calendar",locale:t.locale,"calendar-days":a.value,"select-day-label":t.selectDayLabel,onSelectDate:i[3]||(i[3]=o=>r.$emit("selected-date",o)),onFocusMonthYearPicker:i[4]||(i[4]=o=>r.$refs.monthYearPicker.focusMonthYearPicker()),onCloseDatepicker:i[5]||(i[5]=o=>r.$emit("close-datepicker")),onGoToNextMonth:i[6]||(i[6]=o=>r.$refs.monthYearPicker.goToNextMonth()),onGoToPrevMonth:i[7]||(i[7]=o=>r.$refs.monthYearPicker.goToPrevMonth())},null,8,["locale","calendar-days","select-day-label"])])]),_:1}))}};function Js(t,a="default"){return new Intl.DateTimeFormat(a,{weekday:"long",year:"numeric",month:"long",day:"numeric"}).format(t)}function el(t,a="default"){return new Intl.DateTimeFormat(a,{year:"numeric",month:"long",day:"numeric"}).format(t)}function tl(t,a="default",n=!0){const r=n?{weekday:"short",year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"short",day:"numeric"};return new Intl.DateTimeFormat(a,r).format(t)}function nl(t,a="default",n=!1){const r=n?"short":"long";return new Intl.DateTimeFormat(a,{month:r,day:"numeric"}).format(t)}function al(t,a="default"){return new Intl.DateTimeFormat(a,{year:"2-digit",month:"2-digit",day:"2-digit"}).format(t)}const ol={name:"DtRecipeComboboxWithPopover",components:{DtCombobox:an,DtPopover:_.DtPopover,ComboboxLoadingList:tn,ComboboxEmptyList:nn},mixins:[_.SrOnlyCloseButtonMixin],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:t=>Object.values(vt).includes(t)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return c.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:t=>Object.keys(de).some(a=>a===t)},contentWidth:{type:String,default:null,validator:t=>_.POPOVER_CONTENT_WIDTHS.includes(t)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:de,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:c.getUniqueString(),hasSlotContent:c.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(t){t!==null&&(this.isListShown=t)},immediate:!0},isListShown(t){t?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(t)}},methods:{handleDisplayList(t){!this.hasSuggestionList&&t&&this.showComboboxList(),!this.hasSuggestionList&&!t&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(t){this.loading||(this.$emit("select",t),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(t){this.loading||this.$emit("highlight",t)},onOpened(t){this.$emit("opened",t)},onFocusIn(t){var a;this.hasSuggestionList&&t&&((a=this.$refs.input)==null?void 0:a.querySelector("input"))===t.target&&this.showComboboxList()},onFocusOut(t){var r,i,o;const a=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,n=this.$refs.input;(o=t.composedPath())!=null&&o.some(s=>[a,n].includes(s))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},rl=["id"],il={ref:"header"},sl=["onMouseleave","onFocusout"],ll={ref:"footer"};function dl(t,a,n,r,i,o){const s=e.resolveComponent("combobox-loading-list"),d=e.resolveComponent("combobox-empty-list"),l=e.resolveComponent("dt-popover"),u=e.resolveComponent("dt-combobox");return e.openBlock(),e.createBlock(u,e.mergeProps({ref:"combobox",loading:n.loading,label:n.label,"label-visible":n.labelVisible,size:n.size,description:n.description,"empty-list":n.emptyList,"empty-state-message":n.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":n.onBeginningOfList,"on-end-of-list":n.onEndOfList,"list-rendered-outside":!0,"list-id":n.listId,"data-qa":"dt-combobox"},o.comboboxListeners),{input:e.withCtx(({inputProps:f})=>[e.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:a[0]||(a[0]=(...h)=>o.onFocusIn&&o.onFocusIn(...h)),onKeydown:[a[1]||(a[1]=e.withKeys(h=>o.openOnArrowKeyPress(h),["up"])),a[2]||(a[2]=e.withKeys(h=>o.openOnArrowKeyPress(h),["down"]))]},[e.renderSlot(t.$slots,"input",{inputProps:f,onInput:o.handleDisplayList})],40,rl)]),list:e.withCtx(({opened:f,listProps:h,clearHighlightIndex:p})=>[e.createVNode(l,{ref:"popover",open:i.isListShown,"onUpdate:open":a[3]||(a[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":n.maxHeight,"max-width":n.maxWidth,offset:n.popoverOffset,sticky:n.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":n.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":n.appendTo,transition:n.transition,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,"visually-hidden-close":t.visuallyHiddenClose,onOpened:f},e.createSlots({content:e.withCtx(()=>[e.createElementVNode("div",{ref:"listWrapper",class:e.normalizeClass([i.DROPDOWN_PADDING_CLASSES[n.padding],n.listClass]),onMouseleave:p,onFocusout:p},[n.loading?(e.openBlock(),e.createBlock(s,e.normalizeProps(e.mergeProps({key:0},h)),null,16)):n.emptyList&&n.emptyStateMessage?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1},h,{message:n.emptyStateMessage}),null,16,["message"])):e.renderSlot(t.$slots,"list",{key:2,listProps:h})],42,sl)]),_:2},[i.hasSlotContent(t.$slots.header)?{name:"headerContent",fn:e.withCtx(()=>[e.createElementVNode("div",il,[e.renderSlot(t.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(t.$slots.footer)?{name:"footerContent",fn:e.withCtx(()=>[e.createElementVNode("div",ll,[e.renderSlot(t.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","visually-hidden-close-label","visually-hidden-close","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const Bn=c._export_sfc(ol,[["render",dl]]),Nn={EXTRA_SMALL:"xs",SMALL:"sm",DEFAULT:"md"},Ln={xs:"xs",sm:"xs",md:"sm"},An={xs:1.4,sm:.4,md:.2},cl={name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:Bn,DtInput:m.DtInput,DtChip:St,DtValidationMessages:m.DtValidationMessages},mixins:[_.SrOnlyCloseButtonMixin],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:t=>m.validationMessageValidator(t)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.values(Nn).includes(t)},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["input","select","remove","max-selected","keyup"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,initialInputPadding:{},resizeWindowObserver:null,originalInputSize:null,CHIP_SIZES:Ln,hasSlotContent:c.hasSlotContent}},computed:{inputPlaceHolder(){var t;return((t=this.selectedItems)==null?void 0:t.length)>0?"":this.placeholder},chipListeners(){return{keyup:t=>{this.onChipKeyup(t),this.$emit("keyup",t)}}},inputListeners(){return{input:t=>{this.$emit("input",t),this.hasSuggestionList&&this.showComboboxList()},keyup:t=>{this.onInputKeyup(t),this.$emit("keyup",t)},click:t=>{this.hasSuggestionList&&this.showComboboxList()}}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const t=this.getInput();this.revertInputPadding(t),this.originalInputSize=t.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var t;(t=this.resizeWindowObserver)==null||t.unobserve(document.body)},methods:{async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(t){var a;this.$emit("remove",t),(a=this.$refs.input)==null||a.focus()},onComboboxSelect(t){this.value="",this.$emit("select",t)},showComboboxList(){var t;this.showList==null&&((t=this.$refs.comboboxWithPopover)==null||t.showComboboxList())},closeComboboxList(){var t;this.showList==null&&((t=this.$refs.comboboxWithPopover)==null||t.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(t=>t.$el.querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(t=>t.$el)},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var t;return(t=this.$refs.input)==null?void 0:t.$refs.input},onChipKeyup(t){var n;const a=(n=t.code)==null?void 0:n.toLowerCase();a==="arrowleft"?this.navigateBetweenChips(t.target,!0):a==="arrowright"&&(t.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(t.target,!1))},onInputKeyup(t){var n;const a=(n=t.code)==null?void 0:n.toLowerCase();this.selectedItems.length>0&&t.target.selectionStart===0&&(a==="backspace"||a==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var t;this.getLastChipButton().focus(),(t=this.$refs.input)==null||t.blur(),this.closeComboboxList()},moveFromChipToInput(){var t;this.getLastChipButton().blur(),(t=this.$refs.input)==null||t.focus(),this.showComboboxList()},navigateBetweenChips(t,a){var i;const n=this.getChipButtons().indexOf(t),r=a?n-1:n+1;r<0||r>=((i=this.$refs.chips)==null?void 0:i.length)||(this.getChipButtons()[n].blur(),this.getChipButtons()[r].focus(),this.closeComboboxList())},setChipsTopPosition(){const t=this.getInput();if(!t)return;const a=this.$refs.inputSlotWrapper,n=t.getBoundingClientRect().top-a.getBoundingClientRect().top,r=this.$refs.chipsWrapper;r.style.top=n-An[this.size]+"px"},setInputPadding(){const t=this.getLastChip(),a=this.getInput(),n=this.$refs.chipsWrapper;if(!a||(this.revertInputPadding(a),this.popoverOffset=[0,4],!t))return;const r=t.offsetLeft+this.getFullWidth(t);a.style.paddingLeft=r+"px";const i=n.getBoundingClientRect().height-4,o=t.offsetTop+2;i>this.originalInputSize&&(a.style.paddingTop=`${o}px`)},revertInputPadding(t){t.style.paddingLeft="",t.style.paddingTop="",t.style.paddingBottom=""},getFullWidth(t){const a=window.getComputedStyle(t);return t.offsetWidth+parseInt(a.marginLeft)+parseInt(a.marginRight)},setInputMinWidth(){const t=this.getFirstChip(),a=this.getInput();a&&(t?a.style.minWidth=this.getFullWidth(t)+4+"px":a.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)}}},ul={ref:"inputSlotWrapper",class:"combobox__input-wrapper"},hl={ref:"chipsWrapper",class:"combobox__chip-wrapper"},ml={ref:"header"},fl={key:1,class:"combobox__list--loading"},pl={ref:"footer"};function gl(t,a,n,r,i,o){const s=e.resolveComponent("dt-chip"),d=e.resolveComponent("dt-input"),l=e.resolveComponent("dt-validation-messages"),u=e.resolveComponent("dt-recipe-combobox-with-popover");return e.openBlock(),e.createBlock(u,{ref:"comboboxWithPopover",label:n.label,"show-list":n.showList,"max-height":n.listMaxHeight,"popover-offset":i.popoverOffset,"has-suggestion-list":n.hasSuggestionList,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,"visually-hidden-close":t.visuallyHiddenClose,"content-width":"anchor","append-to":n.appendTo,transition:n.transition,onSelect:o.onComboboxSelect},e.createSlots({input:e.withCtx(({onInput:f})=>[e.createElementVNode("span",ul,[e.createElementVNode("span",hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedItems,h=>(e.openBlock(),e.createBlock(s,e.mergeProps({ref_for:!0,ref:"chips",key:h,"label-class":["d-chip__label"],class:"combobox__chip","close-button-props":{ariaLabel:"close"},size:i.CHIP_SIZES[n.size]},e.toHandlers(o.chipListeners),{onKeyup:e.withKeys(p=>o.onChipRemove(h),["backspace"]),onClose:p=>o.onChipRemove(h)}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h),1)]),_:2},1040,["size","onKeyup","onClose"]))),128))],512),e.createVNode(d,e.mergeProps({ref:"input",modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=h=>i.value=h),class:"combobox__input","aria-label":n.label,label:n.labelVisible?n.label:"",description:n.description,placeholder:o.inputPlaceHolder,"show-messages":n.showInputMessages,messages:n.inputMessages,size:n.size},e.toHandlers(o.inputListeners),{onInput:f}),null,16,["modelValue","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),e.createVNode(l,{"validation-messages":n.maxSelectedMessage,"show-messages":i.showValidationMessages},null,8,["validation-messages","show-messages"])],512)]),list:e.withCtx(()=>[e.createElementVNode("div",{ref:"list",onMousedown:a[1]||(a[1]=e.withModifiers(()=>{},["prevent"]))},[n.loading?(e.openBlock(),e.createElementBlock("div",fl,e.toDisplayString(n.loadingMessage),1)):e.renderSlot(t.$slots,"list",{key:0},void 0,!0)],544)]),_:2},[i.hasSlotContent(t.$slots.header)?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ml,[e.renderSlot(t.$slots,"header",{},void 0,!0)],512)]),key:"0"}:void 0,i.hasSlotContent(t.$slots.footer)?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",pl,[e.renderSlot(t.$slots,"footer",{},void 0,!0)],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","popover-offset","has-suggestion-list","visually-hidden-close-label","visually-hidden-close","append-to","transition","onSelect"])}const _l=c._export_sfc(cl,[["render",gl],["__scopeId","data-v-659a1a3d"]]),It=["sm","md","lg","xl"],bl={name:"DtRecipeCallbarButton",components:{DtButton:m.DtButton,DtTooltip:c.DtTooltip},inheritAttrs:!1,props:{id:{type:String,default(){return c.utils.getUniqueString()}},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},ariaLabel:{type:String,default:null,validator:t=>t||(void 0).$slots.default},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:t=>It.includes(t)},importance:{type:String,default:""}},emits:["click"],computed:{callbarButtonClass(){return[this.buttonClass,"dt-recipe-callbar-button","d-px0",{"dt-recipe-callbar-button--circle":this.circle,"dt-recipe-callbar-button--active":this.active,"dt-recipe-callbar-button--danger":this.danger,"d-btn--disabled d-bgc-transparent":this.disabled,"d-fc-primary":!this.disabled}]},callbarButtonTextClass(){return["d-fs-100 lg:d-d-none md:d-d-none sm:d-d-none",this.textClass]},buttonWidth(){switch(this.buttonWidthSize){case"sm":return"4.5rem";case"md":return"6rem";default:return"8.4rem"}},buttonImportance(){return this.importance?this.importance:this.circle?"outlined":"clear"},callbarButtonListeners(){return{...c.extractVueListeners(this.$attrs),click:t=>this.$emit("click",t)}}}};function vl(t,a,n,r,i,o){const s=e.resolveComponent("dt-button"),d=e.resolveComponent("dt-tooltip");return e.openBlock(),e.createBlock(d,{id:n.id,offset:[0,8]},{anchor:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"dt-recipe-callbar-button--disabled":n.disabled})},[e.createVNode(s,e.mergeProps({importance:o.buttonImportance,kind:"muted","icon-position":"top","aria-disabled":n.disabled,"aria-label":n.ariaLabel,"label-class":o.callbarButtonTextClass,width:o.buttonWidth,class:o.callbarButtonClass},t.$attrs,e.toHandlers(o.callbarButtonListeners)),{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["importance","aria-disabled","aria-label","label-class","width","class"])],2)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),_:3},8,["id"])}const xn=c._export_sfc(bl,[["render",vl]]),yl={name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:xn,DtPopover:_.DtPopover,DtButton:m.DtButton,DtIcon:m.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return c.utils.getUniqueString()}},ariaLabel:{type:String,default:null,validator:t=>t||(void 0).$slots.default},arrowButtonLabel:{type:String,required:!0,validator:t=>!!t},placement:{type:String,default:"top"},initialFocusElement:{type:String,default:"first"},showCloseButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:t=>It.includes(t)},contentClass:{type:[String,Array,Object],default:""},openPopover:{type:Boolean,default:!1}},emits:["arrow-click","click","opened"],data(){return{open:!1}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showPopover(){return!this.openPopover||this.open?(this.syncOpenState(),!1):this.toggleOpen()}},methods:{arrowClick(t){return this.$emit("arrow-click",t),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(t){this.$props.onClick?this.$emit("click",t):this.arrowClick(t)},onModalIsOpened(t){this.open=t,this.$emit("opened",t)}}},Sl={class:"dt-recipe--callbar-button-with-popover"};function Cl(t,a,n,r,i,o){const s=e.resolveComponent("dt-recipe-callbar-button"),d=e.resolveComponent("dt-icon"),l=e.resolveComponent("dt-button"),u=e.resolveComponent("dt-popover");return e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(s,{"aria-label":n.ariaLabel,disabled:n.disabled,active:n.active,danger:n.danger,"button-class":n.buttonClass,"button-width-size":n.buttonWidthSize,"text-class":n.textClass,class:"dt-recipe--callbar-button-with-popover--main-button",onClick:o.buttonClick},{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),tooltip:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["aria-label","disabled","active","danger","button-class","button-width-size","text-class","onClick"]),o.showArrowButton?(e.openBlock(),e.createBlock(u,e.mergeProps({key:0,id:n.id,modal:!1,open:i.open,placement:n.placement,"initial-focus-element":n.initialFocusElement,"show-close-button":n.showCloseButton,offset:[0,16],padding:"none",class:"dt-recipe--callbar-button-with-popover--popover-wrapper","dialog-class":["dt-recipe--callbar-button-with-popover--popover",n.contentClass],"header-class":"d-d-flex d-ai-center d-fw-normal d-px12"},t.$attrs,{"open-popover":o.showPopover,onOpened:o.onModalIsOpened}),{anchor:e.withCtx(()=>[e.createVNode(l,{circle:"",importance:"clear",size:"lg",class:e.normalizeClass(["dt-recipe--callbar-button-with-popover--arrow",{"dt-recipe--callbar-button-with-popover--arrow--large":!o.isCompactMode}]),width:"2rem","aria-label":n.arrowButtonLabel,active:i.open,onClick:o.arrowClick},{icon:e.withCtx(()=>[e.createVNode(d,{name:"chevron-up",class:"dt-recipe--callbar-button-with-popover--arrow__icon",size:"200"})]),_:1},8,["class","aria-label","active","onClick"])]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content")]),headerContent:e.withCtx(()=>[e.renderSlot(t.$slots,"headerContent")]),footerContent:e.withCtx(()=>[e.renderSlot(t.$slots,"footerContent")]),_:3},16,["id","open","placement","initial-focus-element","show-close-button","dialog-class","open-popover","onOpened"])):e.createCommentVNode("",!0)])}const kl=c._export_sfc(yl,[["render",Cl]]),wl={name:"DtRecipeContactInfo",components:{DtAvatar:_.DtAvatar,DtListItem:_.DtListItem},props:{id:{type:String,default(){return c.utils.getUniqueString()}},role:{type:String,default:""},showAvatar:{type:Boolean,default:!0},avatarSrc:{type:String,default:""},avatarSeed:{type:String,default:null},avatarFullName:{type:String,default:""},avatarIcon:{type:String,default:null},avatarSize:{type:String,default:"lg"},avatarAriaLabel:{type:String,default:""},presence:{type:String,default:null},avatarList:{type:Array,default:null}},emits:["avatar-click"],methods:{avatarClick(){this.$emit("avatar-click")}}},El=["aria-labelledby"],Il={key:0,class:"dt-contact-info--avatars"},Dl={"data-qa":"contact-info-header"},Tl={"data-qa":"contact-info-subtitle"},Ol={"data-qa":"contact-info-bottom"},Bl={"data-qa":"contact-info-right"};function Nl(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-list-item");return e.openBlock(),e.createBlock(d,{id:n.id,role:n.role,"element-type":"div","data-qa":"contact-info",class:"dt-contact-info"},{left:e.withCtx(()=>[n.showAvatar?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dt-contact-info__left","data-qa":"contact-info-left","aria-labelledby":n.avatarAriaLabel,onClick:a[0]||(a[0]=(...l)=>o.avatarClick&&o.avatarClick(...l))},[n.avatarList?(e.openBlock(),e.createElementBlock("span",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.avatarList,(l,u)=>(e.openBlock(),e.createBlock(s,{key:u,size:n.avatarSize,seed:l.seed,"full-name":l.fullName,"image-src":l.src,"icon-name":n.avatarIcon,"overlay-icon":l.icon,"overlay-text":l.text,"avatar-class":[{"d-mln24":u>0,"d-bc-brand":!!l.halo}]},null,8,["size","seed","full-name","image-src","icon-name","overlay-icon","overlay-text","avatar-class"]))),128))])):(e.openBlock(),e.createBlock(s,{key:1,size:n.avatarSize,"full-name":n.avatarFullName,"image-src":n.avatarSrc,"icon-name":n.avatarIcon,seed:n.avatarSeed,presence:n.presence},null,8,["size","full-name","image-src","icon-name","seed","presence"]))],8,El)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Dl,[e.renderSlot(t.$slots,"header",{},void 0,!0)])]),subtitle:e.withCtx(()=>[e.createElementVNode("div",Tl,[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)])]),bottom:e.withCtx(()=>[e.createElementVNode("div",Ol,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])]),right:e.withCtx(()=>[e.createElementVNode("div",Bl,[e.renderSlot(t.$slots,"right",{},void 0,!0)])]),_:3},8,["id","role"])}const Ll=c._export_sfc(wl,[["render",Nl],["__scopeId","data-v-20548ad1"]]),Mn=["green300","green100","red200","red100","gold100","gold200","black100","white"],Al={name:"DtRecipeTopBannerInfo",props:{colorCode:{type:String,default:"green300",validator:function(t){return Mn.includes(t)}}},computed:{bannerInfoClass(){return[{green300:"d-bgc-success",green100:"d-bgc-success",red200:"d-bgc-critical",red100:"d-bgc-critical",gold200:"d-bgc-warning",gold100:"d-bgc-warning",black100:"d-bgc-info",white:"d-bgc-primary"}[this.colorCode]]}}},xl={class:"dt-top-banner-info__left"},Ml={class:"dt-top-banner-info__middle","data-qa":"banner-info--middle"},Pl={class:"dt-top-banner-info__right"};function Vl(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dt-top-banner-info",o.bannerInfoClass]),"data-qa":"banner-info"},[e.createElementVNode("div",xl,[e.renderSlot(t.$slots,"left")]),e.createElementVNode("div",Ml,[e.renderSlot(t.$slots,"default")]),e.createElementVNode("div",Pl,[e.renderSlot(t.$slots,"right")])],2)}const Rl=c._export_sfc(Al,[["render",Vl]]),Re="promptmenu",$e="promptcollect",ze="promptplay",Fe="gotoexpert",Ce="goto",qe="branch",He="transfer",Ue="hangup",Pn={[Re]:"keypad",[$e]:"dialer",[ze]:"volume-2",[Fe]:"expert-node",[qe]:"branch",[Ce]:"call-merge",[He]:"transfer",[Ue]:"phone-hang-up"},$l={[Re]:"Menu",[$e]:"Collect",[ze]:"Play",[Fe]:"Expert",[qe]:"Branch",[Ce]:"Go-to",[He]:"Transfer",[Ue]:"Hangup"},Z={PROMPT:{normal:"d-bc-blue-200",selected:"d-bc-blue-300"},LOGIC:{normal:"d-bc-purple-200",selected:"d-bc-purple-400"},TERMINAL:{normal:"d-bc-red-100",selected:"d-bc-red-200"}},zl={[Re]:Z.PROMPT,[$e]:Z.PROMPT,[ze]:Z.PROMPT,[Fe]:Z.LOGIC,[qe]:Z.LOGIC,[Ce]:Z.LOGIC,[He]:Z.TERMINAL,[Ue]:Z.TERMINAL},Fl={name:"DtRecipeIvrNode",components:{DtCard:en,DtButton:m.DtButton,DtDropdown:sn,DtIcon:m.DtIcon},props:{nodeType:{type:String,required:!0},nodeLabel:{type:String,required:!0},isSelected:{type:Boolean,default:!1},menuButtonAriaLabel:{type:String,required:!0},dtmfKey:{type:String,default:null}},emits:["click"],data(){return{isOpen:!1}},computed:{nodeListeners(){return{click:t=>this.$emit("click",t)}},nodeIcon(){return Pn[this.nodeType]},headerColor(){const{normal:t,selected:a}=zl[this.nodeType];return this.isSelected?a:t},isGotoNode(){return this.nodeType===Ce}},methods:{openMenu(){this.isOpen=!0}}},ql={class:"ivr_node__header-left"},Hl={class:"ivr_node__label","data-qa":"ivr-node-label"},Ul={class:"ivr_node__dropdown-list"};function Wl(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("dt-dropdown"),u=e.resolveComponent("dt-card");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"ivr_node"},e.toHandlers(o.nodeListeners,!0)),[n.dtmfKey?(e.openBlock(),e.createElementBlock("div",{key:0,"data-qa":"dt-top-connector-dtmf",class:e.normalizeClass(["ivr-connector ivr-connector--dtmf",{"ivr-connector--dtmf--selected":n.isSelected}])},e.toDisplayString(n.dtmfKey),3)):e.createCommentVNode("",!0),t.$slots.connector?e.renderSlot(t.$slots,"connector",{key:1}):e.createCommentVNode("",!0),!n.dtmfKey&&!t.$slots.connector?(e.openBlock(),e.createElementBlock("div",{key:2,"data-qa":"dt-top-connector",class:e.normalizeClass(["ivr-connector",{"ivr-connector--selected":n.isSelected}])},null,2)):e.createCommentVNode("",!0),e.createVNode(u,{"content-class":"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12","container-class":["d-w100p",{"d-ba d-bar8 d-baw4":n.isSelected},o.headerColor],"header-class":["d-mtn1","d-bt","d-btw4","d-p0",o.headerColor,{"d-btr4":!n.isSelected}]},{header:e.withCtx(()=>[e.createElementVNode("div",ql,[e.createVNode(d,{"aria-label":n.nodeType,importance:"clear",kind:"muted","data-qa":"dt-ivr-node-icon"},{icon:e.withCtx(()=>[e.createVNode(s,{name:o.nodeIcon,size:"200",class:e.normalizeClass(["",{ivr_node__goto_icon:o.isGotoNode}])},null,8,["name","class"])]),_:1},8,["aria-label"]),e.createElementVNode("p",Hl,e.toDisplayString(n.nodeLabel),1)]),e.createVNode(l,{open:i.isOpen,"onUpdate:open":a[0]||(a[0]=f=>i.isOpen=f),placement:"bottom"},{anchor:e.withCtx(()=>[e.createVNode(d,{importance:"clear",kind:"muted","aria-label":n.menuButtonAriaLabel,onClick:e.withModifiers(o.openMenu,["stop","prevent"])},{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"200"})]),_:1},8,["aria-label","onClick"])]),list:e.withCtx(({close:f})=>[e.createElementVNode("div",Ul,[e.renderSlot(t.$slots,"menuItems",{close:f})])]),_:3},8,["open"])]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content")]),_:3},8,["container-class","header-class"])],16)}const Kl=c._export_sfc(Fl,[["render",Wl]]),jl={name:"DtRecipeGroupedChip",components:{DtChip:St},data(){return{hasSlotContent:c.hasSlotContent}}},Yl={"data-qa":"grouped-chip",class:"dt-grouped-chip"},Gl={key:0,"data-qa":"left-grouped-chip-icon"},Ql={key:0,"data-qa":"left-grouped-chip-content"},Zl={key:0,"data-qa":"right-grouped-chip-icon"},Xl={key:0,"data-qa":"right-grouped-chip-content"};function Jl(t,a,n,r,i,o){const s=e.resolveComponent("dt-chip");return e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(s,{"hide-close":!0,interactive:!1,"content-class":"d-fs100",size:"xs","grouped-chip":!0,class:"dt-chip-content dt-chip-content--left"},e.createSlots({default:e.withCtx(()=>[i.hasSlotContent(t.$slots.leftContent)?(e.openBlock(),e.createElementBlock("div",Ql,[e.renderSlot(t.$slots,"leftContent")])):e.createCommentVNode("",!0)]),_:2},[i.hasSlotContent(t.$slots.leftIcon)?{name:"icon",fn:e.withCtx(()=>[i.hasSlotContent(t.$slots.leftIcon)?(e.openBlock(),e.createElementBlock("div",Gl,[e.renderSlot(t.$slots,"leftIcon")])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1024),e.createVNode(s,{"hide-close":!0,interactive:!1,"content-class":"d-fs100",size:"xs","grouped-chip":!0,class:"dt-chip-content dt-chip-content--right"},{icon:e.withCtx(()=>[i.hasSlotContent(t.$slots.rightIcon)?(e.openBlock(),e.createElementBlock("div",Zl,[e.renderSlot(t.$slots,"rightIcon")])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[i.hasSlotContent(t.$slots.rightContent)?(e.openBlock(),e.createElementBlock("div",Xl,[e.renderSlot(t.$slots,"rightContent")])):e.createCommentVNode("",!0)]),_:3})])}const ed=c._export_sfc(jl,[["render",Jl]]),td={name:"DtRecipeSettingsMenuButton",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},inheritAttrs:!1,props:{updateAvailable:{type:Boolean,default:!1},ariaLabel:{type:String,required:!0}}};function nd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return n.updateAvailable?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,importance:"outlined",size:"xs","icon-position":"right",class:"settings-menu-button-update","aria-label":n.ariaLabel},t.$attrs),{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"300"})]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16,["aria-label"])):(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,importance:"clear",kind:"inverted",class:"settings-menu-button","aria-label":n.ariaLabel},t.$attrs),{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"300"})]),_:1},16,["aria-label"]))}const ad=c._export_sfc(td,[["render",nd],["__scopeId","data-v-b0dfa8b3"]]),x={INBOX:"inbox",CONTACTS:"contacts",CHANNELS:"channels",THREADS:"threads",LOCKED_CHANNEL:"locked channel",CONTACT_CENTER:"contact center",QUICK_START:"quick start",COACHING_GROUP:"coaching group",COACHING_CENTER:"coaching center",DIALBOT:"dialbot",ASSIGNED:"assigned",DIGITAL:"digital"},Vn={[x.INBOX]:"inbox",[x.CONTACTS]:"contacts",[x.CHANNELS]:"hash",[x.THREADS]:"thread",[x.LOCKED_CHANNEL]:"lock",[x.QUICK_START]:"sparkle",[x.COACHING_GROUP]:"users",[x.COACHING_CENTER]:"external-link","locked channel unread":"lock-filled","channel unread":"hash-bold",[x.ASSIGNED]:"at-sign",[x.DIGITAL]:"laptop-2"},Se={"magenta-200":"d-bgc-magenta-200","green-200":"d-bgc-green-200","gold-300":"d-bgc-gold-300","purple-600":"d-bgc-purple-600","magenta-300":"d-bgc-magenta-300","purple-300":"d-bgc-purple-300","green-500":"d-bgc-green-500","purple-100":"d-bgc-purple-100","magenta-400":"d-bgc-magenta-400","magenta-100":"d-bgc-magenta-100","black-300":"d-bgc-black-300"},Rn="If type is contact center, color must be oneof the following:"+Object.keys(Se).join(", "),$n=["300","200"],od={name:"DtRecipeLeftbarGeneralRowIcon",components:{DtIcon:m.DtIcon},props:{type:{type:String,default:null},color:{type:String,default:null},iconSize:{type:String,default:"300"}},computed:{isIconType(){return![x.DIALBOT,x.CONTACT_CENTER].includes(this.type)},isContactCenterType(){return this.type===x.CONTACT_CENTER},isDialbotType(){return this.type===x.DIALBOT},getIconName(){return Vn[this.type]},contactCenterIconClasses(){return["dt-leftbar-row__icon-cc",Se[this.color]]},dialbotClasses(){return["d-d-flex","d-ai-center","d-jc-center"]}}};function rd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return o.isIconType?(e.openBlock(),e.createBlock(s,{key:0,name:o.getIconName,size:n.iconSize},null,8,["name","size"])):o.isContactCenterType?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.contactCenterIconClasses)},null,2)):o.isDialbotType?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(o.dialbotClasses),"data-qa":"general-row-dialbot"},[e.createVNode(s,{name:"dialbot",size:"500"})],2)):e.createCommentVNode("",!0)}const id=c._export_sfc(od,[["render",rd]]),sd={name:"DtRecipeGeneralRow",components:{DtEmojiTextWrapper:_t._sfc_main,DtBadge:Ae,DtIcon:m.DtIcon,DtButton:m.DtButton,DtTooltip:c.DtTooltip,DtRecipeLeftbarGeneralRowIcon:id},inheritAttrs:!1,props:{type:{type:String,default:"inbox",validator:t=>Object.values(x).includes(t)},ariaLabel:{type:String,default:""},description:{type:String,required:!0},color:{type:String,default:null,validator:t=>Object.keys(Se).includes(t)},hasUnreads:{type:Boolean,default:!1},unreadCount:{type:String,default:null},unreadCountTooltip:{type:String,default:""},selected:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},activeVoiceChat:{type:Boolean,default:!1},dndText:{type:String,default:""},dndTextTooltip:{type:String,default:""},hasCallButton:{type:Boolean,default:!1},callButtonTooltip:{type:String,default:""},isTyping:{type:Boolean,default:!1},iconSize:{type:String,default:"300",validator:t=>$n.includes(t)}},emits:["call"],data(){return{actionFocused:!1,labelWidth:"100%"}},computed:{leftbarGeneralRowClasses(){return["dt-leftbar-row",{"dt-leftbar-row--no-action":!this.hasCallButton,"dt-leftbar-row--has-unread":this.hasUnreads,"dt-leftbar-row--unread-count":this.showUnreadCount,"dt-leftbar-row--selected":this.selected,"dt-leftbar-row--muted":this.muted,"dt-leftbar-row--action-focused":this.actionFocused}]},getIcon(){switch(this.type){case x.CHANNELS:if(this.hasUnreads)return"channel unread";break;case x.LOCKED_CHANNEL:if(this.hasUnreads)return"locked channel unread";break}return this.type},generalRowListeners(){return c.extractVueListeners(this.$attrs)},getAriaLabel(){return this.ariaLabel?this.ariaLabel:c.safeConcatStrings([this.description,this.unreadCountTooltip,this.dndTextTooltip])},hasActions(){return this.dndText||this.activeVoiceChat||this.showUnreadCount||this.hasCallButton},showUnreadCount(){return!!this.unreadCount&&this.hasUnreads}},watch:{$props:{immediate:!0,deep:!0,async handler(){this.validateProps(),await this.$nextTick(),this.adjustLabelWidth()}}},mounted(){this.resizeObserver=new ResizeObserver(this.adjustLabelWidth),this.resizeObserver.observe(this.$el),this.adjustLabelWidth()},beforeUnmount:function(){this.resizeObserver.disconnect()},methods:{validateProps(){this.type===x.CONTACT_CENTER&&!Object.keys(Se).includes(this.color)&&console.error(Rn)},adjustLabelWidth(){var i,o,s,d,l,u;const t=((o=(i=this.$el)==null?void 0:i.querySelector(".dt-leftbar-row__primary"))==null?void 0:o.clientWidth)||0,a=((d=(s=this.$el)==null?void 0:s.querySelector(".dt-leftbar-row__omega"))==null?void 0:d.clientWidth)||0,n=((u=(l=this.$el)==null?void 0:l.querySelector(".dt-leftbar-row__alpha"))==null?void 0:u.clientWidth)||0,r=16;this.labelWidth=t-(a+n+r)+"px"}}},Dt=t=>(e.pushScopeId("data-v-49d75ce6"),t=t(),e.popScopeId(),t),ld=["data-qa","aria-label","title","href"],dd={class:"dt-leftbar-row__alpha"},cd={key:0,class:"dt-leftbar-row__is-typing"},ud=Dt(()=>e.createElementVNode("span",null,null,-1)),hd=Dt(()=>e.createElementVNode("span",null,null,-1)),md=Dt(()=>e.createElementVNode("span",null,null,-1)),fd=[ud,hd,md],pd={key:0,class:"dt-leftbar-row__omega"},gd={key:1,class:"dt-leftbar-row__active-voice"},_d={key:3,class:"dt-leftbar-row__action","data-qa":"dt-leftbar-row-action"};function bd(t,a,n,r,i,o){const s=e.resolveComponent("dt-recipe-leftbar-general-row-icon"),d=e.resolveComponent("dt-emoji-text-wrapper"),l=e.resolveComponent("dt-tooltip"),u=e.resolveComponent("dt-icon"),f=e.resolveComponent("dt-badge"),h=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.leftbarGeneralRowClasses),"data-qa":"dt-leftbar-row"},[e.createElementVNode("a",e.mergeProps({class:"dt-leftbar-row__primary","data-qa":"data-qa"in t.$attrs?t.$attrs["data-qa"]:"dt-leftbar-row-link","aria-label":o.getAriaLabel,title:n.description,href:"href"in t.$attrs?t.$attrs.href:"javascript:void(0)"},t.$attrs,e.toHandlers(o.generalRowListeners,!0)),[e.createElementVNode("div",dd,[n.isTyping?(e.openBlock(),e.createElementBlock("div",cd,fd)):e.renderSlot(t.$slots,"left",{key:1},()=>[e.createVNode(s,{type:o.getIcon,color:n.color,"icon-size":n.iconSize,"data-qa":"dt-leftbar-row-icon"},null,8,["type","color","icon-size"])],!0)]),e.createElementVNode("div",{class:"dt-leftbar-row__label",style:e.normalizeStyle(`flex-basis: ${i.labelWidth}`)},[e.renderSlot(t.$slots,"label",{},()=>[e.createVNode(d,{class:"dt-leftbar-row__description","data-qa":"dt-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.description),1)]),_:1})],!0)],4)],16,ld),o.hasActions?(e.openBlock(),e.createElementBlock("div",pd,[n.dndText?(e.openBlock(),e.createBlock(l,{key:0,placement:"top",message:n.dndTextTooltip},{anchor:e.withCtx(()=>[e.createElementVNode("div",{ref:"dt-leftbar-row-dnd",class:"dt-leftbar-row__dnd","data-qa":"dt-leftbar-row-dnd"},e.toDisplayString(n.dndText),513)]),_:1},8,["message"])):e.createCommentVNode("",!0),n.activeVoiceChat?(e.openBlock(),e.createElementBlock("div",gd,[e.createVNode(u,{size:"300",name:"waveform"})])):o.showUnreadCount?(e.openBlock(),e.createBlock(l,{key:2,message:n.unreadCountTooltip,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(f,{kind:"count",type:"bulletin","data-qa":"dt-leftbar-row-unread-badge",class:"dt-leftbar-row__unread-badge"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.unreadCount),1)]),_:1})]),_:1},8,["message"])):e.createCommentVNode("",!0),n.hasCallButton?(e.openBlock(),e.createElementBlock("div",_d,[e.createVNode(l,{message:n.callButtonTooltip,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(h,{class:"dt-leftbar-row__action-button","data-qa":"dt-leftbar-row-action-call-button",circle:!0,size:"xs",kind:"inverted","aria-label":n.callButtonTooltip,onFocus:a[0]||(a[0]=p=>i.actionFocused=!0),onBlur:a[1]||(a[1]=p=>i.actionFocused=!1),onClick:a[2]||(a[2]=e.withModifiers(p=>t.$emit("call",p),["stop"]))},{icon:e.withCtx(()=>[e.createVNode(u,{name:"phone",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)}const Tt=c._export_sfc(sd,[["render",bd],["__scopeId","data-v-49d75ce6"]]),vd={name:"DtRecipeGroupRow",components:{DtIcon:m.DtIcon,DtRecipeGeneralRow:Tt},inheritAttrs:!1,props:{groupCountText:{type:String,default:""},names:{type:String,required:!0},unreadCount:{type:String,default:null},unreadCountTooltip:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1}},emits:[],computed:{ariaLabel(){return c.safeConcatStrings([this.groupCountText,this.names])},contactRowListeners(){return c.extractVueListeners(this.$attrs)}}};function yd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(d,e.mergeProps({description:n.names,"aria-label":o.ariaLabel,"unread-count":n.unreadCount,"has-unreads":n.hasUnreads,"unread-count-tooltip":n.unreadCountTooltip,selected:n.selected,"is-typing":n.isTyping},t.$attrs,e.toHandlers(o.contactRowListeners)),{left:e.withCtx(()=>[e.createVNode(s,{name:"users",size:"300"})]),_:1},16,["description","aria-label","unread-count","has-unreads","unread-count-tooltip","selected","is-typing"])}const Sd=c._export_sfc(vd,[["render",yd]]),Cd={name:"DtRecipeContactRow",components:{DtAvatar:_.DtAvatar,DtRecipeGeneralRow:Tt,DtEmojiTextWrapper:_t._sfc_main},inheritAttrs:!1,props:{avatarSrc:{type:String,default:""},avatarAlt:{type:String,default:""},avatarPresence:{type:String,default:null},avatarSeed:{type:String,default:null},presenceText:{type:String,default:""},name:{type:String,required:!0},userStatus:{type:String,default:""},muted:{type:Boolean,default:!1},unreadCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},noInitials:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},hasCallButton:{type:Boolean,default:!0},callButtonTooltip:{type:String,default:""},unreadCountTooltip:{type:String,default:""}},emits:["call"],computed:{presenceColorClass(){switch(this.avatarPresence){case"active":return"d-fc-success";case"busy":return"d-fc-critical";case"away":return"d-fc-warning";default:return}},contactRowListeners(){return c.extractVueListeners(this.$attrs)},contactDescription(){return c.safeConcatStrings([this.name,this.presenceText,this.userStatus])},iconName(){return this.noInitials?"user":null}}},kd={class:"dt-leftbar-row__status"};function wd(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-emoji-text-wrapper"),l=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(l,e.mergeProps({"unread-count":n.unreadCount,description:o.contactDescription,"has-unreads":n.hasUnreads,selected:n.selected,"has-call-button":n.hasCallButton,muted:n.muted,"is-typing":n.isTyping,"call-button-tooltip":n.callButtonTooltip,"unread-count-tooltip":n.unreadCountTooltip},t.$attrs,e.toHandlers(o.contactRowListeners),{onCall:a[0]||(a[0]=u=>t.$emit("call",u))}),{left:e.withCtx(()=>[e.createVNode(s,{"full-name":n.name,"image-src":n.avatarSrc,"image-alt":n.avatarAlt,"icon-name":o.iconName,"icon-size":"200",size:"sm",seed:n.avatarSeed,presence:n.avatarPresence},null,8,["full-name","image-src","image-alt","icon-name","seed","presence"])]),label:e.withCtx(()=>[e.createVNode(d,{class:"dt-leftbar-row__description","data-qa":"dt-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:1}),e.createElementVNode("div",kd,[n.presenceText?(e.openBlock(),e.createElementBlock("span",{key:0,"data-qa":"dt-leftbar-row-presence-text",class:e.normalizeClass(["dt-leftbar-row__meta-context",o.presenceColorClass])},e.toDisplayString(n.presenceText),3)):e.createCommentVNode("",!0),n.userStatus?(e.openBlock(),e.createBlock(d,{key:1,size:"100","element-type":"span","data-qa":"dt-leftbar-row-user-status",class:"dt-leftbar-row__meta-custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.userStatus),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},16,["unread-count","description","has-unreads","selected","has-call-button","muted","is-typing","call-button-tooltip","unread-count-tooltip"])}const Ed=c._export_sfc(Cd,[["render",wd]]),zn=["up","down"],Fn=["mentions","messages"],Id={name:"DtRecipeUnreadPill",components:{DtIcon:m.DtIcon},props:{kind:{type:String,required:!0,validator:t=>Fn.includes(t)},direction:{type:String,required:!0,validator:t=>zn.includes(t)}},emits:["click"],computed:{unreadChipListeners(){return{click:t=>this.$emit("click",t)}}}},Dd={"data-qa":"dt-leftbar-unread-pill__label"};function Td(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return e.openBlock(),e.createElementBlock("button",e.mergeProps({class:["dt-leftbar-unread-pill",`dt-leftbar-unread-pill--${n.kind}`],type:"button","data-qa":"dt-leftbar-unread-pill"},e.toHandlers(o.unreadChipListeners,!0)),[e.createVNode(s,{name:`arrow-${n.direction}`,size:"300"},null,8,["name"]),e.createElementVNode("span",Dd,[e.renderSlot(t.$slots,"default")])],16)}const Od=c._export_sfc(Id,[["render",Td]]),mt={NORMAL:"",SEARCHED:"dt-feed-item-row--state-searched",ERROR:"dt-feed-item-row--state-error"},ve="NORMAL",Bd={name:"DtRecipeFeedItemRow",components:{DtAvatar:_.DtAvatar,DtLazyShow:c.DtLazyShow,DtListItem:_.DtListItem,DtBadge:Ae},mixins:[_.Modal],inheritAttrs:!1,props:{avatarSeed:{type:String,default:null},showHeader:{type:Boolean,default:!1},avatarImageUrl:{type:String,default:""},displayName:{type:String,default:""},time:{type:String,default:""},shortTime:{type:String,default:""},labelText:{type:String,default:""},isActive:{type:Boolean,default:!1},state:{type:String,default:ve,validator:t=>Object.keys(mt).includes(t)}},emits:["hover","focus","keydown"],data(){return{transitionActive:!1}},computed:{feedListeners(){return{mouseenter:()=>this.setHover(!0),mouseleave:()=>this.setHover(!1),focusin:()=>this.setFocus(!0),focusout:()=>this.setFocus(!1),transitionend:()=>this.transitionComplete(),keydown:t=>{switch(t.code){case"Tab":this.trapFocus(t);break}this.$emit("keydown",t)}}},listItemClasses(){return["dt-feed-item-row",{"dt-feed-item-row--active":this.isActive&&this.state===ve},{"dt-feed-item-row--state-transition":this.transitionActive},mt[this.state]]}},watch:{state:{immediate:!0,handler:function(t,a){t!==ve&&(this.transitionActive=!0)}}},methods:{transitionComplete(){this.state===ve&&(this.transitionActive=!1)},trapFocus(t){this.focusTrappedTabPress(t)},setFocus(t){this.$emit("focus",t)},setHover(t){this.$emit("hover",t)}}},Nd={key:0,class:"dt-feed-item-row__avatar-container"},Ld={class:"dt-feed-item-row__content"},Ad={key:0,"data-qa":"dt-feed-item-row--header",class:"dt-feed-item-row__header"},xd={class:"dt-feed-item-row__header__name"},Md={class:"dt-feed-item-row__header__time"},Pd={"data-qa":"dt-feed-item-row--content"},Vd={key:0,class:"dt-feed-item-row__reactions","data-qa":"dt-feed-item-row--reactions"},Rd={key:1,class:"dt-feed-item-row__threading"},$d={"data-qa":"dt-feed-item-row--menu",class:"dt-feed-item-row__menu"};function zd(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-badge"),l=e.resolveComponent("dt-lazy-show"),u=e.resolveComponent("dt-list-item");return e.openBlock(),e.createBlock(u,e.mergeProps({ref:"FeedItemRef","navigation-type":"none"},t.$attrs,{class:["dt-feed-item-row",o.listItemClasses],"data-qa":"dt-feed-item-row"},e.toHandlers(o.feedListeners)),{left:e.withCtx(()=>[n.showHeader?(e.openBlock(),e.createElementBlock("div",Nd,[e.renderSlot(t.$slots,"avatar",{},()=>[e.createVNode(s,{"full-name":n.displayName,"image-src":n.avatarImageUrl,seed:n.avatarSeed},null,8,["full-name","image-src","seed"])],!0)])):e.createCommentVNode("",!0),n.showHeader?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:1,class:"dt-feed-item-row__left-time","data-qa":"dt-feed-item-row--left-time"},e.toDisplayString(n.shortTime),513)),[[e.vShow,n.isActive]])]),bottom:e.withCtx(()=>[t.$slots.reactions?(e.openBlock(),e.createElementBlock("div",Vd,[e.renderSlot(t.$slots,"reactions",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.threading?(e.openBlock(),e.createElementBlock("div",Rd,[e.renderSlot(t.$slots,"threading",{},void 0,!0)])):e.createCommentVNode("",!0)]),right:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",$d,[e.createVNode(l,{appear:!0,transition:"fade",show:n.isActive},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"menu",{},void 0,!0)]),_:3},8,["show"])],512),[[e.vShow,n.isActive]])]),default:e.withCtx(()=>[e.createElementVNode("article",Ld,[n.showHeader?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("p",xd,e.toDisplayString(n.displayName),1),e.createElementVNode("time",Md,e.toDisplayString(n.time),1),n.labelText?(e.openBlock(),e.createBlock(d,{key:0,text:n.labelText},null,8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Pd,[e.renderSlot(t.$slots,"default",{},void 0,!0)])])]),_:3},16,["class"])}const Fd=c._export_sfc(Bd,[["render",zd],["__scopeId","data-v-6f22a9bd"]]),ft={default:"dt-recipe-feed-item-pill__border-default",ai:"dt-recipe-feed-item-pill__border-ai",critical:"dt-recipe-feed-item-pill__border-critical"},qd={name:"DtRecipeFeedItemPill",components:{DtItemLayout:_.DtItemLayout,DtIcon:m.DtIcon,DtCollapsible:on},props:{iconName:{type:String,default:()=>""},title:{type:String,default:()=>""},wrapperClass:{type:[String,Array,Object],default:""},buttonClass:{type:[String,Array,Object],default:""},ariaLabel:{type:String,required:!0},toggleable:{type:Boolean,default:()=>!0},defaultToggled:{type:Boolean,default:()=>!1},borderColor:{type:String,default:"default",validator:t=>Object.keys(ft).includes(t)}},data(){return{hover:!1,expanded:this.defaultToggled}},computed:{computedIcon(){return this.toggleable&&this.hover?this.expanded?"chevron-down":"chevron-right":this.iconName},toggleableClass(){return this.toggleable?"d-c-pointer":""},borderClass(){return ft[this.borderColor]}},methods:{onClick(){this.toggleable&&(this.expanded=!this.expanded)}}},Hd={class:"dt-recipe-feed-item-pill__wrapper"},Ud=["aria-label"],Wd={class:"dt-recipe-feed-item-pill__title"},Kd={class:"dt-recipe-feed-item-pill__content"};function jd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-item-layout"),l=e.resolveComponent("dt-collapsible");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dt-recipe-feed-item-pill__border",o.borderClass,n.wrapperClass])},[e.createElementVNode("div",Hd,[e.createVNode(l,{open:i.expanded},{anchor:e.withCtx(()=>[e.createElementVNode("button",{"data-qa":"dt-recipe-feed-item-pill","aria-label":n.ariaLabel,class:e.normalizeClass(["dt-recipe-feed-item-pill__button",o.toggleableClass,n.buttonClass]),onFocusin:a[0]||(a[0]=u=>i.hover=!0),onFocusout:a[1]||(a[1]=u=>i.hover=!1),onMouseenter:a[2]||(a[2]=u=>i.hover=!0),onMouseleave:a[3]||(a[3]=u=>i.hover=!1),onClick:a[4]||(a[4]=(...u)=>o.onClick&&o.onClick(...u))},[e.createVNode(d,{class:"dt-recipe-feed-item-pill__layout"},{left:e.withCtx(()=>[e.createVNode(s,{"data-qa":"dt-recipe-feed-item-pill__icon",size:"300",class:"dt-recipe-feed-item-pill__icon",name:o.computedIcon},null,8,["name"])]),subtitle:e.withCtx(()=>[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)]),bottom:e.withCtx(()=>[e.renderSlot(t.$slots,"bottom",{},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(t.$slots,"right",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},()=>[e.createElementVNode("span",Wd,e.toDisplayString(n.title),1)],!0)]),_:3})],42,Ud)]),content:e.withCtx(()=>[e.createElementVNode("div",Kd,[e.renderSlot(t.$slots,"content",{},void 0,!0)])]),_:3},8,["open"])])],2)}const Yd=c._export_sfc(qd,[["render",jd],["__scopeId","data-v-ebc5dd1f"]]),Gd={name:"DtRecipeTimePill",props:{dateTimeDisplay:{type:String,required:!0},dateTime:{type:String,required:!0,validator:t=>{const a=new Date(t);return a instanceof Date&&!isNaN(a)}}}},Qd=["dateTime"];function Zd(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("time",{"data-qa":"dt-time-pill",dateTime:n.dateTime,class:"dt-time-pill"},e.toDisplayString(n.dateTimeDisplay),9,Qd)}const Xd=c._export_sfc(Gd,[["render",Zd]]),qn=["emojiUnicodeOrShortname","isSelected","ariaLabel","tooltip","num"],Jd={name:"DtRecipeEmojiRow",components:{DtTooltip:c.DtTooltip,DtButton:m.DtButton,DtEmoji:m.DtEmoji,DtEmojiTextWrapper:_t._sfc_main},mixins:[],props:{reactions:{type:Array,default:()=>[],validator:t=>{for(const a of t)if(!qn.every(r=>a[r]!==void 0))return!1;return!0}}},emits:["emoji-clicked","emoji-hovered"],methods:{emojiClicked(t){this.$emit("emoji-clicked",t.emojiUnicodeOrShortname)},emojiHovered(t,a){this.$emit("emoji-hovered",{reaction:t.emojiUnicodeOrShortname,state:a})}}},ec={class:"dt-emoji-row"},tc=["reaction"],nc={"aria-hidden":"true"},ac={class:"dt-emoji-row__emoji"},oc={class:"dt-emoji-row__reaction-number"};function rc(t,a,n,r,i,o){const s=e.resolveComponent("dt-emoji-text-wrapper"),d=e.resolveComponent("dt-emoji"),l=e.resolveComponent("dt-button"),u=e.resolveComponent("dt-tooltip");return e.openBlock(),e.createElementBlock("span",ec,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.reactions,f=>(e.openBlock(),e.createElementBlock("span",{key:f.unicodeOutput,reaction:f},[e.createVNode(u,{class:"dt-emoji-row__tooltip","content-class":"d-wmx464",onShown:h=>o.emojiHovered(f,h)},{anchor:e.withCtx(({attrs:h})=>[e.createVNode(l,{importance:"clear",size:"sm","data-qa":"feed-item-reaction-button",class:e.normalizeClass(["dt-emoji-row__reaction",f.isSelected?"dt-emoji-row__reaction--selected":""]),"aria-label":f.ariaLabel,attrs:h,onClick:p=>o.emojiClicked(f)},{default:e.withCtx(()=>[e.createElementVNode("span",ac,[e.createVNode(d,{size:"200",code:f.emojiUnicodeOrShortname},null,8,["code"])]),e.createElementVNode("span",oc,e.toDisplayString(f.num),1)]),_:2},1032,["class","aria-label","attrs","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",nc,[e.createVNode(s,{size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.tooltip),1)]),_:2},1024)])]),_:2},1032,["onShown"])],8,tc))),128)),e.renderSlot(t.$slots,"picker")])}const ic=c._export_sfc(Jd,[["render",rc]]),sc={name:"DtProgressBar",props:{progressbarAriaLabel:{type:String,required:!0},progress:{type:Number,default:20}},data:()=>({circleCircumference:50}),computed:{cssVars(){return{"--stroke-dashoffset":this.circleCircumference-this.circleCircumference*this.progress/100,"--stroke-dasharray":this.circleCircumference}}},mounted(){this.circleCircumference=this.$refs.progressbarCircle.getTotalLength()}},lc=["aria-label","aria-valuenow"],dc={ref:"progressbarCircle",r:"8",cx:"12",cy:"12",class:"progress-bar__circle"},cc=e.createElementVNode("circle",{r:"8",cx:"12",cy:"12",class:"progress-bar__circle"},null,-1);function uc(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-label":n.progressbarAriaLabel,tabindex:"-1","aria-valuenow":n.progress,"aria-valuemin":"0","aria-valuemax":"100"},[(e.openBlock(),e.createElementBlock("svg",{class:"progress-bar",style:e.normalizeStyle(o.cssVars)},[e.createElementVNode("circle",dc,null,512),cc],4))],8,lc)}const hc=c._export_sfc(sc,[["render",uc]]),mc={name:"DtImageCarousel",components:{DtImageViewer:ln,DtButton:m.DtButton,DtIcon:m.DtIcon,DtProgressBar:hc},props:{mediaItem:{type:Object,required:!0},index:{type:Number,required:!0},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0}},emits:["remove-media"],methods:{removeMediaItem(t){this.$emit("remove-media",t)}}},fc={class:"dt-attachment-image"},pc={class:"dt-attachment-image__top-right"};function gc(t,a,n,r,i,o){const s=e.resolveComponent("dt-image-viewer"),d=e.resolveComponent("dt-progress-bar"),l=e.resolveComponent("dt-icon"),u=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("li",fc,[e.createVNode(s,{"image-button-class":"dt-attachment-image__image-viewer","image-src":n.mediaItem.path,"image-alt":n.mediaItem.altText,"close-aria-label":n.closeAriaLabel,"aria-label":n.clickToOpenAriaLabel},null,8,["image-src","image-alt","close-aria-label","aria-label"]),e.createElementVNode("div",pc,[n.mediaItem.isUploading?(e.openBlock(),e.createBlock(d,{key:0,class:"dt-attachment-image__progress-bar",progress:n.mediaItem.progress,"progressbar-aria-label":n.progressbarAriaLabel},null,8,["progress","progressbar-aria-label"])):e.createCommentVNode("",!0),e.createVNode(u,{id:`closeButton-${n.index}`,tabindex:"0",class:"dt-attachment-image__close-button",circle:"",size:"xs",importance:"clear","aria-label":n.closeAriaLabel,onClick:a[0]||(a[0]=f=>o.removeMediaItem(n.index))},{icon:e.withCtx(()=>[e.createVNode(l,{name:"close",size:"200"})]),_:1},8,["id","aria-label"])])])}const _c=c._export_sfc(mc,[["render",gc]]),bc=64,vc={name:"DtRecipeAttachmentCarousel",components:{DtButton:m.DtButton,DtIcon:m.DtIcon,DtImageCarousel:_c},mixins:[],props:{mediaList:{type:Array,default:()=>[]},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0},leftArrowAriaLabel:{type:String,required:!0},rightArrowAriaLabel:{type:String,required:!0}},emits:["remove-media"],data(){return{showCloseButton:{},showRightArrow:!0,showLeftArrow:!1,isMounted:!1}},computed:{filteredMediaList(){return this.mediaList.filter(t=>t.type==="image"||t.type==="video")}},mounted:function(){this.showLeftArrow=this.$refs.carousel.scrollLeft>0,this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth},methods:{onItemFocus(t){t.currentTarget.scrollIntoView({behavior:"smooth"})},mediaComponent(t){switch(t){case"image":return"dt-image-carousel";default:return null}},removeMediaItem(t){this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth+bc,this.$emit("remove-media",t)},closeButton(t,a){this.showCloseButton[a]=t},handleScroll(){const t=this.$refs.carousel;this.showLeftArrow=t.scrollLeft>0,this.showRightArrow=t.scrollLeft+t.clientWidth!==t.scrollWidth},leftScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft-100,behavior:"smooth"})},rightScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft+100,behavior:"smooth"})}}},yc={class:"dt-attachment-carousel",role:"presentation"};function Sc(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",yc,[n.mediaList.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,ref:"carousel",class:"dt-attachment-carousel__media-list",onScroll:a[0]||(a[0]=(...l)=>o.handleScroll&&o.handleScroll(...l))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.filteredMediaList,(l,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.mediaComponent(l.type)),{key:`media-${u}`,index:u,"media-item":l,"close-aria-label":n.closeAriaLabel,"click-to-open-aria-label":n.clickToOpenAriaLabel,"progressbar-aria-label":n.progressbarAriaLabel,onRemoveMedia:f=>o.removeMediaItem(u),onFocusin:o.onItemFocus},null,40,["index","media-item","close-aria-label","click-to-open-aria-label","progressbar-aria-label","onRemoveMedia","onFocusin"]))),128))],544)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(d,{tabindex:"-1","aria-label":n.leftArrowAriaLabel,class:"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left",circle:"",size:"xs",importance:"clear",onClick:o.leftScroll},{icon:e.withCtx(()=>[e.createVNode(s,{name:"arrow-left",size:"100"})]),_:1},8,["aria-label","onClick"]),[[e.vShow,i.showLeftArrow]]),e.withDirectives(e.createVNode(d,{tabindex:"-1","aria-label":n.rightArrowAriaLabel,class:"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right",circle:"",size:"xs",importance:"clear",onClick:o.rightScroll},{icon:e.withCtx(()=>[e.createVNode(s,{name:"arrow-right",size:"100"})]),_:1},8,["aria-label","onClick"]),[[e.vShow,i.showRightArrow]])])}const Cc=c._export_sfc(vc,[["render",Sc]]),kc=[/^https?:\/\//,/^http?:\/\//,/^ftp?:\/\//,/^ftps?:\/\//,/^ftps?:\/\//,/mailto:([^?]*)/],wc="https://",Ec={name:"DtRecipeEditor",components:{DtRichTextEditor:_.DtRichTextEditor,DtButton:m.DtButton,DtIcon:m.DtIcon,DtPopover:_.DtPopover,DtStack:_.DtStack,DtInput:m.DtInput,DtTooltip:c.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?_.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},placeholder:{type:String,default:""},maxHeight:{type:String,default:"unset"},confirmSetLinkButton:{type:Object,default:()=>({label:"Confirm",ariaLabel:"Confirm set link"})},removeLinkButton:{type:Object,default:()=>({label:"Remove",ariaLabel:"Remove link"})},cancelSetLinkButton:{type:Object,default:()=>({label:"Cancel",ariaLabel:"Cancel set link"})},setLinkPlaceholder:{type:String,default:""},showBoldButton:{type:Boolean,default:!0},showItalicsButton:{type:Boolean,default:!0},showUnderlineButton:{type:Boolean,default:!0},showStrikeButton:{type:Boolean,default:!0},showListItemsButton:{type:Boolean,default:!0},showOrderedListButton:{type:Boolean,default:!0},showAlignLeftButton:{type:Boolean,default:!0},showAlignCenterButton:{type:Boolean,default:!0},showAlignRightButton:{type:Boolean,default:!0},showAlignJustifyButton:{type:Boolean,default:!0},showQuoteButton:{type:Boolean,default:!0},showCodeBlockButton:{type:Boolean,default:!0},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0,setLinkTitle:"Add a link",setLinkInputAriaLabel:"Input field to add link"})}},emits:["focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,linkOptions:{class:"d-link d-c-text d-d-inline-block"},showLinkInput:!1,linkInput:""}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return _.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},showingTextFormatButtons(){return this.showBoldButton||this.showItalicsButton||this.showStrikeButton||this.showUnderlineButton},showingAlignmentButtons(){return this.showAlignLeftButton||this.showAlignCenterButton||this.showAlignRightButton||this.showAlignJustifyButton},showingListButtons(){return this.showListItemsButton||this.showOrderedListButton},buttonGroups(){const t=this.individualButtons.map(a=>({key:a.selector,buttonGroup:[a]}));return[{key:"format",buttonGroup:this.textFormatButtons},{key:"alignment",buttonGroup:this.alignmentButtons},{key:"list",buttonGroup:this.listButtons},...t].filter(a=>a.buttonGroup.length>0)},textFormatButtons(){return[{showBtn:this.showBoldButton,selector:"bold",iconName:"bold",dataQA:"dt-editor-bold-btn",tooltipMessage:"Bold",onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,selector:"italic",iconName:"italic",dataQA:"dt-editor-italics-btn",tooltipMessage:"Italics",onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,selector:"underline",iconName:"underline",dataQA:"dt-editor-underline-btn",tooltipMessage:"Underline",onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,selector:"strike",iconName:"strikethrough",dataQA:"dt-editor-strike-btn",tooltipMessage:"Strike",onClick:this.onStrikethroughTextToggle}].filter(t=>t.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,selector:{textAlign:"left"},iconName:"align-left",dataQA:"dt-editor-align-left-btn",tooltipMessage:"Align Left",onClick:()=>this.onTextAlign("left")},{showBtn:this.showAlignCenterButton,selector:{textAlign:"center"},iconName:"align-center",dataQA:"dt-editor-align-center-btn",tooltipMessage:"Align Center",onClick:()=>this.onTextAlign("center")},{showBtn:this.showAlignRightButton,selector:{textAlign:"right"},iconName:"align-right",dataQA:"dt-editor-align-right-btn",tooltipMessage:"Align Right",onClick:()=>this.onTextAlign("right")},{showBtn:this.showAlignJustifyButton,selector:{textAlign:"justify"},iconName:"align-justify",dataQA:"dt-editor-align-justify-btn",tooltipMessage:"Align Justify",onClick:()=>this.onTextAlign("justify")}].filter(t=>t.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,selector:"bulletList",iconName:"list-bullet",dataQA:"dt-editor-list-items-btn",tooltipMessage:"Bullet List",onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,selector:"orderedList",iconName:"list-ordered",dataQA:"dt-editor-ordered-list-items-btn",tooltipMessage:"Ordered List",onClick:this.onOrderedListToggle}].filter(t=>t.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,selector:"blockquote",iconName:"quote",dataQA:"dt-editor-blockquote-btn",tooltipMessage:"Quote",onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,selector:"codeBlock",iconName:"code-block",dataQA:"dt-editor-code-block-btn",tooltipMessage:"Code",onClick:this.onCodeBlockToggle}].filter(t=>t.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,selector:"link",iconName:"link-2",dataQA:"dt-editor-add-link-btn",tooltipMessage:"Link",onClick:this.openLinkInput}}},watch:{value(t){this.internalInputValue=t}},methods:{onInputFocus(t){t==null||t.stopPropagation()},removeLink(){var t,a,n,r,i;(i=(r=(n=(a=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null?void 0:a.chain())==null?void 0:n.focus())==null?void 0:r.unsetLink())==null||i.run(),this.closeLinkInput()},setLink(t){var i,o,s;const a=(i=this.$refs.richTextEditor)==null?void 0:i.editor;if(t==null||t.preventDefault(),t==null||t.stopPropagation(),!this.linkInput){this.removeLink();return}kc.find(d=>d.test(this.linkInput))||(this.linkInput=`${wc}${this.linkInput}`);const r=(s=(o=a==null?void 0:a.view)==null?void 0:o.state)==null?void 0:s.selection;r.anchor===r.head?a.chain().focus().insertContentAt(r.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():a.chain().focus().extendMarkRange("link").setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(t){var a,n,r;if(!t)return this.closeLinkInput();this.linkInput=(r=(n=(a=this.$refs.richTextEditor)==null?void 0:a.editor)==null?void 0:n.getAttributes("link"))==null?void 0:r.href},closeLinkInput(){var t;this.showLinkInput=!1,this.linkInput="",(t=this.$refs.richTextEditor.editor)==null||t.chain().focus()},onBoldTextToggle(){var t,a;(a=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null||a.chain().focus().toggleBold().run()},onItalicTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleStrike().run()},onTextAlign(t){var a,n,r,i;if((n=(a=this.$refs.richTextEditor)==null?void 0:a.editor)!=null&&n.isActive({textAlign:t}))return(r=this.$refs.richTextEditor)==null?void 0:r.editor.chain().focus().unsetTextAlign().run();(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().setTextAlign(t).run()},onBulletListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleCodeBlock().run()},onBlockquoteToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBlockquote().run()},onFocus(t){this.hasFocus=!0,this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}},Ic=e.createElementVNode("div",{class:"dt-editor--button-group-divider"},null,-1),Dc={key:0},Tc={class:"d-ml8 d-mr12"};function Oc(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("dt-tooltip"),u=e.resolveComponent("dt-stack"),f=e.resolveComponent("dt-input"),h=e.resolveComponent("dt-popover"),p=e.resolveComponent("dt-rich-text-editor");return e.openBlock(),e.createElementBlock("div",{"data-qa":"dt-editor",role:"presentation",class:"d-d-flex d-fd-column",onClick:a[4]||(a[4]=g=>t.$refs.richTextEditor.focusEditor())},[e.createVNode(u,{direction:"row",gap:"450",class:"d-p8 dt-editor--top-bar-background"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buttonGroups,g=>(e.openBlock(),e.createBlock(u,{key:g.key,direction:"row",gap:"300"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.buttonGroup,b=>(e.openBlock(),e.createBlock(l,{key:`${g.key}-${JSON.stringify(b.selector)}`,message:b.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var T,y;return[e.createVNode(d,{"data-qa":b.dataQA,importance:"clear",kind:"muted",active:(y=(T=t.$refs.richTextEditor)==null?void 0:T.editor)==null?void 0:y.isActive(b.selector),size:"xs",onClick:v=>b.onClick()},{icon:e.withCtx(()=>[e.createVNode(s,{name:b.iconName,size:"200",class:"d-fw-bold"},null,8,["name"])]),_:2},1032,["data-qa","active","onClick"])]}),_:2},1032,["message"]))),128)),Ic]),_:2},1024))),128)),o.linkButton.showBtn?(e.openBlock(),e.createBlock(u,{key:0,direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(h,{open:i.showLinkInput,placement:"bottom-start","visually-hidden-close":!0,"visually-hidden-close-label":"Close link input popover","data-qa":"dt-editor-link-input-popover","show-close-button":!1,onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onOpened:o.updateInput},{anchor:e.withCtx(()=>[(e.openBlock(),e.createBlock(l,{key:o.linkButton.key,message:o.linkButton.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var g,b;return[e.createVNode(d,{"data-qa":o.linkButton.dataQA,importance:"clear",kind:"muted",class:"d-ol-none",active:(b=(g=t.$refs.richTextEditor)==null?void 0:g.editor)==null?void 0:b.isActive(o.linkButton.selector),size:"xs",onClick:a[0]||(a[0]=T=>o.linkButton.onClick())},{icon:e.withCtx(()=>[e.createVNode(s,{name:o.linkButton.iconName,size:"200",class:"d-fw-bold"},null,8,["name"])]),_:1},8,["data-qa","active"])]}),_:1},8,["message"]))]),content:e.withCtx(()=>[n.showAddLink.setLinkTitle.length>0?(e.openBlock(),e.createElementBlock("span",Dc,e.toDisplayString(n.showAddLink.setLinkTitle),1)):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:i.linkInput,"onUpdate:modelValue":a[1]||(a[1]=g=>i.linkInput=g),"input-aria-label":n.showAddLink.setLinkInputAriaLabel,"data-qa":"dt-editor-link-input",placeholder:n.setLinkPlaceholder,"input-wrapper-class":"d-bgc-black-100 d-mt6 d-bar5 d-ba d-baw1 d-bc-black-300 d-py2 d-ol-none",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onFocus:o.onInputFocus,onKeydown:e.withKeys(o.setLink,["enter"])},null,8,["modelValue","input-aria-label","placeholder","onClick","onFocus","onKeydown"])]),footerContent:e.withCtx(()=>[e.createElementVNode("div",Tc,[e.createVNode(d,{class:"d-mx2","aria-label":n.removeLinkButton.ariaLabel,importance:"clear",kind:"muted",size:"sm","data-qa":"dt-editor-remove-link-btn",onClick:o.removeLink},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.removeLinkButton.label),1)]),_:1},8,["aria-label","onClick"]),e.createVNode(d,{class:"d-mx2","aria-label":n.cancelSetLinkButton.ariaLabel,importance:"clear",kind:"muted",size:"sm","data-qa":"dt-editor-set-link-cancel-btn",onClick:o.closeLinkInput},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelSetLinkButton.label),1)]),_:1},8,["aria-label","onClick"]),e.createVNode(d,{class:"d-mx2",size:"sm","aria-label":n.confirmSetLinkButton.ariaLabel,"data-qa":"dt-editor-set-link-confirm-btn",onClick:o.setLink},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.confirmSetLinkButton.label),1)]),_:1},8,["aria-label","onClick"])])]),_:1},8,["open","onClick","onOpened"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",{class:"d-of-auto d-mx16 d-mt8 d-mb16 d-c-text",style:e.normalizeStyle({"max-height":n.maxHeight})},[e.createVNode(p,e.mergeProps({ref:"richTextEditor",modelValue:i.internalInputValue,"onUpdate:modelValue":a[2]||(a[2]=g=>i.internalInputValue=g),"data-qa":"dt-rich-text-editor",editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":`${n.inputClass} d-ol-none d-my6`,"output-format":o.htmlOutputFormat,"auto-focus":n.autoFocus,placeholder:n.placeholder,"allow-line-breaks":!0,link:!1},t.$attrs,{onFocus:o.onFocus,onBlur:o.onBlur,onInput:a[3]||(a[3]=g=>o.onInput(g))}),null,16,["modelValue","editable","input-aria-label","input-class","output-format","auto-focus","placeholder","onFocus","onBlur"])],4)])}const Bc=c._export_sfc(Ec,[["render",Oc]]),pt={warning:"dt-recipe-callbox-badge--warning"},gt={default:"dt-recipe-callbox--border-default",ai:"dt-recipe-callbox--border-ai",critical:"dt-recipe-callbox--border-critical"},Nc={name:"DtRecipeCallbox",components:{DtBadge:Ae,DtAvatar:_.DtAvatar},inheritAttrs:!1,props:{badgeText:{type:String,default:""},badgeColor:{type:String,default:null,validator:t=>t===null||Object.keys(pt).includes(t)},avatarSrc:{type:String,default:""},avatarFullName:{type:String,default:""},avatarSeed:{type:String,default:""},title:{type:String,default:""},borderColor:{type:String,default:"default",validator:t=>Object.keys(gt).includes(t)},clickable:{type:Boolean,default:!1},isOnHold:{type:Boolean,default:!1}},emits:["click"],computed:{shouldShowAvatar(){return this.avatarFullName||this.avatarSrc},badgeClass(){return pt[this.badgeColor]},borderClass(){return gt[this.borderColor]}},methods:{handleClick(t){this.clickable&&this.$emit("click",t)}}},Lc={"data-qa":"dt-recipe-callbox",class:"dt-recipe-callbox"},Ac={key:0,"data-qa":"dt-recipe-callbox--video-wrapper",class:"dt-recipe-callbox--video"},xc={class:"dt-recipe-callbox--main-content-top"},Mc={class:"dt-recipe-callbox--content"},Pc={key:0,"data-qa":"dt-recipe-callbox--badge-wrapper",class:"dt-recipe-callbox--content-badge"},Vc={key:1,"data-qa":"dt-recipe-callbox--subtitle-wrapper",class:"dt-recipe-callbox--content-subtitle"},Rc={key:1,"data-qa":"dt-recipe-callbox--right-wrapper",class:"dt-recipe-callbox--right"},$c={key:0,"data-qa":"dt-recipe-callbox--bottom-wrapper",class:"dt-recipe-callbox--main-content-bottom"};function zc(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-badge");return e.openBlock(),e.createElementBlock("div",Lc,[t.$slots.video?(e.openBlock(),e.createElementBlock("div",Ac,[e.renderSlot(t.$slots,"video",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{"data-qa":"dt-recipe-callbox--main-content",class:e.normalizeClass(["dt-recipe-callbox--main-content",o.borderClass,{"dt-recipe-callbox--clickable":n.clickable}])},[e.createElementVNode("div",xc,[o.shouldShowAvatar?(e.openBlock(),e.createBlock(s,{key:0,"avatar-class":"dt-recipe-callbox--avatar","image-src":n.avatarSrc,"full-name":n.avatarFullName,seed:n.avatarSeed,clickable:n.clickable,"overlay-icon":n.isOnHold?"pause":null,size:"sm",onClick:o.handleClick},null,8,["image-src","full-name","seed","clickable","overlay-icon","onClick"])):e.createCommentVNode("",!0),e.createElementVNode("div",Mc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.clickable?"button":"span"),{"data-qa":"dt-recipe-callbox--title",class:"dt-recipe-callbox--content-title",onClick:o.handleClick},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["onClick"])),t.$slots.badge||n.badgeText?(e.openBlock(),e.createElementBlock("div",Pc,[e.renderSlot(t.$slots,"badge",{},()=>[e.createVNode(d,{class:e.normalizeClass(o.badgeClass),text:n.badgeText},null,8,["class","text"])],!0)])):e.createCommentVNode("",!0),t.$slots.subtitle?(e.openBlock(),e.createElementBlock("div",Vc,[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)])):e.createCommentVNode("",!0)]),t.$slots.right?(e.openBlock(),e.createElementBlock("div",Rc,[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)]),t.$slots.bottom?(e.openBlock(),e.createElementBlock("div",$c,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)],2)])}const Fc=c._export_sfc(Nc,[["render",zc],["__scopeId","data-v-66800ae7"]]);let ae;function Te(t,a){return Ot(),Dn(t,a,{locale:ae})}function qc(t,a){return Ot(),ks(t,{locale:ae,format:a})}function Hc(t,a){return Ot(),Ss(t,a,{locale:ae})}function Uc(){return ae!==void 0}function Ot(){if(!Uc())throw new Error("Locale not set, please call setDateLocale(locale) and pass in a datefns locale object as the locale param before calling this function")}function Wc(t){ae=t}function Kc(t){return Te(t,"MMMM d, y")}function jc(t){if(t<60)return Hc(0,29*1e3);const a=Es({start:0,end:t*1e3});return qc(a,["hours","minutes"])}function Gt(t){const a=new Intl.RelativeTimeFormat(ae.code,{numeric:"auto"});return c.capitalizeFirstLetter(a.formatToParts(t,"day")[0].value,ae.code)}function Yc(t){return Ns(t)?Gt(0):As(t)?Gt(-1):Os(t)?Te(t,"EEEE"):Bs(t)?Te(t,"EEEE, MMMM d"):Te(t,"MMMM d, y")}exports.AVATAR_COLORS=_.AVATAR_COLORS;exports.AVATAR_GROUP_VALIDATOR=_.AVATAR_GROUP_VALIDATOR;exports.AVATAR_ICON_SIZES=_.AVATAR_ICON_SIZES;exports.AVATAR_KIND_MODIFIERS=_.AVATAR_KIND_MODIFIERS;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=_.AVATAR_PRESENCE_SIZE_MODIFIERS;exports.AVATAR_PRESENCE_STATES=_.AVATAR_PRESENCE_STATES;exports.AVATAR_SIZE_MODIFIERS=_.AVATAR_SIZE_MODIFIERS;exports.DT_STACK_DIRECTION=_.DT_STACK_DIRECTION;exports.DT_STACK_GAP=_.DT_STACK_GAP;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=_.DT_STACK_RESPONSIVE_BREAKPOINTS;exports.DtAvatar=_.DtAvatar;exports.DtItemLayout=_.DtItemLayout;exports.DtLink=_.DtLink;exports.DtListItem=_.DtListItem;exports.DtPopover=_.DtPopover;exports.DtPresence=_.DtPresence;exports.DtStack=_.DtStack;exports.LIST_ITEM_NAVIGATION_TYPES=_.LIST_ITEM_NAVIGATION_TYPES;exports.LIST_ITEM_TYPES=_.LIST_ITEM_TYPES;exports.POPOVER_APPEND_TO_VALUES=_.POPOVER_APPEND_TO_VALUES;exports.POPOVER_CONTENT_WIDTHS=_.POPOVER_CONTENT_WIDTHS;exports.POPOVER_DIRECTIONS=_.POPOVER_DIRECTIONS;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=_.POPOVER_HEADER_FOOTER_PADDING_CLASSES;exports.POPOVER_INITIAL_FOCUS_STRINGS=_.POPOVER_INITIAL_FOCUS_STRINGS;exports.POPOVER_PADDING_CLASSES=_.POPOVER_PADDING_CLASSES;exports.POPOVER_ROLES=_.POPOVER_ROLES;exports.POPOVER_STICKY_VALUES=_.POPOVER_STICKY_VALUES;exports.PRESENCE_STATES=_.PRESENCE_STATES;exports.PRESENCE_STATES_LIST=_.PRESENCE_STATES_LIST;exports.BUTTON_ICON_SIZES=m.BUTTON_ICON_SIZES;exports.BUTTON_IMPORTANCE_MODIFIERS=m.BUTTON_IMPORTANCE_MODIFIERS;exports.BUTTON_KIND_MODIFIERS=m.BUTTON_KIND_MODIFIERS;exports.BUTTON_SIZE_MODIFIERS=m.BUTTON_SIZE_MODIFIERS;exports.BUTTON_TYPES=m.BUTTON_TYPES;exports.DtButton=m.DtButton;exports.DtCheckableInputMixin=m.CheckableMixin;exports.DtGroupableInputMixin=m.GroupableMixin;exports.DtIcon=m.DtIcon;exports.DtInput=m.DtInput;exports.DtInputMixin=m.InputMixin;exports.DtSkeleton=m.DtSkeleton;exports.DtSkeletonListItem=m.DtSkeletonListItem;exports.DtSkeletonParagraph=m.DtSkeletonParagraph;exports.DtSkeletonShape=m.DtSkeletonShape;exports.DtSkeletonText=m.DtSkeletonText;exports.DtTab=m.DtTab;exports.DtTabGroup=m.DtTabGroup;exports.DtValidationMessages=m.DtValidationMessages;exports.ICON_POSITION_MODIFIERS=m.ICON_POSITION_MODIFIERS;exports.ICON_SIZE_MODIFIERS=m.ICON_SIZE_MODIFIERS;exports.INPUT_SIZES=m.INPUT_SIZES;exports.INPUT_TYPES=m.INPUT_TYPES;exports.INVALID_COMBINATION=m.INVALID_COMBINATION;exports.LINK_KIND_MODIFIERS=m.LINK_KIND_MODIFIERS;exports.LINK_VARIANTS=m.LINK_VARIANTS;exports.SKELETON_HEADING_HEIGHTS=m.SKELETON_HEADING_HEIGHTS;exports.SKELETON_RIPPLE_DURATION=m.SKELETON_RIPPLE_DURATION;exports.SKELETON_SHAPES=m.SKELETON_SHAPES;exports.SKELETON_SHAPE_SIZES=m.SKELETON_SHAPE_SIZES;exports.SKELETON_TEXT_TYPES=m.SKELETON_TEXT_TYPES;exports.TAB_IMPORTANCE_MODIFIERS=m.TAB_IMPORTANCE_MODIFIERS;exports.TAB_LIST_IMPORTANCE_MODIFIERS=m.TAB_LIST_IMPORTANCE_MODIFIERS;exports.TAB_LIST_KIND_MODIFIERS=m.TAB_LIST_KIND_MODIFIERS;exports.TAB_LIST_SIZES=m.TAB_LIST_SIZES;exports.validationMessageValidator=m.validationMessageValidator;exports.DEFAULT_VALIDATION_MESSAGE_TYPE=c.DEFAULT_VALIDATION_MESSAGE_TYPE;exports.DESCRIPTION_SIZE_TYPES=c.DESCRIPTION_SIZE_TYPES;exports.DtLazyShow=c.DtLazyShow;exports.DtTooltip=c.DtTooltip;exports.TOOLTIP_DELAY_MS=c.TOOLTIP_DELAY_MS;exports.TOOLTIP_DIRECTIONS=c.TOOLTIP_DIRECTIONS;exports.TOOLTIP_HIDE_ON_CLICK_VARIANTS=c.TOOLTIP_HIDE_ON_CLICK_VARIANTS;exports.TOOLTIP_KIND_MODIFIERS=c.TOOLTIP_KIND_MODIFIERS;exports.TOOLTIP_STICKY_VALUES=c.TOOLTIP_STICKY_VALUES;exports.VALIDATION_MESSAGE_TYPES=c.VALIDATION_MESSAGE_TYPES;exports.filterFormattedMessages=c.filterFormattedMessages;exports.formatMessages=c.formatMessages;exports.getUniqueString=c.getUniqueString;exports.getValidationState=c.getValidationState;exports.BADGE_DECORATION_MODIFIERS=et;exports.BADGE_KIND_MODIFIERS=Je;exports.BADGE_TYPE_MODIFIERS=Xe;exports.BREADCRUMBS_INVERTED_MODIFIER=Xt;exports.BREADCRUMB_ITEM_SELECTED_MODIFIER=Zt;exports.BUTTON_GROUP_ALIGNMENT=tt;exports.CALLBAR_BUTTON_VALID_WIDTH_SIZE=It;exports.CALLBOX_BADGE_COLORS=pt;exports.CALLBOX_BORDER_COLORS=gt;exports.CHIP_CLOSE_BUTTON_SIZE_MODIFIERS=un;exports.CHIP_ICON_SIZES=hn;exports.CHIP_SIZES=Ln;exports.CHIP_SIZE_MODIFIERS=rt;exports.CHIP_TOP_POSITION=An;exports.COLOR_CODES=Mn;exports.DEFAULT_FEED_ROW_STATE=ve;exports.DROPDOWN_PADDING_CLASSES=de;exports.DT_DESCRIPTION_LIST_DIRECTION=rn;exports.DtBadge=Ae;exports.DtBanner=ma;exports.DtBreadcrumbItem=Jt;exports.DtBreadcrumbs=va;exports.DtButtonGroup=Ca;exports.DtCard=en;exports.DtCheckbox=Jo;exports.DtCheckboxGroup=er;exports.DtChip=St;exports.DtCodeblock=Ta;exports.DtCollapsible=on;exports.DtCombobox=an;exports.DtDatepicker=Xs;exports.DtDescriptionList=Xa;exports.DtDropdown=sn;exports.DtDropdownSeparator=ro;exports.DtHovercard=so;exports.DtImageViewer=ln;exports.DtInputGroup=yt;exports.DtInputGroupMixin=dn;exports.DtKeyboardListNavigationMixin=bt;exports.DtKeyboardShortcut=Mr;exports.DtListItemGroup=Bo;exports.DtModal=Eo;exports.DtNotice=da;exports.DtNoticeAction=Pe;exports.DtNoticeContent=Me;exports.DtNoticeIcon=xe;exports.DtPagination=Mo;exports.DtRadio=Fo;exports.DtRadioGroup=qo;exports.DtRecipeAttachmentCarousel=Cc;exports.DtRecipeCallbarButton=xn;exports.DtRecipeCallbarButtonWithPopover=kl;exports.DtRecipeCallbox=Fc;exports.DtRecipeComboboxMultiSelect=_l;exports.DtRecipeComboboxWithPopover=Bn;exports.DtRecipeContactInfo=Ll;exports.DtRecipeContactRow=Ed;exports.DtRecipeEmojiRow=ic;exports.DtRecipeFeedItemPill=Yd;exports.DtRecipeFeedItemRow=Fd;exports.DtRecipeGeneralRow=Tt;exports.DtRecipeGroupRow=Sd;exports.DtRecipeGroupedChip=ed;exports.DtRecipeIvrNode=Kl;exports.DtRecipeSettingsMenuButton=ad;exports.DtRecipeTimePill=Xd;exports.DtRecipeTopBannerInfo=Rl;exports.DtRecipeUnreadPill=Od;exports.DtRecipeWysiwygEditor=Bc;exports.DtRootLayout=Rr;exports.DtScroller=Hr;exports.DtSelectMenu=_r;exports.DtTabPanel=Ko;exports.DtToast=Cr;exports.DtToggle=Or;exports.FEED_ITEM_PILL_BORDER_COLORS=ft;exports.FEED_ROW_STATE_BACKGROUND_COLOR=mt;exports.IVR_NODE_BRANCH=qe;exports.IVR_NODE_EXPERT=Fe;exports.IVR_NODE_GO_TO=Ce;exports.IVR_NODE_HANGUP=Ue;exports.IVR_NODE_ICON_TYPES=Pn;exports.IVR_NODE_LABELS=$l;exports.IVR_NODE_PROMPT_COLLECT=$e;exports.IVR_NODE_PROMPT_MENU=Re;exports.IVR_NODE_PROMPT_PLAY=ze;exports.IVR_NODE_TRANSFER=He;exports.LABEL_SIZES=vt;exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS=Se;exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR=Rn;exports.LEFTBAR_GENERAL_ROW_ICON_MAPPING=Vn;exports.LEFTBAR_GENERAL_ROW_ICON_SIZES=$n;exports.LEFTBAR_GENERAL_ROW_TYPES=x;exports.MODAL_BANNER_KINDS=ot;exports.MODAL_KIND_MODIFIERS=nt;exports.MODAL_SIZE_MODIFIERS=at;exports.MULTI_SELECT_SIZES=Nn;exports.NOTICE_KINDS=ue;exports.NOTICE_ROLES=Qt;exports.RADIO_INPUT_VALIDATION_CLASSES=cn;exports.REACTIONS_ATTRIBUTES=qn;exports.ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS=_n;exports.ROOT_LAYOUT_SIDEBAR_POSITIONS=dt;exports.SELECT_SIZE_MODIFIERS=it;exports.SELECT_STATE_MODIFIERS=mn;exports.SHORTCUTS_ALIASES_LIST=Br;exports.SHORTCUTS_ICON_ALIASES=le;exports.SHORTCUTS_ICON_SEPARATOR=gn;exports.TOAST_MIN_DURATION=st;exports.TOAST_ROLES=fn;exports.TOGGLE_CHECKED_VALUES=pn;exports.TOGGLE_SIZE_MODIFIERS=lt;exports.UNREAD_PILL_DIRECTIONS=zn;exports.UNREAD_PILL_KINDS=Fn;exports.durationInHHMM=jc;exports.formatLong=Js;exports.formatMedium=el;exports.formatNoYear=nl;exports.formatNumerical=al;exports.formatShort=tl;exports.getDateMedium=Kc;exports.relativeDate=Yc;exports.setDateLocale=Wc;
5
+ need to be set so the component always includes a close button`)}}},yo=["aria-describedby","aria-labelledby"],So=["id"],Co=["id"],ko={key:4,class:"d-modal__footer"};function wo(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("sr-only-close-button"),u=e.resolveComponent("dt-lazy-show");return e.openBlock(),e.createBlock(u,e.mergeProps({transition:"d-zoom",show:n.show,class:["d-modal",i.MODAL_KIND_MODIFIERS[n.kind],i.MODAL_SIZE_MODIFIERS[n.size],n.modalClass],"data-qa":"dt-modal","aria-hidden":o.open},e.toHandlers(o.modalListeners)),{default:e.withCtx(()=>[n.show&&(i.hasSlotContent(t.$slots.banner)||n.bannerTitle)?(e.openBlock(),e.createElementBlock("div",{key:0,"data-qa":"dt-modal-banner",class:e.normalizeClass(["d-modal__banner",n.bannerClass,o.bannerKindClass])},[e.renderSlot(t.$slots,"banner",{},()=>[e.createTextVNode(e.toDisplayString(n.bannerTitle),1)])],2)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{appear:"",name:"d-modal__dialog"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["d-modal__dialog",{"d-modal__dialog--scrollable":n.fixedHeaderFooter},n.dialogClass]),role:"dialog","aria-modal":"true","aria-describedby":n.describedById,"aria-labelledby":n.labelledById},[i.hasSlotContent(t.$slots.header)?(e.openBlock(),e.createElementBlock("div",{key:0,id:n.labelledById,class:"d-modal__header","data-qa":"dt-modal-title"},[e.renderSlot(t.$slots,"header")],8,So)):(e.openBlock(),e.createElementBlock("h2",{key:1,id:n.labelledById,class:"d-modal__header","data-qa":"dt-modal-title"},e.toDisplayString(n.title),9,Co)),i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-modal__content",n.contentClass]),"data-qa":"dt-modal-copy"},[e.renderSlot(t.$slots,"default")],2)):(e.openBlock(),e.createElementBlock("p",{key:3,class:e.normalizeClass(["d-modal__content",n.contentClass]),"data-qa":"dt-modal-copy"},e.toDisplayString(n.copy),3)),o.hasFooterSlot?(e.openBlock(),e.createElementBlock("footer",ko,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0),n.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,e.mergeProps({key:5,class:"d-modal__close",circle:"",size:"lg",importance:"clear","aria-label":n.closeButtonProps.ariaLabel},n.closeButtonProps,{onClick:o.close}),{icon:e.withCtx(()=>[e.createVNode(s,{name:"close",size:"400"})]),_:1},16,["aria-label","onClick"])),t.showVisuallyHiddenClose?(e.openBlock(),e.createBlock(l,{key:6,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:o.close},null,8,["visually-hidden-close-label","onClose"])):e.createCommentVNode("",!0)],10,yo),[[e.vShow,n.show]])]),_:3})]),_:3},16,["show","class","aria-hidden"])}const Eo=c._export_sfc(vo,[["render",wo]]),Io={name:"DtListItemGroup",props:{id:{type:String,default(){return c.getUniqueString()}},heading:{type:String,default:""},headingClass:{type:[String,Array,Object],default:""},listClass:{type:[String,Array,Object],default:""}}},Do=["id","aria-labelledby"],To=["id"];function Oo(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("ul",{id:n.id,class:e.normalizeClass(["d-list-item-group",n.listClass]),role:"group","data-qa":"dt-dropdown-list-wrapper","aria-labelledby":`${n.id}-heading`},[n.heading?(e.openBlock(),e.createElementBlock("li",{key:0,id:`${n.id}-heading`,role:"presentation","data-qa":"dt-dropdown-list-heading",class:e.normalizeClass(["dt-dropdown-list--header",n.headingClass])},[e.renderSlot(t.$slots,"headingSlot",{},()=>[e.createTextVNode(e.toDisplayString(n.heading),1)])],10,To)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default")],10,Do)}const Bo=c._export_sfc(Io,[["render",Oo]]),No={name:"DtPagination",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},props:{ariaLabel:{type:String,required:!0},totalPages:{type:Number,required:!0},prevAriaLabel:{type:String,required:!0},nextAriaLabel:{type:String,required:!0},pageNumberAriaLabel:{type:Function,required:!0},activePage:{type:Number,default:1},maxVisible:{type:Number,default:5}},emits:["change"],data(){return{currentPage:this.activePage}},computed:{isFirstPage(){return this.currentPage===1},isLastPage(){return this.currentPage===this.totalPages},pages(){if(this.maxVisible===0)return[];if(this.totalPages<=this.maxVisible)return this.range(1,this.totalPages);const t=this.maxVisible-1,a=this.totalPages-t+1;if(this.currentPage<t)return[...this.range(1,t),"...",this.totalPages];if(this.currentPage>a)return[1,"...",...this.range(a,this.totalPages)];const n=this.maxVisible-(3-this.maxVisible%2),r=Math.floor(n/2),i=this.currentPage-r,o=this.currentPage+r;return[1,"...",...this.range(i,o),"...",this.totalPages]}},methods:{range(t,a){const n=[];t=t>0?t:1;for(let r=t;r<=a;r++)n.push(r);return n},changePage(t){this.currentPage=t,this.$emit("change",this.currentPage)}}},Lo=["aria-label"],Ao={key:0,class:"d-pagination__separator-icon","data-qa":"dt-pagination-separator"};function xo(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("nav",{"aria-label":n.ariaLabel,class:"d-pagination"},[e.createVNode(d,{class:e.normalizeClass(["d-pagination__button",o.isFirstPage?"d-fc-black-300 d-bgc-transparent":"d-fc-tertiary"]),"data-qa":"dt-pagination-prev","aria-label":n.prevAriaLabel,kind:o.isFirstPage?"default":"muted",importance:o.isFirstPage?"primary":"clear",disabled:o.isFirstPage,onClick:a[0]||(a[0]=l=>o.changePage(i.currentPage-1))},{icon:e.withCtx(()=>[e.createVNode(s,{name:"chevron-left",size:"300"})]),_:1},8,["aria-label","kind","importance","disabled","class"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.pages,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:`page-${l}-${u}`,class:e.normalizeClass({"d-pagination__separator":isNaN(Number(l))})},[isNaN(Number(l))?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode(s,{name:"more-horizontal",size:"300"})])):(e.openBlock(),e.createBlock(d,{key:1,"aria-label":n.pageNumberAriaLabel(l),kind:i.currentPage===l?"default":"muted",importance:i.currentPage===l?"primary":"clear","label-class":"",onClick:f=>o.changePage(l)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1032,["aria-label","kind","importance","onClick"]))],2))),128)),e.createVNode(d,{class:e.normalizeClass(["d-pagination__button",o.isLastPage?"d-fc-black-300 d-bgc-transparent":"d-fc-tertiary"]),"data-qa":"dt-pagination-next","aria-label":n.nextAriaLabel,disabled:o.isLastPage,kind:"muted",importance:o.isLastPage?"primary":"clear",onClick:a[1]||(a[1]=l=>o.changePage(i.currentPage+1))},{icon:e.withCtx(()=>[e.createVNode(s,{name:"chevron-right",size:"300"})]),_:1},8,["aria-label","disabled","importance","class"])],8,Lo)}const Mo=c._export_sfc(No,[["render",xo]]),cn={warning:"d-radio--warning",error:"d-radio--error",success:"d-radio--success"},Po={name:"DtRadio",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.InputMixin,m.CheckableMixin,m.GroupableMixin,m.MessagesMixin],inheritAttrs:!1,props:{value:{type:[String,Number],default:""}},emits:["input","focus","focusin","focusout","click"],data(){return{hasSlotContent:c.hasSlotContent}},computed:{inputValidationClass(){return cn[this.internalValidationState]},radioGroupValue(){var t;return(t=this.groupContext)==null?void 0:t.selectedValue},inputListeners(){return{input:()=>{},focusin:t=>this.$emit("focusin",t),focusout:t=>this.$emit("focusout",t),change:t=>this.emitValue(t.target.value)}}},watch:{radioGroupValue:{immediate:!0,handler(t){this.hasGroup&&(this.internalChecked=t===this.value)}}},methods:{emitValue(t){t!==this.radioGroupValue&&(this.setGroupValue(t),this.$emit("input",t))}}},Vo={class:"d-radio__input"},Ro=["checked","name","value","disabled"],$o={class:"d-radio__copy d-radio__label","data-qa":"radio-label-description-container"};function zo(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[e.createElementVNode("div",{class:e.normalizeClass(["d-radio-group",{"d-radio-group--disabled":t.internalDisabled}])},[e.createElementVNode("div",Vo,[e.createElementVNode("input",e.mergeProps({checked:t.internalChecked,name:t.internalName,value:n.value,disabled:t.internalDisabled,type:"radio",class:["d-radio",o.inputValidationClass,t.inputClass]},t.$attrs,e.toHandlers(o.inputListeners,!0)),null,16,Ro)]),e.createElementVNode("div",$o,[e.createElementVNode("div",e.mergeProps({class:t.labelClass},t.labelChildProps,{"data-qa":"radio-label"}),[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],16),t.$slots.description||t.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:["d-description",t.descriptionClass]},t.descriptionChildProps,{"data-qa":"radio-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],16)):e.createCommentVNode("",!0),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-radio-validation-messages"}),null,16,["validation-messages","show-messages","class"])])],2)])])}const Fo=c._export_sfc(Po,[["render",zo]]),qo={name:"DtRadioGroup",extends:yt,props:{value:{type:[String,Number],default:""},dataQaGroup:{type:String,default:"radio-group"},dataQaGroupLegend:{type:String,default:"radio-group-legend"},dataQaGroupMessages:{type:String,default:"radio-group-messages"}},emits:["input"],data(){return{internalValue:this.value}},watch:{value(t){this.internalValue=t},internalValue:{immediate:!0,handler(t){this.provideObj.selectedValue=t}}},methods:{setGroupValue(t){this.$emit("input",t)},getMessageKey(t,a){return`radio-group-message-${t}-${a}-${this.id}`}}},Ho={name:"DtTabPanel",mixins:[_.Modal],inject:["groupContext"],props:{id:{type:String,required:!0},tabId:{type:String,required:!0},hidden:{type:Boolean,default:!1},tabPanelClass:{type:[String,Array,Object],default:""}},data(){return{isFirstElementFocusable:!1}},computed:{hidePanel(){return this.groupContext.selected!==this.id||this.hidden}},async mounted(){const t=await this.getFirstFocusableElement(this.$el);t?this.isFirstElementFocusable=this.isFirstElementOfPanel(t):this.isFirstElementFocusable=!1},methods:{isFirstElementOfPanel(t){let a=t,n=!0;for(;a;){if(a.previousElementSibling!==null){n=!1;break}a=a.parentNode!==this.$el?a.parentNode:null}return n}}},Uo=["id","tabindex","aria-labelledby","aria-hidden"];function Wo(t,a,n,r,i,o){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{id:`dt-panel-${n.id}`,role:"tabpanel",tabindex:i.isFirstElementFocusable?-1:0,"aria-labelledby":`dt-tab-${n.tabId}`,"aria-hidden":`${o.hidePanel}`,class:e.normalizeClass(n.tabPanelClass),"data-qa":"dt-tab-panel"},[e.renderSlot(t.$slots,"default")],10,Uo)),[[e.vShow,!o.hidePanel]])}const Ko=c._export_sfc(Ho,[["render",Wo]]),jo={error:"d-checkbox--error",warning:"d-checkbox--warning",success:"d-checkbox--success"},Yo={name:"DtCheckbox",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.InputMixin,m.CheckableMixin,m.GroupableMixin,m.MessagesMixin],inheritAttrs:!1,emits:["input","focusin","focusout"],computed:{inputValidationClass(){return jo[this.internalValidationState]},checkboxGroupValueChecked(){var t,a;return((a=(t=this.groupContext)==null?void 0:t.selectedValues)==null?void 0:a.includes(this.value))??!1},hasLabel(){return!!(this.$slots.default||this.label)},hasDescription(){return!!(this.$slots.description||this.description)},hasLabelOrDescription(){return this.hasLabel||this.hasDescription},inputListeners(){return{input:()=>{},focusin:t=>this.$emit("focusin",t),focusout:t=>this.$emit("focusout",t),change:t=>this.emitValue(t.target)}}},watch:{checkboxGroupValueChecked:{immediate:!0,handler(t){this.hasGroup&&(this.internalChecked=t)}}},mounted(){this.runValidations()},methods:{emitValue(t){let{value:a,checked:n}=t;this.internalIndeterminate&&(n=!1,this.internalIndeterminate=!1,t.checked=!1),this.setGroupValue(a,n),this.$emit("input",n)},runValidations(){this.validateInputLabels(this.hasLabel,this.$attrs["aria-label"])}}},Go={class:"d-checkbox__input"},Qo=["checked","name","value","disabled",".indeterminate"],Zo={key:0,class:"d-checkbox__copy d-checkbox__label","data-qa":"checkbox-label-description-container"};function Xo(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[e.createElementVNode("div",{class:e.normalizeClass(["d-checkbox-group",{"d-checkbox-group--disabled":t.internalDisabled}])},[e.createElementVNode("div",Go,[e.createElementVNode("input",e.mergeProps({type:"checkbox",checked:t.internalChecked,name:t.internalName,value:t.value,disabled:t.internalDisabled,class:["d-checkbox",o.inputValidationClass,t.inputClass]},t.$attrs,{".indeterminate":t.internalIndeterminate},e.toHandlers(o.inputListeners,!0)),null,16,Qo)]),o.hasLabelOrDescription?(e.openBlock(),e.createElementBlock("div",Zo,[o.hasLabel?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:t.labelClass},t.labelChildProps,{"data-qa":"checkbox-label"}),[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],16)):e.createCommentVNode("",!0),o.hasDescription?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,class:["d-description",t.descriptionClass]},t.descriptionChildProps,{"data-qa":"checkbox-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)])],16)):e.createCommentVNode("",!0),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-checkbox-validation-messages"}),null,16,["validation-messages","show-messages","class"])])):e.createCommentVNode("",!0)],2)])])}const Jo=c._export_sfc(Yo,[["render",Xo]]),er={name:"DtCheckboxGroup",extends:yt,model:{prop:"selectedValues"},props:{value:{type:[],default:null,validator:t=>t?(e.warn("Component uses selectedValues to initialize the model, value is not supported by this component",void 0),!1):!0},selectedValues:{type:Array,default(){return[]}},dataQaGroup:{type:String,default:"checkbox-group"},dataQaGroupLegend:{type:String,default:"checkbox-group-legend"},dataQaGroupMessages:{type:String,default:"checkbox-group-messages"}},emits:["input"],data(){return{internalValue:this.selectedValues}},watch:{selectedValues(t){this.internalValue=t},internalValue:{immediate:!0,handler(t){this.provideObj.selectedValues=t}}},methods:{setGroupValue(t,a){a?this.internalValue.includes(t)||this.internalValue.push(t):this.internalValue=this.internalValue.filter(n=>n!==t),this.$emit("input",this.internalValue)},getMessageKey(t,a){return`checkbox-group-message-${t}-${a}-${this.id}`}}},rt={xs:"d-chip__label--xs",sm:"d-chip__label--sm",md:""},un={xs:"d-chip__close--xs",sm:"d-chip__close--sm",md:""},hn={xs:"200",sm:"200",md:"200"},tr={name:"DtChip",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},props:{closeButtonProps:{type:Object,default:function(){return{ariaLabel:"close"}},validator:t=>!!t.ariaLabel},hideClose:{type:Boolean,default:!1},size:{type:String,default:"md",validator:t=>Object.keys(rt).includes(t)},interactive:{type:Boolean,default:!0},id:{type:String,default:function(){return c.getUniqueString()}},ariaLabel:{type:String,default:""},contentClass:{type:[String,Array,Object],default:""},labelClass:{type:[String,Array,Object],default:""}},emits:["click","close","keyup"],data(){return{isActive:!1,hasSlotContent:c.hasSlotContent}},computed:{chipListeners(){return{click:t=>{this.interactive&&this.$emit("click",t)},keyup:t=>{var a;((a=t.code)==null?void 0:a.toLowerCase())==="delete"?this.onClose():this.$emit("keyup",t)}}},closeButtonIconSize(){return hn[this.size]}},methods:{chipClasses(){return[this.$attrs["grouped-chip"]?"d-chip":"d-chip__label",rt[this.size],this.labelClass]},chipCloseButtonClasses(){return["d-chip__close",un[this.size]]},onClose(){this.hideClose||this.$emit("close")}}},nr={class:"d-chip"},ar={key:0,"data-qa":"dt-chip-icon",class:"d-chip__icon"},or={key:1,"data-qa":"dt-chip-avatar"},rr=["id"];function ir(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("span",nr,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.interactive?"button":"span"),e.mergeProps({id:n.id,type:n.interactive&&"button",class:o.chipClasses(),"data-qa":"dt-chip","aria-labelledby":n.ariaLabel?void 0:`${n.id}-content`,"aria-label":n.ariaLabel},e.toHandlers(o.chipListeners)),{default:e.withCtx(()=>[i.hasSlotContent(t.$slots.icon)?(e.openBlock(),e.createElementBlock("span",ar,[e.renderSlot(t.$slots,"icon")])):i.hasSlotContent(t.$slots.avatar)?(e.openBlock(),e.createElementBlock("span",or,[e.renderSlot(t.$slots,"avatar")])):e.createCommentVNode("",!0),i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("span",{key:2,id:`${n.id}-content`,"data-qa":"dt-chip-label",class:e.normalizeClass(["d-chip__text",n.contentClass])},[e.renderSlot(t.$slots,"default")],10,rr)):e.createCommentVNode("",!0)]),_:3},16,["id","type","class","aria-labelledby","aria-label"])),n.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(d,e.mergeProps({key:0},n.closeButtonProps,{class:o.chipCloseButtonClasses(),"data-qa":"dt-chip-close","aria-label":n.closeButtonProps.ariaLabel,onClick:a[0]||(a[0]=l=>t.$emit("close"))}),{icon:e.withCtx(()=>[e.createVNode(s,{name:"close",size:o.closeButtonIconSize},null,8,["size"])]),_:1},16,["class","aria-label"]))])}const St=c._export_sfc(tr,[["render",ir]]),it={xs:"d-select--xs",sm:"d-select--sm",md:"",lg:"d-select--lg",xl:"d-select--xl"},mn={error:"d-select__input--error",warning:"d-select__input--warning",success:"d-select__input--success"},sr=t=>!t.index||typeof t.index=="number",lr=t=>t.value?typeof t.value=="string"||typeof t.value=="number":!1,dr=t=>t.label?typeof t.label=="string":!1,cr=t=>t?t.every(a=>!(!sr(a)||!lr(a)||!dr(a))):!0,ur={name:"DtSelectMenu",components:{DtValidationMessages:m.DtValidationMessages},mixins:[m.MessagesMixin],inheritAttrs:!1,props:{label:{type:String,default:""},description:{type:String,default:""},options:{type:Array,default:()=>[],validator:t=>cr(t)},size:{type:String,default:"md",validator:t=>Object.keys(it).includes(t)},labelClass:{type:[String,Array,Object],default:""},descriptionClass:{type:[String,Array,Object],default:""},selectClass:{type:[String,Array,Object],default:""},optionClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})},descriptionChildProps:{type:Object,default:()=>({})},optionChildProps:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1}},emits:["input","change"],data(){return{LABEL_SIZE_MODIFIERS:c.LABEL_SIZE_MODIFIERS,DESCRIPTION_SIZE_MODIFIERS:c.DESCRIPTION_SIZE_MODIFIERS,SELECT_SIZE_MODIFIERS:it,SELECT_STATE_MODIFIERS:mn,hasSlotContent:c.hasSlotContent}},computed:{selectListeners(){return{input:()=>{},change:t=>this.emitValue(t.target.value,t)}},state(){return c.getValidationState(this.formattedMessages)},selectKey(){return c.getUniqueString()},descriptionKey(){return`select-${this.selectKey}-description`},labelAriaDetails(){return this.$slots.description||this.description?this.descriptionKey:this.$attrs["aria-details"]}},watch:{options(){this.$nextTick(()=>{this.emitValue(this.$refs.selectElement.value,null)})}},mounted(){this.emitValue(this.$refs.selectElement.value,null),this.validateOptionsPresence()},beforeUpdate(){this.validateOptionsPresence()},methods:{emitValue(t,a){this.$emit("input",t,a),this.$emit("change",t,a)},getOptionKey(t){return`select-${this.selectKey}-option-${t}`},validateOptionsPresence(){var t;((t=this.options)==null?void 0:t.length)<1&&!this.$slots.default&&e.warn("Options are expected to be provided via prop or slot",this)}}},hr=["aria-details"],mr=["id"],fr=["disabled"],pr=["value"];function gr(t,a,n,r,i,o){const s=e.resolveComponent("dt-validation-messages");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",null,[i.hasSlotContent(t.$slots.label)||n.label?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,"aria-details":o.labelAriaDetails,class:["d-label",i.LABEL_SIZE_MODIFIERS[n.size],n.labelClass]},n.labelChildProps,{"data-qa":"dt-select-label"}),[e.renderSlot(t.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],16,hr)):e.createCommentVNode("",!0),i.hasSlotContent(t.$slots.description)||n.description?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:1,id:o.descriptionKey,class:["d-description",i.DESCRIPTION_SIZE_MODIFIERS[n.size],n.descriptionClass]},n.descriptionChildProps,{"data-qa":"dt-select-description"}),[e.renderSlot(t.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)])],16,mr)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["d-select",i.SELECT_SIZE_MODIFIERS[n.size],n.selectClass,{"d-select--disabled":n.disabled}]),"data-qa":"dt-select-wrapper"},[e.createElementVNode("select",e.mergeProps({ref:"selectElement",class:["d-select__input",i.SELECT_STATE_MODIFIERS[o.state]]},t.$attrs,{"data-qa":"dt-select",disabled:n.disabled},e.toHandlers(o.selectListeners,!0)),[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,d=>(e.openBlock(),e.createElementBlock("option",e.mergeProps({key:o.getOptionKey(d.value),value:d.value,class:n.optionClass},n.optionChildProps),e.toDisplayString(d.label),17,pr))),128))])],16,fr)],2)]),e.createVNode(s,e.mergeProps({"validation-messages":t.formattedMessages,"show-messages":t.showMessages,class:t.messagesClass},t.messagesChildProps,{"data-qa":"dt-select-messages"}),null,16,["validation-messages","show-messages","class"])])}const _r=c._export_sfc(ur,[["render",gr]]),fn=["status","alert"],st=6e3,br={name:"DtToast",components:{DtNoticeIcon:xe,DtNoticeContent:Me,DtNoticeAction:Pe},mixins:[_.SrOnlyCloseButtonMixin],props:{titleId:{type:String,default(){return c.utils.getUniqueString()}},contentId:{type:String,default(){return c.utils.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:t=>fn.includes(t)},kind:{type:String,default:"base",validator:t=>ue.includes(t)},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},duration:{type:Number,default:null,validator:t=>t>=st}},emits:["close","click","update:show"],data(){return{isShown:!1,minDuration:st}},computed:{kindClass(){return{error:"d-toast--error",info:"d-toast--info",success:"d-toast--success",warning:"d-toast--warning",base:"d-toast--base"}[this.kind]},shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration}},watch:{show:{handler:function(t){this.isShown=t,t?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},unmounted(){clearTimeout(this.displayTimer)},methods:{closeToast(t){this.$emit("update:show",!1),this.$emit("close",t)},setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit("update:show",!1)},this.duration))}}},vr=["aria-hidden"],yr={class:"d-toast__dialog"};function Sr(t,a,n,r,i,o){const s=e.resolveComponent("dt-notice-icon"),d=e.resolveComponent("dt-notice-content"),l=e.resolveComponent("dt-notice-action");return i.isShown?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-toast",o.kindClass,{"d-toast--important":n.important}]),"data-qa":"dt-toast","aria-hidden":(!i.isShown).toString()},[e.createElementVNode("div",yr,[e.createVNode(s,{kind:n.kind},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["kind"]),e.createVNode(d,{"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},{titleOverride:e.withCtx(()=>[e.renderSlot(t.$slots,"titleOverride")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.message),1)])]),_:3},8,["title-id","content-id","title","role"]),e.createVNode(l,{"hide-close":n.hideClose,"close-button-props":n.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:o.closeToast},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"action")]),_:3},8,["hide-close","close-button-props","visually-hidden-close","visually-hidden-close-label","onClose"])])],10,vr)):e.createCommentVNode("",!0)}const Cr=c._export_sfc(br,[["render",Sr]]),lt={sm:"d-toggle--small",md:""},pn=[!1,!0,"mixed"],kr={name:"DtToggle",inheritAttrs:!1,model:{prop:"checked",event:"change"},props:{id:{type:String,default(){return c.getUniqueString()}},disabled:{type:Boolean,default:!1},checked:{type:[Boolean,String],default:!1,validator:t=>pn.includes(t)},toggleOnClick:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.keys(lt).includes(t)},showIcon:{type:Boolean,default:!0},labelClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})}},emits:["change"],data(){return{internalChecked:this.checked,hasSlotContent:c.hasSlotContent}},computed:{inputListeners(){return{...this.$attrs,onClick:t=>this.toggleCheckedValue()}},isIndeterminate(){return this.internalChecked==="mixed"},toggleRole(){return this.isIndeterminate?"checkbox":"switch"},toggleClasses(){return["d-toggle",lt[this.size],{"d-toggle--checked":this.internalChecked===!0,"d-toggle--disabled":this.disabled,"d-toggle--indeterminate":this.isIndeterminate}]}},watch:{checked(t){this.internalChecked=t}},mounted(){this.runValidations()},methods:{toggleCheckedValue(){this.$emit("change",!this.internalChecked),this.toggleOnClick&&(this.internalChecked=!this.internalChecked)},hasSlotLabel(){return!!this.$slots.default},runValidations(){this.validateInputLabels(this.hasSlotLabel(),this.$attrs["aria-label"])},validateInputLabels(t,a){!t&&!a&&e.warn("You must provide an aria-label when there is no label passed",this)}}},wr={class:"d-toggle-wrapper"},Er=["for"],Ir=["id","role","aria-checked","disabled","aria-disabled"],Dr={key:0,class:"d-toggle__inner"};function Tr(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",wr,[i.hasSlotContent(t.$slots.default)?(e.openBlock(),e.createElementBlock("label",e.mergeProps({key:0,class:n.labelClass,for:n.id},n.labelChildProps,{"data-qa":"toggle-label"}),[e.renderSlot(t.$slots,"default")],16,Er)):e.createCommentVNode("",!0),e.createElementVNode("button",e.mergeProps({id:n.id,role:o.toggleRole,type:"button","aria-checked":i.internalChecked.toString(),disabled:n.disabled,"aria-disabled":n.disabled.toString(),class:o.toggleClasses},o.inputListeners),[n.showIcon?(e.openBlock(),e.createElementBlock("span",Dr)):e.createCommentVNode("",!0)],16,Ir)])}const Or=c._export_sfc(kr,[["render",Tr]]),le={"{win}":"layout-grid","{arrow-right}":"arrow-right","{arrow-left}":"arrow-left","{arrow-up}":"arrow-up","{arrow-down}":"arrow-down","{cmd}":"command"},gn={"{plus}":"plus"},Br=Object.keys(le),Nr={name:"DtKeyboardShortcut",components:{DtIcon:m.DtIcon},props:{inverted:{type:Boolean,default:!1},shortcut:{type:String,required:!0},screenReaderText:{type:String,default:null}},data(){return{SHORTCUTS_ICON_ALIASES:le,separator:/\+/gi}},computed:{icons(){return{...le,...gn}},shortcutWithSeparator(){return this.shortcut.replace(this.separator,"{plus}")},formattedShortcut(){return Object.keys(le).reduce((t,a)=>t.replace(new RegExp("{"+a+"}","gi"),le[a]),this.shortcutWithSeparator)},formattedShortcutSplit(){const t=Object.keys(this.icons).join("|"),a=new RegExp(`(${t})`,"gi");return this.formattedShortcut.split(a).filter(Boolean)}}},Lr={key:0,class:"sr-only"},Ar=["innerHTML"];function xr(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return e.openBlock(),e.createElementBlock("kbd",{class:e.normalizeClass(["d-keyboard-shortcut",{"d-keyboard-shortcut--inverted":n.inverted}])},[n.screenReaderText?(e.openBlock(),e.createElementBlock("span",Lr,e.toDisplayString(n.screenReaderText),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.formattedShortcutSplit,(d,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.icons[d]?(e.openBlock(),e.createBlock(s,{key:`${l}-${d}`,name:o.icons[d],size:"100","aria-hidden":"true",class:e.normalizeClass(["d-keyboard-shortcut__icon",{"d-keyboard-shortcut__icon--inverted":n.inverted}])},null,8,["name","class"])):(e.openBlock(),e.createElementBlock("span",{key:`${l}-${d}`,"aria-hidden":"true",class:e.normalizeClass(["d-keyboard-shortcut__item",{"d-keyboard-shortcut__item--inverted":n.inverted}]),innerHTML:d},null,10,Ar))],64))),256))],2)}const Mr=c._export_sfc(Nr,[["render",xr]]),dt={LEFT:"left",RIGHT:"right"},_n=["sm","md","lg",null],Pr={name:"DtRootLayout",props:{fixed:{type:Boolean,default:!0},headerClass:{type:[String,Array,Object],default:""},headerHeight:{type:String,default:"64px"},headerSticky:{type:Boolean,default:!1},bodyClass:{type:[String,Array,Object],default:""},contentClass:{type:[String,Array,Object],default:""},sidebarClass:{type:[String,Array,Object],default:""},sidebarWidth:{type:String,default:"256px"},sidebarPosition:{type:String,default:"left",validator:t=>Object.values(dt).includes(t)},footerClass:{type:[String,Array,Object],default:""},footerHeight:{type:String,default:"64px"},responsiveBreakpoint:{type:String,default:null,validator:t=>_n.includes(t)}},computed:{isInverted(){return this.sidebarPosition===dt.RIGHT}}};function Vr(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["root-layout","d-root-layout",{"d-root-layout--fixed":n.fixed,"d-root-layout--inverted":o.isInverted,[`d-root-layout__responsive--${n.responsiveBreakpoint}`]:!!n.responsiveBreakpoint}]),"data-qa":"dt-root-layout"},[e.createElementVNode("header",{class:e.normalizeClass(["d-root-layout__header",{"d-root-layout__header--sticky":n.headerSticky},n.headerClass]),"data-qa":"dt-root-layout-header"},[e.renderSlot(t.$slots,"header")],2),e.createElementVNode("aside",{ref:"root-layout-sidebar",tabindex:"0",class:e.normalizeClass(["d-root-layout__sidebar",n.sidebarClass]),"data-qa":"dt-root-layout-sidebar"},[e.renderSlot(t.$slots,"sidebar")],2),e.createElementVNode("main",{ref:"root-layout-content",class:e.normalizeClass(["d-root-layout__content",n.contentClass]),"data-qa":"dt-root-layout-content",tabindex:"0"},[e.renderSlot(t.$slots,"default")],2),e.createElementVNode("footer",{class:e.normalizeClass(["d-root-layout__footer",n.footerClass]),"data-qa":"dt-root-layout-footer"},[e.renderSlot(t.$slots,"footer")],2)],2)}const Rr=c._export_sfc(Pr,[["render",Vr]]),bn={__name:"core_scroller",props:{items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},buffer:{type:Number,default:200},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["user-position"],setup(t,{expose:a,emit:n}){const r=t,i=n,o=e.reactive(new Map),s=e.reactive(new Map),d=e.ref([]),l=e.ref(null),u=e.ref(!1),f=e.ref(null),h=e.ref("top");let p=0,g=0,b=!1,T=0,y=null,v=null,L=0,R=0;const X=e.computed(()=>{if(r.itemSize===null){const k={"-1":{accumulator:0}},I=r.items,w=r.sizeField,H=r.minItemSize;let V=1e4,j=0,N;for(let $=0,fe=I.length;$<fe;$++)N=I[$][w]||H,N<V&&(V=N),j+=N,k[$]={accumulator:j,size:N};return v=V,k}return[]}),We=e.computed(()=>r.items.length&&typeof r.items[0]!="object"),J=e.computed(()=>{const k={};for(let I=0,w=r.items.length;I<w;I++)k[r.items[I][r.keyField]]=I;return k});e.watch(X,()=>{ie(!1)},{deep:!0}),e.onMounted(()=>{e.nextTick(()=>{ie(!0),u.value=!0})});const K=(k,I,w,H,V)=>{const j=e.markRaw({id:R++,index:I,used:!0,key:H,type:V}),N=e.shallowReactive({item:w,position:0,nr:j});return k.value.push(N),N},ee=(k,I=!1)=>{const w=s,H=k.nr.type;let V=w.get(H);V||(V=[],w.set(H,V)),V.push(k),I||(k.nr.used=!1,k.position=-9999)},me=()=>{const k=r.direction==="vertical";let I;return k?I={start:f.value.scrollTop,end:f.value.scrollTop+f.value.clientHeight}:I={start:f.value.scrollLeft,end:f.value.scrollLeft+f.value.clientWidth},I},re=()=>{throw setTimeout(()=>{console.error("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",f),console.error("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},Ke=()=>{d.value.sort((k,I)=>k.nr.index-I.nr.index)},ie=(k,I=!1)=>{var Lt,At,xt,Mt,Pt,Vt,Rt,$t;const w=r.itemSize,H=v,V=We.value?null:r.keyField,j=r.items,N=j.length,$=X.value,fe=o,Bt=s,ke=d,Hn=J;let z,M,we,U,Y;if(!N)z=M=U=Y=we=0;else{const O=me();if(I){let A=O.start-T.value;if(A<0&&(A=-A),w===null&&A<H.value||A<w)return{continuous:!0}}T=O.start;const F=r.buffer;if(O.start-=F,O.end+=F,w===null){let A,pe=0,zt=N-1,q=~~(N/2),Ft;do Ft=q,A=(Lt=$[q])==null?void 0:Lt.accumulator,A<O.start?pe=q:q<N-1&&((At=$[q+1])==null?void 0:At.accumulator)>O.start&&(zt=q),q=~~((pe+zt)/2);while(q!==Ft);for(q<0&&(q=0),z=q,we=(xt=$[N-1])==null?void 0:xt.accumulator,M=q;M<N&&((Mt=$[M])==null?void 0:Mt.accumulator)<O.end;M++);for(M===-1?M=j.length-1:(M++,M>N&&(M=N)),U=p;U<N&&((Pt=$[U])==null?void 0:Pt.accumulator)<O.start;U++);for(Y=U;Y<N&&((Vt=$[Y])==null?void 0:Vt.accumulator)<O.end;Y++);}else{z=~~(O.start/w);const A=z%1;z-=A,M=Math.ceil(O.end/w),U=Math.max(0,Math.floor(O.start/w)),Y=Math.floor(O.end/w),z<0&&(z=0),M>N&&(M=N),U<0&&(U=0),Y>N&&(Y=N),we=Math.ceil(N/1)*w}}M-z>1e3&&re(),L=we;let E;const Ee=z<=g&&M>=z;if(Ee)for(let O=0,F=ke.value.length;O<F;O++)E=ke.value[O],E!=null&&E.nr.used&&(k&&(E.nr.index=Hn[E.item[V]]),(E.nr.index==null||E.nr.index<z||E.nr.index>=M)&&ee(E));const Nt=Ee?null:new Map;let W,G,Ie;for(let O=z;O<M;O++){W=j[O];const F=V?W==null?void 0:W[V]:W;if(F==null)throw new Error(`Key is ${F} on item (keyField is '${V}')`);if(E=fe.get(F),!w&&!((Rt=$[O])!=null&&Rt.size)){E&&ee(E);continue}G=W.type;let A=Bt.get(G);if(!E)Ee?A&&A.length?E=A.pop():E=K(ke,O,W,F,G):(Ie=Nt.get(G)||0,(!A||Ie>=A.length)&&(E=K(ke,O,W,F,G),ee(E,!0),A=Bt.get(G)),E=A[Ie],Nt.set(G,Ie+1)),fe.delete(E.nr.key),E.nr.used=!0,E.nr.index=O,E.nr.key=F,E.nr.type=G,fe.set(F,E);else if(!E.nr.used&&(E.nr.used=!0,A)){const pe=A.indexOf(E);pe!==-1&&A.splice(pe,1)}E.item=W,w===null?(E.position=($t=$[O-1])==null?void 0:$t.accumulator,E.offset=0):(E.position=Math.floor(O)*w,E.offset=O%1*w)}return p=z,g=M,clearTimeout(y),y=setTimeout(Ke,300),{continuous:Ee}},je=k=>{const I=r.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"},w=f.value,H=I.scroll;w[H]=k},Ye=k=>{var w;let I;r.itemSize===null?I=k>0?(w=X.value[k-1])==null?void 0:w.accumulator:0:I=Math.floor(k)*r.itemSize,je(I)},P=()=>{const k=f.value;h.value!=="middle"&&(h.value="middle",i("user-position","middle")),k.scrollTop===0&&(h.value="top",i("user-position","top")),k.scrollTop+k.clientHeight===k.scrollHeight&&(h.value="bottom",i("user-position","bottom")),b||(b=!0,requestAnimationFrame(()=>{b=!1,ie(!1,!0)}))};return a({scrollToItem:Ye,_updateVisibleItems:ie}),(k,I)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scroller",ref:f,class:e.normalizeClass(["vue-recycle-scroller",{ready:u.value,[`direction-${t.direction}`]:!0}]),onScrollPassive:P},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.listTag),{ref:"wrapper",style:e.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:`${e.unref(L)}px`}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",t.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,w=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.itemTag),e.mergeProps({key:w.nr.id,style:u.value?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${w.position}px) translate${t.direction==="vertical"?"X":"Y"}(${w.offset}px)`,width:void 0,height:void 0}:null,class:["vue-recycle-scroller__item-view",[t.itemClass,{hover:!t.skipHover&&l.value===w.nr.key}]]},e.toHandlers(t.skipHover?{}:{mouseenter:()=>{l.value=w.nr.key},mouseleave:()=>{l.value=null}})),{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default",{item:w.item,index:w.nr.index,active:w.nr.used})]),_:2},1040,["style","class"]))),128))]),_:3},8,["style","class"]))],34))}},$r={name:"DtScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},tag:{type:String,default:"div"}},computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,a){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[a],r=this.vscrollData.sizes[t];n!=null&&n!==r&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver))for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate)},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const a=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(a,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,a){const n=~~(this.vscrollParent.direction==="vertical"?a:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,a,n){this.id===t&&this.applyWidthHeight(a,n)}},render(){return e.h(this.tag,this.$slots.default())}},zr={name:"DynamicScroller",components:{CoreScroller:bn,DtScrollerItem:$r},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const a of t)if(a.target&&a.target.$_vs_onResize){let n,r;if(a.borderBoxSize){const i=a.borderBoxSize[0];n=i.inlineSize,r=i.blockSize}else n=a.contentRect.width,r=a.contentRect.height;a.target.$_vs_onResize(a.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{items:{type:Array,required:!0},dynamic:{type:Boolean,default:!1},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},minItemSize:{type:[Number,String]}},data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray(){return this.items.length&&typeof this.items[0]!="object"},itemsWithSize(){const t=[],{items:a,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,o=a.length;for(let s=0;s<o;s++){const d=a[s],l=r?s:d[n];let u=i[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),t.push({item:d,[n]:l,size:u})}return t}},watch:{simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},itemsWithSize(t,a){const n=this.$el.scrollTop;let r=0,i=0;const o=Math.min(t.length,a.length);for(let d=0;d<o&&!(r>=n);d++)r+=a[d].size||this.minItemSize,i+=t[d].size||this.minItemSize;const s=i-r;s!==0&&(this.$el.scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},methods:{dynamicScrollerUpdateItems(){const t=this.$refs.scroller;t&&t._updateVisibleItems(!0)},dynamicScrollerUpdateItemsFromBottom(){const t=this.$refs.scroller;t&&t._updateVisibleItems(!1,!0)},scrollToItem(t){const a=this.$refs.scroller;a&&a.scrollToItem(t)},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const a=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(a)})};requestAnimationFrame(a)})}}};function Fr(t,a,n,r,i,o){const s=e.resolveComponent("dt-scroller-item"),d=e.resolveComponent("core-scroller");return e.openBlock(),e.createBlock(d,e.mergeProps({ref:"scroller",items:o.itemsWithSize,"min-item-size":n.minItemSize,direction:n.direction,"key-field":n.keyField,"list-tag":n.listTag,"item-tag":n.itemTag},t.$attrs),{default:e.withCtx(({item:l,index:u,active:f})=>[e.createVNode(s,{item:l,active:f,"size-dependencies":[l.message],"data-index":u},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({item:l.item,index:u,active:f,itemWithSize:l})))]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:3},16,["items","min-item-size","direction","key-field","list-tag","item-tag"])}const qr=c._export_sfc(zr,[["render",Fr]]),Hr={__name:"DtScroller",props:{direction:{type:String,default:"vertical",validator:t=>["vertical","horizontal"].includes(t)},dynamic:{type:Boolean,default:!1},itemSize:{type:Number,default:null},itemTag:{type:String,default:"div"},items:{type:Array,required:!0},keyField:{type:String,default:"id"},listTag:{type:String,default:"div"},minItemSize:{type:[Number,String],default:null},scrollerHeight:{type:[String,Number],default:"100%"},scrollerWidth:{type:[String,Number],default:"100%"}},emits:["user-position"],setup(t,{expose:a,emit:n}){const r=t,i=n;e.provide("emit",i);const o=e.ref(null),s=e.computed(()=>({width:typeof r.scrollerWidth=="number"?`${r.scrollerWidth}px`:r.scrollerWidth,height:typeof r.scrollerHeight=="number"?`${r.scrollerHeight}px`:r.scrollerHeight}));e.watch(r,()=>{h()},{deep:!0,immediate:!0});function d(){o.value&&o.value.scrollToBottom()}function l(p){o.value&&o.value.scrollToItem(p)}function u(){o.value&&(r.dynamic?o.value.dynamicScrollerUpdateItems():o.value._updateVisibleItems(!0))}function f(){o.value&&(r.dynamic?o.value.dynamicScrollerUpdateItemsFromBottom():o.value._updateVisibleItems(!1,!0))}function h(){r.dynamic&&!r.minItemSize&&console.error("scroller error: 'minItemSize' is required on 'dynamic' mode."),!r.dynamic&&!r.itemSize&&console.error("scroller error: 'itemSize' is required.")}return a({scrollToBottom:d,scrollToItem:l,updateItems:u,updateItemsFromBottom:f}),(p,g)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dynamic?qr:bn),{ref_key:"scroller",ref:o,"data-qa":"dt-scroller",items:t.items,"item-size":t.itemSize,"min-item-size":t.minItemSize,direction:t.direction,"key-field":t.keyField,"list-tag":t.listTag,"item-tag":t.itemTag,style:e.normalizeStyle(s.value),tabindex:"0",onUserPosition:g[0]||(g[0]=b=>p.$emit("user-position",b))},{default:e.withCtx(({item:b,index:T,active:y})=>[e.renderSlot(p.$slots,"default",e.normalizeProps(e.guardReactiveProps({item:b,index:T,active:y})))]),_:3},40,["items","item-size","min-item-size","direction","key-field","list-tag","item-tag","style"]))}},vn=0,Ur="MMMM",Ge="long";function ce(t){"@babel/helpers - typeof";return ce=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},ce(t)}function B(t){if(t===null||t===!0||t===!1)return NaN;var a=Number(t);return isNaN(a)?a:a<0?Math.ceil(a):Math.floor(a)}function S(t,a){if(a.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+a.length+" present")}function C(t){S(1,arguments);var a=Object.prototype.toString.call(t);return t instanceof Date||ce(t)==="object"&&a==="[object Date]"?new Date(t.getTime()):typeof t=="number"||a==="[object Number]"?new Date(t):((typeof t=="string"||a==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function he(t,a){S(2,arguments);var n=C(t),r=B(a);return isNaN(r)?new Date(NaN):(r&&n.setDate(n.getDate()+r),n)}function Ve(t,a){S(2,arguments);var n=C(t),r=B(a);if(isNaN(r))return new Date(NaN);if(!r)return n;var i=n.getDate(),o=new Date(n.getTime());o.setMonth(n.getMonth()+r+1,0);var s=o.getDate();return i>=s?o:(n.setFullYear(o.getFullYear(),o.getMonth(),i),n)}function ge(t,a){if(S(2,arguments),!a||ce(a)!=="object")return new Date(NaN);var n=a.years?B(a.years):0,r=a.months?B(a.months):0,i=a.weeks?B(a.weeks):0,o=a.days?B(a.days):0,s=a.hours?B(a.hours):0,d=a.minutes?B(a.minutes):0,l=a.seconds?B(a.seconds):0,u=C(t),f=r||n?Ve(u,r+n*12):u,h=o||i?he(f,o+i*7):f,p=d+s*60,g=l+p*60,b=g*1e3,T=new Date(h.getTime()+b);return T}function Wr(t,a){S(2,arguments);var n=C(t).getTime(),r=B(a);return new Date(n+r)}var Kr={};function oe(){return Kr}function ct(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.weekStartsOn)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=C(t),g=p.getDay(),b=(g<h?7:0)+g-h;return p.setDate(p.getDate()-b),p.setHours(0,0,0,0),p}function ye(t){var a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),t.getTime()-a.getTime()}function Oe(t){S(1,arguments);var a=C(t);return a.setHours(0,0,0,0),a}var jr=864e5;function Yr(t,a){S(2,arguments);var n=Oe(t),r=Oe(a),i=n.getTime()-ye(n),o=r.getTime()-ye(r);return Math.round((i-o)/jr)}function ne(t,a){S(2,arguments);var n=C(t),r=C(a),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}var Gr=6e4,Qr=36e5;function yn(t,a){S(2,arguments);var n=Oe(t),r=Oe(a);return n.getTime()===r.getTime()}function Zr(t){return S(1,arguments),t instanceof Date||ce(t)==="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Xr(t){if(S(1,arguments),!Zr(t)&&typeof t!="number")return!1;var a=C(t);return!isNaN(Number(a))}function Jr(t,a){S(2,arguments);var n=C(t),r=C(a),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return i*12+o}function ei(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getFullYear()-r.getFullYear()}function qt(t,a){var n=t.getFullYear()-a.getFullYear()||t.getMonth()-a.getMonth()||t.getDate()-a.getDate()||t.getHours()-a.getHours()||t.getMinutes()-a.getMinutes()||t.getSeconds()-a.getSeconds()||t.getMilliseconds()-a.getMilliseconds();return n<0?-1:n>0?1:n}function ti(t,a){S(2,arguments);var n=C(t),r=C(a),i=qt(n,r),o=Math.abs(Yr(n,r));n.setDate(n.getDate()-i*o);var s=+(qt(n,r)===-i),d=i*(o-s);return d===0?0:d}function Ct(t,a){return S(2,arguments),C(t).getTime()-C(a).getTime()}var Ht={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},ni="trunc";function kt(t){return t?Ht[t]:Ht[ni]}function ai(t,a,n){S(2,arguments);var r=Ct(t,a)/Qr;return kt(n==null?void 0:n.roundingMethod)(r)}function oi(t,a,n){S(2,arguments);var r=Ct(t,a)/Gr;return kt(n==null?void 0:n.roundingMethod)(r)}function ri(t){S(1,arguments);var a=C(t);return a.setHours(23,59,59,999),a}function Sn(t){S(1,arguments);var a=C(t),n=a.getMonth();return a.setFullYear(a.getFullYear(),n+1,0),a.setHours(23,59,59,999),a}function ii(t){S(1,arguments);var a=C(t);return ri(a).getTime()===Sn(a).getTime()}function Cn(t,a){S(2,arguments);var n=C(t),r=C(a),i=ne(n,r),o=Math.abs(Jr(n,r)),s;if(o<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*o);var d=ne(n,r)===-i;ii(C(t))&&o===1&&ne(t,r)===1&&(d=!1),s=i*(o-Number(d))}return s===0?0:s}function kn(t,a,n){S(2,arguments);var r=Ct(t,a)/1e3;return kt(n==null?void 0:n.roundingMethod)(r)}function si(t,a){S(2,arguments);var n=C(t),r=C(a),i=ne(n,r),o=Math.abs(ei(n,r));n.setFullYear(1584),r.setFullYear(1584);var s=ne(n,r)===-i,d=i*(o-Number(s));return d===0?0:d}function li(t){S(1,arguments);var a=C(t);return a.setDate(1),a.setHours(0,0,0,0),a}function di(t,a){S(2,arguments);var n=B(a);return Wr(t,-n)}var ci=864e5;function ui(t){S(1,arguments);var a=C(t),n=a.getTime();a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0);var r=a.getTime(),i=n-r;return Math.floor(i/ci)+1}function Be(t){S(1,arguments);var a=1,n=C(t),r=n.getUTCDay(),i=(r<a?7:0)+r-a;return n.setUTCDate(n.getUTCDate()-i),n.setUTCHours(0,0,0,0),n}function wn(t){S(1,arguments);var a=C(t),n=a.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Be(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var s=Be(o);return a.getTime()>=i.getTime()?n+1:a.getTime()>=s.getTime()?n:n-1}function hi(t){S(1,arguments);var a=wn(t),n=new Date(0);n.setUTCFullYear(a,0,4),n.setUTCHours(0,0,0,0);var r=Be(n);return r}var mi=6048e5;function fi(t){S(1,arguments);var a=C(t),n=Be(a).getTime()-hi(a).getTime();return Math.round(n/mi)+1}function Ne(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.weekStartsOn)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=C(t),g=p.getUTCDay(),b=(g<h?7:0)+g-h;return p.setUTCDate(p.getUTCDate()-b),p.setUTCHours(0,0,0,0),p}function En(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=C(t),h=f.getUTCFullYear(),p=oe(),g=B((n=(r=(i=(o=a==null?void 0:a.firstWeekContainsDate)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:p.firstWeekContainsDate)!==null&&r!==void 0?r:(l=p.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=new Date(0);b.setUTCFullYear(h+1,0,g),b.setUTCHours(0,0,0,0);var T=Ne(b,a),y=new Date(0);y.setUTCFullYear(h,0,g),y.setUTCHours(0,0,0,0);var v=Ne(y,a);return f.getTime()>=T.getTime()?h+1:f.getTime()>=v.getTime()?h:h-1}function pi(t,a){var n,r,i,o,s,d,l,u;S(1,arguments);var f=oe(),h=B((n=(r=(i=(o=a==null?void 0:a.firstWeekContainsDate)!==null&&o!==void 0?o:a==null||(s=a.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:f.firstWeekContainsDate)!==null&&r!==void 0?r:(l=f.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:1),p=En(t,a),g=new Date(0);g.setUTCFullYear(p,0,h),g.setUTCHours(0,0,0,0);var b=Ne(g,a);return b}var gi=6048e5;function _i(t,a){S(1,arguments);var n=C(t),r=Ne(n,a).getTime()-pi(n,a).getTime();return Math.round(r/gi)+1}function D(t,a){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<a;)r="0"+r;return n+r}var bi={y:function(a,n){var r=a.getUTCFullYear(),i=r>0?r:1-r;return D(n==="yy"?i%100:i,n.length)},M:function(a,n){var r=a.getUTCMonth();return n==="M"?String(r+1):D(r+1,2)},d:function(a,n){return D(a.getUTCDate(),n.length)},a:function(a,n){var r=a.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(a,n){return D(a.getUTCHours()%12||12,n.length)},H:function(a,n){return D(a.getUTCHours(),n.length)},m:function(a,n){return D(a.getUTCMinutes(),n.length)},s:function(a,n){return D(a.getUTCSeconds(),n.length)},S:function(a,n){var r=n.length,i=a.getUTCMilliseconds(),o=Math.floor(i*Math.pow(10,r-3));return D(o,n.length)}};const Q=bi;var se={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vi={G:function(a,n,r){var i=a.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(a,n,r){if(n==="yo"){var i=a.getUTCFullYear(),o=i>0?i:1-i;return r.ordinalNumber(o,{unit:"year"})}return Q.y(a,n)},Y:function(a,n,r,i){var o=En(a,i),s=o>0?o:1-o;if(n==="YY"){var d=s%100;return D(d,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):D(s,n.length)},R:function(a,n){var r=wn(a);return D(r,n.length)},u:function(a,n){var r=a.getUTCFullYear();return D(r,n.length)},Q:function(a,n,r){var i=Math.ceil((a.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return D(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(a,n,r){var i=Math.ceil((a.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return D(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(a,n,r){var i=a.getUTCMonth();switch(n){case"M":case"MM":return Q.M(a,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(a,n,r){var i=a.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return D(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(a,n,r,i){var o=_i(a,i);return n==="wo"?r.ordinalNumber(o,{unit:"week"}):D(o,n.length)},I:function(a,n,r){var i=fi(a);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):D(i,n.length)},d:function(a,n,r){return n==="do"?r.ordinalNumber(a.getUTCDate(),{unit:"date"}):Q.d(a,n)},D:function(a,n,r){var i=ui(a);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):D(i,n.length)},E:function(a,n,r){var i=a.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(a,n,r,i){var o=a.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return D(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});case"eeee":default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(a,n,r,i){var o=a.getUTCDay(),s=(o-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return D(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(a,n,r){var i=a.getUTCDay(),o=i===0?7:i;switch(n){case"i":return String(o);case"ii":return D(o,n.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(a,n,r){var i=a.getUTCHours(),o=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(a,n,r){var i=a.getUTCHours(),o;switch(i===12?o=se.noon:i===0?o=se.midnight:o=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(a,n,r){var i=a.getUTCHours(),o;switch(i>=17?o=se.evening:i>=12?o=se.afternoon:i>=4?o=se.morning:o=se.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(a,n,r){if(n==="ho"){var i=a.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Q.h(a,n)},H:function(a,n,r){return n==="Ho"?r.ordinalNumber(a.getUTCHours(),{unit:"hour"}):Q.H(a,n)},K:function(a,n,r){var i=a.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):D(i,n.length)},k:function(a,n,r){var i=a.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):D(i,n.length)},m:function(a,n,r){return n==="mo"?r.ordinalNumber(a.getUTCMinutes(),{unit:"minute"}):Q.m(a,n)},s:function(a,n,r){return n==="so"?r.ordinalNumber(a.getUTCSeconds(),{unit:"second"}):Q.s(a,n)},S:function(a,n){return Q.S(a,n)},X:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return Wt(s);case"XXXX":case"XX":return te(s);case"XXXXX":case"XXX":default:return te(s,":")}},x:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"x":return Wt(s);case"xxxx":case"xx":return te(s);case"xxxxx":case"xxx":default:return te(s,":")}},O:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+Ut(s,":");case"OOOO":default:return"GMT"+te(s,":")}},z:function(a,n,r,i){var o=i._originalDate||a,s=o.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+Ut(s,":");case"zzzz":default:return"GMT"+te(s,":")}},t:function(a,n,r,i){var o=i._originalDate||a,s=Math.floor(o.getTime()/1e3);return D(s,n.length)},T:function(a,n,r,i){var o=i._originalDate||a,s=o.getTime();return D(s,n.length)}};function Ut(t,a){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(o===0)return n+String(i);var s=a||"";return n+String(i)+s+D(o,2)}function Wt(t,a){if(t%60===0){var n=t>0?"-":"+";return n+D(Math.abs(t)/60,2)}return te(t,a)}function te(t,a){var n=a||"",r=t>0?"-":"+",i=Math.abs(t),o=D(Math.floor(i/60),2),s=D(i%60,2);return r+o+n+s}const yi=vi;var Kt=function(a,n){switch(a){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},In=function(a,n){switch(a){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Si=function(a,n){var r=a.match(/(P+)(p+)?/)||[],i=r[1],o=r[2];if(!o)return Kt(a,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Kt(i,n)).replace("{{time}}",In(o,n))},Ci={p:In,P:Si};const ki=Ci;var wi=["D","DD"],Ei=["YY","YYYY"];function Ii(t){return wi.indexOf(t)!==-1}function Di(t){return Ei.indexOf(t)!==-1}function jt(t,a,n){if(t==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(a,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(a,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(a,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(t==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(a,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ti={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Oi=function(a,n,r){var i,o=Ti[a];return typeof o=="string"?i=o:n===1?i=o.one:i=o.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};const Bi=Oi;function Qe(t){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=a.width?String(a.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var Ni={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Li={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ai={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xi={date:Qe({formats:Ni,defaultWidth:"full"}),time:Qe({formats:Li,defaultWidth:"full"}),dateTime:Qe({formats:Ai,defaultWidth:"full"})};const Mi=xi;var Pi={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Vi=function(a,n,r,i){return Pi[a]};const Ri=Vi;function _e(t){return function(a,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;i=t.formattingValues[s]||t.formattingValues[o]}else{var d=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;i=t.values[l]||t.values[d]}var u=t.argumentCallback?t.argumentCallback(a):a;return i[u]}}var $i={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zi={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fi={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qi={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Hi={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ui={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Wi=function(a,n){var r=Number(a),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ki={ordinalNumber:Wi,era:_e({values:$i,defaultWidth:"wide"}),quarter:_e({values:zi,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:_e({values:Fi,defaultWidth:"wide"}),day:_e({values:qi,defaultWidth:"wide"}),dayPeriod:_e({values:Hi,defaultWidth:"wide",formattingValues:Ui,defaultFormattingWidth:"wide"})};const ji=Ki;function be(t){return function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=a.match(i);if(!o)return null;var s=o[0],d=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(d)?Gi(d,function(h){return h.test(s)}):Yi(d,function(h){return h.test(s)}),u;u=t.valueCallback?t.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;var f=a.slice(s.length);return{value:u,rest:f}}}function Yi(t,a){for(var n in t)if(t.hasOwnProperty(n)&&a(t[n]))return n}function Gi(t,a){for(var n=0;n<t.length;n++)if(a(t[n]))return n}function Qi(t){return function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=a.match(t.matchPattern);if(!r)return null;var i=r[0],o=a.match(t.parsePattern);if(!o)return null;var s=t.valueCallback?t.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;var d=a.slice(i.length);return{value:s,rest:d}}}var Zi=/^(\d+)(th|st|nd|rd)?/i,Xi=/\d+/i,Ji={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},es={any:[/^b/i,/^(a|c)/i]},ts={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ns={any:[/1/i,/2/i,/3/i,/4/i]},as={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},os={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},rs={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},is={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ss={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ls={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ds={ordinalNumber:Qi({matchPattern:Zi,parsePattern:Xi,valueCallback:function(a){return parseInt(a,10)}}),era:be({matchPatterns:Ji,defaultMatchWidth:"wide",parsePatterns:es,defaultParseWidth:"any"}),quarter:be({matchPatterns:ts,defaultMatchWidth:"wide",parsePatterns:ns,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:be({matchPatterns:as,defaultMatchWidth:"wide",parsePatterns:os,defaultParseWidth:"any"}),day:be({matchPatterns:rs,defaultMatchWidth:"wide",parsePatterns:is,defaultParseWidth:"any"}),dayPeriod:be({matchPatterns:ss,defaultMatchWidth:"any",parsePatterns:ls,defaultParseWidth:"any"})};const cs=ds;var us={code:"en-US",formatDistance:Bi,formatLong:Mi,formatRelative:Ri,localize:ji,match:cs,options:{weekStartsOn:0,firstWeekContainsDate:1}};const wt=us;var hs=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ms=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,fs=/^'([^]*?)'?$/,ps=/''/g,gs=/[a-zA-Z]/;function Dn(t,a,n){var r,i,o,s,d,l,u,f,h,p,g,b,T,y,v,L,R,X;S(2,arguments);var We=String(a),J=oe(),K=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:J.locale)!==null&&r!==void 0?r:wt,ee=B((o=(s=(d=(l=n==null?void 0:n.firstWeekContainsDate)!==null&&l!==void 0?l:n==null||(u=n.locale)===null||u===void 0||(f=u.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&d!==void 0?d:J.firstWeekContainsDate)!==null&&s!==void 0?s:(h=J.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&o!==void 0?o:1);if(!(ee>=1&&ee<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var me=B((g=(b=(T=(y=n==null?void 0:n.weekStartsOn)!==null&&y!==void 0?y:n==null||(v=n.locale)===null||v===void 0||(L=v.options)===null||L===void 0?void 0:L.weekStartsOn)!==null&&T!==void 0?T:J.weekStartsOn)!==null&&b!==void 0?b:(R=J.locale)===null||R===void 0||(X=R.options)===null||X===void 0?void 0:X.weekStartsOn)!==null&&g!==void 0?g:0);if(!(me>=0&&me<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!K.localize)throw new RangeError("locale must contain localize property");if(!K.formatLong)throw new RangeError("locale must contain formatLong property");var re=C(t);if(!Xr(re))throw new RangeError("Invalid time value");var Ke=ye(re),ie=di(re,Ke),je={firstWeekContainsDate:ee,weekStartsOn:me,locale:K,_originalDate:re},Ye=We.match(ms).map(function(P){var k=P[0];if(k==="p"||k==="P"){var I=ki[k];return I(P,K.formatLong)}return P}).join("").match(hs).map(function(P){if(P==="''")return"'";var k=P[0];if(k==="'")return _s(P);var I=yi[k];if(I)return!(n!=null&&n.useAdditionalWeekYearTokens)&&Di(P)&&jt(P,a,String(t)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ii(P)&&jt(P,a,String(t)),I(ie,P,K.localize,je);if(k.match(gs))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return P}).join("");return Ye}function _s(t){var a=t.match(fs);return a?a[1].replace(ps,"'"):t}function Tn(t,a){if(t==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);return t}function bs(t){return Tn({},t)}var Yt=1440,vs=2520,Ze=43200,ys=86400;function Ss(t,a,n){var r,i;S(2,arguments);var o=oe(),s=(r=(i=n==null?void 0:n.locale)!==null&&i!==void 0?i:o.locale)!==null&&r!==void 0?r:wt;if(!s.formatDistance)throw new RangeError("locale must contain formatDistance property");var d=ne(t,a);if(isNaN(d))throw new RangeError("Invalid time value");var l=Tn(bs(n),{addSuffix:!!(n!=null&&n.addSuffix),comparison:d}),u,f;d>0?(u=C(a),f=C(t)):(u=C(t),f=C(a));var h=kn(f,u),p=(ye(f)-ye(u))/1e3,g=Math.round((h-p)/60),b;if(g<2)return n!=null&&n.includeSeconds?h<5?s.formatDistance("lessThanXSeconds",5,l):h<10?s.formatDistance("lessThanXSeconds",10,l):h<20?s.formatDistance("lessThanXSeconds",20,l):h<40?s.formatDistance("halfAMinute",0,l):h<60?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",1,l):g===0?s.formatDistance("lessThanXMinutes",1,l):s.formatDistance("xMinutes",g,l);if(g<45)return s.formatDistance("xMinutes",g,l);if(g<90)return s.formatDistance("aboutXHours",1,l);if(g<Yt){var T=Math.round(g/60);return s.formatDistance("aboutXHours",T,l)}else{if(g<vs)return s.formatDistance("xDays",1,l);if(g<Ze){var y=Math.round(g/Yt);return s.formatDistance("xDays",y,l)}else if(g<ys)return b=Math.round(g/Ze),s.formatDistance("aboutXMonths",b,l)}if(b=Cn(f,u),b<12){var v=Math.round(g/Ze);return s.formatDistance("xMonths",v,l)}else{var L=b%12,R=Math.floor(b/12);return L<3?s.formatDistance("aboutXYears",R,l):L<9?s.formatDistance("overXYears",R,l):s.formatDistance("almostXYears",R+1,l)}}var Cs=["years","months","weeks","days","hours","minutes","seconds"];function ks(t,a){var n,r,i,o,s;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var d=oe(),l=(n=(r=a==null?void 0:a.locale)!==null&&r!==void 0?r:d.locale)!==null&&n!==void 0?n:wt,u=(i=a==null?void 0:a.format)!==null&&i!==void 0?i:Cs,f=(o=a==null?void 0:a.zero)!==null&&o!==void 0?o:!1,h=(s=a==null?void 0:a.delimiter)!==null&&s!==void 0?s:" ";if(!l.formatDistance)return"";var p=u.reduce(function(g,b){var T="x".concat(b.replace(/(^.)/,function(v){return v.toUpperCase()})),y=t[b];return typeof y=="number"&&(f||t[b])?g.concat(l.formatDistance(T,y)):g},[]).join(h);return p}function Et(t){S(1,arguments);var a=C(t),n=a.getDate();return n}function Le(t){S(1,arguments);var a=C(t),n=a.getDay();return n}function ws(t){S(1,arguments);var a=C(t),n=a.getFullYear(),r=a.getMonth(),i=new Date(0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function De(t){S(1,arguments);var a=C(t),n=a.getMonth();return n}function ut(t){return S(1,arguments),C(t).getFullYear()}function Es(t){S(1,arguments);var a=C(t.start),n=C(t.end);if(isNaN(a.getTime()))throw new RangeError("Start Date is invalid");if(isNaN(n.getTime()))throw new RangeError("End Date is invalid");var r={};r.years=Math.abs(si(n,a));var i=ne(n,a),o=ge(a,{years:i*r.years});r.months=Math.abs(Cn(n,o));var s=ge(o,{months:i*r.months});r.days=Math.abs(ti(n,s));var d=ge(s,{days:i*r.days});r.hours=Math.abs(ai(n,d));var l=ge(d,{hours:i*r.hours});r.minutes=Math.abs(oi(n,l));var u=ge(l,{minutes:i*r.minutes});return r.seconds=Math.abs(kn(n,u)),r}function Is(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getTime()===r.getTime()}function Ds(t,a,n){S(2,arguments);var r=ct(t,n),i=ct(a,n);return r.getTime()===i.getTime()}function Ts(t,a){S(2,arguments);var n=C(t),r=C(a);return n.getFullYear()===r.getFullYear()}function Os(t,a){return S(1,arguments),Ds(t,Date.now(),a)}function Bs(t){return S(1,arguments),Ts(t,Date.now())}function Ns(t){return S(1,arguments),yn(t,Date.now())}function Ls(t,a){S(2,arguments);var n=B(a);return he(t,-n)}function As(t){return S(1,arguments),yn(t,Ls(Date.now(),1))}function xs(t,a){S(2,arguments);var n=C(t),r=B(a),i=n.getFullYear(),o=n.getDate(),s=new Date(0);s.setFullYear(i,r,15),s.setHours(0,0,0,0);var d=ws(s);return n.setMonth(r,Math.min(o,d)),n}function Ms(t,a){if(S(2,arguments),ce(a)!=="object"||a===null)throw new RangeError("values parameter must be an object");var n=C(t);return isNaN(n.getTime())?new Date(NaN):(a.year!=null&&n.setFullYear(a.year),a.month!=null&&(n=xs(n,a.month)),a.date!=null&&n.setDate(B(a.date)),a.hours!=null&&n.setHours(B(a.hours)),a.minutes!=null&&n.setMinutes(B(a.minutes)),a.seconds!=null&&n.setSeconds(B(a.seconds)),a.milliseconds!=null&&n.setMilliseconds(B(a.milliseconds)),n)}function On(t,a){S(2,arguments);var n=B(a);return Ve(t,-n)}const ht=t=>t?new Date(t):new Date,Ps=(t,a,n)=>{const r=ht(JSON.parse(JSON.stringify(t))),i=[];for(let o=0;o<7;o++){const s=he(r,o),d=De(s)!==a;i.push({text:s.getDate(),value:s,currentMonth:!d,isFirstDayOfMonth:s.getDate()===1&&!d,selected:n?s.getDate()===n&&!d:!1})}return i},Vs=(t,a)=>!t||!a?!1:Is(t,a),Rs=(t,a,n)=>{const r=[],i=ht(new Date(a,t)),o=ht(new Date(a,t+1,0)),d=ct(i,{weekStartsOn:vn}),l=u=>{const f=Ps(u,t,n);if(r.push({days:f}),!r[r.length-1].days.some(h=>Vs(h.value,o))){const h=he(u,7);l(h)}};return l(d),r},$s=(t,a)=>{const n=[1,2,3,4,5,6,7].map(o=>new Intl.DateTimeFormat(t,{weekday:"short",timeZone:"UTC"}).format(new Date(`2017-01-0${o}T00:00:00+00:00`)).slice(0,2)),r=n.slice(0,a),i=n.slice(a+1,n.length);return[n[a]].concat(...i).concat(...r)},zs=(t,a,n)=>new Intl.DateTimeFormat(n,{month:a}).format(new Date(2e3,t,1)),Fs=t=>{const a=new Date(t),n=Le(a),r=Ve(a,1),i=li(r),o=Le(i),s=(n-o+7)%7,d=he(i,s);return Et(d)},qs=t=>{const a=new Date(t),n=Le(a);let i=Sn(On(a,1));for(;Le(i)!==n;)i=he(i,-1);return Et(i)};function Hs(t,a){const n=e.ref(De(t.selectedDate)),r=e.ref(ut(t.selectedDate)),i=e.ref(null),o=e.ref(0),s=e.ref([]),d=e.computed(()=>Rs(n.value,r.value,i.value)),l=e.computed(()=>(v,L,R)=>zs(v,L,R));e.watch(n,()=>{p(),a("calendar-days",d.value)},{immediate:!0}),e.watch(r,()=>{p(),a("calendar-days",d.value)},{immediate:!0});function u(v){s.value.includes(v)||s.value.push(v)}function f(){s.value[0].$el.focus()}function h(v){switch(v.key){case"ArrowLeft":v.preventDefault(),o.value===0?(o.value=3,s.value[o.value].$el.focus()):(o.value--,s.value[o.value].$el.focus());break;case"ArrowRight":v.preventDefault(),o.value===3?(o.value=0,s.value[o.value].$el.focus()):(o.value++,s.value[o.value].$el.focus());break;case"ArrowDown":v.preventDefault(),a("focus-first-day");break;case"Tab":v.preventDefault(),a("focus-first-day");break;case"Escape":a("close-datepicker");break}}function p(){const v=ut(t.selectedDate),L=De(t.selectedDate);v!==r.value||L!==n.value?i.value=null:i.value=Et(t.selectedDate)}function g(v){(n.value===0&&v===-1||n.value===11&&v===1)&&(r.value+=v);const L=Ms(t.selectedDate,{month:n.value,year:r.value}),R=v===1?Ve(L,1):On(L,1);n.value=De(R)}function b(v){r.value=r.value+v}function T(){g(1)}function y(){g(-1)}return{selectMonth:n,selectYear:r,formattedMonth:l,setDayRef:u,focusMonthYearPicker:f,handleKeyDown:h,changeMonth:g,changeYear:b,goToNextMonth:T,goToPrevMonth:y}}const Us={id:"calendar-heading",class:"d-datepicker__month-year-title"},Ws={__name:"month-year-picker",props:{locale:{type:String,required:!0},prevMonthLabel:{type:String,required:!0},nextMonthLabel:{type:String,required:!0},prevYearLabel:{type:String,required:!0},nextYearLabel:{type:String,required:!0},changeToLabel:{type:String,required:!0},selectedDate:{type:Date,required:!0}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],setup(t,{expose:a,emit:n}){const r=t,i=n,{selectMonth:o,selectYear:s,formattedMonth:d,setDayRef:l,focusMonthYearPicker:u,handleKeyDown:f,changeMonth:h,changeYear:p,goToNextMonth:g,goToPrevMonth:b}=Hs(r,i);return e.onMounted(()=>{u()}),a({focusMonthYearPicker:u,goToNextMonth:g,goToPrevMonth:b}),(T,y)=>(e.openBlock(),e.createBlock(e.unref(_.DtStack),{direction:"row",class:"d-datepicker__month-year",gap:"300"},{default:e.withCtx(()=>[e.createVNode(e.unref(_.DtStack),{as:"nav",direction:"row",gap:"200",class:"d-datepicker__nav"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.DtTooltip),{message:t.prevYearLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"prevYearButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.prevYearLabel} ${e.unref(s)-1}`,onClick:y[0]||(y[0]=v=>e.unref(p)(-1)),onKeydown:y[1]||(y[1]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevrons-left",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"]),e.createVNode(e.unref(c.DtTooltip),{message:t.prevMonthLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"prevMonthButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.prevMonthLabel} ${e.unref(d)(e.unref(o)-1,e.unref(Ge),t.locale)}`,onClick:y[2]||(y[2]=v=>e.unref(h)(-1)),onKeydown:y[3]||(y[3]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevron-left",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])]),_:1}),e.createElementVNode("div",Us,e.toDisplayString(e.unref(d)(e.unref(o),e.unref(Ge),t.locale))+" "+e.toDisplayString(e.unref(s)),1),e.createVNode(e.unref(_.DtStack),{as:"nav",direction:"row",gap:"200",class:"d-datepicker__nav"},{default:e.withCtx(()=>[e.createVNode(e.unref(c.DtTooltip),{message:t.nextMonthLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"nextMonthButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.nextMonthLabel} ${e.unref(d)(e.unref(o)+1,e.unref(Ge),t.locale)}`,onClick:y[4]||(y[4]=v=>e.unref(h)(1)),onKeydown:y[5]||(y[5]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevron-right",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"]),e.createVNode(e.unref(c.DtTooltip),{message:t.nextYearLabel,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref(m.DtButton),{id:"nextYearButton",ref:v=>{v&&e.unref(l)(v)},size:"xs",importance:"clear",kind:"muted",circle:!0,class:"d-datepicker__nav-btn",type:"button","aria-label":`${t.changeToLabel} ${t.nextYearLabel} ${e.unref(s)+1}`,onClick:y[6]||(y[6]=v=>e.unref(p)(1)),onKeydown:y[7]||(y[7]=v=>e.unref(f)(v))},{default:e.withCtx(()=>[e.createVNode(e.unref(m.DtIcon),{name:"chevrons-right",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])]),_:1})]),_:1}))}};function Ks(t,a){const n=e.ref(null),r=e.ref(0),i=e.ref([]),o=e.computed(()=>$s(t.locale,vn));e.watch(()=>t.calendarDays,()=>{r.value=0,i.value=[],n.value=null});function s(p){return`${t.selectDayLabel} ${p.text} ${Dn(p.value,Ur)} ${ut(p.value)}`}function d(p,g){!i.value.some(b=>b.el===p)&&g.currentMonth&&i.value.push({el:p,day:g})}function l(p){switch(p.key){case"ArrowUp":p.preventDefault(),r.value-=7;try{i.value[r.value].el.$el.focus()}catch{const b=qs(i.value[r.value+7].day.value);a("go-to-prev-month"),e.nextTick(()=>{i.value[b-1].el.$el.focus(),r.value+=b-1})}break;case"ArrowDown":p.preventDefault(),r.value+=7;try{i.value[r.value].el.$el.focus()}catch{const b=Fs(i.value[r.value-7].day.value);a("go-to-next-month"),e.nextTick(()=>{i.value[b-1].el.$el.focus(),r.value+=b-1})}break;case"ArrowLeft":p.preventDefault(),r.value>0?(r.value-=1,i.value[r.value].el.$el.focus()):(a("go-to-prev-month"),f());break;case"ArrowRight":p.preventDefault(),r.value<i.value.length-1?(r.value+=1,i.value[r.value].el.$el.focus()):(a("go-to-next-month"),u());break;case"Tab":p.preventDefault(),a("focus-month-year-picker");break;case"Escape":a("close-datepicker");break}}function u(){r.value=0,e.nextTick(()=>{i.value[r.value].el.$el.focus()})}function f(){e.nextTick(()=>{r.value=i.value.length-1,i.value[r.value].el.$el.focus()})}function h(p){p.currentMonth&&(n.value=p.text,a("select-date",p.value))}return{selectedDay:n,weekDays:o,dayAriaLabel:s,setDayRef:d,handleKeyDown:l,focusFirstDay:u,selectDay:h}}const js={class:"d-datepicker__calendar","aria-labelledby":"calendar-heading"},Ys=["title","aria-label"],Gs={__name:"calendar",props:{calendarDays:{type:Array,required:!0},locale:{type:String,required:!0},selectDayLabel:{type:String,required:!0}},emits:["select-date","focus-month-year-picker","close-datepicker","go-to-next-month","go-to-prev-month"],setup(t,{expose:a,emit:n}){const r=t,i=n,{selectedDay:o,weekDays:s,dayAriaLabel:d,setDayRef:l,handleKeyDown:u,focusFirstDay:f,selectDay:h}=Ks(r,i);return a({focusFirstDay:f}),(p,g)=>(e.openBlock(),e.createElementBlock("table",js,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),b=>(e.openBlock(),e.createElementBlock("th",{key:b,scope:"col",class:"d-datepicker__cell d-datepicker__cell--header"},[e.createElementVNode("span",{class:"d-datepicker__weekday",title:b,"aria-label":b},e.toDisplayString(b),9,Ys)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.calendarDays,(b,T)=>(e.openBlock(),e.createElementBlock("tr",{key:T},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.days,(y,v)=>(e.openBlock(),e.createElementBlock("td",{key:T+v,class:"d-datepicker__cell"},[e.createVNode(e.unref(m.DtButton),{ref_for:!0,ref:L=>{L&&e.unref(l)(L,y)},class:e.normalizeClass(["d-datepicker__day",{"d-datepicker__day--disabled":!y.currentMonth,"d-datepicker__day--selected":e.unref(o)?y.text===e.unref(o)&&y.currentMonth:y.selected}]),circle:!0,size:"sm",importance:"clear",disabled:!y.currentMonth,type:"button","aria-selected":e.unref(o)?y.text===e.unref(o)&&y.currentMonth:y.selected,"aria-label":e.unref(d)(y),onClick:L=>e.unref(h)(y),onKeydown:g[0]||(g[0]=L=>e.unref(u)(L))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.text),1)]),_:2},1032,["disabled","class","aria-selected","aria-label","onClick"])]))),128))]))),128))])]))}},Qs={class:"d-datepicker__hd"},Zs={class:"d-datepicker__bd"},Xs={__name:"datepicker",props:{prevMonthLabel:{type:String,required:!0},nextMonthLabel:{type:String,required:!0},prevYearLabel:{type:String,required:!0},nextYearLabel:{type:String,required:!0},selectDayLabel:{type:String,required:!0},changeToLabel:{type:String,required:!0},locale:{type:String,default:"en-US"},selectedDate:{type:Date,default:()=>new Date}},emits:["selected-date","close-datepicker"],setup(t){const a=e.ref([]);function n(r){a.value=r}return(r,i)=>(e.openBlock(),e.createBlock(e.unref(_.DtStack),{class:"d-datepicker",gap:"400"},{default:e.withCtx(()=>[e.createElementVNode("div",Qs,[e.createVNode(Ws,{ref:"monthYearPicker",locale:t.locale,"prev-month-label":t.prevMonthLabel,"next-month-label":t.nextMonthLabel,"prev-year-label":t.prevYearLabel,"next-year-label":t.nextYearLabel,"change-to-label":t.changeToLabel,"selected-date":t.selectedDate,onCalendarDays:n,onFocusFirstDay:i[0]||(i[0]=o=>r.$refs.calendar.focusFirstDay()),onFocusLastDay:i[1]||(i[1]=o=>r.$refs.calendar.focusLastDay()),onCloseDatepicker:i[2]||(i[2]=o=>r.$emit("close-datepicker"))},null,8,["locale","prev-month-label","next-month-label","prev-year-label","next-year-label","change-to-label","selected-date"])]),e.createElementVNode("div",Zs,[e.createVNode(Gs,{ref:"calendar",locale:t.locale,"calendar-days":a.value,"select-day-label":t.selectDayLabel,onSelectDate:i[3]||(i[3]=o=>r.$emit("selected-date",o)),onFocusMonthYearPicker:i[4]||(i[4]=o=>r.$refs.monthYearPicker.focusMonthYearPicker()),onCloseDatepicker:i[5]||(i[5]=o=>r.$emit("close-datepicker")),onGoToNextMonth:i[6]||(i[6]=o=>r.$refs.monthYearPicker.goToNextMonth()),onGoToPrevMonth:i[7]||(i[7]=o=>r.$refs.monthYearPicker.goToPrevMonth())},null,8,["locale","calendar-days","select-day-label"])])]),_:1}))}};function Js(t,a="default"){return new Intl.DateTimeFormat(a,{weekday:"long",year:"numeric",month:"long",day:"numeric"}).format(t)}function el(t,a="default"){return new Intl.DateTimeFormat(a,{year:"numeric",month:"long",day:"numeric"}).format(t)}function tl(t,a="default",n=!0){const r=n?{weekday:"short",year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"short",day:"numeric"};return new Intl.DateTimeFormat(a,r).format(t)}function nl(t,a="default",n=!1){const r=n?"short":"long";return new Intl.DateTimeFormat(a,{month:r,day:"numeric"}).format(t)}function al(t,a="default"){return new Intl.DateTimeFormat(a,{year:"2-digit",month:"2-digit",day:"2-digit"}).format(t)}const ol={name:"DtRecipeComboboxWithPopover",components:{DtCombobox:an,DtPopover:_.DtPopover,ComboboxLoadingList:tn,ComboboxEmptyList:nn},mixins:[_.SrOnlyCloseButtonMixin],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:t=>Object.values(vt).includes(t)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return c.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:t=>Object.keys(de).some(a=>a===t)},contentWidth:{type:String,default:null,validator:t=>_.POPOVER_CONTENT_WIDTHS.includes(t)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:de,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:c.getUniqueString(),hasSlotContent:c.hasSlotContent}},computed:{comboboxListeners(){return{...this.$attrs,onSelect:this.onSelect,onEscape:this.onEscape,onHighlight:this.onHighlight}}},watch:{showList:{handler:function(t){t!==null&&(this.isListShown=t)},immediate:!0},isListShown(t){t?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(t)}},methods:{handleDisplayList(t){!this.hasSuggestionList&&t&&this.showComboboxList(),!this.hasSuggestionList&&!t&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(t){this.loading||(this.$emit("select",t),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(t){this.loading||this.$emit("highlight",t)},onOpened(t){this.$emit("opened",t)},onFocusIn(t){var a;this.hasSuggestionList&&t&&((a=this.$refs.input)==null?void 0:a.querySelector("input"))===t.target&&this.showComboboxList()},onFocusOut(t){var r,i,o;const a=(i=(r=this.$refs.popover)==null?void 0:r.tip)==null?void 0:i.popper,n=this.$refs.input;(o=t.composedPath())!=null&&o.some(s=>[a,n].includes(s))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}},rl=["id"],il={ref:"header"},sl=["onMouseleave","onFocusout"],ll={ref:"footer"};function dl(t,a,n,r,i,o){const s=e.resolveComponent("combobox-loading-list"),d=e.resolveComponent("combobox-empty-list"),l=e.resolveComponent("dt-popover"),u=e.resolveComponent("dt-combobox");return e.openBlock(),e.createBlock(u,e.mergeProps({ref:"combobox",loading:n.loading,label:n.label,"label-visible":n.labelVisible,size:n.size,description:n.description,"empty-list":n.emptyList,"empty-state-message":n.emptyStateMessage,"show-list":i.isListShown,"on-beginning-of-list":n.onBeginningOfList,"on-end-of-list":n.onEndOfList,"list-rendered-outside":!0,"list-id":n.listId,"data-qa":"dt-combobox"},o.comboboxListeners),{input:e.withCtx(({inputProps:f})=>[e.createElementVNode("div",{id:i.externalAnchor,ref:"input",onFocusin:a[0]||(a[0]=(...h)=>o.onFocusIn&&o.onFocusIn(...h)),onKeydown:[a[1]||(a[1]=e.withKeys(h=>o.openOnArrowKeyPress(h),["up"])),a[2]||(a[2]=e.withKeys(h=>o.openOnArrowKeyPress(h),["down"]))]},[e.renderSlot(t.$slots,"input",{inputProps:f,onInput:o.handleDisplayList})],40,rl)]),list:e.withCtx(({opened:f,listProps:h,clearHighlightIndex:p})=>[e.createVNode(l,{ref:"popover",open:i.isListShown,"onUpdate:open":a[3]||(a[3]=g=>i.isListShown=g),"hide-on-click":!1,"max-height":n.maxHeight,"max-width":n.maxWidth,offset:n.popoverOffset,sticky:n.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":i.externalAnchor,"content-width":n.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":n.appendTo,transition:n.transition,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,"visually-hidden-close":t.visuallyHiddenClose,onOpened:f},e.createSlots({content:e.withCtx(()=>[e.createElementVNode("div",{ref:"listWrapper",class:e.normalizeClass([i.DROPDOWN_PADDING_CLASSES[n.padding],n.listClass]),onMouseleave:p,onFocusout:p},[n.loading?(e.openBlock(),e.createBlock(s,e.normalizeProps(e.mergeProps({key:0},h)),null,16)):n.emptyList&&n.emptyStateMessage?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1},h,{message:n.emptyStateMessage}),null,16,["message"])):e.renderSlot(t.$slots,"list",{key:2,listProps:h})],42,sl)]),_:2},[i.hasSlotContent(t.$slots.header)?{name:"headerContent",fn:e.withCtx(()=>[e.createElementVNode("div",il,[e.renderSlot(t.$slots,"header")],512)]),key:"0"}:void 0,i.hasSlotContent(t.$slots.footer)?{name:"footerContent",fn:e.withCtx(()=>[e.createElementVNode("div",ll,[e.renderSlot(t.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["open","max-height","max-width","offset","sticky","external-anchor","content-width","append-to","transition","visually-hidden-close-label","visually-hidden-close","onOpened"])]),_:3},16,["loading","label","label-visible","size","description","empty-list","empty-state-message","show-list","on-beginning-of-list","on-end-of-list","list-id"])}const Bn=c._export_sfc(ol,[["render",dl]]),Nn={EXTRA_SMALL:"xs",SMALL:"sm",DEFAULT:"md"},Ln={xs:"xs",sm:"xs",md:"sm"},An={xs:1.4,sm:.4,md:.2},cl={name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:Bn,DtInput:m.DtInput,DtChip:St,DtValidationMessages:m.DtValidationMessages},mixins:[_.SrOnlyCloseButtonMixin],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:t=>m.validationMessageValidator(t)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.values(Nn).includes(t)},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>_.POPOVER_APPEND_TO_VALUES.includes(t)||t instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["input","select","remove","max-selected","keyup"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,initialInputPadding:{},resizeWindowObserver:null,originalInputSize:null,CHIP_SIZES:Ln,hasSlotContent:c.hasSlotContent}},computed:{inputPlaceHolder(){var t;return((t=this.selectedItems)==null?void 0:t.length)>0?"":this.placeholder},chipListeners(){return{keyup:t=>{this.onChipKeyup(t),this.$emit("keyup",t)}}},inputListeners(){return{input:t=>{this.$emit("input",t),this.hasSuggestionList&&this.showComboboxList()},keyup:t=>{this.onInputKeyup(t),this.$emit("keyup",t)},click:t=>{this.hasSuggestionList&&this.showComboboxList()}}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const t=this.getInput();this.revertInputPadding(t),this.originalInputSize=t.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var t;(t=this.resizeWindowObserver)==null||t.unobserve(document.body)},methods:{async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(t){var a;this.$emit("remove",t),(a=this.$refs.input)==null||a.focus()},onComboboxSelect(t){this.value="",this.$emit("select",t)},showComboboxList(){var t;this.showList==null&&((t=this.$refs.comboboxWithPopover)==null||t.showComboboxList())},closeComboboxList(){var t;this.showList==null&&((t=this.$refs.comboboxWithPopover)==null||t.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(t=>t.$el.querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(t=>t.$el)},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var t;return(t=this.$refs.input)==null?void 0:t.$refs.input},onChipKeyup(t){var n;const a=(n=t.code)==null?void 0:n.toLowerCase();a==="arrowleft"?this.navigateBetweenChips(t.target,!0):a==="arrowright"&&(t.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(t.target,!1))},onInputKeyup(t){var n;const a=(n=t.code)==null?void 0:n.toLowerCase();this.selectedItems.length>0&&t.target.selectionStart===0&&(a==="backspace"||a==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var t;this.getLastChipButton().focus(),(t=this.$refs.input)==null||t.blur(),this.closeComboboxList()},moveFromChipToInput(){var t;this.getLastChipButton().blur(),(t=this.$refs.input)==null||t.focus(),this.showComboboxList()},navigateBetweenChips(t,a){var i;const n=this.getChipButtons().indexOf(t),r=a?n-1:n+1;r<0||r>=((i=this.$refs.chips)==null?void 0:i.length)||(this.getChipButtons()[n].blur(),this.getChipButtons()[r].focus(),this.closeComboboxList())},setChipsTopPosition(){const t=this.getInput();if(!t)return;const a=this.$refs.inputSlotWrapper,n=t.getBoundingClientRect().top-a.getBoundingClientRect().top,r=this.$refs.chipsWrapper;r.style.top=n-An[this.size]+"px"},setInputPadding(){const t=this.getLastChip(),a=this.getInput(),n=this.$refs.chipsWrapper;if(!a||(this.revertInputPadding(a),this.popoverOffset=[0,4],!t))return;const r=t.offsetLeft+this.getFullWidth(t);a.style.paddingLeft=r+"px";const i=n.getBoundingClientRect().height-4,o=t.offsetTop+2;i>this.originalInputSize&&(a.style.paddingTop=`${o}px`)},revertInputPadding(t){t.style.paddingLeft="",t.style.paddingTop="",t.style.paddingBottom=""},getFullWidth(t){const a=window.getComputedStyle(t);return t.offsetWidth+parseInt(a.marginLeft)+parseInt(a.marginRight)},setInputMinWidth(){const t=this.getFirstChip(),a=this.getInput();a&&(t?a.style.minWidth=this.getFullWidth(t)+4+"px":a.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)}}},ul={ref:"inputSlotWrapper",class:"combobox__input-wrapper"},hl={ref:"chipsWrapper",class:"combobox__chip-wrapper"},ml={ref:"header"},fl={key:1,class:"combobox__list--loading"},pl={ref:"footer"};function gl(t,a,n,r,i,o){const s=e.resolveComponent("dt-chip"),d=e.resolveComponent("dt-input"),l=e.resolveComponent("dt-validation-messages"),u=e.resolveComponent("dt-recipe-combobox-with-popover");return e.openBlock(),e.createBlock(u,{ref:"comboboxWithPopover",label:n.label,"show-list":n.showList,"max-height":n.listMaxHeight,"popover-offset":i.popoverOffset,"has-suggestion-list":n.hasSuggestionList,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,"visually-hidden-close":t.visuallyHiddenClose,"content-width":"anchor","append-to":n.appendTo,transition:n.transition,onSelect:o.onComboboxSelect},e.createSlots({input:e.withCtx(({onInput:f})=>[e.createElementVNode("span",ul,[e.createElementVNode("span",hl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.selectedItems,h=>(e.openBlock(),e.createBlock(s,e.mergeProps({ref_for:!0,ref:"chips",key:h,"label-class":["d-chip__label"],class:"combobox__chip","close-button-props":{ariaLabel:"close"},size:i.CHIP_SIZES[n.size]},e.toHandlers(o.chipListeners),{onKeyup:e.withKeys(p=>o.onChipRemove(h),["backspace"]),onClose:p=>o.onChipRemove(h)}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h),1)]),_:2},1040,["size","onKeyup","onClose"]))),128))],512),e.createVNode(d,e.mergeProps({ref:"input",modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=h=>i.value=h),class:"combobox__input","aria-label":n.label,label:n.labelVisible?n.label:"",description:n.description,placeholder:o.inputPlaceHolder,"show-messages":n.showInputMessages,messages:n.inputMessages,size:n.size},e.toHandlers(o.inputListeners),{onInput:f}),null,16,["modelValue","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),e.createVNode(l,{"validation-messages":n.maxSelectedMessage,"show-messages":i.showValidationMessages},null,8,["validation-messages","show-messages"])],512)]),list:e.withCtx(()=>[e.createElementVNode("div",{ref:"list",onMousedown:a[1]||(a[1]=e.withModifiers(()=>{},["prevent"]))},[n.loading?(e.openBlock(),e.createElementBlock("div",fl,e.toDisplayString(n.loadingMessage),1)):e.renderSlot(t.$slots,"list",{key:0},void 0,!0)],544)]),_:2},[i.hasSlotContent(t.$slots.header)?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",ml,[e.renderSlot(t.$slots,"header",{},void 0,!0)],512)]),key:"0"}:void 0,i.hasSlotContent(t.$slots.footer)?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",pl,[e.renderSlot(t.$slots,"footer",{},void 0,!0)],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","popover-offset","has-suggestion-list","visually-hidden-close-label","visually-hidden-close","append-to","transition","onSelect"])}const _l=c._export_sfc(cl,[["render",gl],["__scopeId","data-v-659a1a3d"]]),It=["sm","md","lg","xl"],bl={name:"DtRecipeCallbarButton",components:{DtButton:m.DtButton,DtTooltip:c.DtTooltip},inheritAttrs:!1,props:{id:{type:String,default(){return c.utils.getUniqueString()}},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},ariaLabel:{type:String,default:null,validator:t=>t||(void 0).$slots.default},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:t=>It.includes(t)},importance:{type:String,default:""}},emits:["click"],computed:{callbarButtonClass(){return[this.buttonClass,"dt-recipe-callbar-button","d-px0",{"dt-recipe-callbar-button--circle":this.circle,"dt-recipe-callbar-button--active":this.active,"dt-recipe-callbar-button--danger":this.danger,"d-btn--disabled d-bgc-transparent":this.disabled,"d-fc-primary":!this.disabled}]},callbarButtonTextClass(){return["d-fs-100 lg:d-d-none md:d-d-none sm:d-d-none",this.textClass]},buttonWidth(){switch(this.buttonWidthSize){case"sm":return"4.5rem";case"md":return"6rem";default:return"8.4rem"}},buttonImportance(){return this.importance?this.importance:this.circle?"outlined":"clear"},callbarButtonListeners(){return{...c.extractVueListeners(this.$attrs),click:t=>this.$emit("click",t)}}}};function vl(t,a,n,r,i,o){const s=e.resolveComponent("dt-button"),d=e.resolveComponent("dt-tooltip");return e.openBlock(),e.createBlock(d,{id:n.id,offset:[0,8]},{anchor:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"dt-recipe-callbar-button--disabled":n.disabled})},[e.createVNode(s,e.mergeProps({importance:o.buttonImportance,kind:"muted","icon-position":"top","aria-disabled":n.disabled,"aria-label":n.ariaLabel,"label-class":o.callbarButtonTextClass,width:o.buttonWidth,class:o.callbarButtonClass},t.$attrs,e.toHandlers(o.callbarButtonListeners)),{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["importance","aria-disabled","aria-label","label-class","width","class"])],2)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),_:3},8,["id"])}const xn=c._export_sfc(bl,[["render",vl]]),yl={name:"DtRecipeCallbarButtonWithPopover",components:{DtRecipeCallbarButton:xn,DtPopover:_.DtPopover,DtButton:m.DtButton,DtIcon:m.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return c.utils.getUniqueString()}},ariaLabel:{type:String,default:null,validator:t=>t||(void 0).$slots.default},arrowButtonLabel:{type:String,required:!0,validator:t=>!!t},placement:{type:String,default:"top"},initialFocusElement:{type:String,default:"first"},showCloseButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},forceShowArrow:{type:Boolean,default:!1},active:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},onClick:{type:Function,default:null},buttonClass:{type:[String,Array,Object],default:""},textClass:{type:[String,Array,Object],default:""},buttonWidthSize:{type:String,default:"xl",validator:t=>It.includes(t)},contentClass:{type:[String,Array,Object],default:""},openPopover:{type:Boolean,default:!1}},emits:["arrow-click","click","opened"],data(){return{open:!1}},computed:{showArrowButton(){return this.forceShowArrow||!this.disabled},isCompactMode(){return this.buttonWidthSize==="sm"||this.buttonWidthSize==="md"},showPopover(){return!this.openPopover||this.open?(this.syncOpenState(),!1):this.toggleOpen()}},methods:{arrowClick(t){return this.$emit("arrow-click",t),this.toggleOpen()},toggleOpen(){return this.open=!this.open},syncOpenState(){this.open=this.openPopover},buttonClick(t){this.$props.onClick?this.$emit("click",t):this.arrowClick(t)},onModalIsOpened(t){this.open=t,this.$emit("opened",t)}}},Sl={class:"dt-recipe--callbar-button-with-popover"};function Cl(t,a,n,r,i,o){const s=e.resolveComponent("dt-recipe-callbar-button"),d=e.resolveComponent("dt-icon"),l=e.resolveComponent("dt-button"),u=e.resolveComponent("dt-popover");return e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(s,{"aria-label":n.ariaLabel,disabled:n.disabled,active:n.active,danger:n.danger,"button-class":n.buttonClass,"button-width-size":n.buttonWidthSize,"text-class":n.textClass,class:"dt-recipe--callbar-button-with-popover--main-button",onClick:o.buttonClick},{icon:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),tooltip:e.withCtx(()=>[e.renderSlot(t.$slots,"tooltip")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["aria-label","disabled","active","danger","button-class","button-width-size","text-class","onClick"]),o.showArrowButton?(e.openBlock(),e.createBlock(u,e.mergeProps({key:0,id:n.id,modal:!1,open:i.open,placement:n.placement,"initial-focus-element":n.initialFocusElement,"show-close-button":n.showCloseButton,offset:[0,16],padding:"none",class:"dt-recipe--callbar-button-with-popover--popover-wrapper","dialog-class":["dt-recipe--callbar-button-with-popover--popover",n.contentClass],"header-class":"d-d-flex d-ai-center d-fw-normal d-px12"},t.$attrs,{"open-popover":o.showPopover,onOpened:o.onModalIsOpened}),{anchor:e.withCtx(()=>[e.createVNode(l,{circle:"",importance:"clear",size:"lg",class:e.normalizeClass(["dt-recipe--callbar-button-with-popover--arrow",{"dt-recipe--callbar-button-with-popover--arrow--large":!o.isCompactMode}]),width:"2rem","aria-label":n.arrowButtonLabel,active:i.open,onClick:o.arrowClick},{icon:e.withCtx(()=>[e.createVNode(d,{name:"chevron-up",class:"dt-recipe--callbar-button-with-popover--arrow__icon",size:"200"})]),_:1},8,["class","aria-label","active","onClick"])]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content")]),headerContent:e.withCtx(()=>[e.renderSlot(t.$slots,"headerContent")]),footerContent:e.withCtx(()=>[e.renderSlot(t.$slots,"footerContent")]),_:3},16,["id","open","placement","initial-focus-element","show-close-button","dialog-class","open-popover","onOpened"])):e.createCommentVNode("",!0)])}const kl=c._export_sfc(yl,[["render",Cl]]),wl={name:"DtRecipeContactInfo",components:{DtAvatar:_.DtAvatar,DtListItem:_.DtListItem},props:{id:{type:String,default(){return c.utils.getUniqueString()}},role:{type:String,default:""},showAvatar:{type:Boolean,default:!0},avatarSrc:{type:String,default:""},avatarSeed:{type:String,default:null},avatarFullName:{type:String,default:""},avatarIcon:{type:String,default:null},avatarSize:{type:String,default:"lg"},avatarAriaLabel:{type:String,default:""},presence:{type:String,default:null},avatarList:{type:Array,default:null}},emits:["avatar-click"],methods:{avatarClick(){this.$emit("avatar-click")}}},El=["aria-labelledby"],Il={key:0,class:"dt-contact-info--avatars"},Dl={"data-qa":"contact-info-header"},Tl={"data-qa":"contact-info-subtitle"},Ol={"data-qa":"contact-info-bottom"},Bl={"data-qa":"contact-info-right"};function Nl(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-list-item");return e.openBlock(),e.createBlock(d,{id:n.id,role:n.role,"element-type":"div","data-qa":"contact-info",class:"dt-contact-info"},{left:e.withCtx(()=>[n.showAvatar?(e.openBlock(),e.createElementBlock("button",{key:0,class:"dt-contact-info__left","data-qa":"contact-info-left","aria-labelledby":n.avatarAriaLabel,onClick:a[0]||(a[0]=(...l)=>o.avatarClick&&o.avatarClick(...l))},[n.avatarList?(e.openBlock(),e.createElementBlock("span",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.avatarList,(l,u)=>(e.openBlock(),e.createBlock(s,{key:u,size:n.avatarSize,seed:l.seed,"full-name":l.fullName,"image-src":l.src,"icon-name":n.avatarIcon,"overlay-icon":l.icon,"overlay-text":l.text,"avatar-class":[{"d-mln24":u>0,"d-bc-brand":!!l.halo}]},null,8,["size","seed","full-name","image-src","icon-name","overlay-icon","overlay-text","avatar-class"]))),128))])):(e.openBlock(),e.createBlock(s,{key:1,size:n.avatarSize,"full-name":n.avatarFullName,"image-src":n.avatarSrc,"icon-name":n.avatarIcon,seed:n.avatarSeed,presence:n.presence},null,8,["size","full-name","image-src","icon-name","seed","presence"]))],8,El)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createElementVNode("div",Dl,[e.renderSlot(t.$slots,"header",{},void 0,!0)])]),subtitle:e.withCtx(()=>[e.createElementVNode("div",Tl,[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)])]),bottom:e.withCtx(()=>[e.createElementVNode("div",Ol,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])]),right:e.withCtx(()=>[e.createElementVNode("div",Bl,[e.renderSlot(t.$slots,"right",{},void 0,!0)])]),_:3},8,["id","role"])}const Ll=c._export_sfc(wl,[["render",Nl],["__scopeId","data-v-20548ad1"]]),Mn=["green300","green100","red200","red100","gold100","gold200","black100","white"],Al={name:"DtRecipeTopBannerInfo",props:{colorCode:{type:String,default:"green300",validator:function(t){return Mn.includes(t)}}},computed:{bannerInfoClass(){return[{green300:"d-bgc-success",green100:"d-bgc-success",red200:"d-bgc-critical",red100:"d-bgc-critical",gold200:"d-bgc-warning",gold100:"d-bgc-warning",black100:"d-bgc-info",white:"d-bgc-primary"}[this.colorCode]]}}},xl={class:"dt-top-banner-info__left"},Ml={class:"dt-top-banner-info__middle","data-qa":"banner-info--middle"},Pl={class:"dt-top-banner-info__right"};function Vl(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dt-top-banner-info",o.bannerInfoClass]),"data-qa":"banner-info"},[e.createElementVNode("div",xl,[e.renderSlot(t.$slots,"left")]),e.createElementVNode("div",Ml,[e.renderSlot(t.$slots,"default")]),e.createElementVNode("div",Pl,[e.renderSlot(t.$slots,"right")])],2)}const Rl=c._export_sfc(Al,[["render",Vl]]),Re="promptmenu",$e="promptcollect",ze="promptplay",Fe="gotoexpert",Ce="goto",qe="branch",He="transfer",Ue="hangup",Pn={[Re]:"keypad",[$e]:"dialer",[ze]:"volume-2",[Fe]:"expert-node",[qe]:"branch",[Ce]:"call-merge",[He]:"transfer",[Ue]:"phone-hang-up"},$l={[Re]:"Menu",[$e]:"Collect",[ze]:"Play",[Fe]:"Expert",[qe]:"Branch",[Ce]:"Go-to",[He]:"Transfer",[Ue]:"Hangup"},Z={PROMPT:{normal:"d-bc-blue-200",selected:"d-bc-blue-300"},LOGIC:{normal:"d-bc-purple-200",selected:"d-bc-purple-400"},TERMINAL:{normal:"d-bc-red-100",selected:"d-bc-red-200"}},zl={[Re]:Z.PROMPT,[$e]:Z.PROMPT,[ze]:Z.PROMPT,[Fe]:Z.LOGIC,[qe]:Z.LOGIC,[Ce]:Z.LOGIC,[He]:Z.TERMINAL,[Ue]:Z.TERMINAL},Fl={name:"DtRecipeIvrNode",components:{DtCard:en,DtButton:m.DtButton,DtDropdown:sn,DtIcon:m.DtIcon},props:{nodeType:{type:String,required:!0},nodeLabel:{type:String,required:!0},isSelected:{type:Boolean,default:!1},menuButtonAriaLabel:{type:String,required:!0},dtmfKey:{type:String,default:null}},emits:["click"],data(){return{isOpen:!1}},computed:{nodeListeners(){return{click:t=>this.$emit("click",t)}},nodeIcon(){return Pn[this.nodeType]},headerColor(){const{normal:t,selected:a}=zl[this.nodeType];return this.isSelected?a:t},isGotoNode(){return this.nodeType===Ce}},methods:{openMenu(){this.isOpen=!0}}},ql={class:"ivr_node__header-left"},Hl={class:"ivr_node__label","data-qa":"ivr-node-label"},Ul={class:"ivr_node__dropdown-list"};function Wl(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("dt-dropdown"),u=e.resolveComponent("dt-card");return e.openBlock(),e.createElementBlock("div",e.mergeProps({class:"ivr_node"},e.toHandlers(o.nodeListeners,!0)),[n.dtmfKey?(e.openBlock(),e.createElementBlock("div",{key:0,"data-qa":"dt-top-connector-dtmf",class:e.normalizeClass(["ivr-connector ivr-connector--dtmf",{"ivr-connector--dtmf--selected":n.isSelected}])},e.toDisplayString(n.dtmfKey),3)):e.createCommentVNode("",!0),t.$slots.connector?e.renderSlot(t.$slots,"connector",{key:1}):e.createCommentVNode("",!0),!n.dtmfKey&&!t.$slots.connector?(e.openBlock(),e.createElementBlock("div",{key:2,"data-qa":"dt-top-connector",class:e.normalizeClass(["ivr-connector",{"ivr-connector--selected":n.isSelected}])},null,2)):e.createCommentVNode("",!0),e.createVNode(u,{"content-class":"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12","container-class":["d-w100p",{"d-ba d-bar8 d-baw4":n.isSelected},o.headerColor],"header-class":["d-mtn1","d-bt","d-btw4","d-p0",o.headerColor,{"d-btr4":!n.isSelected}]},{header:e.withCtx(()=>[e.createElementVNode("div",ql,[e.createVNode(d,{"aria-label":n.nodeType,importance:"clear",kind:"muted","data-qa":"dt-ivr-node-icon"},{icon:e.withCtx(()=>[e.createVNode(s,{name:o.nodeIcon,size:"200",class:e.normalizeClass(["",{ivr_node__goto_icon:o.isGotoNode}])},null,8,["name","class"])]),_:1},8,["aria-label"]),e.createElementVNode("p",Hl,e.toDisplayString(n.nodeLabel),1)]),e.createVNode(l,{open:i.isOpen,"onUpdate:open":a[0]||(a[0]=f=>i.isOpen=f),placement:"bottom"},{anchor:e.withCtx(()=>[e.createVNode(d,{importance:"clear",kind:"muted","aria-label":n.menuButtonAriaLabel,onClick:e.withModifiers(o.openMenu,["stop","prevent"])},{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"200"})]),_:1},8,["aria-label","onClick"])]),list:e.withCtx(({close:f})=>[e.createElementVNode("div",Ul,[e.renderSlot(t.$slots,"menuItems",{close:f})])]),_:3},8,["open"])]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content")]),_:3},8,["container-class","header-class"])],16)}const Kl=c._export_sfc(Fl,[["render",Wl]]),jl={name:"DtRecipeGroupedChip",components:{DtChip:St},data(){return{hasSlotContent:c.hasSlotContent}}},Yl={"data-qa":"grouped-chip",class:"dt-grouped-chip"},Gl={key:0,"data-qa":"left-grouped-chip-icon"},Ql={key:0,"data-qa":"left-grouped-chip-content"},Zl={key:0,"data-qa":"right-grouped-chip-icon"},Xl={key:0,"data-qa":"right-grouped-chip-content"};function Jl(t,a,n,r,i,o){const s=e.resolveComponent("dt-chip");return e.openBlock(),e.createElementBlock("div",Yl,[e.createVNode(s,{"hide-close":!0,interactive:!1,"content-class":"d-fs100",size:"xs","grouped-chip":!0,class:"dt-chip-content dt-chip-content--left"},e.createSlots({default:e.withCtx(()=>[i.hasSlotContent(t.$slots.leftContent)?(e.openBlock(),e.createElementBlock("div",Ql,[e.renderSlot(t.$slots,"leftContent")])):e.createCommentVNode("",!0)]),_:2},[i.hasSlotContent(t.$slots.leftIcon)?{name:"icon",fn:e.withCtx(()=>[i.hasSlotContent(t.$slots.leftIcon)?(e.openBlock(),e.createElementBlock("div",Gl,[e.renderSlot(t.$slots,"leftIcon")])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1024),e.createVNode(s,{"hide-close":!0,interactive:!1,"content-class":"d-fs100",size:"xs","grouped-chip":!0,class:"dt-chip-content dt-chip-content--right"},{icon:e.withCtx(()=>[i.hasSlotContent(t.$slots.rightIcon)?(e.openBlock(),e.createElementBlock("div",Zl,[e.renderSlot(t.$slots,"rightIcon")])):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[i.hasSlotContent(t.$slots.rightContent)?(e.openBlock(),e.createElementBlock("div",Xl,[e.renderSlot(t.$slots,"rightContent")])):e.createCommentVNode("",!0)]),_:3})])}const ed=c._export_sfc(jl,[["render",Jl]]),td={name:"DtRecipeSettingsMenuButton",components:{DtButton:m.DtButton,DtIcon:m.DtIcon},inheritAttrs:!1,props:{updateAvailable:{type:Boolean,default:!1},ariaLabel:{type:String,required:!0}}};function nd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return n.updateAvailable?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,importance:"outlined",size:"xs","icon-position":"right",class:"settings-menu-button-update","aria-label":n.ariaLabel},t.$attrs),{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"300"})]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16,["aria-label"])):(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,importance:"clear",kind:"inverted",class:"settings-menu-button","aria-label":n.ariaLabel},t.$attrs),{icon:e.withCtx(()=>[e.createVNode(s,{name:"more-vertical",size:"300"})]),_:1},16,["aria-label"]))}const ad=c._export_sfc(td,[["render",nd],["__scopeId","data-v-b0dfa8b3"]]),x={INBOX:"inbox",CONTACTS:"contacts",CHANNELS:"channels",THREADS:"threads",LOCKED_CHANNEL:"locked channel",CONTACT_CENTER:"contact center",QUICK_START:"quick start",COACHING_GROUP:"coaching group",COACHING_CENTER:"coaching center",DIALBOT:"dialbot",ASSIGNED:"assigned",DIGITAL:"digital"},Vn={[x.INBOX]:"inbox",[x.CONTACTS]:"contacts",[x.CHANNELS]:"hash",[x.THREADS]:"thread",[x.LOCKED_CHANNEL]:"lock",[x.QUICK_START]:"sparkle",[x.COACHING_GROUP]:"users",[x.COACHING_CENTER]:"external-link","locked channel unread":"lock-filled","channel unread":"hash-bold",[x.ASSIGNED]:"at-sign",[x.DIGITAL]:"laptop-2"},Se={"magenta-200":"d-bgc-magenta-200","green-200":"d-bgc-green-200","gold-300":"d-bgc-gold-300","purple-600":"d-bgc-purple-600","magenta-300":"d-bgc-magenta-300","purple-300":"d-bgc-purple-300","green-500":"d-bgc-green-500","purple-100":"d-bgc-purple-100","magenta-400":"d-bgc-magenta-400","magenta-100":"d-bgc-magenta-100","black-300":"d-bgc-black-300"},Rn="If type is contact center, color must be oneof the following:"+Object.keys(Se).join(", "),$n=["300","200"],od={name:"DtRecipeLeftbarGeneralRowIcon",components:{DtIcon:m.DtIcon},props:{type:{type:String,default:null},color:{type:String,default:null},iconSize:{type:String,default:"300"}},computed:{isIconType(){return![x.DIALBOT,x.CONTACT_CENTER].includes(this.type)},isContactCenterType(){return this.type===x.CONTACT_CENTER},isDialbotType(){return this.type===x.DIALBOT},getIconName(){return Vn[this.type]},contactCenterIconClasses(){return["dt-leftbar-row__icon-cc",Se[this.color]]},dialbotClasses(){return["d-d-flex","d-ai-center","d-jc-center"]}}};function rd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return o.isIconType?(e.openBlock(),e.createBlock(s,{key:0,name:o.getIconName,size:n.iconSize},null,8,["name","size"])):o.isContactCenterType?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(o.contactCenterIconClasses)},null,2)):o.isDialbotType?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(o.dialbotClasses),"data-qa":"general-row-dialbot"},[e.createVNode(s,{name:"dialbot",size:"500"})],2)):e.createCommentVNode("",!0)}const id=c._export_sfc(od,[["render",rd]]),sd={name:"DtRecipeGeneralRow",components:{DtEmojiTextWrapper:_t._sfc_main,DtBadge:Ae,DtIcon:m.DtIcon,DtButton:m.DtButton,DtTooltip:c.DtTooltip,DtRecipeLeftbarGeneralRowIcon:id},inheritAttrs:!1,props:{type:{type:String,default:"inbox",validator:t=>Object.values(x).includes(t)},ariaLabel:{type:String,default:""},description:{type:String,required:!0},color:{type:String,default:null,validator:t=>Object.keys(Se).includes(t)},hasUnreads:{type:Boolean,default:!1},unreadCount:{type:String,default:null},unreadCountTooltip:{type:String,default:""},selected:{type:Boolean,default:!1},muted:{type:Boolean,default:!1},activeVoiceChat:{type:Boolean,default:!1},dndText:{type:String,default:""},dndTextTooltip:{type:String,default:""},hasCallButton:{type:Boolean,default:!1},callButtonTooltip:{type:String,default:""},isTyping:{type:Boolean,default:!1},iconSize:{type:String,default:"300",validator:t=>$n.includes(t)}},emits:["call"],data(){return{actionFocused:!1,labelWidth:"100%"}},computed:{leftbarGeneralRowClasses(){return["dt-leftbar-row",{"dt-leftbar-row--no-action":!this.hasCallButton,"dt-leftbar-row--has-unread":this.hasUnreads,"dt-leftbar-row--unread-count":this.showUnreadCount,"dt-leftbar-row--selected":this.selected,"dt-leftbar-row--muted":this.muted,"dt-leftbar-row--action-focused":this.actionFocused}]},getIcon(){switch(this.type){case x.CHANNELS:if(this.hasUnreads)return"channel unread";break;case x.LOCKED_CHANNEL:if(this.hasUnreads)return"locked channel unread";break}return this.type},generalRowListeners(){return c.extractVueListeners(this.$attrs)},getAriaLabel(){return this.ariaLabel?this.ariaLabel:c.safeConcatStrings([this.description,this.unreadCountTooltip,this.dndTextTooltip])},hasActions(){return this.dndText||this.activeVoiceChat||this.showUnreadCount||this.hasCallButton},showUnreadCount(){return!!this.unreadCount&&this.hasUnreads}},watch:{$props:{immediate:!0,deep:!0,async handler(){this.validateProps(),await this.$nextTick(),this.adjustLabelWidth()}}},mounted(){this.resizeObserver=new ResizeObserver(this.adjustLabelWidth),this.resizeObserver.observe(this.$el),this.adjustLabelWidth()},beforeUnmount:function(){this.resizeObserver.disconnect()},methods:{validateProps(){this.type===x.CONTACT_CENTER&&!Object.keys(Se).includes(this.color)&&console.error(Rn)},adjustLabelWidth(){var i,o,s,d,l,u;const t=((o=(i=this.$el)==null?void 0:i.querySelector(".dt-leftbar-row__primary"))==null?void 0:o.clientWidth)||0,a=((d=(s=this.$el)==null?void 0:s.querySelector(".dt-leftbar-row__omega"))==null?void 0:d.clientWidth)||0,n=((u=(l=this.$el)==null?void 0:l.querySelector(".dt-leftbar-row__alpha"))==null?void 0:u.clientWidth)||0,r=16;this.labelWidth=t-(a+n+r)+"px"}}},Dt=t=>(e.pushScopeId("data-v-49d75ce6"),t=t(),e.popScopeId(),t),ld=["data-qa","aria-label","title","href"],dd={class:"dt-leftbar-row__alpha"},cd={key:0,class:"dt-leftbar-row__is-typing"},ud=Dt(()=>e.createElementVNode("span",null,null,-1)),hd=Dt(()=>e.createElementVNode("span",null,null,-1)),md=Dt(()=>e.createElementVNode("span",null,null,-1)),fd=[ud,hd,md],pd={key:0,class:"dt-leftbar-row__omega"},gd={key:1,class:"dt-leftbar-row__active-voice"},_d={key:3,class:"dt-leftbar-row__action","data-qa":"dt-leftbar-row-action"};function bd(t,a,n,r,i,o){const s=e.resolveComponent("dt-recipe-leftbar-general-row-icon"),d=e.resolveComponent("dt-emoji-text-wrapper"),l=e.resolveComponent("dt-tooltip"),u=e.resolveComponent("dt-icon"),f=e.resolveComponent("dt-badge"),h=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.leftbarGeneralRowClasses),"data-qa":"dt-leftbar-row"},[e.createElementVNode("a",e.mergeProps({class:"dt-leftbar-row__primary","data-qa":"data-qa"in t.$attrs?t.$attrs["data-qa"]:"dt-leftbar-row-link","aria-label":o.getAriaLabel,title:n.description,href:"href"in t.$attrs?t.$attrs.href:"javascript:void(0)"},t.$attrs,e.toHandlers(o.generalRowListeners,!0)),[e.createElementVNode("div",dd,[n.isTyping?(e.openBlock(),e.createElementBlock("div",cd,fd)):e.renderSlot(t.$slots,"left",{key:1},()=>[e.createVNode(s,{type:o.getIcon,color:n.color,"icon-size":n.iconSize,"data-qa":"dt-leftbar-row-icon"},null,8,["type","color","icon-size"])],!0)]),e.createElementVNode("div",{class:"dt-leftbar-row__label",style:e.normalizeStyle(`flex-basis: ${i.labelWidth}`)},[e.renderSlot(t.$slots,"label",{},()=>[e.createVNode(d,{class:"dt-leftbar-row__description","data-qa":"dt-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.description),1)]),_:1})],!0)],4)],16,ld),o.hasActions?(e.openBlock(),e.createElementBlock("div",pd,[n.dndText?(e.openBlock(),e.createBlock(l,{key:0,placement:"top",message:n.dndTextTooltip},{anchor:e.withCtx(()=>[e.createElementVNode("div",{ref:"dt-leftbar-row-dnd",class:"dt-leftbar-row__dnd","data-qa":"dt-leftbar-row-dnd"},e.toDisplayString(n.dndText),513)]),_:1},8,["message"])):e.createCommentVNode("",!0),n.activeVoiceChat?(e.openBlock(),e.createElementBlock("div",gd,[e.createVNode(u,{size:"300",name:"waveform"})])):o.showUnreadCount?(e.openBlock(),e.createBlock(l,{key:2,message:n.unreadCountTooltip,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(f,{kind:"count",type:"bulletin","data-qa":"dt-leftbar-row-unread-badge",class:"dt-leftbar-row__unread-badge"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.unreadCount),1)]),_:1})]),_:1},8,["message"])):e.createCommentVNode("",!0),n.hasCallButton?(e.openBlock(),e.createElementBlock("div",_d,[e.createVNode(l,{message:n.callButtonTooltip,placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(h,{class:"dt-leftbar-row__action-button","data-qa":"dt-leftbar-row-action-call-button",circle:!0,size:"xs",kind:"inverted","aria-label":n.callButtonTooltip,onFocus:a[0]||(a[0]=p=>i.actionFocused=!0),onBlur:a[1]||(a[1]=p=>i.actionFocused=!1),onClick:a[2]||(a[2]=e.withModifiers(p=>t.$emit("call",p),["stop"]))},{icon:e.withCtx(()=>[e.createVNode(u,{name:"phone",size:"200"})]),_:1},8,["aria-label"])]),_:1},8,["message"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2)}const Tt=c._export_sfc(sd,[["render",bd],["__scopeId","data-v-49d75ce6"]]),vd={name:"DtRecipeGroupRow",components:{DtIcon:m.DtIcon,DtRecipeGeneralRow:Tt},inheritAttrs:!1,props:{groupCountText:{type:String,default:""},names:{type:String,required:!0},unreadCount:{type:String,default:null},unreadCountTooltip:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1}},emits:[],computed:{ariaLabel(){return c.safeConcatStrings([this.groupCountText,this.names])},contactRowListeners(){return c.extractVueListeners(this.$attrs)}}};function yd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(d,e.mergeProps({description:n.names,"aria-label":o.ariaLabel,"unread-count":n.unreadCount,"has-unreads":n.hasUnreads,"unread-count-tooltip":n.unreadCountTooltip,selected:n.selected,"is-typing":n.isTyping},t.$attrs,e.toHandlers(o.contactRowListeners)),{left:e.withCtx(()=>[e.createVNode(s,{name:"users",size:"300"})]),_:1},16,["description","aria-label","unread-count","has-unreads","unread-count-tooltip","selected","is-typing"])}const Sd=c._export_sfc(vd,[["render",yd]]),Cd={name:"DtRecipeContactRow",components:{DtAvatar:_.DtAvatar,DtRecipeGeneralRow:Tt,DtEmojiTextWrapper:_t._sfc_main},inheritAttrs:!1,props:{avatarSrc:{type:String,default:""},avatarAlt:{type:String,default:""},avatarPresence:{type:String,default:null},avatarSeed:{type:String,default:null},presenceText:{type:String,default:""},name:{type:String,required:!0},userStatus:{type:String,default:""},muted:{type:Boolean,default:!1},unreadCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},noInitials:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},hasCallButton:{type:Boolean,default:!0},callButtonTooltip:{type:String,default:""},unreadCountTooltip:{type:String,default:""}},emits:["call"],computed:{presenceColorClass(){switch(this.avatarPresence){case"active":return"d-fc-success";case"busy":return"d-fc-critical";case"away":return"d-fc-warning";default:return}},contactRowListeners(){return c.extractVueListeners(this.$attrs)},contactDescription(){return c.safeConcatStrings([this.name,this.presenceText,this.userStatus])},iconName(){return this.noInitials?"user":null}}},kd={class:"dt-leftbar-row__status"};function wd(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-emoji-text-wrapper"),l=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(l,e.mergeProps({"unread-count":n.unreadCount,description:o.contactDescription,"has-unreads":n.hasUnreads,selected:n.selected,"has-call-button":n.hasCallButton,muted:n.muted,"is-typing":n.isTyping,"call-button-tooltip":n.callButtonTooltip,"unread-count-tooltip":n.unreadCountTooltip},t.$attrs,e.toHandlers(o.contactRowListeners),{onCall:a[0]||(a[0]=u=>t.$emit("call",u))}),{left:e.withCtx(()=>[e.createVNode(s,{"full-name":n.name,"image-src":n.avatarSrc,"image-alt":n.avatarAlt,"icon-name":o.iconName,"icon-size":"200",size:"sm",seed:n.avatarSeed,presence:n.avatarPresence},null,8,["full-name","image-src","image-alt","icon-name","seed","presence"])]),label:e.withCtx(()=>[e.createVNode(d,{class:"dt-leftbar-row__description","data-qa":"dt-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.name),1)]),_:1}),e.createElementVNode("div",kd,[n.presenceText?(e.openBlock(),e.createElementBlock("span",{key:0,"data-qa":"dt-leftbar-row-presence-text",class:e.normalizeClass(["dt-leftbar-row__meta-context",o.presenceColorClass])},e.toDisplayString(n.presenceText),3)):e.createCommentVNode("",!0),n.userStatus?(e.openBlock(),e.createBlock(d,{key:1,size:"100","element-type":"span","data-qa":"dt-leftbar-row-user-status",class:"dt-leftbar-row__meta-custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.userStatus),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},16,["unread-count","description","has-unreads","selected","has-call-button","muted","is-typing","call-button-tooltip","unread-count-tooltip"])}const Ed=c._export_sfc(Cd,[["render",wd]]),zn=["up","down"],Fn=["mentions","messages"],Id={name:"DtRecipeUnreadPill",components:{DtIcon:m.DtIcon},props:{kind:{type:String,required:!0,validator:t=>Fn.includes(t)},direction:{type:String,required:!0,validator:t=>zn.includes(t)}},emits:["click"],computed:{unreadChipListeners(){return{click:t=>this.$emit("click",t)}}}},Dd={"data-qa":"dt-leftbar-unread-pill__label"};function Td(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon");return e.openBlock(),e.createElementBlock("button",e.mergeProps({class:["dt-leftbar-unread-pill",`dt-leftbar-unread-pill--${n.kind}`],type:"button","data-qa":"dt-leftbar-unread-pill"},e.toHandlers(o.unreadChipListeners,!0)),[e.createVNode(s,{name:`arrow-${n.direction}`,size:"300"},null,8,["name"]),e.createElementVNode("span",Dd,[e.renderSlot(t.$slots,"default")])],16)}const Od=c._export_sfc(Id,[["render",Td]]),mt={NORMAL:"",SEARCHED:"dt-feed-item-row--state-searched",ERROR:"dt-feed-item-row--state-error"},ve="NORMAL",Bd={name:"DtRecipeFeedItemRow",components:{DtAvatar:_.DtAvatar,DtLazyShow:c.DtLazyShow,DtListItem:_.DtListItem,DtBadge:Ae},mixins:[_.Modal],inheritAttrs:!1,props:{avatarSeed:{type:String,default:null},showHeader:{type:Boolean,default:!1},avatarImageUrl:{type:String,default:""},displayName:{type:String,default:""},time:{type:String,default:""},shortTime:{type:String,default:""},labelText:{type:String,default:""},isActive:{type:Boolean,default:!1},state:{type:String,default:ve,validator:t=>Object.keys(mt).includes(t)}},emits:["hover","focus","keydown"],data(){return{transitionActive:!1}},computed:{feedListeners(){return{mouseenter:()=>this.setHover(!0),mouseleave:()=>this.setHover(!1),focusin:()=>this.setFocus(!0),focusout:()=>this.setFocus(!1),transitionend:()=>this.transitionComplete(),keydown:t=>{switch(t.code){case"Tab":this.trapFocus(t);break}this.$emit("keydown",t)}}},listItemClasses(){return["dt-feed-item-row",{"dt-feed-item-row--active":this.isActive&&this.state===ve},{"dt-feed-item-row--state-transition":this.transitionActive},mt[this.state]]}},watch:{state:{immediate:!0,handler:function(t,a){t!==ve&&(this.transitionActive=!0)}}},methods:{transitionComplete(){this.state===ve&&(this.transitionActive=!1)},trapFocus(t){this.focusTrappedTabPress(t)},setFocus(t){this.$emit("focus",t)},setHover(t){this.$emit("hover",t)}}},Nd={key:0,class:"dt-feed-item-row__avatar-container"},Ld={class:"dt-feed-item-row__content"},Ad={key:0,"data-qa":"dt-feed-item-row--header",class:"dt-feed-item-row__header"},xd={class:"dt-feed-item-row__header__name"},Md={class:"dt-feed-item-row__header__time"},Pd={"data-qa":"dt-feed-item-row--content"},Vd={key:0,class:"dt-feed-item-row__reactions","data-qa":"dt-feed-item-row--reactions"},Rd={key:1,class:"dt-feed-item-row__threading"},$d={"data-qa":"dt-feed-item-row--menu",class:"dt-feed-item-row__menu"};function zd(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-badge"),l=e.resolveComponent("dt-lazy-show"),u=e.resolveComponent("dt-list-item");return e.openBlock(),e.createBlock(u,e.mergeProps({ref:"FeedItemRef","navigation-type":"none"},t.$attrs,{class:["dt-feed-item-row",o.listItemClasses],"data-qa":"dt-feed-item-row"},e.toHandlers(o.feedListeners)),{left:e.withCtx(()=>[n.showHeader?(e.openBlock(),e.createElementBlock("div",Nd,[e.renderSlot(t.$slots,"avatar",{},()=>[e.createVNode(s,{"full-name":n.displayName,"image-src":n.avatarImageUrl,seed:n.avatarSeed},null,8,["full-name","image-src","seed"])],!0)])):e.createCommentVNode("",!0),n.showHeader?e.createCommentVNode("",!0):e.withDirectives((e.openBlock(),e.createElementBlock("span",{key:1,class:"dt-feed-item-row__left-time","data-qa":"dt-feed-item-row--left-time"},e.toDisplayString(n.shortTime),513)),[[e.vShow,n.isActive]])]),bottom:e.withCtx(()=>[t.$slots.reactions?(e.openBlock(),e.createElementBlock("div",Vd,[e.renderSlot(t.$slots,"reactions",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.threading?(e.openBlock(),e.createElementBlock("div",Rd,[e.renderSlot(t.$slots,"threading",{},void 0,!0)])):e.createCommentVNode("",!0)]),right:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",$d,[e.createVNode(l,{appear:!0,transition:"fade",show:n.isActive},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"menu",{},void 0,!0)]),_:3},8,["show"])],512),[[e.vShow,n.isActive]])]),default:e.withCtx(()=>[e.createElementVNode("article",Ld,[n.showHeader?(e.openBlock(),e.createElementBlock("div",Ad,[e.createElementVNode("p",xd,e.toDisplayString(n.displayName),1),e.createElementVNode("time",Md,e.toDisplayString(n.time),1),n.labelText?(e.openBlock(),e.createBlock(d,{key:0,text:n.labelText},null,8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",Pd,[e.renderSlot(t.$slots,"default",{},void 0,!0)])])]),_:3},16,["class"])}const Fd=c._export_sfc(Bd,[["render",zd],["__scopeId","data-v-6f22a9bd"]]),ft={default:"dt-recipe-feed-item-pill__border-default",ai:"dt-recipe-feed-item-pill__border-ai",critical:"dt-recipe-feed-item-pill__border-critical"},qd={name:"DtRecipeFeedItemPill",components:{DtItemLayout:_.DtItemLayout,DtIcon:m.DtIcon,DtCollapsible:on},props:{iconName:{type:String,default:()=>""},title:{type:String,default:()=>""},wrapperClass:{type:[String,Array,Object],default:""},buttonClass:{type:[String,Array,Object],default:""},ariaLabel:{type:String,required:!0},toggleable:{type:Boolean,default:()=>!0},defaultToggled:{type:Boolean,default:()=>!1},borderColor:{type:String,default:"default",validator:t=>Object.keys(ft).includes(t)}},data(){return{hover:!1,expanded:this.defaultToggled}},computed:{computedIcon(){return this.toggleable&&this.hover?this.expanded?"chevron-down":"chevron-right":this.iconName},toggleableClass(){return this.toggleable?"d-c-pointer":""},borderClass(){return ft[this.borderColor]}},methods:{onClick(){this.toggleable&&(this.expanded=!this.expanded)}}},Hd={class:"dt-recipe-feed-item-pill__wrapper"},Ud=["aria-label"],Wd={class:"dt-recipe-feed-item-pill__title"},Kd={class:"dt-recipe-feed-item-pill__content"};function jd(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-item-layout"),l=e.resolveComponent("dt-collapsible");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["dt-recipe-feed-item-pill__border",o.borderClass,n.wrapperClass])},[e.createElementVNode("div",Hd,[e.createVNode(l,{open:i.expanded},{anchor:e.withCtx(()=>[e.createElementVNode("button",{"data-qa":"dt-recipe-feed-item-pill","aria-label":n.ariaLabel,class:e.normalizeClass(["dt-recipe-feed-item-pill__button",o.toggleableClass,n.buttonClass]),onFocusin:a[0]||(a[0]=u=>i.hover=!0),onFocusout:a[1]||(a[1]=u=>i.hover=!1),onMouseenter:a[2]||(a[2]=u=>i.hover=!0),onMouseleave:a[3]||(a[3]=u=>i.hover=!1),onClick:a[4]||(a[4]=(...u)=>o.onClick&&o.onClick(...u))},[e.createVNode(d,{class:"dt-recipe-feed-item-pill__layout"},{left:e.withCtx(()=>[e.createVNode(s,{"data-qa":"dt-recipe-feed-item-pill__icon",size:"300",class:"dt-recipe-feed-item-pill__icon",name:o.computedIcon},null,8,["name"])]),subtitle:e.withCtx(()=>[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)]),bottom:e.withCtx(()=>[e.renderSlot(t.$slots,"bottom",{},void 0,!0)]),right:e.withCtx(()=>[e.renderSlot(t.$slots,"right",{},void 0,!0)]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"title",{},()=>[e.createElementVNode("span",Wd,e.toDisplayString(n.title),1)],!0)]),_:3})],42,Ud)]),content:e.withCtx(()=>[e.createElementVNode("div",Kd,[e.renderSlot(t.$slots,"content",{},void 0,!0)])]),_:3},8,["open"])])],2)}const Yd=c._export_sfc(qd,[["render",jd],["__scopeId","data-v-ebc5dd1f"]]),Gd={name:"DtRecipeTimePill",props:{dateTimeDisplay:{type:String,required:!0},dateTime:{type:String,required:!0,validator:t=>{const a=new Date(t);return a instanceof Date&&!isNaN(a)}}}},Qd=["dateTime"];function Zd(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("time",{"data-qa":"dt-time-pill",dateTime:n.dateTime,class:"dt-time-pill"},e.toDisplayString(n.dateTimeDisplay),9,Qd)}const Xd=c._export_sfc(Gd,[["render",Zd]]),qn=["emojiUnicodeOrShortname","isSelected","ariaLabel","tooltip","num"],Jd={name:"DtRecipeEmojiRow",components:{DtTooltip:c.DtTooltip,DtButton:m.DtButton,DtEmoji:m.DtEmoji,DtEmojiTextWrapper:_t._sfc_main},mixins:[],props:{reactions:{type:Array,default:()=>[],validator:t=>{for(const a of t)if(!qn.every(r=>a[r]!==void 0))return!1;return!0}}},emits:["emoji-clicked","emoji-hovered"],methods:{emojiClicked(t){this.$emit("emoji-clicked",t.emojiUnicodeOrShortname)},emojiHovered(t,a){this.$emit("emoji-hovered",{reaction:t.emojiUnicodeOrShortname,state:a})}}},ec={class:"dt-emoji-row"},tc=["reaction"],nc={"aria-hidden":"true"},ac={class:"dt-emoji-row__emoji"},oc={class:"dt-emoji-row__reaction-number"};function rc(t,a,n,r,i,o){const s=e.resolveComponent("dt-emoji-text-wrapper"),d=e.resolveComponent("dt-emoji"),l=e.resolveComponent("dt-button"),u=e.resolveComponent("dt-tooltip");return e.openBlock(),e.createElementBlock("span",ec,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.reactions,f=>(e.openBlock(),e.createElementBlock("span",{key:f.unicodeOutput,reaction:f},[e.createVNode(u,{class:"dt-emoji-row__tooltip","content-class":"d-wmx464",sticky:"popper",onShown:h=>o.emojiHovered(f,h)},{anchor:e.withCtx(({attrs:h})=>[e.createVNode(l,{importance:"clear",size:"sm","data-qa":"feed-item-reaction-button",class:e.normalizeClass(["dt-emoji-row__reaction",f.isSelected?"dt-emoji-row__reaction--selected":""]),"aria-label":f.ariaLabel,attrs:h,onClick:p=>o.emojiClicked(f)},{default:e.withCtx(()=>[e.createElementVNode("span",ac,[e.createVNode(d,{size:"200",code:f.emojiUnicodeOrShortname},null,8,["code"])]),e.createElementVNode("span",oc,e.toDisplayString(f.num),1)]),_:2},1032,["class","aria-label","attrs","onClick"])]),default:e.withCtx(()=>[e.createElementVNode("span",nc,[e.createVNode(s,{size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.tooltip),1)]),_:2},1024)])]),_:2},1032,["onShown"])],8,tc))),128)),e.renderSlot(t.$slots,"picker")])}const ic=c._export_sfc(Jd,[["render",rc]]),sc={name:"DtProgressBar",props:{progressbarAriaLabel:{type:String,required:!0},progress:{type:Number,default:20}},data:()=>({circleCircumference:50}),computed:{cssVars(){return{"--stroke-dashoffset":this.circleCircumference-this.circleCircumference*this.progress/100,"--stroke-dasharray":this.circleCircumference}}},mounted(){this.circleCircumference=this.$refs.progressbarCircle.getTotalLength()}},lc=["aria-label","aria-valuenow"],dc={ref:"progressbarCircle",r:"8",cx:"12",cy:"12",class:"progress-bar__circle"},cc=e.createElementVNode("circle",{r:"8",cx:"12",cy:"12",class:"progress-bar__circle"},null,-1);function uc(t,a,n,r,i,o){return e.openBlock(),e.createElementBlock("div",{role:"progressbar","aria-label":n.progressbarAriaLabel,tabindex:"-1","aria-valuenow":n.progress,"aria-valuemin":"0","aria-valuemax":"100"},[(e.openBlock(),e.createElementBlock("svg",{class:"progress-bar",style:e.normalizeStyle(o.cssVars)},[e.createElementVNode("circle",dc,null,512),cc],4))],8,lc)}const hc=c._export_sfc(sc,[["render",uc]]),mc={name:"DtImageCarousel",components:{DtImageViewer:ln,DtButton:m.DtButton,DtIcon:m.DtIcon,DtProgressBar:hc},props:{mediaItem:{type:Object,required:!0},index:{type:Number,required:!0},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0}},emits:["remove-media"],methods:{removeMediaItem(t){this.$emit("remove-media",t)}}},fc={class:"dt-attachment-image"},pc={class:"dt-attachment-image__top-right"};function gc(t,a,n,r,i,o){const s=e.resolveComponent("dt-image-viewer"),d=e.resolveComponent("dt-progress-bar"),l=e.resolveComponent("dt-icon"),u=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("li",fc,[e.createVNode(s,{"image-button-class":"dt-attachment-image__image-viewer","image-src":n.mediaItem.path,"image-alt":n.mediaItem.altText,"close-aria-label":n.closeAriaLabel,"aria-label":n.clickToOpenAriaLabel},null,8,["image-src","image-alt","close-aria-label","aria-label"]),e.createElementVNode("div",pc,[n.mediaItem.isUploading?(e.openBlock(),e.createBlock(d,{key:0,class:"dt-attachment-image__progress-bar",progress:n.mediaItem.progress,"progressbar-aria-label":n.progressbarAriaLabel},null,8,["progress","progressbar-aria-label"])):e.createCommentVNode("",!0),e.createVNode(u,{id:`closeButton-${n.index}`,tabindex:"0",class:"dt-attachment-image__close-button",circle:"",size:"xs",importance:"clear","aria-label":n.closeAriaLabel,onClick:a[0]||(a[0]=f=>o.removeMediaItem(n.index))},{icon:e.withCtx(()=>[e.createVNode(l,{name:"close",size:"200"})]),_:1},8,["id","aria-label"])])])}const _c=c._export_sfc(mc,[["render",gc]]),bc=64,vc={name:"DtRecipeAttachmentCarousel",components:{DtButton:m.DtButton,DtIcon:m.DtIcon,DtImageCarousel:_c},mixins:[],props:{mediaList:{type:Array,default:()=>[]},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0},leftArrowAriaLabel:{type:String,required:!0},rightArrowAriaLabel:{type:String,required:!0}},emits:["remove-media"],data(){return{showCloseButton:{},showRightArrow:!0,showLeftArrow:!1,isMounted:!1}},computed:{filteredMediaList(){return this.mediaList.filter(t=>t.type==="image"||t.type==="video")}},mounted:function(){this.showLeftArrow=this.$refs.carousel.scrollLeft>0,this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth},methods:{onItemFocus(t){t.currentTarget.scrollIntoView({behavior:"smooth"})},mediaComponent(t){switch(t){case"image":return"dt-image-carousel";default:return null}},removeMediaItem(t){this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth+bc,this.$emit("remove-media",t)},closeButton(t,a){this.showCloseButton[a]=t},handleScroll(){const t=this.$refs.carousel;this.showLeftArrow=t.scrollLeft>0,this.showRightArrow=t.scrollLeft+t.clientWidth!==t.scrollWidth},leftScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft-100,behavior:"smooth"})},rightScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft+100,behavior:"smooth"})}}},yc={class:"dt-attachment-carousel",role:"presentation"};function Sc(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button");return e.openBlock(),e.createElementBlock("div",yc,[n.mediaList.length>0?(e.openBlock(),e.createElementBlock("ul",{key:0,ref:"carousel",class:"dt-attachment-carousel__media-list",onScroll:a[0]||(a[0]=(...l)=>o.handleScroll&&o.handleScroll(...l))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.filteredMediaList,(l,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.mediaComponent(l.type)),{key:`media-${u}`,index:u,"media-item":l,"close-aria-label":n.closeAriaLabel,"click-to-open-aria-label":n.clickToOpenAriaLabel,"progressbar-aria-label":n.progressbarAriaLabel,onRemoveMedia:f=>o.removeMediaItem(u),onFocusin:o.onItemFocus},null,40,["index","media-item","close-aria-label","click-to-open-aria-label","progressbar-aria-label","onRemoveMedia","onFocusin"]))),128))],544)):e.createCommentVNode("",!0),e.withDirectives(e.createVNode(d,{tabindex:"-1","aria-label":n.leftArrowAriaLabel,class:"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left",circle:"",size:"xs",importance:"clear",onClick:o.leftScroll},{icon:e.withCtx(()=>[e.createVNode(s,{name:"arrow-left",size:"100"})]),_:1},8,["aria-label","onClick"]),[[e.vShow,i.showLeftArrow]]),e.withDirectives(e.createVNode(d,{tabindex:"-1","aria-label":n.rightArrowAriaLabel,class:"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right",circle:"",size:"xs",importance:"clear",onClick:o.rightScroll},{icon:e.withCtx(()=>[e.createVNode(s,{name:"arrow-right",size:"100"})]),_:1},8,["aria-label","onClick"]),[[e.vShow,i.showRightArrow]])])}const Cc=c._export_sfc(vc,[["render",Sc]]),kc=[/^https?:\/\//,/^http?:\/\//,/^ftp?:\/\//,/^ftps?:\/\//,/^ftps?:\/\//,/mailto:([^?]*)/],wc="https://",Ec={name:"DtRecipeEditor",components:{DtRichTextEditor:_.DtRichTextEditor,DtButton:m.DtButton,DtIcon:m.DtIcon,DtPopover:_.DtPopover,DtStack:_.DtStack,DtInput:m.DtInput,DtTooltip:c.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?_.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},placeholder:{type:String,default:""},maxHeight:{type:String,default:"unset"},confirmSetLinkButton:{type:Object,default:()=>({label:"Confirm",ariaLabel:"Confirm set link"})},removeLinkButton:{type:Object,default:()=>({label:"Remove",ariaLabel:"Remove link"})},cancelSetLinkButton:{type:Object,default:()=>({label:"Cancel",ariaLabel:"Cancel set link"})},setLinkPlaceholder:{type:String,default:""},showBoldButton:{type:Boolean,default:!0},showItalicsButton:{type:Boolean,default:!0},showUnderlineButton:{type:Boolean,default:!0},showStrikeButton:{type:Boolean,default:!0},showListItemsButton:{type:Boolean,default:!0},showOrderedListButton:{type:Boolean,default:!0},showAlignLeftButton:{type:Boolean,default:!0},showAlignCenterButton:{type:Boolean,default:!0},showAlignRightButton:{type:Boolean,default:!0},showAlignJustifyButton:{type:Boolean,default:!0},showQuoteButton:{type:Boolean,default:!0},showCodeBlockButton:{type:Boolean,default:!0},showAddLink:{type:Object,default:()=>({showAddLinkButton:!0,setLinkTitle:"Add a link",setLinkInputAriaLabel:"Input field to add link"})}},emits:["focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,linkOptions:{class:"d-link d-c-text d-d-inline-block"},showLinkInput:!1,linkInput:""}},computed:{inputLength(){return this.internalInputValue.length},htmlOutputFormat(){return _.RICH_TEXT_EDITOR_OUTPUT_FORMATS[2]},showingTextFormatButtons(){return this.showBoldButton||this.showItalicsButton||this.showStrikeButton||this.showUnderlineButton},showingAlignmentButtons(){return this.showAlignLeftButton||this.showAlignCenterButton||this.showAlignRightButton||this.showAlignJustifyButton},showingListButtons(){return this.showListItemsButton||this.showOrderedListButton},buttonGroups(){const t=this.individualButtons.map(a=>({key:a.selector,buttonGroup:[a]}));return[{key:"format",buttonGroup:this.textFormatButtons},{key:"alignment",buttonGroup:this.alignmentButtons},{key:"list",buttonGroup:this.listButtons},...t].filter(a=>a.buttonGroup.length>0)},textFormatButtons(){return[{showBtn:this.showBoldButton,selector:"bold",iconName:"bold",dataQA:"dt-editor-bold-btn",tooltipMessage:"Bold",onClick:this.onBoldTextToggle},{showBtn:this.showItalicsButton,selector:"italic",iconName:"italic",dataQA:"dt-editor-italics-btn",tooltipMessage:"Italics",onClick:this.onItalicTextToggle},{showBtn:this.showUnderlineButton,selector:"underline",iconName:"underline",dataQA:"dt-editor-underline-btn",tooltipMessage:"Underline",onClick:this.onUnderlineTextToggle},{showBtn:this.showStrikeButton,selector:"strike",iconName:"strikethrough",dataQA:"dt-editor-strike-btn",tooltipMessage:"Strike",onClick:this.onStrikethroughTextToggle}].filter(t=>t.showBtn)},alignmentButtons(){return[{showBtn:this.showAlignLeftButton,selector:{textAlign:"left"},iconName:"align-left",dataQA:"dt-editor-align-left-btn",tooltipMessage:"Align Left",onClick:()=>this.onTextAlign("left")},{showBtn:this.showAlignCenterButton,selector:{textAlign:"center"},iconName:"align-center",dataQA:"dt-editor-align-center-btn",tooltipMessage:"Align Center",onClick:()=>this.onTextAlign("center")},{showBtn:this.showAlignRightButton,selector:{textAlign:"right"},iconName:"align-right",dataQA:"dt-editor-align-right-btn",tooltipMessage:"Align Right",onClick:()=>this.onTextAlign("right")},{showBtn:this.showAlignJustifyButton,selector:{textAlign:"justify"},iconName:"align-justify",dataQA:"dt-editor-align-justify-btn",tooltipMessage:"Align Justify",onClick:()=>this.onTextAlign("justify")}].filter(t=>t.showBtn)},listButtons(){return[{showBtn:this.showListItemsButton,selector:"bulletList",iconName:"list-bullet",dataQA:"dt-editor-list-items-btn",tooltipMessage:"Bullet List",onClick:this.onBulletListToggle},{showBtn:this.showOrderedListButton,selector:"orderedList",iconName:"list-ordered",dataQA:"dt-editor-ordered-list-items-btn",tooltipMessage:"Ordered List",onClick:this.onOrderedListToggle}].filter(t=>t.showBtn)},individualButtons(){return[{showBtn:this.showQuoteButton,selector:"blockquote",iconName:"quote",dataQA:"dt-editor-blockquote-btn",tooltipMessage:"Quote",onClick:this.onBlockquoteToggle},{showBtn:this.showCodeBlockButton,selector:"codeBlock",iconName:"code-block",dataQA:"dt-editor-code-block-btn",tooltipMessage:"Code",onClick:this.onCodeBlockToggle}].filter(t=>t.showBtn)},linkButton(){return{showBtn:this.showAddLink.showAddLinkButton,selector:"link",iconName:"link-2",dataQA:"dt-editor-add-link-btn",tooltipMessage:"Link",onClick:this.openLinkInput}}},watch:{value(t){this.internalInputValue=t}},methods:{onInputFocus(t){t==null||t.stopPropagation()},removeLink(){var t,a,n,r,i;(i=(r=(n=(a=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null?void 0:a.chain())==null?void 0:n.focus())==null?void 0:r.unsetLink())==null||i.run(),this.closeLinkInput()},setLink(t){var i,o,s;const a=(i=this.$refs.richTextEditor)==null?void 0:i.editor;if(t==null||t.preventDefault(),t==null||t.stopPropagation(),!this.linkInput){this.removeLink();return}kc.find(d=>d.test(this.linkInput))||(this.linkInput=`${wc}${this.linkInput}`);const r=(s=(o=a==null?void 0:a.view)==null?void 0:o.state)==null?void 0:s.selection;r.anchor===r.head?a.chain().focus().insertContentAt(r.anchor,`<a class="${this.linkOptions.class}" href=${this.linkInput}>${this.linkInput}</a>`).run():a.chain().focus().extendMarkRange("link").setLink({href:this.linkInput,class:this.linkOptions.class}).run(),this.closeLinkInput()},openLinkInput(){this.showLinkInput=!0},updateInput(t){var a,n,r;if(!t)return this.closeLinkInput();this.linkInput=(r=(n=(a=this.$refs.richTextEditor)==null?void 0:a.editor)==null?void 0:n.getAttributes("link"))==null?void 0:r.href},closeLinkInput(){var t;this.showLinkInput=!1,this.linkInput="",(t=this.$refs.richTextEditor.editor)==null||t.chain().focus()},onBoldTextToggle(){var t,a;(a=(t=this.$refs.richTextEditor)==null?void 0:t.editor)==null||a.chain().focus().toggleBold().run()},onItalicTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleItalic().run()},onUnderlineTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleUnderline().run()},onStrikethroughTextToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleStrike().run()},onTextAlign(t){var a,n,r,i;if((n=(a=this.$refs.richTextEditor)==null?void 0:a.editor)!=null&&n.isActive({textAlign:t}))return(r=this.$refs.richTextEditor)==null?void 0:r.editor.chain().focus().unsetTextAlign().run();(i=this.$refs.richTextEditor)==null||i.editor.chain().focus().setTextAlign(t).run()},onBulletListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBulletList().run()},onOrderedListToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleOrderedList().run()},onCodeBlockToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleCodeBlock().run()},onBlockquoteToggle(){var t;(t=this.$refs.richTextEditor)==null||t.editor.chain().focus().toggleBlockquote().run()},onFocus(t){this.hasFocus=!0,this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}},Ic=e.createElementVNode("div",{class:"dt-editor--button-group-divider"},null,-1),Dc={key:0},Tc={class:"d-ml8 d-mr12"};function Oc(t,a,n,r,i,o){const s=e.resolveComponent("dt-icon"),d=e.resolveComponent("dt-button"),l=e.resolveComponent("dt-tooltip"),u=e.resolveComponent("dt-stack"),f=e.resolveComponent("dt-input"),h=e.resolveComponent("dt-popover"),p=e.resolveComponent("dt-rich-text-editor");return e.openBlock(),e.createElementBlock("div",{"data-qa":"dt-editor",role:"presentation",class:"d-d-flex d-fd-column",onClick:a[4]||(a[4]=g=>t.$refs.richTextEditor.focusEditor())},[e.createVNode(u,{direction:"row",gap:"450",class:"d-p8 dt-editor--top-bar-background"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buttonGroups,g=>(e.openBlock(),e.createBlock(u,{key:g.key,direction:"row",gap:"300"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.buttonGroup,b=>(e.openBlock(),e.createBlock(l,{key:`${g.key}-${JSON.stringify(b.selector)}`,message:b.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var T,y;return[e.createVNode(d,{"data-qa":b.dataQA,importance:"clear",kind:"muted",active:(y=(T=t.$refs.richTextEditor)==null?void 0:T.editor)==null?void 0:y.isActive(b.selector),size:"xs",onClick:v=>b.onClick()},{icon:e.withCtx(()=>[e.createVNode(s,{name:b.iconName,size:"200",class:"d-fw-bold"},null,8,["name"])]),_:2},1032,["data-qa","active","onClick"])]}),_:2},1032,["message"]))),128)),Ic]),_:2},1024))),128)),o.linkButton.showBtn?(e.openBlock(),e.createBlock(u,{key:0,direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(h,{open:i.showLinkInput,placement:"bottom-start","visually-hidden-close":!0,"visually-hidden-close-label":"Close link input popover","data-qa":"dt-editor-link-input-popover","show-close-button":!1,onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onOpened:o.updateInput},{anchor:e.withCtx(()=>[(e.openBlock(),e.createBlock(l,{key:o.linkButton.key,message:o.linkButton.tooltipMessage,placement:"top"},{anchor:e.withCtx(()=>{var g,b;return[e.createVNode(d,{"data-qa":o.linkButton.dataQA,importance:"clear",kind:"muted",class:"d-ol-none",active:(b=(g=t.$refs.richTextEditor)==null?void 0:g.editor)==null?void 0:b.isActive(o.linkButton.selector),size:"xs",onClick:a[0]||(a[0]=T=>o.linkButton.onClick())},{icon:e.withCtx(()=>[e.createVNode(s,{name:o.linkButton.iconName,size:"200",class:"d-fw-bold"},null,8,["name"])]),_:1},8,["data-qa","active"])]}),_:1},8,["message"]))]),content:e.withCtx(()=>[n.showAddLink.setLinkTitle.length>0?(e.openBlock(),e.createElementBlock("span",Dc,e.toDisplayString(n.showAddLink.setLinkTitle),1)):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:i.linkInput,"onUpdate:modelValue":a[1]||(a[1]=g=>i.linkInput=g),"input-aria-label":n.showAddLink.setLinkInputAriaLabel,"data-qa":"dt-editor-link-input",placeholder:n.setLinkPlaceholder,"input-wrapper-class":"d-bgc-black-100 d-mt6 d-bar5 d-ba d-baw1 d-bc-black-300 d-py2 d-ol-none",onClick:[o.onInputFocus,e.withModifiers(o.onInputFocus,["stop"])],onFocus:o.onInputFocus,onKeydown:e.withKeys(o.setLink,["enter"])},null,8,["modelValue","input-aria-label","placeholder","onClick","onFocus","onKeydown"])]),footerContent:e.withCtx(()=>[e.createElementVNode("div",Tc,[e.createVNode(d,{class:"d-mx2","aria-label":n.removeLinkButton.ariaLabel,importance:"clear",kind:"muted",size:"sm","data-qa":"dt-editor-remove-link-btn",onClick:o.removeLink},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.removeLinkButton.label),1)]),_:1},8,["aria-label","onClick"]),e.createVNode(d,{class:"d-mx2","aria-label":n.cancelSetLinkButton.ariaLabel,importance:"clear",kind:"muted",size:"sm","data-qa":"dt-editor-set-link-cancel-btn",onClick:o.closeLinkInput},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelSetLinkButton.label),1)]),_:1},8,["aria-label","onClick"]),e.createVNode(d,{class:"d-mx2",size:"sm","aria-label":n.confirmSetLinkButton.ariaLabel,"data-qa":"dt-editor-set-link-confirm-btn",onClick:o.setLink},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.confirmSetLinkButton.label),1)]),_:1},8,["aria-label","onClick"])])]),_:1},8,["open","onClick","onOpened"])]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",{class:"d-of-auto d-mx16 d-mt8 d-mb16 d-c-text",style:e.normalizeStyle({"max-height":n.maxHeight})},[e.createVNode(p,e.mergeProps({ref:"richTextEditor",modelValue:i.internalInputValue,"onUpdate:modelValue":a[2]||(a[2]=g=>i.internalInputValue=g),"data-qa":"dt-rich-text-editor",editable:n.editable,"input-aria-label":n.inputAriaLabel,"input-class":`${n.inputClass} d-ol-none d-my6`,"output-format":o.htmlOutputFormat,"auto-focus":n.autoFocus,placeholder:n.placeholder,"allow-line-breaks":!0,link:!1},t.$attrs,{onFocus:o.onFocus,onBlur:o.onBlur,onInput:a[3]||(a[3]=g=>o.onInput(g))}),null,16,["modelValue","editable","input-aria-label","input-class","output-format","auto-focus","placeholder","onFocus","onBlur"])],4)])}const Bc=c._export_sfc(Ec,[["render",Oc]]),pt={warning:"dt-recipe-callbox-badge--warning"},gt={default:"dt-recipe-callbox--border-default",ai:"dt-recipe-callbox--border-ai",critical:"dt-recipe-callbox--border-critical"},Nc={name:"DtRecipeCallbox",components:{DtBadge:Ae,DtAvatar:_.DtAvatar},inheritAttrs:!1,props:{badgeText:{type:String,default:""},badgeColor:{type:String,default:null,validator:t=>t===null||Object.keys(pt).includes(t)},avatarSrc:{type:String,default:""},avatarFullName:{type:String,default:""},avatarSeed:{type:String,default:""},title:{type:String,default:""},borderColor:{type:String,default:"default",validator:t=>Object.keys(gt).includes(t)},clickable:{type:Boolean,default:!1},isOnHold:{type:Boolean,default:!1}},emits:["click"],computed:{shouldShowAvatar(){return this.avatarFullName||this.avatarSrc},badgeClass(){return pt[this.badgeColor]},borderClass(){return gt[this.borderColor]}},methods:{handleClick(t){this.clickable&&this.$emit("click",t)}}},Lc={"data-qa":"dt-recipe-callbox",class:"dt-recipe-callbox"},Ac={key:0,"data-qa":"dt-recipe-callbox--video-wrapper",class:"dt-recipe-callbox--video"},xc={class:"dt-recipe-callbox--main-content-top"},Mc={class:"dt-recipe-callbox--content"},Pc={key:0,"data-qa":"dt-recipe-callbox--badge-wrapper",class:"dt-recipe-callbox--content-badge"},Vc={key:1,"data-qa":"dt-recipe-callbox--subtitle-wrapper",class:"dt-recipe-callbox--content-subtitle"},Rc={key:1,"data-qa":"dt-recipe-callbox--right-wrapper",class:"dt-recipe-callbox--right"},$c={key:0,"data-qa":"dt-recipe-callbox--bottom-wrapper",class:"dt-recipe-callbox--main-content-bottom"};function zc(t,a,n,r,i,o){const s=e.resolveComponent("dt-avatar"),d=e.resolveComponent("dt-badge");return e.openBlock(),e.createElementBlock("div",Lc,[t.$slots.video?(e.openBlock(),e.createElementBlock("div",Ac,[e.renderSlot(t.$slots,"video",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{"data-qa":"dt-recipe-callbox--main-content",class:e.normalizeClass(["dt-recipe-callbox--main-content",o.borderClass,{"dt-recipe-callbox--clickable":n.clickable}])},[e.createElementVNode("div",xc,[o.shouldShowAvatar?(e.openBlock(),e.createBlock(s,{key:0,"avatar-class":"dt-recipe-callbox--avatar","image-src":n.avatarSrc,"full-name":n.avatarFullName,seed:n.avatarSeed,clickable:n.clickable,"overlay-icon":n.isOnHold?"pause":null,size:"sm",onClick:o.handleClick},null,8,["image-src","full-name","seed","clickable","overlay-icon","onClick"])):e.createCommentVNode("",!0),e.createElementVNode("div",Mc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.clickable?"button":"span"),{"data-qa":"dt-recipe-callbox--title",class:"dt-recipe-callbox--content-title",onClick:o.handleClick},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["onClick"])),t.$slots.badge||n.badgeText?(e.openBlock(),e.createElementBlock("div",Pc,[e.renderSlot(t.$slots,"badge",{},()=>[e.createVNode(d,{class:e.normalizeClass(o.badgeClass),text:n.badgeText},null,8,["class","text"])],!0)])):e.createCommentVNode("",!0),t.$slots.subtitle?(e.openBlock(),e.createElementBlock("div",Vc,[e.renderSlot(t.$slots,"subtitle",{},void 0,!0)])):e.createCommentVNode("",!0)]),t.$slots.right?(e.openBlock(),e.createElementBlock("div",Rc,[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)]),t.$slots.bottom?(e.openBlock(),e.createElementBlock("div",$c,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)],2)])}const Fc=c._export_sfc(Nc,[["render",zc],["__scopeId","data-v-66800ae7"]]);let ae;function Te(t,a){return Ot(),Dn(t,a,{locale:ae})}function qc(t,a){return Ot(),ks(t,{locale:ae,format:a})}function Hc(t,a){return Ot(),Ss(t,a,{locale:ae})}function Uc(){return ae!==void 0}function Ot(){if(!Uc())throw new Error("Locale not set, please call setDateLocale(locale) and pass in a datefns locale object as the locale param before calling this function")}function Wc(t){ae=t}function Kc(t){return Te(t,"MMMM d, y")}function jc(t){if(t<60)return Hc(0,29*1e3);const a=Es({start:0,end:t*1e3});return qc(a,["hours","minutes"])}function Gt(t){const a=new Intl.RelativeTimeFormat(ae.code,{numeric:"auto"});return c.capitalizeFirstLetter(a.formatToParts(t,"day")[0].value,ae.code)}function Yc(t){return Ns(t)?Gt(0):As(t)?Gt(-1):Os(t)?Te(t,"EEEE"):Bs(t)?Te(t,"EEEE, MMMM d"):Te(t,"MMMM d, y")}exports.AVATAR_COLORS=_.AVATAR_COLORS;exports.AVATAR_GROUP_VALIDATOR=_.AVATAR_GROUP_VALIDATOR;exports.AVATAR_ICON_SIZES=_.AVATAR_ICON_SIZES;exports.AVATAR_KIND_MODIFIERS=_.AVATAR_KIND_MODIFIERS;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=_.AVATAR_PRESENCE_SIZE_MODIFIERS;exports.AVATAR_PRESENCE_STATES=_.AVATAR_PRESENCE_STATES;exports.AVATAR_SIZE_MODIFIERS=_.AVATAR_SIZE_MODIFIERS;exports.DT_STACK_DIRECTION=_.DT_STACK_DIRECTION;exports.DT_STACK_GAP=_.DT_STACK_GAP;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=_.DT_STACK_RESPONSIVE_BREAKPOINTS;exports.DtAvatar=_.DtAvatar;exports.DtItemLayout=_.DtItemLayout;exports.DtLink=_.DtLink;exports.DtListItem=_.DtListItem;exports.DtPopover=_.DtPopover;exports.DtPresence=_.DtPresence;exports.DtStack=_.DtStack;exports.LIST_ITEM_NAVIGATION_TYPES=_.LIST_ITEM_NAVIGATION_TYPES;exports.LIST_ITEM_TYPES=_.LIST_ITEM_TYPES;exports.POPOVER_APPEND_TO_VALUES=_.POPOVER_APPEND_TO_VALUES;exports.POPOVER_CONTENT_WIDTHS=_.POPOVER_CONTENT_WIDTHS;exports.POPOVER_DIRECTIONS=_.POPOVER_DIRECTIONS;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=_.POPOVER_HEADER_FOOTER_PADDING_CLASSES;exports.POPOVER_INITIAL_FOCUS_STRINGS=_.POPOVER_INITIAL_FOCUS_STRINGS;exports.POPOVER_PADDING_CLASSES=_.POPOVER_PADDING_CLASSES;exports.POPOVER_ROLES=_.POPOVER_ROLES;exports.POPOVER_STICKY_VALUES=_.POPOVER_STICKY_VALUES;exports.PRESENCE_STATES=_.PRESENCE_STATES;exports.PRESENCE_STATES_LIST=_.PRESENCE_STATES_LIST;exports.BUTTON_ICON_SIZES=m.BUTTON_ICON_SIZES;exports.BUTTON_IMPORTANCE_MODIFIERS=m.BUTTON_IMPORTANCE_MODIFIERS;exports.BUTTON_KIND_MODIFIERS=m.BUTTON_KIND_MODIFIERS;exports.BUTTON_SIZE_MODIFIERS=m.BUTTON_SIZE_MODIFIERS;exports.BUTTON_TYPES=m.BUTTON_TYPES;exports.DtButton=m.DtButton;exports.DtCheckableInputMixin=m.CheckableMixin;exports.DtGroupableInputMixin=m.GroupableMixin;exports.DtIcon=m.DtIcon;exports.DtInput=m.DtInput;exports.DtInputMixin=m.InputMixin;exports.DtSkeleton=m.DtSkeleton;exports.DtSkeletonListItem=m.DtSkeletonListItem;exports.DtSkeletonParagraph=m.DtSkeletonParagraph;exports.DtSkeletonShape=m.DtSkeletonShape;exports.DtSkeletonText=m.DtSkeletonText;exports.DtTab=m.DtTab;exports.DtTabGroup=m.DtTabGroup;exports.DtValidationMessages=m.DtValidationMessages;exports.ICON_POSITION_MODIFIERS=m.ICON_POSITION_MODIFIERS;exports.ICON_SIZE_MODIFIERS=m.ICON_SIZE_MODIFIERS;exports.INPUT_SIZES=m.INPUT_SIZES;exports.INPUT_TYPES=m.INPUT_TYPES;exports.INVALID_COMBINATION=m.INVALID_COMBINATION;exports.LINK_KIND_MODIFIERS=m.LINK_KIND_MODIFIERS;exports.LINK_VARIANTS=m.LINK_VARIANTS;exports.SKELETON_HEADING_HEIGHTS=m.SKELETON_HEADING_HEIGHTS;exports.SKELETON_RIPPLE_DURATION=m.SKELETON_RIPPLE_DURATION;exports.SKELETON_SHAPES=m.SKELETON_SHAPES;exports.SKELETON_SHAPE_SIZES=m.SKELETON_SHAPE_SIZES;exports.SKELETON_TEXT_TYPES=m.SKELETON_TEXT_TYPES;exports.TAB_IMPORTANCE_MODIFIERS=m.TAB_IMPORTANCE_MODIFIERS;exports.TAB_LIST_IMPORTANCE_MODIFIERS=m.TAB_LIST_IMPORTANCE_MODIFIERS;exports.TAB_LIST_KIND_MODIFIERS=m.TAB_LIST_KIND_MODIFIERS;exports.TAB_LIST_SIZES=m.TAB_LIST_SIZES;exports.validationMessageValidator=m.validationMessageValidator;exports.DEFAULT_VALIDATION_MESSAGE_TYPE=c.DEFAULT_VALIDATION_MESSAGE_TYPE;exports.DESCRIPTION_SIZE_TYPES=c.DESCRIPTION_SIZE_TYPES;exports.DtLazyShow=c.DtLazyShow;exports.DtTooltip=c.DtTooltip;exports.TOOLTIP_DELAY_MS=c.TOOLTIP_DELAY_MS;exports.TOOLTIP_DIRECTIONS=c.TOOLTIP_DIRECTIONS;exports.TOOLTIP_HIDE_ON_CLICK_VARIANTS=c.TOOLTIP_HIDE_ON_CLICK_VARIANTS;exports.TOOLTIP_KIND_MODIFIERS=c.TOOLTIP_KIND_MODIFIERS;exports.TOOLTIP_STICKY_VALUES=c.TOOLTIP_STICKY_VALUES;exports.VALIDATION_MESSAGE_TYPES=c.VALIDATION_MESSAGE_TYPES;exports.filterFormattedMessages=c.filterFormattedMessages;exports.formatMessages=c.formatMessages;exports.getUniqueString=c.getUniqueString;exports.getValidationState=c.getValidationState;exports.BADGE_DECORATION_MODIFIERS=et;exports.BADGE_KIND_MODIFIERS=Je;exports.BADGE_TYPE_MODIFIERS=Xe;exports.BREADCRUMBS_INVERTED_MODIFIER=Xt;exports.BREADCRUMB_ITEM_SELECTED_MODIFIER=Zt;exports.BUTTON_GROUP_ALIGNMENT=tt;exports.CALLBAR_BUTTON_VALID_WIDTH_SIZE=It;exports.CALLBOX_BADGE_COLORS=pt;exports.CALLBOX_BORDER_COLORS=gt;exports.CHIP_CLOSE_BUTTON_SIZE_MODIFIERS=un;exports.CHIP_ICON_SIZES=hn;exports.CHIP_SIZES=Ln;exports.CHIP_SIZE_MODIFIERS=rt;exports.CHIP_TOP_POSITION=An;exports.COLOR_CODES=Mn;exports.DEFAULT_FEED_ROW_STATE=ve;exports.DROPDOWN_PADDING_CLASSES=de;exports.DT_DESCRIPTION_LIST_DIRECTION=rn;exports.DtBadge=Ae;exports.DtBanner=ma;exports.DtBreadcrumbItem=Jt;exports.DtBreadcrumbs=va;exports.DtButtonGroup=Ca;exports.DtCard=en;exports.DtCheckbox=Jo;exports.DtCheckboxGroup=er;exports.DtChip=St;exports.DtCodeblock=Ta;exports.DtCollapsible=on;exports.DtCombobox=an;exports.DtDatepicker=Xs;exports.DtDescriptionList=Xa;exports.DtDropdown=sn;exports.DtDropdownSeparator=ro;exports.DtHovercard=so;exports.DtImageViewer=ln;exports.DtInputGroup=yt;exports.DtInputGroupMixin=dn;exports.DtKeyboardListNavigationMixin=bt;exports.DtKeyboardShortcut=Mr;exports.DtListItemGroup=Bo;exports.DtModal=Eo;exports.DtNotice=da;exports.DtNoticeAction=Pe;exports.DtNoticeContent=Me;exports.DtNoticeIcon=xe;exports.DtPagination=Mo;exports.DtRadio=Fo;exports.DtRadioGroup=qo;exports.DtRecipeAttachmentCarousel=Cc;exports.DtRecipeCallbarButton=xn;exports.DtRecipeCallbarButtonWithPopover=kl;exports.DtRecipeCallbox=Fc;exports.DtRecipeComboboxMultiSelect=_l;exports.DtRecipeComboboxWithPopover=Bn;exports.DtRecipeContactInfo=Ll;exports.DtRecipeContactRow=Ed;exports.DtRecipeEmojiRow=ic;exports.DtRecipeFeedItemPill=Yd;exports.DtRecipeFeedItemRow=Fd;exports.DtRecipeGeneralRow=Tt;exports.DtRecipeGroupRow=Sd;exports.DtRecipeGroupedChip=ed;exports.DtRecipeIvrNode=Kl;exports.DtRecipeSettingsMenuButton=ad;exports.DtRecipeTimePill=Xd;exports.DtRecipeTopBannerInfo=Rl;exports.DtRecipeUnreadPill=Od;exports.DtRecipeWysiwygEditor=Bc;exports.DtRootLayout=Rr;exports.DtScroller=Hr;exports.DtSelectMenu=_r;exports.DtTabPanel=Ko;exports.DtToast=Cr;exports.DtToggle=Or;exports.FEED_ITEM_PILL_BORDER_COLORS=ft;exports.FEED_ROW_STATE_BACKGROUND_COLOR=mt;exports.IVR_NODE_BRANCH=qe;exports.IVR_NODE_EXPERT=Fe;exports.IVR_NODE_GO_TO=Ce;exports.IVR_NODE_HANGUP=Ue;exports.IVR_NODE_ICON_TYPES=Pn;exports.IVR_NODE_LABELS=$l;exports.IVR_NODE_PROMPT_COLLECT=$e;exports.IVR_NODE_PROMPT_MENU=Re;exports.IVR_NODE_PROMPT_PLAY=ze;exports.IVR_NODE_TRANSFER=He;exports.LABEL_SIZES=vt;exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS=Se;exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR=Rn;exports.LEFTBAR_GENERAL_ROW_ICON_MAPPING=Vn;exports.LEFTBAR_GENERAL_ROW_ICON_SIZES=$n;exports.LEFTBAR_GENERAL_ROW_TYPES=x;exports.MODAL_BANNER_KINDS=ot;exports.MODAL_KIND_MODIFIERS=nt;exports.MODAL_SIZE_MODIFIERS=at;exports.MULTI_SELECT_SIZES=Nn;exports.NOTICE_KINDS=ue;exports.NOTICE_ROLES=Qt;exports.RADIO_INPUT_VALIDATION_CLASSES=cn;exports.REACTIONS_ATTRIBUTES=qn;exports.ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS=_n;exports.ROOT_LAYOUT_SIDEBAR_POSITIONS=dt;exports.SELECT_SIZE_MODIFIERS=it;exports.SELECT_STATE_MODIFIERS=mn;exports.SHORTCUTS_ALIASES_LIST=Br;exports.SHORTCUTS_ICON_ALIASES=le;exports.SHORTCUTS_ICON_SEPARATOR=gn;exports.TOAST_MIN_DURATION=st;exports.TOAST_ROLES=fn;exports.TOGGLE_CHECKED_VALUES=pn;exports.TOGGLE_SIZE_MODIFIERS=lt;exports.UNREAD_PILL_DIRECTIONS=zn;exports.UNREAD_PILL_KINDS=Fn;exports.durationInHHMM=jc;exports.formatLong=Js;exports.formatMedium=el;exports.formatNoYear=nl;exports.formatNumerical=al;exports.formatShort=tl;exports.getDateMedium=Kc;exports.relativeDate=Yc;exports.setDateLocale=Wc;