@genesislcap/design-system-configurator 14.409.0-FUI-2495.2 → 14.409.1

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.
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[715],{14609(e,t,i){i.d(t,{b:()=>s});const o=(0,i(348).createLogger)("foundation-criteria");var n=i(86636);const a="default";class s{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,n.r.And()),this.Or=(e,t={})=>this.withExpression(e,t,n.r.Or()),this.Not=(e,t={})=>this.withExpression(e,t,n.r.Not())}withExpression(e,t={},i=n.r.And()){const{condition:s,join:r,groupName:l}=t,d=(e,t=a)=>{var o;const n=null!==(o=this.expressions[t])&&void 0!==o?o:[];this.expressions[t]=[...n,{join:i||r,condition:s,expression:e}]};if(Array.isArray(e))if(r){const t=e.filter(e=>{const t=e instanceof n.r;return t&&o.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(l)t.forEach(e=>{d(e,l)});else{const e=(c=r,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,c]:e));d(e,a)}}else d(e,a);else d(e,"string"==typeof e?a:e.group);var c;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,o)=>this.parseExpression(e,o[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const o=[];return i&&t&&o.push(` ${i.operator} `),"string"==typeof e?o.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof n.r){if(i[t-1]instanceof n.r)throw new Error("Adjacent Join operations detected")}}),o.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof n.r?o.push(` ${e.operator} `):e&&o.push(e.serialiser(e)),o.join("")}}},58749(e,t,i){i.d(t,{K:()=>n});var o=i(95553);class n{constructor(e){this.serialiser=o.n.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}},95553(e,t,i){i.d(t,{n:()=>s});var o=i(86636);const n=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},a=e=>t=>`${t.field} ${e} ${n(t)}`,s={AND:e=>a(o.X.AND)(e),OR:e=>a(o.X.OR)(e),NOT:e=>a(o.X.NOT)(e),GT:e=>a(o.X.GT)(e),GE:e=>a(o.X.GE)(e),LT:e=>a(o.X.LT)(e),LE:e=>a(o.X.LE)(e),NE:e=>a(o.X.NE)(e),EQ:e=>a(o.X.EQ)(e),equals:e=>`${e.field}.equals(${n(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${n(e)})`,contains:e=>`Expr.contains(${e.field}, ${n(e)})`,fieldContains:e=>`${e.field}.contains(${n(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${n(e)})`,startsWith:e=>`${e.field}.startsWith(${n(e)})`,endsWith:e=>`${e.field}.endsWith(${n(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${n(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${n(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${n(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${n(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${n(e)})`}},86636(e,t,i){var o;i.d(t,{X:()=>o,r:()=>n}),function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(o||(o={}));class n{constructor(e){this.$$operator=e}static And(){return new n(o.AND)}static Or(){return new n(o.OR)}static Not(){return new n(o.NOT)}static GreaterThan(){return new n(o.GT)}static GreaterThanOrEqual(){return new n(o.GE)}static LessThan(){return new n(o.LT)}static LessThanOrEqual(){return new n(o.LE)}static NotEqual(){return new n(o.NE)}static Equal(){return new n(o.EQ)}get operator(){return this.$$operator}}},31274(e,t,i){i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-dialog`),s=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);s.appendChild(a),a.notification=e,a.show()}},60416(e,t,i){i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(348),n=i(52945),a=i(68424);const s=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;s.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevel.Debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},12715(e,t,i){i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AiCriteriaSearch:()=>fe,AiIndicator:()=>$e,Anchor:()=>Te,AnchoredRegion:()=>Ne,Avatar:()=>Pe,Badge:()=>Ye,Banner:()=>it,BaseDatasource:()=>ri,BaseFileComponent:()=>$a,Breadcrumb:()=>st,BreadcrumbItem:()=>ht,Button:()=>bt,COMBO_INPUT_MIN_LENGTH:()=>zc,CSSVarsTokenMapper:()=>Yp,Calendar:()=>St,Card:()=>Dt,CategorizedMultiselect:()=>Ut,Checkbox:()=>Vt,Combobox:()=>gi,ConnectionIndicator:()=>xi,DATETIME_OPERATORS:()=>Z,DATE_OPERATORS:()=>J,DEFUALT_FILTER_BAR_COLUMNS:()=>ds,DataGrid:()=>Oi,DataGridCell:()=>Ri,DataGridDatasource:()=>Wp,DataGridRow:()=>Mi,DatePicker:()=>lo,DefaultRouter:()=>Zg,DesignTokensObservable:()=>Lo,Dialog:()=>fn,DialogElement:()=>vn,Disclosure:()=>Cn,Divider:()=>Tn,DropdownMenu:()=>Mn,EnvironmentIndicator:()=>Xn,ErrorBanner:()=>ta,ErrorBoundary:()=>ga,ErrorBoundaryEvent:()=>oa,ErrorDialog:()=>Ca,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>ug,FaPrefixFromStyle:()=>ur,FileReader:()=>ka,FileUpload:()=>Ba,Filter:()=>ts,FilterBar:()=>cs,FilterEvents:()=>es,FlexLayout:()=>bs,FlexMediaQueriesEnum:()=>hs,Flipper:()=>xs,Flyout:()=>Ds,FoundationDesignSystemProvider:()=>sn,FoundationExpressionBuilder:()=>Xm,FoundationRouteCollection:()=>hv,FoundationRouteNav:()=>lv,FoundationRouter:()=>vv,FoundationRouterConfiguration:()=>pv,FoundationRuleExpressionBuilder:()=>Tg,FoundationValueExpressionBuilder:()=>Ng,GenerateNavigationPathEventType:()=>gv,GridLayout:()=>Us,GridLayoutItem:()=>Ys,GridMediaQueriesEnum:()=>Ls,HorizontalScroll:()=>Xs,INPUT_MIN_LENGTH:()=>Hc,Icon:()=>mr,Listbox:()=>br,ListboxOption:()=>Sr,Menu:()=>Dr,MenuItem:()=>Mr,Modal:()=>jr,Multiselect:()=>Zr,MultiselectDatasource:()=>qr,NUMERIC_OPERATORS:()=>Q,NavigateToEventType:()=>mv,NotificationListener:()=>_g,NumberField:()=>pl,Optgroup:()=>yl,OptionsDatasource:()=>ci,Popper:()=>ad,Position:()=>Lt,Progress:()=>Gl,ProgressRing:()=>ud,Radio:()=>fd,RadioGroup:()=>$d,Router:()=>Jg,RuleExpression:()=>hg,SCROLL_TIMEOUT:()=>_c,SECTION_NAVIGATOR_EVENTS:()=>tu,SNACKBAR_CLOSE_TIMEOUT:()=>qu,SNACKBAR_EVENTS_NAMES:()=>Ku,SNACKBAR_TYPES:()=>Wu,SNACKBAR_TYPE_DEFAULT:()=>Yu,STRING_OPERATORS:()=>X,Scheduler:()=>Dd,SchedulerCronBuilder:()=>Cc,SchedulerTimezone:()=>kc,SearchBar:()=>Uc,SearchBarCombobox:()=>Wc,SectionNavigator:()=>nu,SegmentedControl:()=>cu,SegmentedItem:()=>vu,Select:()=>xu,Skeleton:()=>ku,Slider:()=>Mu,SliderLabel:()=>Bu,Snackbar:()=>eh,StackingIcons:()=>nh,StatusPill:()=>dh,Stepper:()=>wv,StepperTab:()=>mh,StepperTabPanel:()=>yh,Switch:()=>Eh,SystemHealthOverlay:()=>Ql,Tab:()=>Rh,TabPanel:()=>_h,Tabs:()=>Gh,TextArea:()=>Kh,TextField:()=>op,Toast:()=>hp,Toolbar:()=>vp,Tooltip:()=>xp,TreeItem:()=>kp,TreeView:()=>Lp,UrlInput:()=>Gp,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>qo,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>Po,baseComponents:()=>Vp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Xo,black:()=>po,bodyFont:()=>r.bodyFont,categorizedMultiselectStyles:()=>Mt,categorizedMultiselectTemplate:()=>Ht,clientOperators:()=>mg,closeIcon:()=>Wa,configureDesignSystem:()=>Wo,configureEnvironmentIndicator:()=>qn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Jo,createDesignSystemProxy:()=>Wl,createFormData:()=>Fa,crossIcon:()=>Nc,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>ye,defaultAnchorConfig:()=>Ie,defaultAnchoredRegionConfig:()=>Fe,defaultAvatarConfig:()=>Be,defaultBadgeConfig:()=>qe,defaultBreadcrumbConfig:()=>lt,defaultBreadcrumbItemConfig:()=>mt,defaultButtonConfig:()=>wt,defaultCalendarConfig:()=>Ot,defaultCardConfig:()=>At,defaultCategorizedMultiselectConfig:()=>Pt,defaultCheckboxConfig:()=>Wt,defaultComboboxConfig:()=>fi,defaultConfig:()=>Ad,defaultCronBuilderConfig:()=>$c,defaultDataGridCellConfig:()=>Ni,defaultDataGridConfig:()=>ki,defaultDataGridRowConfig:()=>Hi,defaultDatePickerConfig:()=>ro,defaultDialogConfig:()=>gn,defaultDisclosureConfig:()=>$n,defaultDividerConfig:()=>In,defaultFileUploadConfig:()=>ja,defaultFillColor:()=>go,defaultFlexLayoutConfig:()=>fs,defaultFlipperConfig:()=>Ss,defaultFlyoutConfig:()=>As,defaultGridLayoutConfig:()=>zs,defaultGridLayoutItemConfig:()=>Vs,defaultHorizontalScrollConfig:()=>Js,defaultIconConfig:()=>cr,defaultListboxConfig:()=>wr,defaultListboxOptionConfig:()=>Or,defaultMenuConfig:()=>Ar,defaultMenuItemConfig:()=>Hr,defaultModalConfig:()=>Gr,defaultMultiselectConfig:()=>Jr,defaultNavItemPredicate:()=>dv,defaultNeutralForegroundContrast:()=>ko,defaultNumberFieldConfig:()=>gl,defaultPlacementIndexPadding:()=>cv,defaultProgressConfig:()=>Vl,defaultProgressRingConfig:()=>pd,defaultRadioConfig:()=>yd,defaultRadioGroupConfig:()=>Ed,defaultSearchBarComboboxConfig:()=>Kc,defaultSearchBarConfig:()=>Gc,defaultSectionNavigatorConfig:()=>su,defaultSegmentedControlConfig:()=>hu,defaultSegmentedItemConfig:()=>bu,defaultSelectConfig:()=>Su,defaultSkeletonConfig:()=>Du,defaultSliderConfig:()=>Hu,defaultSliderLabelConfig:()=>ju,defaultStepperConfig:()=>xv,defaultStepperTabConfig:()=>vh,defaultStepperTabPanelConfig:()=>Ch,defaultSwitchConfig:()=>Th,defaultSystemHealthOverlayConfig:()=>td,defaultTabConfig:()=>Nh,defaultTabPanelConfig:()=>zh,defaultTabsConfig:()=>Vh,defaultTextAreaConfig:()=>Qh,defaultTextFieldConfig:()=>ap,defaultTimezoneConfig:()=>Dc,defaultToastConfig:()=>up,defaultToolbarConfig:()=>bp,defaultTooltipConfig:()=>Sp,defaultTreeItemConfig:()=>Dp,defaultTreeViewConfig:()=>Mp,defaultUrlInputConfig:()=>Bp,defineFactory:()=>zg,density:()=>r.density,designToken:()=>_o,designTokensMap:()=>Vo,designUnit:()=>r.designUnit,designUnitValue:()=>Zo,direction:()=>r.direction,directionValue:()=>Qo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>_a,dropdownMenuBaseStyles:()=>Rn,environmentIndicatorStyles:()=>zn,errorDialogTemplate:()=>ya,extractMenuItems:()=>Nn,faSizeValueDefault:()=>hr,faSizeValues:()=>pr,fileReaderStyles:()=>Sa,fileReaderTemplate:()=>Ta,fillColor:()=>r.fillColor,filterBarTemplate:()=>rs,findParentRouter:()=>ov,findRouter:()=>iv,findTopLevelRouter:()=>nv,flyoutAnimationTime:()=>Os,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>lh,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>we,foundationAiCriteriaSearchShadowOptions:()=>be,foundationAiCriteriaSearchStyles:()=>M,foundationAiCriteriaSearchTemplate:()=>U,foundationAiIndicator:()=>Se,foundationAiIndicatorStyles:()=>Ce,foundationAiIndicatorTemplate:()=>xe,foundationAnchor:()=>De,foundationAnchorShadowOptions:()=>ke,foundationAnchorStyles:()=>Ee,foundationAnchorTemplate:()=>Oe,foundationAnchoredRegion:()=>Me,foundationAnchoredRegionShadowOptions:()=>Le,foundationAnchoredRegionStyles:()=>Ae,foundationAnchoredRegionTemplate:()=>Re,foundationAvatar:()=>Ge,foundationAvatarShadowOptions:()=>Ue,foundationAvatarStyles:()=>_e,foundationAvatarTemplate:()=>He,foundationBadge:()=>Ke,foundationBadgeShadowOptions:()=>We,foundationBadgeStyles:()=>je,foundationBadgeTemplate:()=>Ve,foundationBanner:()=>ot,foundationBannerShadowOptions:()=>tt,foundationBannerStyles:()=>Je,foundationBannerTemplate:()=>et,foundationBreadcrumb:()=>dt,foundationBreadcrumbItem:()=>gt,foundationBreadcrumbItemShadowOptions:()=>pt,foundationBreadcrumbItemStyles:()=>ct,foundationBreadcrumbItemTemplate:()=>ut,foundationBreadcrumbShadowOptions:()=>rt,foundationBreadcrumbStyles:()=>nt,foundationBreadcrumbTemplate:()=>at,foundationButton:()=>Ct,foundationButtonShadowOptions:()=>yt,foundationButtonStyles:()=>vt,foundationButtonTemplate:()=>ft,foundationCalendar:()=>Tt,foundationCalendarShadowOptions:()=>Et,foundationCalendarStyles:()=>xt,foundationCalendarTemplate:()=>$t,foundationCard:()=>Nt,foundationCardShadowOptions:()=>Rt,foundationCardStyles:()=>kt,foundationCardTemplate:()=>It,foundationCategorizedMultiselect:()=>Bt,foundationCategorizedMultiselectShadowOptions:()=>zt,foundationCheckbox:()=>qt,foundationCheckboxShadowOptions:()=>Yt,foundationCheckboxStyles:()=>Gt,foundationCheckboxTemplate:()=>jt,foundationCombobox:()=>bi,foundationComboboxShadowOptions:()=>vi,foundationComboboxStyles:()=>ui,foundationComboboxTemplate:()=>hi,foundationConnectionIndicator:()=>$i,foundationConnectionIndicatorStyles:()=>wi,foundationConnectionIndicatorTemplate:()=>Ci,foundationDataGrid:()=>Ii,foundationDataGridCell:()=>Li,foundationDataGridCellShadowOptions:()=>Ai,foundationDataGridCellStyles:()=>Di,foundationDataGridCellTemplate:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>zi,foundationDataGridRowShadowOptions:()=>_i,foundationDataGridRowStyles:()=>Fi,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Ti,foundationDataGridStyles:()=>Si,foundationDataGridTemplate:()=>Ei,foundationDatePicker:()=>co,foundationDatePickerShadowOptions:()=>so,foundationDatePickerStyles:()=>Zi,foundationDatePickerTemplate:()=>io,foundationDesignSystemProvider:()=>rn,foundationDialog:()=>bn,foundationDialogShadowOptions:()=>mn,foundationDialogStyles:()=>dn,foundationDialogTemplate:()=>pn,foundationDisclosure:()=>Sn,foundationDisclosureShadowOptions:()=>xn,foundationDisclosureStyles:()=>yn,foundationDisclosureTemplate:()=>wn,foundationDivider:()=>Dn,foundationDividerShadowOptions:()=>kn,foundationDividerStyles:()=>En,foundationDividerTemplate:()=>On,foundationDropdownMenu:()=>_n,foundationDropdownMenuStyles:()=>An,foundationDropdownMenuTemplate:()=>Fn,foundationEnvironmentIndicator:()=>Qn,foundationEnvironmentIndicatorTemplate:()=>Pn,foundationErrorBanner:()=>ia,foundationErrorBannerShadowOptions:()=>ea,foundationErrorBannerTemplate:()=>Zn,foundationErrorBoundary:()=>va,foundationErrorBoundaryShadowOptions:()=>ma,foundationErrorBoundaryTemplate:()=>pa,foundationErrorDialog:()=>xa,foundationErrorDialogShadowOptions:()=>wa,foundationErrorDialogStyles:()=>fa,foundationFileReader:()=>Ia,foundationFileReaderStyles:()=>Ea,foundationFileUpload:()=>Va,foundationFileUploadShadowOptions:()=>Ga,foundationFileUploadStyles:()=>Aa,foundationFileUploadTemplate:()=>La,foundationFilter:()=>is,foundationFilterBar:()=>us,foundationFilterBarStyles:()=>ns,foundationFilterBarTemplate:()=>ls,foundationFilterStyles:()=>Ya,foundationFilterTemplate:()=>Za,foundationFlexLayout:()=>ys,foundationFlexLayoutShadowOptions:()=>vs,foundationFlexLayoutStyles:()=>ms,foundationFlexLayoutTemplate:()=>gs,foundationFlipper:()=>Es,foundationFlipperShadowOptions:()=>$s,foundationFlipperStyles:()=>ws,foundationFlipperTemplate:()=>Cs,foundationFlyout:()=>Ns,foundationFlyoutShadowOptions:()=>Rs,foundationFlyoutStyles:()=>Ts,foundationFlyoutTemplate:()=>Is,foundationGridLayout:()=>Bs,foundationGridLayoutItem:()=>Ws,foundationGridLayoutItemShadowOptions:()=>js,foundationGridLayoutItemTemplate:()=>Gs,foundationGridLayoutShadowOptions:()=>Hs,foundationGridLayoutStyles:()=>Ms,foundationGridLayoutTemplate:()=>_s,foundationHorizontalScroll:()=>Zs,foundationHorizontalScrollShadowOptions:()=>Qs,foundationHorizontalScrollStyles:()=>qs,foundationHorizontalScrollTemplate:()=>Ks,foundationIcon:()=>gr,foundationIconShadowOptions:()=>dr,foundationIconStyles:()=>sr,foundationIconTemplate:()=>lr,foundationListbox:()=>Cr,foundationListboxOption:()=>Tr,foundationListboxOptionShadowOptions:()=>Er,foundationListboxOptionStyles:()=>xr,foundationListboxOptionTemplate:()=>$r,foundationListboxShadowOptions:()=>yr,foundationListboxStyles:()=>vr,foundationListboxTemplate:()=>fr,foundationMenu:()=>Nr,foundationMenuItem:()=>zr,foundationMenuItemShadowOptions:()=>_r,foundationMenuItemStyles:()=>Lr,foundationMenuItemTemplate:()=>Fr,foundationMenuShadowOptions:()=>Rr,foundationMenuStyles:()=>kr,foundationMenuTemplate:()=>Ir,foundationModal:()=>Vr,foundationModalShadowOptions:()=>Br,foundationModalStyles:()=>Pr,foundationModalTemplate:()=>Ur,foundationMultiselect:()=>el,foundationMultiselectShadowOptions:()=>Qr,foundationNotificationListener:()=>Hg,foundationNotificationListenerShadowOptions:()=>Mg,foundationNotificationListenerTemplate:()=>Lg,foundationNumberField:()=>vl,foundationNumberFieldShadowOptions:()=>ml,foundationNumberFieldStyles:()=>il,foundationNumberFieldTemplate:()=>ol,foundationOptgroup:()=>wl,foundationOptgroupStyles:()=>fl,foundationOptgroupTemplate:()=>bl,foundationPopper:()=>ld,foundationProgress:()=>Yl,foundationProgressRing:()=>md,foundationProgressRingShadowOptions:()=>hd,foundationProgressRingStyles:()=>dd,foundationProgressRingTemplate:()=>cd,foundationProgressShadowOptions:()=>jl,foundationProgressStyles:()=>Ul,foundationProgressTemplate:()=>Bl,foundationRadio:()=>wd,foundationRadioGroup:()=>Od,foundationRadioGroupShadowOptions:()=>Sd,foundationRadioGroupStyles:()=>Cd,foundationRadioGroupTemplate:()=>xd,foundationRadioShadowOptions:()=>bd,foundationRadioStyles:()=>gd,foundationRadioTemplate:()=>vd,foundationScheduler:()=>Nd,foundationSchedulerCronBuilder:()=>Sc,foundationSchedulerCronBuilderShadowOptions:()=>xc,foundationSchedulerCronBuilderTemplate:()=>wc,foundationSchedulerShadowOptions:()=>Rd,foundationSchedulerTemplate:()=>Id,foundationSchedulerTimezone:()=>Rc,foundationSchedulerTimezoneShadowOptions:()=>Ic,foundationSchedulerTimezoneTemplate:()=>Tc,foundationSearchBar:()=>jc,foundationSearchBarCombobox:()=>Xc,foundationSearchBarComboboxShadowOptions:()=>qc,foundationSearchBarComboboxStyles:()=>Vc,foundationSearchBarComboboxTemplate:()=>Yc,foundationSearchBarShadowOptions:()=>Bc,foundationSearchBarStyles:()=>Ac,foundationSearchBarTemplate:()=>Mc,foundationSectionNavigator:()=>ru,foundationSectionNavigatorShadowOptions:()=>au,foundationSectionNavigatorStyles:()=>Qc,foundationSectionNavigatorTemplate:()=>Jc,foundationSegmentedControl:()=>pu,foundationSegmentedControlShadowOptions:()=>uu,foundationSegmentedControlStyles:()=>lu,foundationSegmentedControlTemplate:()=>du,foundationSegmentedItem:()=>yu,foundationSegmentedItemShadowOptions:()=>fu,foundationSegmentedItemStyles:()=>mu,foundationSegmentedItemTemplate:()=>gu,foundationSelect:()=>Eu,foundationSelectShadowOptions:()=>$u,foundationSelectStyles:()=>wu,foundationSelectTemplate:()=>Cu,foundationSkeleton:()=>Ru,foundationSkeletonShadowOptions:()=>Iu,foundationSkeletonStyles:()=>Ou,foundationSkeletonTemplate:()=>Tu,foundationSlider:()=>zu,foundationSliderLabel:()=>Vu,foundationSliderLabelShadowOptions:()=>Gu,foundationSliderLabelStyles:()=>Pu,foundationSliderLabelTemplate:()=>Uu,foundationSliderShadowOptions:()=>_u,foundationSliderStyles:()=>Au,foundationSliderTemplate:()=>Fu,foundationSnackbar:()=>th,foundationSnackbarShadowOptions:()=>Zu,foundationSnackbarStyles:()=>Xu,foundationSnackbarTemplate:()=>Ju,foundationStackingIcons:()=>ah,foundationStackingIconsStyles:()=>ih,foundationStackingIconsTemplate:()=>oh,foundationStatusPill:()=>ch,foundationStatusPillTemplate:()=>rh,foundationStepper:()=>$v,foundationStepperShadowOptions:()=>Cv,foundationStepperStyles:()=>yv,foundationStepperTab:()=>fh,foundationStepperTabPanel:()=>xh,foundationStepperTabPanelShadowOptions:()=>wh,foundationStepperTabPanelTemplate:()=>bh,foundationStepperTabShadowOptions:()=>gh,foundationStepperTabStyles:()=>uh,foundationStepperTabTemplate:()=>ph,foundationStepperTemplate:()=>bv,foundationSwitch:()=>kh,foundationSwitchShadowOptions:()=>Oh,foundationSwitchStyles:()=>$h,foundationSwitchTemplate:()=>Sh,foundationSystemHealthOverlay:()=>id,foundationSystemHealthOverlayShadowOptions:()=>ed,foundationSystemHealthOverlayStyles:()=>Zl,foundationSystemHealthOverlayTemplate:()=>Jl,foundationTab:()=>Lh,foundationTabPanel:()=>Ph,foundationTabPanelShadowOptions:()=>Hh,foundationTabPanelStyles:()=>Fh,foundationTabPanelTemplate:()=>Mh,foundationTabShadowOptions:()=>Ah,foundationTabStyles:()=>Ih,foundationTabTemplate:()=>Dh,foundationTabs:()=>Yh,foundationTabsShadowOptions:()=>jh,foundationTabsStyles:()=>Uh,foundationTabsTemplate:()=>Bh,foundationTextArea:()=>Jh,foundationTextAreaShadowOptions:()=>Xh,foundationTextAreaStyles:()=>Wh,foundationTextAreaTemplate:()=>qh,foundationTextField:()=>sp,foundationTextFieldShadowOptions:()=>np,foundationTextFieldStyles:()=>tp,foundationTextFieldTemplate:()=>ip,foundationToast:()=>pp,foundationToastShadowOptions:()=>cp,foundationToastStyles:()=>rp,foundationToastTemplate:()=>dp,foundationToolbar:()=>yp,foundationToolbarShadowOptions:()=>fp,foundationToolbarStyles:()=>mp,foundationToolbarTemplate:()=>gp,foundationTooltip:()=>Ep,foundationTooltipShadowOptions:()=>$p,foundationTooltipStyles:()=>wp,foundationTooltipTemplate:()=>Cp,foundationTreeItem:()=>Rp,foundationTreeItemShadowOptions:()=>Ip,foundationTreeItemStyles:()=>Op,foundationTreeItemTemplate:()=>Tp,foundationTreeView:()=>_p,foundationTreeViewShadowOptions:()=>Fp,foundationTreeViewStyles:()=>Ap,foundationTreeViewTemplate:()=>Np,foundationUrlInput:()=>jp,foundationUrlInputShadowOptions:()=>Up,foundationUrlInputStyles:()=>Hp,foundationUrlInputTemplate:()=>Pp,fromBinaryExpression:()=>Sg,fromMethodExpression:()=>Eg,fuiAccentPalette:()=>So,fuiAccentSwatch:()=>$o,fuiCardFillColor:()=>To,fuiCardForegroundColor:()=>Do,fuiDefaultCardFillColor:()=>fo,fuiDefaultCardPalette:()=>bo,fuiFillColor:()=>Oo,fuiNeutralPalette:()=>Co,fuiNeutralSwatch:()=>wo,getBannerTemplate:()=>Ze,getCriteriaBuilder:()=>Pc,getDefaultConfig:()=>Bo,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>hn,getDropdownMenuTemplate:()=>Ln,getErrorDialogTemplate:()=>ba,getExports:()=>Go,getFontawesomeIconsCss:()=>ar,getNavItems:()=>uv,getPrefixedCategorizedMultiselect:()=>_t,getPrefixedCronBuilder:()=>yc,getPrefixedDatePicker:()=>to,getPrefixedErrorBanner:()=>Jn,getPrefixedFileReader:()=>Oa,getPrefixedFileUpload:()=>Na,getPrefixedFilterTemplate:()=>Ja,getPrefixedFlyout:()=>ks,getPrefixedIcon:()=>rr,getPrefixedMultiselect:()=>Kr,getPrefixedScheduler:()=>kd,getPrefixedSchedulerTimezone:()=>Oc,getPrefixedSearchBar:()=>Fc,getPrefixedSnackbar:()=>Qu,getPrefixedStepper:()=>fv,getPrefixedStepperTab:()=>hh,getPrefixedToast:()=>lp,getPrefixedUrlInput:()=>zp,getTypeRampValue:()=>jo,groupsToCriteria:()=>K,inputControls:()=>Jd,isAbsoluteUrl:()=>tv,jsonConverter:()=>nd,mapType:()=>as,maxheight:()=>Yr,media:()=>ze,menuTemplate:()=>k,mixinFoundationFontFamily:()=>tn,multiselectStyles:()=>Wr,multiselectTemplate:()=>Xr,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Io,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>Ko,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Ft,paletteFromHex:()=>zo,pathJoin:()=>av,plusIcon:()=>Lc,provideDesignSystem:()=>ql,provideTokens:()=>Mo,rebuildOperator:()=>$g,registerFoundationDesignSystem:()=>Sv,removeChildRouteParameter:()=>rv,removeLastPathSegment:()=>sv,routerLogger:()=>Wg,routerProperty:()=>Qg,ruleExpressionToGroup:()=>Og,ruleToRuleExpression:()=>Cg,ruleToRuleMethodExpression:()=>wg,schedulerCronBuilderStyles:()=>Zd,schedulerStyles:()=>Td,schedulerTimezoneStyles:()=>Ec,selectCustomToken:()=>Yo,singleOptionTemplate:()=>I,statusPillStyles:()=>sh,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>Ho,tagFor:()=>Pg,transformOperatorNameToServerName:()=>yg,transformServerNameToOperatorName:()=>xg,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Ma,validateClauses:()=>le,validateGroups:()=>de,white:()=>ho});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>ko,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>To,fuiCardForegroundColor:()=>Do,fuiFillColor:()=>Oo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>Io,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>qo,baseLayerLuminanceValue:()=>Xo,controlCornerRadiusValue:()=>Jo,designUnitValue:()=>Zo,directionValue:()=>Qo,neutralPaletteValue:()=>Ko});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>qp,BASE_OPERATORS:()=>em,LOGICAL_COMBINATORS:()=>Kp,NULL_COMBINATOR:()=>Xp});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
1
+ "use strict";(self.webpackChunk_genesislcap_design_system_configurator=self.webpackChunk_genesislcap_design_system_configurator||[]).push([[715],{14609(e,t,i){i.d(t,{b:()=>s});const o=(0,i(348).createLogger)("foundation-criteria");var n=i(86636);const a="default";class s{constructor(){this.expressions={},this.And=(e,t={})=>this.withExpression(e,t,n.r.And()),this.Or=(e,t={})=>this.withExpression(e,t,n.r.Or()),this.Not=(e,t={})=>this.withExpression(e,t,n.r.Not())}withExpression(e,t={},i=n.r.And()){const{condition:s,join:r,groupName:l}=t,d=(e,t=a)=>{var o;const n=null!==(o=this.expressions[t])&&void 0!==o?o:[];this.expressions[t]=[...n,{join:i||r,condition:s,expression:e}]};if(Array.isArray(e))if(r){const t=e.filter(e=>{const t=e instanceof n.r;return t&&o.warn("Inline joins will be discarded when join is defined in ExpressionOptions"),!t});if(l)t.forEach(e=>{d(e,l)});else{const e=(c=r,t.flat().flatMap((e,t,i)=>i.length-1!==t?[e,c]:e));d(e,a)}}else d(e,a);else d(e,"string"==typeof e?a:e.group);var c;return this}build(e){const t=Object.entries(this.expressions).reduce((e,[t,i])=>Object.assign(Object.assign({},e),{[t]:`(${i.filter(({condition:e})=>!e||e()).map(({expression:e,join:t},i,o)=>this.parseExpression(e,o[i-1],t)).join("")})`}),{});return e?e(t):`(${Object.values(t).join(" && ")})`}reset(){this.expressions={}}parseExpression(e,t,i){const o=[];return i&&t&&o.push(` ${i.operator} `),"string"==typeof e?o.push(e):Array.isArray(e)?(e.forEach((e,t,i)=>{if(e instanceof n.r){if(i[t-1]instanceof n.r)throw new Error("Adjacent Join operations detected")}}),o.push(`(${e.map(e=>this.parseExpression(e,void 0)).join("")})`)):e instanceof n.r?o.push(` ${e.operator} `):e&&o.push(e.serialiser(e)),o.join("")}}},58749(e,t,i){i.d(t,{K:()=>n});var o=i(95553);class n{constructor(e){this.serialiser=o.n.EQ,this.build=()=>{if(!this.field)throw new Error("Missing required param 'field'");if(void 0===this.value)throw new Error("Missing required param 'value'");if(!this.serialiser)throw new Error("Missing required param 'serialise'");return{field:this.field,value:this.value,serialiser:this.serialiser,params:this.params,valueGetter:this.valueGetter,group:this.group}},e&&(this.field=e.field,this.value=e.value,this.serialiser=e.serialiser,this.params=e.params,this.valueGetter=e.valueGetter,this.group=e.group)}withField(e){return this.field=e,this}withValue(e){return this.value=e,this}withSerialiser(e){return this.serialiser=e,this}withParams(e){return this.params=e,this}withValueGetter(e){return this.valueGetter=e,this}withGroup(e){return this.group=e,this}}},95553(e,t,i){i.d(t,{n:()=>s});var o=i(86636);const n=e=>{const{value:t}=e;return e.valueGetter?e.valueGetter(t):"function"==typeof t?t(e):Array.isArray(t)?t.join(","):"string"==typeof t?`"${t}"`:t},a=e=>t=>`${t.field} ${e} ${n(t)}`,s={AND:e=>a(o.X.AND)(e),OR:e=>a(o.X.OR)(e),NOT:e=>a(o.X.NOT)(e),GT:e=>a(o.X.GT)(e),GE:e=>a(o.X.GE)(e),LT:e=>a(o.X.LT)(e),LE:e=>a(o.X.LE)(e),NE:e=>a(o.X.NE)(e),EQ:e=>a(o.X.EQ)(e),equals:e=>`${e.field}.equals(${n(e)})`,equalsIgnoreCase:e=>`${e.field}.equalsIgnoreCase(${n(e)})`,contains:e=>`Expr.contains(${e.field}, ${n(e)})`,fieldContains:e=>`${e.field}.contains(${n(e)})`,containsIgnoreCase:e=>`Expr.containsIgnoreCase(${e.field}, ${n(e)})`,startsWith:e=>`${e.field}.startsWith(${n(e)})`,endsWith:e=>`${e.field}.endsWith(${n(e)})`,dateIsToday:e=>`Expr.dateIsToday(${e.field})`,dateIsEqual:e=>`Expr.dateIsEqual(${e.field}, ${n(e)})`,dateIsGreaterEqual:e=>`Expr.dateIsGreaterEqual(${e.field}, ${n(e)})`,dateIsLessEqual:e=>`Expr.dateIsLessEqual(${e.field}, ${n(e)})`,dateTimeIsGreaterEqual:e=>`Expr.dateTimeIsGreaterEqual(${e.field}, ${n(e)})`,dateTimeIsLessEqual:e=>`Expr.dateTimeIsLessEqual(${e.field}, ${n(e)})`}},86636(e,t,i){var o;i.d(t,{X:()=>o,r:()=>n}),function(e){e.AND="&&",e.OR="||",e.NOT="!",e.GT=">",e.GE=">=",e.LT="<",e.LE="<=",e.NE="!=",e.EQ="=="}(o||(o={}));class n{constructor(e){this.$$operator=e}static And(){return new n(o.AND)}static Or(){return new n(o.OR)}static Not(){return new n(o.NOT)}static GreaterThan(){return new n(o.GT)}static GreaterThanOrEqual(){return new n(o.GE)}static LessThan(){return new n(o.LT)}static LessThanOrEqual(){return new n(o.LE)}static NotEqual(){return new n(o.NE)}static Equal(){return new n(o.EQ)}get operator(){return this.$$operator}}},31274(e,t,i){i.d(t,{u:()=>n});var o=i(60416);const n=(e,t,i)=>{(0,o.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-dialog`),s=i?(e=>{let t=e.querySelector("#dialog-container");return t||(t=document.createElement("div"),t.setAttribute("id","dialog-container"),t.style.position="relative",e.appendChild(t)),t})(i):(0,o.jE)("dialog-container",t);s.appendChild(a),a.notification=e,a.show()}},60416(e,t,i){i.d(t,{cL:()=>h,jE:()=>u,uP:()=>d,u_:()=>c});var o=i(348),n=i(52945),a=i(68424);const s=(0,o.createLogger)("foundation-notifications");let r=null;const l=new Map,d=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.body)&&void 0!==i?i:"Something went wrong"}`},c=e=>{var t,i;s.log({message:d(e),level:(t=e,(null==t?void 0:t.logLevel)||(null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.logLevel)||o.LogLevel.Debug)})},u=(e,t)=>{let i=document.querySelector(`#${e}`);if(!i)if(l.has(e))i=l.get(e);else{const t=(0,n.fI)(document).find(t=>t.id===e);t&&(i=t,l.set(e,t))}if(!i){i=document.createElement("div"),i.setAttribute("id",e),i.style.zIndex="9999";const{element:t,prefix:o}=(0,a.DW)(document.body,"rapid");if(t)t.appendChild(i),r=t;else if(r)r.appendChild(i);else{const e=document.createElement(`${o}-design-system-provider`);e.appendChild(i),document.body.appendChild(e),r=e}}return i},h=e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return p()},p=()=>{const e=document.createElement("div");return e.setAttribute("id","banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e}},12715(e,t,i){i.r(t),i.d(t,{Accordion:()=>u,AccordionItem:()=>f,ActionsMenu:()=>R,AiCriteriaSearch:()=>ve,AiIndicator:()=>xe,Anchor:()=>Oe,AnchoredRegion:()=>Ae,Avatar:()=>ze,Badge:()=>Ve,Banner:()=>tt,BaseDatasource:()=>si,BaseFileComponent:()=>xa,Breadcrumb:()=>at,BreadcrumbItem:()=>ut,Button:()=>ft,COMBO_INPUT_MIN_LENGTH:()=>Hc,CSSVarsTokenMapper:()=>Vp,Calendar:()=>$t,Card:()=>It,CategorizedMultiselect:()=>Pt,Checkbox:()=>jt,Combobox:()=>mi,ConnectionIndicator:()=>Ci,DATETIME_OPERATORS:()=>J,DATE_OPERATORS:()=>Q,DEFUALT_FILTER_BAR_COLUMNS:()=>ls,DataGrid:()=>Ei,DataGridCell:()=>Di,DataGridDatasource:()=>Yp,DataGridRow:()=>Fi,DatePicker:()=>ro,DefaultRouter:()=>Jg,DesignTokensObservable:()=>No,Dialog:()=>vn,DialogElement:()=>gn,Disclosure:()=>wn,Divider:()=>On,DropdownMenu:()=>Fn,EnvironmentIndicator:()=>Kn,ErrorBanner:()=>ea,ErrorBoundary:()=>ma,ErrorBoundaryEvent:()=>ia,ErrorDialog:()=>wa,ExpressionBuilderConfig:()=>a,ExpressionBuilderCore:()=>cg,FaPrefixFromStyle:()=>cr,FileReader:()=>Ta,FileUpload:()=>Ua,Filter:()=>es,FilterBar:()=>ds,FilterEvents:()=>Za,FlexLayout:()=>fs,FlexMediaQueriesEnum:()=>us,Flipper:()=>Cs,Flyout:()=>Is,FoundationDesignSystemProvider:()=>an,FoundationExpressionBuilder:()=>Km,FoundationRouteCollection:()=>uv,FoundationRouteNav:()=>rv,FoundationRouter:()=>gv,FoundationRouterConfiguration:()=>hv,FoundationRuleExpressionBuilder:()=>Og,FoundationValueExpressionBuilder:()=>Ag,GenerateNavigationPathEventType:()=>mv,GridLayout:()=>Ps,GridLayoutItem:()=>Vs,GridMediaQueriesEnum:()=>Ns,HorizontalScroll:()=>Ks,INPUT_MIN_LENGTH:()=>_c,Icon:()=>pr,Listbox:()=>fr,ListboxOption:()=>$r,Menu:()=>Ir,MenuItem:()=>Fr,Modal:()=>Gr,Multiselect:()=>Jr,MultiselectDatasource:()=>Wr,NUMERIC_OPERATORS:()=>X,NavigateToEventType:()=>pv,NotificationListener:()=>Mg,NumberField:()=>hl,Optgroup:()=>bl,OptionsDatasource:()=>di,Popper:()=>nd,Position:()=>Nt,Progress:()=>Bl,ProgressRing:()=>cd,Radio:()=>vd,RadioGroup:()=>xd,Router:()=>Qg,RuleExpression:()=>ug,SCROLL_TIMEOUT:()=>Mc,SECTION_NAVIGATOR_EVENTS:()=>eu,SNACKBAR_CLOSE_TIMEOUT:()=>Wu,SNACKBAR_EVENTS_NAMES:()=>qu,SNACKBAR_TYPES:()=>Yu,SNACKBAR_TYPE_DEFAULT:()=>Vu,STRING_OPERATORS:()=>K,Scheduler:()=>Id,SchedulerCronBuilder:()=>wc,SchedulerTimezone:()=>Tc,SearchBar:()=>Pc,SearchBarCombobox:()=>Yc,SectionNavigator:()=>ou,SegmentedControl:()=>du,SegmentedItem:()=>gu,Select:()=>Cu,Skeleton:()=>Tu,Slider:()=>Fu,SliderLabel:()=>Uu,Snackbar:()=>Zu,StackingIcons:()=>oh,StatusPill:()=>lh,Stepper:()=>yv,StepperTab:()=>ph,StepperTabPanel:()=>bh,Switch:()=>Sh,SystemHealthOverlay:()=>Xl,Tab:()=>Dh,TabPanel:()=>Mh,Tabs:()=>Bh,TextArea:()=>qh,TextField:()=>ip,Toast:()=>up,Toolbar:()=>gp,Tooltip:()=>Cp,TreeItem:()=>Tp,TreeView:()=>Np,UrlInput:()=>Bp,accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,accentPaletteValue:()=>Wo,actionsMenuBaseStyles:()=>$,applyCustomTokens:()=>zo,baseComponents:()=>jp,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,baseLayerLuminanceValue:()=>Ko,black:()=>ho,bodyFont:()=>r.bodyFont,categorizedMultiselectStyles:()=>Ft,categorizedMultiselectTemplate:()=>_t,clientOperators:()=>pg,closeIcon:()=>Ya,configureDesignSystem:()=>Yo,configureEnvironmentIndicator:()=>Wn,controlCornerRadius:()=>r.controlCornerRadius,controlCornerRadiusValue:()=>Qo,createDesignSystemProxy:()=>Yl,createFormData:()=>La,crossIcon:()=>Ac,defaultAccordionConfig:()=>p,defaultAccordionItemConfig:()=>y,defaultAiCriteriaSearchConfig:()=>be,defaultAnchorConfig:()=>ke,defaultAnchoredRegionConfig:()=>Le,defaultAvatarConfig:()=>Ue,defaultBadgeConfig:()=>We,defaultBreadcrumbConfig:()=>rt,defaultBreadcrumbItemConfig:()=>pt,defaultButtonConfig:()=>yt,defaultCalendarConfig:()=>Et,defaultCardConfig:()=>Rt,defaultCategorizedMultiselectConfig:()=>zt,defaultCheckboxConfig:()=>Yt,defaultComboboxConfig:()=>vi,defaultConfig:()=>Rd,defaultCronBuilderConfig:()=>xc,defaultDataGridCellConfig:()=>Ai,defaultDataGridConfig:()=>Ti,defaultDataGridRowConfig:()=>_i,defaultDatePickerConfig:()=>so,defaultDialogConfig:()=>mn,defaultDisclosureConfig:()=>xn,defaultDividerConfig:()=>kn,defaultFileUploadConfig:()=>Ga,defaultFillColor:()=>mo,defaultFlexLayoutConfig:()=>vs,defaultFlipperConfig:()=>$s,defaultFlyoutConfig:()=>Rs,defaultGridLayoutConfig:()=>Hs,defaultGridLayoutItemConfig:()=>js,defaultHorizontalScrollConfig:()=>Qs,defaultIconConfig:()=>dr,defaultListboxConfig:()=>yr,defaultListboxOptionConfig:()=>Er,defaultMenuConfig:()=>Rr,defaultMenuItemConfig:()=>_r,defaultModalConfig:()=>Br,defaultMultiselectConfig:()=>Qr,defaultNavItemPredicate:()=>lv,defaultNeutralForegroundContrast:()=>To,defaultNumberFieldConfig:()=>ml,defaultPlacementIndexPadding:()=>dv,defaultProgressConfig:()=>jl,defaultProgressRingConfig:()=>hd,defaultRadioConfig:()=>bd,defaultRadioGroupConfig:()=>Sd,defaultSearchBarComboboxConfig:()=>qc,defaultSearchBarConfig:()=>Bc,defaultSectionNavigatorConfig:()=>au,defaultSegmentedControlConfig:()=>uu,defaultSegmentedItemConfig:()=>fu,defaultSelectConfig:()=>$u,defaultSkeletonConfig:()=>Iu,defaultSliderConfig:()=>_u,defaultSliderLabelConfig:()=>Gu,defaultStepperConfig:()=>Cv,defaultStepperTabConfig:()=>gh,defaultStepperTabPanelConfig:()=>wh,defaultSwitchConfig:()=>Oh,defaultSystemHealthOverlayConfig:()=>ed,defaultTabConfig:()=>Ah,defaultTabPanelConfig:()=>Hh,defaultTabsConfig:()=>jh,defaultTextAreaConfig:()=>Xh,defaultTextFieldConfig:()=>np,defaultTimezoneConfig:()=>Ic,defaultToastConfig:()=>cp,defaultToolbarConfig:()=>fp,defaultTooltipConfig:()=>$p,defaultTreeItemConfig:()=>Ip,defaultTreeViewConfig:()=>Fp,defaultUrlInputConfig:()=>Up,defineFactory:()=>Hg,density:()=>r.density,designToken:()=>Mo,designTokensMap:()=>jo,designUnit:()=>r.designUnit,designUnitValue:()=>Jo,direction:()=>r.direction,directionValue:()=>Xo,disabledOpacity:()=>r.disabledOpacity,downloadFile:()=>Ma,dropdownMenuBaseStyles:()=>Dn,environmentIndicatorStyles:()=>Hn,errorDialogTemplate:()=>ba,extractMenuItems:()=>An,faSizeValueDefault:()=>ur,faSizeValues:()=>hr,fileReaderStyles:()=>$a,fileReaderTemplate:()=>Oa,fillColor:()=>r.fillColor,filterBarTemplate:()=>ss,findParentRouter:()=>iv,findRouter:()=>tv,findTopLevelRouter:()=>ov,flyoutAnimationTime:()=>Es,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,formatTimeForCountDown:()=>rh,foundationAccordion:()=>m,foundationAccordionItem:()=>w,foundationAccordionItemShadowOptions:()=>b,foundationAccordionItemStyles:()=>g,foundationAccordionItemTemplate:()=>v,foundationAccordionShadowOptions:()=>h,foundationAccordionStyles:()=>d,foundationAccordionTemplate:()=>c,foundationActionsMenu:()=>A,foundationActionsMenuStyles:()=>S,foundationActionsMenuTemplate:()=>D,foundationAiCriteriaSearch:()=>ye,foundationAiCriteriaSearchShadowOptions:()=>fe,foundationAiCriteriaSearchStyles:()=>M,foundationAiCriteriaSearchTemplate:()=>P,foundationAiIndicator:()=>$e,foundationAiIndicatorStyles:()=>we,foundationAiIndicatorTemplate:()=>Ce,foundationAnchor:()=>Ie,foundationAnchorShadowOptions:()=>Te,foundationAnchorStyles:()=>Se,foundationAnchorTemplate:()=>Ee,foundationAnchoredRegion:()=>Fe,foundationAnchoredRegionShadowOptions:()=>Ne,foundationAnchoredRegionStyles:()=>Re,foundationAnchoredRegionTemplate:()=>De,foundationAvatar:()=>Be,foundationAvatarShadowOptions:()=>Pe,foundationAvatarStyles:()=>Me,foundationAvatarTemplate:()=>_e,foundationBadge:()=>qe,foundationBadgeShadowOptions:()=>Ye,foundationBadgeStyles:()=>Ge,foundationBadgeTemplate:()=>je,foundationBanner:()=>it,foundationBannerShadowOptions:()=>et,foundationBannerStyles:()=>Qe,foundationBannerTemplate:()=>Ze,foundationBreadcrumb:()=>lt,foundationBreadcrumbItem:()=>mt,foundationBreadcrumbItemShadowOptions:()=>ht,foundationBreadcrumbItemStyles:()=>dt,foundationBreadcrumbItemTemplate:()=>ct,foundationBreadcrumbShadowOptions:()=>st,foundationBreadcrumbStyles:()=>ot,foundationBreadcrumbTemplate:()=>nt,foundationButton:()=>wt,foundationButtonShadowOptions:()=>bt,foundationButtonStyles:()=>gt,foundationButtonTemplate:()=>vt,foundationCalendar:()=>Ot,foundationCalendarShadowOptions:()=>St,foundationCalendarStyles:()=>Ct,foundationCalendarTemplate:()=>xt,foundationCard:()=>At,foundationCardShadowOptions:()=>Dt,foundationCardStyles:()=>Tt,foundationCardTemplate:()=>kt,foundationCategorizedMultiselect:()=>Ut,foundationCategorizedMultiselectShadowOptions:()=>Ht,foundationCheckbox:()=>Wt,foundationCheckboxShadowOptions:()=>Vt,foundationCheckboxStyles:()=>Bt,foundationCheckboxTemplate:()=>Gt,foundationCombobox:()=>fi,foundationComboboxShadowOptions:()=>gi,foundationComboboxStyles:()=>ci,foundationComboboxTemplate:()=>ui,foundationConnectionIndicator:()=>xi,foundationConnectionIndicatorStyles:()=>yi,foundationConnectionIndicatorTemplate:()=>wi,foundationDataGrid:()=>ki,foundationDataGridCell:()=>Ni,foundationDataGridCellShadowOptions:()=>Ri,foundationDataGridCellStyles:()=>Ii,foundationDataGridCellTemplate:()=>s.dataGridCellTemplate,foundationDataGridRow:()=>Hi,foundationDataGridRowShadowOptions:()=>Mi,foundationDataGridRowStyles:()=>Li,foundationDataGridRowTemplate:()=>s.dataGridRowTemplate,foundationDataGridShadowOptions:()=>Oi,foundationDataGridStyles:()=>$i,foundationDataGridTemplate:()=>Si,foundationDatePicker:()=>lo,foundationDatePickerShadowOptions:()=>ao,foundationDatePickerStyles:()=>Ji,foundationDatePickerTemplate:()=>to,foundationDesignSystemProvider:()=>sn,foundationDialog:()=>fn,foundationDialogShadowOptions:()=>pn,foundationDialogStyles:()=>ln,foundationDialogTemplate:()=>hn,foundationDisclosure:()=>$n,foundationDisclosureShadowOptions:()=>Cn,foundationDisclosureStyles:()=>bn,foundationDisclosureTemplate:()=>yn,foundationDivider:()=>In,foundationDividerShadowOptions:()=>Tn,foundationDividerStyles:()=>Sn,foundationDividerTemplate:()=>En,foundationDropdownMenu:()=>Mn,foundationDropdownMenuStyles:()=>Rn,foundationDropdownMenuTemplate:()=>Ln,foundationEnvironmentIndicator:()=>Xn,foundationEnvironmentIndicatorTemplate:()=>zn,foundationErrorBanner:()=>ta,foundationErrorBannerShadowOptions:()=>Zn,foundationErrorBannerTemplate:()=>Jn,foundationErrorBoundary:()=>ga,foundationErrorBoundaryShadowOptions:()=>pa,foundationErrorBoundaryTemplate:()=>ha,foundationErrorDialog:()=>Ca,foundationErrorDialogShadowOptions:()=>ya,foundationErrorDialogStyles:()=>va,foundationFileReader:()=>ka,foundationFileReaderStyles:()=>Sa,foundationFileUpload:()=>ja,foundationFileUploadShadowOptions:()=>Ba,foundationFileUploadStyles:()=>Ra,foundationFileUploadTemplate:()=>Na,foundationFilter:()=>ts,foundationFilterBar:()=>cs,foundationFilterBarStyles:()=>os,foundationFilterBarTemplate:()=>rs,foundationFilterStyles:()=>Va,foundationFilterTemplate:()=>Ja,foundationFlexLayout:()=>bs,foundationFlexLayoutShadowOptions:()=>gs,foundationFlexLayoutStyles:()=>ps,foundationFlexLayoutTemplate:()=>ms,foundationFlipper:()=>Ss,foundationFlipperShadowOptions:()=>xs,foundationFlipperStyles:()=>ys,foundationFlipperTemplate:()=>ws,foundationFlyout:()=>As,foundationFlyoutShadowOptions:()=>Ds,foundationFlyoutStyles:()=>Os,foundationFlyoutTemplate:()=>ks,foundationGridLayout:()=>Us,foundationGridLayoutItem:()=>Ys,foundationGridLayoutItemShadowOptions:()=>Gs,foundationGridLayoutItemTemplate:()=>Bs,foundationGridLayoutShadowOptions:()=>_s,foundationGridLayoutStyles:()=>Fs,foundationGridLayoutTemplate:()=>Ms,foundationHorizontalScroll:()=>Js,foundationHorizontalScrollShadowOptions:()=>Xs,foundationHorizontalScrollStyles:()=>Ws,foundationHorizontalScrollTemplate:()=>qs,foundationIcon:()=>mr,foundationIconShadowOptions:()=>lr,foundationIconStyles:()=>ar,foundationIconTemplate:()=>rr,foundationListbox:()=>wr,foundationListboxOption:()=>Or,foundationListboxOptionShadowOptions:()=>Sr,foundationListboxOptionStyles:()=>Cr,foundationListboxOptionTemplate:()=>xr,foundationListboxShadowOptions:()=>br,foundationListboxStyles:()=>gr,foundationListboxTemplate:()=>vr,foundationMenu:()=>Ar,foundationMenuItem:()=>Hr,foundationMenuItemShadowOptions:()=>Mr,foundationMenuItemStyles:()=>Nr,foundationMenuItemTemplate:()=>Lr,foundationMenuShadowOptions:()=>Dr,foundationMenuStyles:()=>Tr,foundationMenuTemplate:()=>kr,foundationModal:()=>jr,foundationModalShadowOptions:()=>Ur,foundationModalStyles:()=>zr,foundationModalTemplate:()=>Pr,foundationMultiselect:()=>Zr,foundationMultiselectShadowOptions:()=>Xr,foundationNotificationListener:()=>_g,foundationNotificationListenerShadowOptions:()=>Fg,foundationNotificationListenerTemplate:()=>Ng,foundationNumberField:()=>gl,foundationNumberFieldShadowOptions:()=>pl,foundationNumberFieldStyles:()=>tl,foundationNumberFieldTemplate:()=>il,foundationOptgroup:()=>yl,foundationOptgroupStyles:()=>vl,foundationOptgroupTemplate:()=>fl,foundationPopper:()=>rd,foundationProgress:()=>Vl,foundationProgressRing:()=>pd,foundationProgressRingShadowOptions:()=>ud,foundationProgressRingStyles:()=>ld,foundationProgressRingTemplate:()=>dd,foundationProgressShadowOptions:()=>Gl,foundationProgressStyles:()=>Pl,foundationProgressTemplate:()=>Ul,foundationRadio:()=>yd,foundationRadioGroup:()=>Ed,foundationRadioGroupShadowOptions:()=>$d,foundationRadioGroupStyles:()=>wd,foundationRadioGroupTemplate:()=>Cd,foundationRadioShadowOptions:()=>fd,foundationRadioStyles:()=>md,foundationRadioTemplate:()=>gd,foundationScheduler:()=>Ad,foundationSchedulerCronBuilder:()=>$c,foundationSchedulerCronBuilderShadowOptions:()=>Cc,foundationSchedulerCronBuilderTemplate:()=>yc,foundationSchedulerShadowOptions:()=>Dd,foundationSchedulerTemplate:()=>kd,foundationSchedulerTimezone:()=>Dc,foundationSchedulerTimezoneShadowOptions:()=>kc,foundationSchedulerTimezoneTemplate:()=>Oc,foundationSearchBar:()=>Gc,foundationSearchBarCombobox:()=>Kc,foundationSearchBarComboboxShadowOptions:()=>Wc,foundationSearchBarComboboxStyles:()=>jc,foundationSearchBarComboboxTemplate:()=>Vc,foundationSearchBarShadowOptions:()=>Uc,foundationSearchBarStyles:()=>Rc,foundationSearchBarTemplate:()=>Fc,foundationSectionNavigator:()=>su,foundationSectionNavigatorShadowOptions:()=>nu,foundationSectionNavigatorStyles:()=>Xc,foundationSectionNavigatorTemplate:()=>Qc,foundationSegmentedControl:()=>hu,foundationSegmentedControlShadowOptions:()=>cu,foundationSegmentedControlStyles:()=>ru,foundationSegmentedControlTemplate:()=>lu,foundationSegmentedItem:()=>bu,foundationSegmentedItemShadowOptions:()=>vu,foundationSegmentedItemStyles:()=>pu,foundationSegmentedItemTemplate:()=>mu,foundationSelect:()=>Su,foundationSelectShadowOptions:()=>xu,foundationSelectStyles:()=>yu,foundationSelectTemplate:()=>wu,foundationSkeleton:()=>Du,foundationSkeletonShadowOptions:()=>ku,foundationSkeletonStyles:()=>Eu,foundationSkeletonTemplate:()=>Ou,foundationSlider:()=>Hu,foundationSliderLabel:()=>ju,foundationSliderLabelShadowOptions:()=>Bu,foundationSliderLabelStyles:()=>zu,foundationSliderLabelTemplate:()=>Pu,foundationSliderShadowOptions:()=>Mu,foundationSliderStyles:()=>Ru,foundationSliderTemplate:()=>Lu,foundationSnackbar:()=>eh,foundationSnackbarShadowOptions:()=>Ju,foundationSnackbarStyles:()=>Ku,foundationSnackbarTemplate:()=>Qu,foundationStackingIcons:()=>nh,foundationStackingIconsStyles:()=>th,foundationStackingIconsTemplate:()=>ih,foundationStatusPill:()=>dh,foundationStatusPillTemplate:()=>sh,foundationStepper:()=>xv,foundationStepperShadowOptions:()=>wv,foundationStepperStyles:()=>bv,foundationStepperTab:()=>vh,foundationStepperTabPanel:()=>Ch,foundationStepperTabPanelShadowOptions:()=>yh,foundationStepperTabPanelTemplate:()=>fh,foundationStepperTabShadowOptions:()=>mh,foundationStepperTabStyles:()=>ch,foundationStepperTabTemplate:()=>hh,foundationStepperTemplate:()=>fv,foundationSwitch:()=>Th,foundationSwitchShadowOptions:()=>Eh,foundationSwitchStyles:()=>xh,foundationSwitchTemplate:()=>$h,foundationSystemHealthOverlay:()=>td,foundationSystemHealthOverlayShadowOptions:()=>Zl,foundationSystemHealthOverlayStyles:()=>Jl,foundationSystemHealthOverlayTemplate:()=>Ql,foundationTab:()=>Nh,foundationTabPanel:()=>zh,foundationTabPanelShadowOptions:()=>_h,foundationTabPanelStyles:()=>Lh,foundationTabPanelTemplate:()=>Fh,foundationTabShadowOptions:()=>Rh,foundationTabStyles:()=>kh,foundationTabTemplate:()=>Ih,foundationTabs:()=>Vh,foundationTabsShadowOptions:()=>Gh,foundationTabsStyles:()=>Ph,foundationTabsTemplate:()=>Uh,foundationTextArea:()=>Qh,foundationTextAreaShadowOptions:()=>Kh,foundationTextAreaStyles:()=>Yh,foundationTextAreaTemplate:()=>Wh,foundationTextField:()=>ap,foundationTextFieldShadowOptions:()=>op,foundationTextFieldStyles:()=>ep,foundationTextFieldTemplate:()=>tp,foundationToast:()=>hp,foundationToastShadowOptions:()=>dp,foundationToastStyles:()=>sp,foundationToastTemplate:()=>lp,foundationToolbar:()=>bp,foundationToolbarShadowOptions:()=>vp,foundationToolbarStyles:()=>pp,foundationToolbarTemplate:()=>mp,foundationTooltip:()=>Sp,foundationTooltipShadowOptions:()=>xp,foundationTooltipStyles:()=>yp,foundationTooltipTemplate:()=>wp,foundationTreeItem:()=>Dp,foundationTreeItemShadowOptions:()=>kp,foundationTreeItemStyles:()=>Ep,foundationTreeItemTemplate:()=>Op,foundationTreeView:()=>Mp,foundationTreeViewShadowOptions:()=>Lp,foundationTreeViewStyles:()=>Rp,foundationTreeViewTemplate:()=>Ap,foundationUrlInput:()=>Gp,foundationUrlInputShadowOptions:()=>Pp,foundationUrlInputStyles:()=>_p,foundationUrlInputTemplate:()=>zp,fromBinaryExpression:()=>$g,fromMethodExpression:()=>Sg,fuiAccentPalette:()=>$o,fuiAccentSwatch:()=>xo,fuiCardFillColor:()=>Oo,fuiCardForegroundColor:()=>Io,fuiDefaultCardFillColor:()=>vo,fuiDefaultCardPalette:()=>fo,fuiFillColor:()=>Eo,fuiNeutralPalette:()=>wo,fuiNeutralSwatch:()=>yo,getBannerTemplate:()=>Je,getCriteriaBuilder:()=>zc,getDefaultConfig:()=>Uo,getDesignSystemPrefix:()=>T,getDialogTemplate:()=>un,getDropdownMenuTemplate:()=>Nn,getErrorDialogTemplate:()=>fa,getExports:()=>Bo,getFontawesomeIconsCss:()=>nr,getNavItems:()=>cv,getPrefixedCategorizedMultiselect:()=>Mt,getPrefixedCronBuilder:()=>bc,getPrefixedDatePicker:()=>eo,getPrefixedErrorBanner:()=>Qn,getPrefixedFileReader:()=>Ea,getPrefixedFileUpload:()=>Aa,getPrefixedFilterTemplate:()=>Qa,getPrefixedFlyout:()=>Ts,getPrefixedIcon:()=>sr,getPrefixedMultiselect:()=>qr,getPrefixedScheduler:()=>Td,getPrefixedSchedulerTimezone:()=>Ec,getPrefixedSearchBar:()=>Lc,getPrefixedSnackbar:()=>Xu,getPrefixedStepper:()=>vv,getPrefixedStepperTab:()=>uh,getPrefixedToast:()=>rp,getPrefixedUrlInput:()=>Hp,getTypeRampValue:()=>Go,groupsToCriteria:()=>q,inputControls:()=>Qd,isAbsoluteUrl:()=>ev,jsonConverter:()=>od,mapType:()=>ns,maxheight:()=>Vr,media:()=>He,menuTemplate:()=>k,mixinFoundationFontFamily:()=>en,multiselectStyles:()=>Yr,multiselectTemplate:()=>Kr,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>ko,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralPaletteValue:()=>qo,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,optionsMaxheight:()=>Lt,paletteFromHex:()=>Ho,pathJoin:()=>nv,plusIcon:()=>Nc,provideDesignSystem:()=>Wl,provideTokens:()=>Fo,rebuildOperator:()=>xg,registerFoundationDesignSystem:()=>$v,removeChildRouteParameter:()=>sv,removeLastPathSegment:()=>av,routerLogger:()=>Yg,routerProperty:()=>Xg,ruleExpressionToGroup:()=>Eg,ruleToRuleExpression:()=>wg,ruleToRuleMethodExpression:()=>yg,schedulerCronBuilderStyles:()=>Jd,schedulerStyles:()=>Od,schedulerTimezoneStyles:()=>Sc,selectCustomToken:()=>Vo,singleOptionTemplate:()=>I,statusPillStyles:()=>ah,strokeWidth:()=>r.strokeWidth,swatchConverter:()=>_o,tagFor:()=>zg,transformOperatorNameToServerName:()=>bg,transformServerNameToOperatorName:()=>Cg,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight,uploadFiles:()=>Fa,validateClauses:()=>re,validateGroups:()=>le,white:()=>uo});var o={};i.r(o),i.d(o,{accentFillActive:()=>r.accentFillActive,accentFillActiveDelta:()=>r.accentFillActiveDelta,accentFillFocus:()=>r.accentFillFocus,accentFillFocusDelta:()=>r.accentFillFocusDelta,accentFillHover:()=>r.accentFillHover,accentFillHoverDelta:()=>r.accentFillHoverDelta,accentFillRest:()=>r.accentFillRest,accentFillRestDelta:()=>r.accentFillRestDelta,accentForegroundActive:()=>r.accentForegroundActive,accentForegroundActiveDelta:()=>r.accentForegroundActiveDelta,accentForegroundFocus:()=>r.accentForegroundFocus,accentForegroundFocusDelta:()=>r.accentForegroundFocusDelta,accentForegroundHover:()=>r.accentForegroundHover,accentForegroundHoverDelta:()=>r.accentForegroundHoverDelta,accentForegroundRest:()=>r.accentForegroundRest,accentForegroundRestDelta:()=>r.accentForegroundRestDelta,accentPalette:()=>r.accentPalette,baseHeightMultiplier:()=>r.baseHeightMultiplier,baseLayerLuminance:()=>r.baseLayerLuminance,bodyFont:()=>r.bodyFont,controlCornerRadius:()=>r.controlCornerRadius,defaultNeutralForegroundContrast:()=>To,density:()=>r.density,designUnit:()=>r.designUnit,direction:()=>r.direction,disabledOpacity:()=>r.disabledOpacity,fillColor:()=>r.fillColor,focusStrokeInner:()=>r.focusStrokeInner,focusStrokeOuter:()=>r.focusStrokeOuter,focusStrokeWidth:()=>r.focusStrokeWidth,foregroundOnAccentActive:()=>r.foregroundOnAccentActive,foregroundOnAccentActiveLarge:()=>r.foregroundOnAccentActiveLarge,foregroundOnAccentFocus:()=>r.foregroundOnAccentFocus,foregroundOnAccentFocusLarge:()=>r.foregroundOnAccentFocusLarge,foregroundOnAccentHover:()=>r.foregroundOnAccentHover,foregroundOnAccentHoverLarge:()=>r.foregroundOnAccentHoverLarge,foregroundOnAccentRest:()=>r.foregroundOnAccentRest,foregroundOnAccentRestLarge:()=>r.foregroundOnAccentRestLarge,fuiCardFillColor:()=>Oo,fuiCardForegroundColor:()=>Io,fuiFillColor:()=>Eo,neutralFillActive:()=>r.neutralFillActive,neutralFillActiveDelta:()=>r.neutralFillActiveDelta,neutralFillFocus:()=>r.neutralFillFocus,neutralFillFocusDelta:()=>r.neutralFillFocusDelta,neutralFillHover:()=>r.neutralFillHover,neutralFillHoverDelta:()=>r.neutralFillHoverDelta,neutralFillInputActive:()=>r.neutralFillInputActive,neutralFillInputActiveDelta:()=>r.neutralFillInputActiveDelta,neutralFillInputFocus:()=>r.neutralFillInputFocus,neutralFillInputFocusDelta:()=>r.neutralFillInputFocusDelta,neutralFillInputHover:()=>r.neutralFillInputHover,neutralFillInputHoverDelta:()=>r.neutralFillInputHoverDelta,neutralFillInputRest:()=>r.neutralFillInputRest,neutralFillInputRestDelta:()=>r.neutralFillInputRestDelta,neutralFillLayerRest:()=>r.neutralFillLayerRest,neutralFillLayerRestDelta:()=>r.neutralFillLayerRestDelta,neutralFillRest:()=>r.neutralFillRest,neutralFillRestDelta:()=>r.neutralFillRestDelta,neutralFillStealthActive:()=>r.neutralFillStealthActive,neutralFillStealthActiveDelta:()=>r.neutralFillStealthActiveDelta,neutralFillStealthFocus:()=>r.neutralFillStealthFocus,neutralFillStealthFocusDelta:()=>r.neutralFillStealthFocusDelta,neutralFillStealthHover:()=>r.neutralFillStealthHover,neutralFillStealthHoverDelta:()=>r.neutralFillStealthHoverDelta,neutralFillStealthRest:()=>r.neutralFillStealthRest,neutralFillStealthRestDelta:()=>r.neutralFillStealthRestDelta,neutralFillStrongActive:()=>r.neutralFillStrongActive,neutralFillStrongActiveDelta:()=>r.neutralFillStrongActiveDelta,neutralFillStrongFocus:()=>r.neutralFillStrongFocus,neutralFillStrongFocusDelta:()=>r.neutralFillStrongFocusDelta,neutralFillStrongHover:()=>r.neutralFillStrongHover,neutralFillStrongHoverDelta:()=>r.neutralFillStrongHoverDelta,neutralFillStrongRest:()=>r.neutralFillStrongRest,neutralFillStrongRestDelta:()=>r.neutralFillStrongRestDelta,neutralForeground:()=>ko,neutralForegroundHint:()=>r.neutralForegroundHint,neutralForegroundRest:()=>r.neutralForegroundRest,neutralLayer1:()=>r.neutralLayer1,neutralLayer2:()=>r.neutralLayer2,neutralLayer3:()=>r.neutralLayer3,neutralLayer4:()=>r.neutralLayer4,neutralLayerCardContainer:()=>r.neutralLayerCardContainer,neutralLayerFloating:()=>r.neutralLayerFloating,neutralPalette:()=>r.neutralPalette,neutralStrokeActive:()=>r.neutralStrokeActive,neutralStrokeActiveDelta:()=>r.neutralStrokeActiveDelta,neutralStrokeDividerRest:()=>r.neutralStrokeDividerRest,neutralStrokeDividerRestDelta:()=>r.neutralStrokeDividerRestDelta,neutralStrokeFocus:()=>r.neutralStrokeFocus,neutralStrokeFocusDelta:()=>r.neutralStrokeFocusDelta,neutralStrokeHover:()=>r.neutralStrokeHover,neutralStrokeHoverDelta:()=>r.neutralStrokeHoverDelta,neutralStrokeRest:()=>r.neutralStrokeRest,neutralStrokeRestDelta:()=>r.neutralStrokeRestDelta,strokeWidth:()=>r.strokeWidth,typeRampBaseFontSize:()=>r.typeRampBaseFontSize,typeRampBaseLineHeight:()=>r.typeRampBaseLineHeight,typeRampMinus1FontSize:()=>r.typeRampMinus1FontSize,typeRampMinus1LineHeight:()=>r.typeRampMinus1LineHeight,typeRampMinus2FontSize:()=>r.typeRampMinus2FontSize,typeRampMinus2LineHeight:()=>r.typeRampMinus2LineHeight,typeRampPlus1FontSize:()=>r.typeRampPlus1FontSize,typeRampPlus1LineHeight:()=>r.typeRampPlus1LineHeight,typeRampPlus2FontSize:()=>r.typeRampPlus2FontSize,typeRampPlus2LineHeight:()=>r.typeRampPlus2LineHeight,typeRampPlus3FontSize:()=>r.typeRampPlus3FontSize,typeRampPlus3LineHeight:()=>r.typeRampPlus3LineHeight,typeRampPlus4FontSize:()=>r.typeRampPlus4FontSize,typeRampPlus4LineHeight:()=>r.typeRampPlus4LineHeight,typeRampPlus5FontSize:()=>r.typeRampPlus5FontSize,typeRampPlus5LineHeight:()=>r.typeRampPlus5LineHeight,typeRampPlus6FontSize:()=>r.typeRampPlus6FontSize,typeRampPlus6LineHeight:()=>r.typeRampPlus6LineHeight});var n={};i.r(n),i.d(n,{accentPaletteValue:()=>Wo,baseLayerLuminanceValue:()=>Ko,controlCornerRadiusValue:()=>Qo,designUnitValue:()=>Jo,directionValue:()=>Xo,neutralPaletteValue:()=>qo});var a={};i.r(a),i.d(a,{BASE_LOGICAL_COMBINATORS:()=>Wp,BASE_OPERATORS:()=>Zp,LOGICAL_COMBINATORS:()=>qp,NULL_COMBINATOR:()=>Kp});var s=i(38370),r=i(54634),l=i(33681);const d=(e,t)=>l.css`
2
2
  ${(0,r.accordionStyles)(e,t)}
3
3
  `,c=(e,t)=>(0,s.accordionTemplate)(e,t);class u extends s.Accordion{}const h={delegatesFocus:!0,mode:"open"},p={},m=u.compose(Object.assign({baseName:"accordion",template:c,styles:d,shadowOptions:h},p)),g=(e,t)=>l.css`
4
4
  ${(0,r.accordionItemStyles)(e,t)}
@@ -193,9 +193,9 @@
193
193
  .mode-control {
194
194
  flex-shrink: 0;
195
195
  }
196
- `;var _=i(77679);let H=!1;try{"undefined"!=typeof GENX_ENABLE_AI&&(H="true"===GENX_ENABLE_AI)}catch(Nl){}const z=()=>H||(0,_.m)("ai");var P=i(40729);const U=l.html`
196
+ `;var _=i(77679);const H=()=>(0,_.m)("ai");var z=i(40729);const P=l.html`
197
197
  ${e=>{return t=T(e),l.html`
198
- ${(0,l.when)(()=>z(),l.html`
198
+ ${(0,l.when)(()=>H(),l.html`
199
199
  <div class="ai-criteria-search">
200
200
  <div class="ai-criteria-search-row">
201
201
  <${t}-text-area
@@ -203,7 +203,7 @@
203
203
  class="criteria-input"
204
204
  placeholder="${e=>e.placeholder}"
205
205
  ?disabled=${e=>e.disabled||e.isInterpreting}
206
- :value=${(0,P.O)(e=>e.inputValue,"string","input")}
206
+ :value=${(0,z.O)(e=>e.inputValue,"string","input")}
207
207
  @blur=${e=>e.handleBlur()}
208
208
  rows="1"
209
209
  ></${t}-text-area>
@@ -223,7 +223,7 @@
223
223
  ></${t}-icon>
224
224
  </${t}-button>
225
225
  `)}
226
- <${t}-segmented-control class="mode-control" :value=${(0,P.O)(e=>e.mode)}>
226
+ <${t}-segmented-control class="mode-control" :value=${(0,z.O)(e=>e.mode)}>
227
227
  <${t}-segmented-item value="append">Append</${t}-segmented-item>
228
228
  <${t}-segmented-item value="replace">Replace</${t}-segmented-item>
229
229
  </${t}-segmented-control>
@@ -231,7 +231,7 @@
231
231
  </div>
232
232
  `)}
233
233
  `;var t}}
234
- `;var B=i(95553),G=i(58749),j=i(14609),V=i(86636);const Y={contains:B.n.containsIgnoreCase,equals:B.n.EQ,startsWith:B.n.startsWith,endsWith:B.n.endsWith,greaterThan:B.n.GT,lessThan:B.n.LT,greaterThanOrEqual:B.n.GE,lessThanOrEqual:B.n.LE,notEqual:B.n.NE,dateIsToday:B.n.dateIsToday,dateIsAfter:B.n.dateIsGreaterEqual,dateIsGreaterEqual:B.n.dateIsGreaterEqual,dateIsBefore:B.n.dateIsLessEqual,dateIsLessEqual:B.n.dateIsLessEqual,dateIsEqual:B.n.dateIsEqual,dateTimeIsAfter:B.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:B.n.dateTimeIsGreaterEqual,dateTimeIsBefore:B.n.dateTimeIsLessEqual,dateTimeIsLessEqual:B.n.dateTimeIsLessEqual};function W(e){var t,i;const o=null!==(t=Y[e.operator])&&void 0!==t?t:B.n.containsIgnoreCase;return(new G.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function q(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function K(e){var t;const i=new j.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(W),a="or"===n.logic?V.r.Or():V.r.And(),s=q(e,a),r=e.length>1?{join:a}:{};n.negated?i.And([V.r.Not(),s]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const X=["contains","equals","startsWith","endsWith","notEqual"],Q=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],J=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],Z=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],ee=new Set(["DATE","LOCALDATE"]),te=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),ie=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function oe(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function ne(e){const t=oe(e);return ee.has(t)?J:te.has(t)?Z:ie.has(t)?Q:X}function ae(e){return ie.has(oe(e))}function se(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function re(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function le(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:a,value:s}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";ne(l).includes(a)?!J.includes(a)&&!Z.includes(a)||"dateIsToday"===a||se(s)?ae(l)&&Q.includes(a)&&!re(s)?o.push({field:e,operator:a,value:s,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:a,value:s,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:a,value:s,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:a,value:s,message:`Operator '${a}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function de(e,t){var i;const o=[],n=[];for(const a of e){if(!(null==a?void 0:a.clauses)||!Array.isArray(a.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:s}=le(a.clauses,t);n.push(...s),e.length>0&&o.push({logic:null!==(i=a.logic)&&void 0!==i?i:"and",negated:a.negated,clauses:e})}return{valid:o,invalid:n}}var ce=i(60416);var ue=i(31274);var he=i(52945);const pe=(e,t,i)=>{var o,n,a,s,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,ce.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(a=null!=i?i:(e=>(0,he.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==a?a:(0,ce.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let I;k.setAttribute("slot","date"),k.textContent=(null===(s=null==e?void 0:e.createdAt)||void 0===s?void 0:s.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(I=document.createElement("div"),I.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),I.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),I&&E.appendChild(I),S.prepend(E)},me={alert:e=>{(0,ce.u_)(e),alert((0,ce.uP)(e))},toast:pe,dialog:ue.u,snackbar:(e,t)=>{(0,ce.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,ce.jE)("snack-container",t);n&&(n.style.position="fixed",n.style.bottom="0",n.style.left="0"),n.appendChild(o),o.notification=e},banner:(e,t,i)=>{var o;(0,ce.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-banner`),s=(0,ce.cL)(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.notification=e}},ge=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{me[o]&&me[o](e,t,i)})};function ve(e,t,i){(null==t?void 0:t.trim())&&ge({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class fe extends s.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.mode="replace",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null,this.baseInputForAppend=""}get speechAvailable(){return N()}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(o&&!this.isInterpreting)if(null===(t=this.aiProvider)||void 0===t?void 0:t.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield this.aiProvider.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return ve("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:a,invalid:s}=de(t.groups,this.fieldMetadata);if(s.length>0&&(ve("Criteria validation error",0===(n=s).length?"":1===n.length?n[0].message:n.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",s)),a.length>0){const e=K(a);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}catch(e){ve("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var n}else ve("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.clear()}clear(){this.inputValue="",this.lastValidCriteria=null,this.$emit("criteria-changed",null)}toggleSpeechInput(){var e,t;if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1,void(this.baseInputForAppend="");this.baseInputForAppend="append"===this.mode&&null!==(t=null===(e=this.inputValue)||void 0===e?void 0:e.trim())&&void 0!==t?t:"",this.stopRecording=function(e,t){if(!N())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{"append"===this.mode?this.inputValue=this.baseInputForAppend?`${this.baseInputForAppend} ${e}`.trim():e:this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1,this.baseInputForAppend=""),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null,this.baseInputForAppend=""}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([F],fe.prototype,"aiProvider",void 0),(0,C.Cg)([l.attr],fe.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],fe.prototype,"disabled",void 0),(0,C.Cg)([l.attr],fe.prototype,"mode",void 0),(0,C.Cg)([l.observable],fe.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],fe.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],fe.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],fe.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],fe.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],fe.prototype,"speechAvailable",null);const be=void 0,ye={},we=fe.compose(Object.assign({baseName:"ai-criteria-search",template:U,styles:M,shadowOptions:be},ye)),Ce=(e,t)=>l.css`
234
+ `;var U=i(95553),B=i(58749),G=i(14609),j=i(86636);const V={contains:U.n.containsIgnoreCase,equals:U.n.EQ,startsWith:U.n.startsWith,endsWith:U.n.endsWith,greaterThan:U.n.GT,lessThan:U.n.LT,greaterThanOrEqual:U.n.GE,lessThanOrEqual:U.n.LE,notEqual:U.n.NE,dateIsToday:U.n.dateIsToday,dateIsAfter:U.n.dateIsGreaterEqual,dateIsGreaterEqual:U.n.dateIsGreaterEqual,dateIsBefore:U.n.dateIsLessEqual,dateIsLessEqual:U.n.dateIsLessEqual,dateIsEqual:U.n.dateIsEqual,dateTimeIsAfter:U.n.dateTimeIsGreaterEqual,dateTimeIsGreaterEqual:U.n.dateTimeIsGreaterEqual,dateTimeIsBefore:U.n.dateTimeIsLessEqual,dateTimeIsLessEqual:U.n.dateTimeIsLessEqual};function Y(e){var t,i;const o=null!==(t=V[e.operator])&&void 0!==t?t:U.n.containsIgnoreCase;return(new B.K).withField(e.field).withValue(null!==(i=e.value)&&void 0!==i?i:null).withSerialiser(o).withGroup("default").build()}function W(e,t){return 1===e.length?e[0]:e.reduce((e,i,o)=>0===o?[i]:[...e,t,i],[])}function q(e){var t;const i=new G.b;let o=!1;for(const n of e){if(!(null===(t=n.clauses)||void 0===t?void 0:t.length))continue;const e=n.clauses.map(Y),a="or"===n.logic?j.r.Or():j.r.And(),s=W(e,a),r=e.length>1?{join:a}:{};n.negated?i.And([j.r.Not(),s]):i.And(1===e.length?e[0]:e,r),o=!0}return o?i.build():""}const K=["contains","equals","startsWith","endsWith","notEqual"],X=["equals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","notEqual"],Q=["dateIsToday","dateIsAfter","dateIsBefore","dateIsEqual","dateIsGreaterEqual","dateIsLessEqual"],J=["dateTimeIsAfter","dateTimeIsBefore","dateTimeIsGreaterEqual","dateTimeIsLessEqual"],Z=new Set(["DATE","LOCALDATE"]),ee=new Set(["DATETIME","NANO_TIMESTAMP","LOCALDATETIME","TIMESTAMP"]),te=new Set(["INT","INTEGER","LONG","SHORT","DOUBLE","BIGDECIMAL","DECIMAL"]);function ie(e){return(e||"").toUpperCase().trim().split("(")[0].trim()}function oe(e){const t=ie(e);return Z.has(t)?Q:ee.has(t)?J:te.has(t)?X:K}function ne(e){return te.has(ie(e))}function ae(e){return null!=e&&("number"==typeof e?!Number.isNaN(e)&&e>0:"string"==typeof e&&(/^\d{8}$/.test(e)||/^\d{4}-\d{2}-\d{2}$/.test(e)||/^\d{8}-\d{2}:\d{2}(:\d{2})?$/.test(e)))}function se(e){return null!=e&&("number"==typeof e?!Number.isNaN(e):"string"==typeof e&&!Number.isNaN(Number(e)))}function re(e,t){const i=[],o=[],n=new Map;if(Array.isArray(t)&&t.length>0){"string"==typeof t[0]?t.forEach(e=>n.set(e,void 0)):t.forEach(e=>n.set(e.NAME,e))}for(const t of e){const{field:e,operator:a,value:s}=t;if(!e||"string"!=typeof e){o.push({field:String(e),message:"Field name is required"});continue}const r=n.get(e),l=r&&"TYPE"in r?r.TYPE:"STRING";oe(l).includes(a)?!Q.includes(a)&&!J.includes(a)||"dateIsToday"===a||ae(s)?ne(l)&&X.includes(a)&&!se(s)?o.push({field:e,operator:a,value:s,message:"Invalid numeric value"}):n.size>0&&!n.has(e)?o.push({field:e,operator:a,value:s,message:`Unknown field '${e}'`}):i.push(t):o.push({field:e,operator:a,value:s,message:"Invalid date/datetime value; use yyyyMMdd, yyyy-MM-dd, or epoch"}):o.push({field:e,operator:a,value:s,message:`Operator '${a}' is not allowed for field type ${l}`})}return{valid:i,invalid:o}}function le(e,t){var i;const o=[],n=[];for(const a of e){if(!(null==a?void 0:a.clauses)||!Array.isArray(a.clauses)){n.push({field:"",message:"Group must have a clauses array"});continue}const{valid:e,invalid:s}=re(a.clauses,t);n.push(...s),e.length>0&&o.push({logic:null!==(i=a.logic)&&void 0!==i?i:"and",negated:a.negated,clauses:e})}return{valid:o,invalid:n}}var de=i(60416);var ce=i(31274);var ue=i(52945);const he=(e,t,i)=>{var o,n,a,s,r,l,d,c,u,h,p,m,g,v,f,b,y,w,C;(0,de.u_)(e);const x=t.split("-")[0],$=(null===(n=null===(o=null==e?void 0:e.config)||void 0===o?void 0:o.toast)||void 0===n?void 0:n.position)||"top-right",S=null!==(a=null!=i?i:(e=>(0,ue.fI)(document.body).find(t=>"notify-container"===t.tagName.toLowerCase()&&t.position===e))($))&&void 0!==a?a:(0,de.jE)("notify-container",t);S&&"notify-container"!==S.tagName.toLowerCase()&&function(e,t){var i,o;switch(t.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.toast)||void 0===o?void 0:o.position){case"top-left":t.style.top="var(--nav-height, 0)",t.style.left="0";break;case"bottom-left":t.style.bottom="0",t.style.left="0";break;case"bottom-right":t.style.bottom="0",t.style.right="0";break;default:t.style.top="var(--nav-height, 0)",t.style.right="0"}}(e,S);const E=document.createElement(`${x}-toast`),O=document.createElement("div");O.setAttribute("slot","top"),O.textContent=e.title;const T=document.createElement("div");T.setAttribute("slot","content"),T.textContent=(null==e?void 0:e.body)||"";const k=document.createElement("div");let I;k.setAttribute("slot","date"),k.textContent=(null===(s=null==e?void 0:e.createdAt)||void 0===s?void 0:s.toLocaleTimeString())||"",(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.toast)||void 0===l?void 0:l.buttons)&&(null===(u=null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.toast)||void 0===c?void 0:c.buttons)||void 0===u?void 0:u.length)&&(I=document.createElement("div"),I.setAttribute("slot","bottom"),e.config.toast.buttons.forEach(t=>{const i=document.createElement(`${x}-button`);i.textContent=t.placeholder||"example placeholder",i.addEventListener("click",()=>{const{details:o}=e.config.toast;if(t.action)return t.action({details:o,buttonElement:i,toastElement:E})}),t.appearance&&i.setAttribute("appearance",t.appearance),I.appendChild(i)})),E.setAttribute("notify",(null===(p=null===(h=null==e?void 0:e.config)||void 0===h?void 0:h.toast)||void 0===p?void 0:p.type)||""),e.iconName&&E.setAttribute("notification-icon",e.iconName),(null===(g=null===(m=null==e?void 0:e.config)||void 0===m?void 0:m.toast)||void 0===g?void 0:g.autoClose)&&E.setAttribute("auto-close",`${null===(f=null===(v=null==e?void 0:e.config)||void 0===v?void 0:v.toast)||void 0===f?void 0:f.autoClose}`),(null===(y=null===(b=null==e?void 0:e.config)||void 0===b?void 0:b.toast)||void 0===y?void 0:y.closeTimeout)&&E.setAttribute("close-timeout",`${null===(C=null===(w=null==e?void 0:e.config)||void 0===w?void 0:w.toast)||void 0===C?void 0:C.closeTimeout}`),E.appendChild(O),E.appendChild(T),E.appendChild(k),I&&E.appendChild(I),S.prepend(E)},pe={alert:e=>{(0,de.u_)(e),alert((0,de.uP)(e))},toast:he,dialog:ce.u,snackbar:(e,t)=>{(0,de.u_)(e);const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`),n=(0,de.jE)("snack-container",t);n&&(n.style.position="fixed",n.style.bottom="0",n.style.left="0"),n.appendChild(o),o.notification=e},banner:(e,t,i)=>{var o;(0,de.u_)(e);const n=t.split("-")[0],a=document.createElement(`${n}-banner`),s=(0,de.cL)(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.notification=e}},me=(e,t,i)=>{Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{pe[o]&&pe[o](e,t,i)})};function ge(e,t,i){(null==t?void 0:t.trim())&&me({title:e,body:t,config:{toast:{autoClose:!0,closeTimeout:4e3,type:"error"}}},i)}class ve extends s.FoundationElement{constructor(){super(...arguments),this.placeholder="Describe your search criteria in natural language...",this.mode="replace",this.inputValue="",this.isInterpreting=!1,this.lastValidCriteria=null,this.fieldMetadata=[],this.isRecording=!1,this.stopRecording=null,this.speechApplyDebounceTimer=null,this.baseInputForAppend=""}get speechAvailable(){return N()}handleSubmit(){return(0,C.sH)(this,void 0,void 0,function*(){var e,t,i;const o=null===(e=this.inputValue)||void 0===e?void 0:e.trim();if(o&&!this.isInterpreting)if(null===(t=this.aiProvider)||void 0===t?void 0:t.interpretCriteria){this.isInterpreting=!0;try{const e=Array.isArray(this.fieldMetadata)?this.fieldMetadata:[],t=yield this.aiProvider.interpretCriteria(o,{fields:e});if(!(null===(i=null==t?void 0:t.groups)||void 0===i?void 0:i.some(e=>{var t;return null===(t=e.clauses)||void 0===t?void 0:t.length})))return ge("AI criteria search","AI could not interpret the criteria",T(this)),void(this.isInterpreting=!1);const{valid:a,invalid:s}=le(t.groups,this.fieldMetadata);if(s.length>0&&(ge("Criteria validation error",0===(n=s).length?"":1===n.length?n[0].message:n.map(e=>e.message).join("; "),T(this)),this.$emit("validation-errors",s)),a.length>0){const e=q(a);this.lastValidCriteria=e,this.$emit("criteria-changed",e)}}catch(e){ge("AI criteria search",e instanceof Error?e.message:"Interpretation failed",T(this))}finally{this.isInterpreting=!1}var n}else ge("AI criteria search","AI provider not configured",T(this))})}handleBlur(){var e;if(this.isRecording)return;(null===(e=this.inputValue)||void 0===e?void 0:e.trim())?this.handleSubmit():this.clear()}clear(){this.inputValue="",this.lastValidCriteria=null,this.$emit("criteria-changed",null)}toggleSpeechInput(){var e,t;if(this.isRecording&&this.stopRecording)return this.clearSpeechApplyDebounce(),this.stopRecording(),this.stopRecording=null,this.isRecording=!1,void(this.baseInputForAppend="");this.baseInputForAppend="append"===this.mode&&null!==(t=null===(e=this.inputValue)||void 0===e?void 0:e.trim())&&void 0!==t?t:"",this.stopRecording=function(e,t){if(!N())return null;const i=new(window.SpeechRecognition||window.webkitSpeechRecognition);i.continuous=!0,i.interimResults=!0,i.lang="en-US";let o="";return i.onresult=t=>{let i="",n="";for(let e=t.resultIndex;e<t.results.length;e+=1){const o=t.results[e][0].transcript;t.results[e].isFinal?n+=o:i+=o}n?(o+=n,e(o,!0)):i&&e(o+i,!1)},i.onerror=e=>{"aborted"!==e.error&&(null==t||t(e.error||"Speech recognition error"))},i.start(),()=>{try{i.stop()}catch(e){}}}((e,t)=>{"append"===this.mode?this.inputValue=this.baseInputForAppend?`${this.baseInputForAppend} ${e}`.trim():e:this.inputValue=e,t&&(null==e?void 0:e.trim())&&(this.clearSpeechApplyDebounce(),this.stopRecording&&(this.stopRecording(),this.stopRecording=null,this.isRecording=!1,this.baseInputForAppend=""),this.speechApplyDebounceTimer=setTimeout(()=>{this.speechApplyDebounceTimer=null,this.handleSubmit()},700))},()=>{this.clearSpeechApplyDebounce(),this.isRecording=!1,this.stopRecording=null,this.baseInputForAppend=""}),this.stopRecording&&(this.isRecording=!0)}clearSpeechApplyDebounce(){this.speechApplyDebounceTimer&&(clearTimeout(this.speechApplyDebounceTimer),this.speechApplyDebounceTimer=null)}}(0,C.Cg)([F],ve.prototype,"aiProvider",void 0),(0,C.Cg)([l.attr],ve.prototype,"placeholder",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ve.prototype,"disabled",void 0),(0,C.Cg)([l.attr],ve.prototype,"mode",void 0),(0,C.Cg)([l.observable],ve.prototype,"inputValue",void 0),(0,C.Cg)([l.observable],ve.prototype,"isInterpreting",void 0),(0,C.Cg)([l.observable],ve.prototype,"lastValidCriteria",void 0),(0,C.Cg)([l.observable],ve.prototype,"fieldMetadata",void 0),(0,C.Cg)([l.observable],ve.prototype,"isRecording",void 0),(0,C.Cg)([l.volatile],ve.prototype,"speechAvailable",null);const fe=void 0,be={},ye=ve.compose(Object.assign({baseName:"ai-criteria-search",template:P,styles:M,shadowOptions:fe},be)),we=(e,t)=>l.css`
235
235
  :host {
236
236
  display: flex;
237
237
  justify-content: center;
@@ -361,9 +361,9 @@
361
361
  margin-top: calc(var(--design-unit) * 3px);
362
362
  width: 100%;
363
363
  }
364
- `,xe=l.html`
364
+ `,Ce=l.html`
365
365
  ${e=>{return t=T(e),l.html`
366
- ${(0,l.when)(()=>z(),l.html`
366
+ ${(0,l.when)(()=>H(),l.html`
367
367
  <div class="ai-indicator-container" part="ai-indicator-container">
368
368
  <div
369
369
  class=${e=>(0,x.x)("ai-indicator-badge",["green","available"===e.state||"server"===e.state],["amber","downloading"===e.state||"downloadable"===e.state],["red","unavailable"===e.state||"none"===e.state],["pulsing","downloading"===e.state||e.isInstalling])}
@@ -418,19 +418,19 @@
418
418
  </div>
419
419
  `)}
420
420
  `;var t}}
421
- `;class $e extends s.FoundationElement{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}(0,C.Cg)([F],$e.prototype,"aiProvider",void 0),(0,C.Cg)([l.observable],$e.prototype,"status",void 0),(0,C.Cg)([l.observable],$e.prototype,"open",void 0),(0,C.Cg)([l.observable],$e.prototype,"state",void 0),(0,C.Cg)([l.observable],$e.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],$e.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],$e.prototype,"canInstall",null),(0,C.Cg)([l.volatile],$e.prototype,"isDownloading",null);const Se=$e.compose({baseName:"ai-indicator",template:xe,styles:Ce}),Ee=(e,t)=>l.css`
421
+ `;class xe extends s.FoundationElement{constructor(){super(...arguments),this.status=null,this.open=!1,this.state="none",this.isInstalling=!1,this.pollTimer=null,this.clickOutside=e=>this.handleClickOutside(e)}get chromeStatusLabel(){var e,t;if("chrome"!==(null===(e=this.status)||void 0===e?void 0:e.provider))return null;const i=null===(t=this.status)||void 0===t?void 0:t.chromeAvailability;return"available"===i?"Installed":"downloading"===i||this.isInstalling?"Downloading…":"downloadable"===i?"Downloadable":"unavailable"===i?"Unavailable":null}get canInstall(){var e,t,i;return!!(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)&&"chrome"===(null===(t=this.status)||void 0===t?void 0:t.provider)&&"downloadable"===(null===(i=this.status)||void 0===i?void 0:i.chromeAvailability)&&!this.isInstalling}get isDownloading(){var e;return"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),yield this.refreshStatus(),this.maybeStartPolling()})}disconnectedCallback(){this.stopPolling(),document.removeEventListener("mousedown",this.clickOutside)}openChanged(){this.open?(document.addEventListener("mousedown",this.clickOutside),this.refreshStatus()):document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}toggleDropdown(){this.open=!this.open}refreshStatus(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(!(null===(e=this.aiProvider)||void 0===e?void 0:e.getStatus))return this.status=null,void(this.state="none");try{const e=yield this.aiProvider.getStatus();this.status=e,this.state=this.deriveState(e),"available"===this.state&&(this.isInstalling=!1)}catch(e){this.status=null,this.state="none",this.isInstalling=!1}})}deriveState(e){if(!e||"none"===e.provider)return"none";if("chrome"===e.provider){const t=e.chromeAvailability;return"available"===t?"available":"downloading"===t?"downloading":"downloadable"===t?"downloadable":"unavailable"}return"server"}maybeStartPolling(){var e;"downloading"===(null===(e=this.status)||void 0===e?void 0:e.chromeAvailability)||this.isInstalling?this.startPolling():this.stopPolling()}startPolling(){this.pollTimer||(this.pollTimer=setInterval(()=>{this.refreshStatus().then(()=>{this.maybeStartPolling()})},2500))}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}onInstall(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.canInstall&&(null===(e=this.aiProvider)||void 0===e?void 0:e.triggerDownload)){this.isInstalling=!0;try{yield this.aiProvider.triggerDownload(),this.startPolling()}catch(e){this.isInstalling=!1}finally{yield this.refreshStatus()}}})}}(0,C.Cg)([F],xe.prototype,"aiProvider",void 0),(0,C.Cg)([l.observable],xe.prototype,"status",void 0),(0,C.Cg)([l.observable],xe.prototype,"open",void 0),(0,C.Cg)([l.observable],xe.prototype,"state",void 0),(0,C.Cg)([l.observable],xe.prototype,"isInstalling",void 0),(0,C.Cg)([l.volatile],xe.prototype,"chromeStatusLabel",null),(0,C.Cg)([l.volatile],xe.prototype,"canInstall",null),(0,C.Cg)([l.volatile],xe.prototype,"isDownloading",null);const $e=xe.compose({baseName:"ai-indicator",template:Ce,styles:we}),Se=(e,t)=>l.css`
422
422
  ${(0,r.anchorStyles)(e,t)}
423
- `,Oe=(e,t)=>(0,s.anchorTemplate)(e,t);class Te extends r.Anchor{}const ke={delegatesFocus:!0,mode:"open"},Ie={},De=Te.compose(Object.assign({baseName:"anchor",template:Oe,styles:Ee,shadowOptions:ke},Ie)),Re=(e,t)=>(0,s.anchoredRegionTemplate)(e,t),Ae=(e,t)=>l.css`
423
+ `,Ee=(e,t)=>(0,s.anchorTemplate)(e,t);class Oe extends r.Anchor{}const Te={delegatesFocus:!0,mode:"open"},ke={},Ie=Oe.compose(Object.assign({baseName:"anchor",template:Ee,styles:Se,shadowOptions:Te},ke)),De=(e,t)=>(0,s.anchoredRegionTemplate)(e,t),Re=(e,t)=>l.css`
424
424
  ${(0,r.anchoredRegionStyles)(e,t)}
425
- `;class Ne extends r.AnchoredRegion{}const Le={delegatesFocus:!0,mode:"open"},Fe={},Me=Ne.compose(Object.assign({baseName:"anchored-region",template:Re,styles:Ae,shadowOptions:Le},Fe)),_e=(e,t)=>l.css`
425
+ `;class Ae extends r.AnchoredRegion{}const Ne={delegatesFocus:!0,mode:"open"},Le={},Fe=Ae.compose(Object.assign({baseName:"anchored-region",template:De,styles:Re,shadowOptions:Ne},Le)),Me=(e,t)=>l.css`
426
426
  ${(0,r.avatarStyles)(e,t)}
427
- `,He=(e,t)=>(0,s.avatarTemplate)(e,t),ze=l.html`
427
+ `,_e=(e,t)=>(0,s.avatarTemplate)(e,t),He=l.html`
428
428
  ${(0,l.when)(e=>e.imgSrc,l.html`
429
429
  <img src="${e=>e.imgSrc}" alt="${e=>e.alt}" slot="media" class="media" part="media" />
430
430
  `)}
431
- `;class Pe extends r.Avatar{}const Ue={delegatesFocus:!0,mode:"open"},Be={media:ze},Ge=Pe.compose(Object.assign({baseName:"avatar",template:He,styles:_e,shadowOptions:Ue},Be)),je=(e,t)=>l.css`
431
+ `;class ze extends r.Avatar{}const Pe={delegatesFocus:!0,mode:"open"},Ue={media:He},Be=ze.compose(Object.assign({baseName:"avatar",template:_e,styles:Me,shadowOptions:Pe},Ue)),Ge=(e,t)=>l.css`
432
432
  ${(0,r.badgeStyles)(e,t)}
433
- `,Ve=(e,t)=>(0,s.badgeTemplate)(e,t);class Ye extends r.Badge{}const We=void 0,qe={},Ke=Ye.compose(Object.assign({baseName:"badge",template:Ve,styles:je,shadowOptions:We},qe));var Xe=i(348);const Qe=(0,Xe.createLogger)("foundation-ui"),Je=l.css`
433
+ `,je=(e,t)=>(0,s.badgeTemplate)(e,t);class Ve extends r.Badge{}const Ye=void 0,We={},qe=Ve.compose(Object.assign({baseName:"badge",template:je,styles:Ge,shadowOptions:Ye},We));var Ke=i(348);const Xe=(0,Ke.createLogger)("foundation-ui"),Qe=l.css`
434
434
  @keyframes delete-animate {
435
435
  from {
436
436
  height: 100px;
@@ -502,7 +502,7 @@
502
502
  flex: 1;
503
503
  overflow: hidden;
504
504
  }
505
- `,Ze=e=>l.html`
505
+ `,Je=e=>l.html`
506
506
  <div role="alert" aria-live="polite" class="banner ${e=>e.dismissAnimation}" ${(0,l.ref)("banner")}>
507
507
  <div part="content" class="content">
508
508
  <slot name="content">
@@ -531,23 +531,23 @@
531
531
  </slot>
532
532
  </div>
533
533
  </div>
534
- `,et=l.html`
535
- ${e=>Ze(T(e))}
536
- `,tt={mode:"open",delegatesFocus:!0};class it extends s.FoundationElement{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Qe.error(e)}})}}(0,C.Cg)([l.observable],it.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],it.prototype,"notification",void 0);const ot=it.compose({baseName:"banner",styles:Je,template:et,shadowOptions:tt}),nt=(e,t)=>l.css`
534
+ `,Ze=l.html`
535
+ ${e=>Je(T(e))}
536
+ `,et={mode:"open",delegatesFocus:!0};class tt extends s.FoundationElement{constructor(){super(...arguments),this.dismissAnimation=""}connectedCallback(){super.connectedCallback()}dismiss(){return this.dismissAnimation="banner-delete",new Promise(e=>{this.banner.onanimationend=()=>{this.remove(),e()}})}dismissNotification(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.dismiss(),this.remove()}catch(e){Xe.error(e)}})}}(0,C.Cg)([l.observable],tt.prototype,"dismissAnimation",void 0),(0,C.Cg)([l.observable],tt.prototype,"notification",void 0);const it=tt.compose({baseName:"banner",styles:Qe,template:Ze,shadowOptions:et}),ot=(e,t)=>l.css`
537
537
  ${(0,r.breadcrumbStyles)(e,t)}
538
- `,at=(e,t)=>(0,s.breadcrumbTemplate)(e,t);class st extends r.Breadcrumb{}const rt=void 0,lt={},dt=st.compose(Object.assign({baseName:"breadcrumb",template:at,styles:nt,shadowOptions:rt},lt)),ct=(e,t)=>l.css`
538
+ `,nt=(e,t)=>(0,s.breadcrumbTemplate)(e,t);class at extends r.Breadcrumb{}const st=void 0,rt={},lt=at.compose(Object.assign({baseName:"breadcrumb",template:nt,styles:ot,shadowOptions:st},rt)),dt=(e,t)=>l.css`
539
539
  ${(0,r.breadcrumbItemStyles)(e,t)}
540
- `,ut=(e,t)=>(0,s.breadcrumbItemTemplate)(e,t);class ht extends r.BreadcrumbItem{}const pt=void 0,mt={separator:"/"},gt=ht.compose(Object.assign({baseName:"breadcrumb-item",template:ut,styles:ct,shadowOptions:pt},mt)),vt=(e,t)=>l.css`
540
+ `,ct=(e,t)=>(0,s.breadcrumbItemTemplate)(e,t);class ut extends r.BreadcrumbItem{}const ht=void 0,pt={separator:"/"},mt=ut.compose(Object.assign({baseName:"breadcrumb-item",template:ct,styles:dt,shadowOptions:ht},pt)),gt=(e,t)=>l.css`
541
541
  ${(0,r.buttonStyles)(e,t)}
542
- `,ft=(e,t)=>(0,s.buttonTemplate)(e,t);class bt extends r.Button{}const yt={delegatesFocus:!0,mode:"open"},wt={},Ct=bt.compose(Object.assign({baseName:"button",template:ft,styles:vt,shadowOptions:yt},wt)),xt=()=>l.css`
542
+ `,vt=(e,t)=>(0,s.buttonTemplate)(e,t);class ft extends r.Button{}const bt={delegatesFocus:!0,mode:"open"},yt={},wt=ft.compose(Object.assign({baseName:"button",template:vt,styles:gt,shadowOptions:bt},yt)),Ct=()=>l.css`
543
543
  ${r.CalendarStyles}
544
- `,$t=(e,t)=>(0,s.calendarTemplate)(e,t);class St extends r.Calendar{}const Et={delegatesFocus:!0,mode:"open"},Ot={},Tt=St.compose(Object.assign({baseName:"calendar",template:$t,styles:xt,shadowOptions:Et},Ot)),kt=(e,t)=>l.css`
544
+ `,xt=(e,t)=>(0,s.calendarTemplate)(e,t);class $t extends r.Calendar{}const St={delegatesFocus:!0,mode:"open"},Et={},Ot=$t.compose(Object.assign({baseName:"calendar",template:xt,styles:Ct,shadowOptions:St},Et)),Tt=(e,t)=>l.css`
545
545
  ${(0,r.cardStyles)(e,t)}
546
546
  :host {
547
547
  background-color: var(--fui-card-fill-color);
548
548
  color: var(--fui-card-foreground-color);
549
549
  }
550
- `,It=(e,t)=>(0,s.cardTemplate)(e,t);class Dt extends r.Card{}const Rt=void 0,At={},Nt=Dt.compose(Object.assign({baseName:"card",template:It,styles:kt,shadowOptions:Rt},At));var Lt;!function(e){e.BELOW="below",e.ABOVE="above"}(Lt||(Lt={}));const Ft=450,Mt=l.css`
550
+ `,kt=(e,t)=>(0,s.cardTemplate)(e,t);class It extends r.Card{}const Dt=void 0,Rt={},At=It.compose(Object.assign({baseName:"card",template:kt,styles:Tt,shadowOptions:Dt},Rt));var Nt;!function(e){e.BELOW="below",e.ABOVE="above"}(Nt||(Nt={}));const Lt=450,Ft=l.css`
551
551
  .root {
552
552
  position: relative;
553
553
  width: 100%;
@@ -735,9 +735,9 @@
735
735
 
736
736
  .visible {
737
737
  visibility: visible;
738
- max-height: ${Ft.toString()}px;
738
+ max-height: ${Lt.toString()}px;
739
739
  }
740
- `,_t=(e="foundation")=>l.html`
740
+ `,Mt=(e="foundation")=>l.html`
741
741
  <div class="root" part="root">
742
742
  <div class="control" part="control" @click=${e=>!e.disabled&&e.toggle()}>
743
743
  <label
@@ -760,7 +760,7 @@
760
760
  <${e}-text-field
761
761
  id="filter-search"
762
762
  part="filter-search"
763
- value=${(0,P.O)(e=>e.filterSearchValue,"string","input")}
763
+ value=${(0,z.O)(e=>e.filterSearchValue,"string","input")}
764
764
  placeholder="${e=>e.getPlaceholder}"
765
765
  @input=${(e,t)=>e.setFilter()}
766
766
  @change=${(e,t)=>e.changeHandler(t.event)}
@@ -806,11 +806,11 @@
806
806
  </div>
807
807
  </div>
808
808
  </div>
809
- `,Ht=l.html`
810
- ${_t()}
811
- `,zt=void 0,Pt={};class Ut extends s.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Lt.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Lt.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),n=i.top+i.height/2;e=o.top<n?Lt.BELOW:Lt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Lt.ABOVE:Lt.BELOW}}e===Lt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Lt.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Ut.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Ut.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ut.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ut.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Ut.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Ut.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Ut.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Ut.prototype,"open",void 0),(0,C.Cg)([l.observable],Ut.prototype,"options",void 0),(0,C.Cg)([l.observable],Ut.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Ut.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Ut.prototype,"position",void 0),(0,C.Cg)([l.volatile],Ut.prototype,"getPlaceholder",null);const Bt=Ut.compose(Object.assign({baseName:"categorized-multiselect",template:Ht,styles:Mt,shadowOptions:zt},Pt)),Gt=(e,t)=>l.css`
809
+ `,_t=l.html`
810
+ ${Mt()}
811
+ `,Ht=void 0,zt={};class Pt extends s.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.search=!0,this.disabled=!1,this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.position=Nt.BELOW}openChanged(e,t){var i,o;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.optionsElement)||void 0===i||i.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(o=this.optionsElement)||void 0===o||o.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Nt.ABOVE&&(null===(e=this.optionsElement)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}sortFilteredOptions(e){const t=(null!=e?e:this.options).reduce((e,t)=>{const i=t.type||"Other";return e[i]?e[i].options.push(t):e[i]={type:i,options:[t]},e},{});return Object.values(t)}optionsChanged(){this.filteredAvailableOptions=this.sortFilteredOptions()}setDropdownPosition(){let e=this.position;if(this.autoPosition){let t=this.assignedSlot?this.assignedSlot.parentElement:this.parentElement;for(;t&&!t.classList.contains("content-wrapper");)t=t.parentElement;if(t){const i=t.getBoundingClientRect(),o=this.getBoundingClientRect(),n=i.top+i.height/2;e=o.top<n?Nt.BELOW:Nt.ABOVE}else{const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<t.height&&o>n?Nt.ABOVE:Nt.BELOW}}e===Nt.ABOVE?(this.optionsElement.classList.add("position-above"),this.optionsElement.classList.remove("position-below")):e===Nt.BELOW&&(this.optionsElement.classList.add("position-below"),this.optionsElement.classList.remove("position-above"))}optionGetter(e){return e.value}getItemLabel(e){let t;return e?(t=e.label||e.value||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}isOptionSelected(e){return this.selectedOptions.includes(this.optionGetter(e))}selectCheckboxOne(e){const t=this.optionGetter(e);this.selectedOptions.includes(t)?(this.selectedOptions=[...this.selectedOptions],this.selectedOptions.splice(this.selectedOptions.indexOf(t),1)):this.selectedOptions=[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}setFilter(){const e=this.options.filter(e=>{var t;const i=e.description,o=null!==(t=e.label)&&void 0!==t?t:e.value;return(null==i?void 0:i.toLowerCase().includes(this.filterSearchValue.toLowerCase()))||o.toLowerCase().includes(this.filterSearchValue.toLowerCase())?e:void 0});this.filteredAvailableOptions=this.sortFilteredOptions(e)}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}}(0,C.Cg)([l.attr],Pt.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Pt.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pt.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pt.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Pt.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Pt.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Pt.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Pt.prototype,"open",void 0),(0,C.Cg)([l.observable],Pt.prototype,"options",void 0),(0,C.Cg)([l.observable],Pt.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Pt.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Pt.prototype,"position",void 0),(0,C.Cg)([l.volatile],Pt.prototype,"getPlaceholder",null);const Ut=Pt.compose(Object.assign({baseName:"categorized-multiselect",template:_t,styles:Ft,shadowOptions:Ht},zt)),Bt=(e,t)=>l.css`
812
812
  ${(0,r.checkboxStyles)(e,t)}
813
- `,jt=(e,t)=>(0,s.checkboxTemplate)(e,t);class Vt extends r.Checkbox{}const Yt=void 0,Wt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},qt=Vt.compose(Object.assign({baseName:"checkbox",template:jt,styles:Gt,shadowOptions:Yt},Wt));var Kt=i(62051),Xt=i.n(Kt),Qt=i(40370),Jt=i(6884),Zt=i(96730),ei=i(21281),ti=i(34193),ii=i(41119),oi=i(26347),ni=i(9033),ai=i(12066),si=i(97156);class ri extends((0,Qt.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Jt.OD.MAX_ROWS_250,this.maxView=Jt.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new si.t(new Map)}criteriaChanged(e,t){const i=e!==(0,Zt.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&(this.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),this.fetchGenesisData(null))}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t)){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();return void this.syncComponentData(e)}Qe.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===ei.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ti.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh){"ROW_REF"!==this.rowId&&(null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,Zt.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&Qe[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ii.w.DATE||t===ii.w.DATETIME?(0,ai.Ey)(e,t===ii.w.DATETIME):e}}function li(e,t){var i;const o=new j.b;o.withExpression((new G.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(B.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var di;(0,C.Cg)([oi.dm],ri.prototype,"connect",void 0),(0,C.Cg)([ni.yW],ri.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],ri.prototype,"criteria",void 0),(0,C.Cg)([l.observable],ri.prototype,"data",void 0),(0,C.Cg)([l.attr],ri.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],ri.prototype,"maxView",void 0),(0,C.Cg)([l.attr],ri.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],ri.prototype,"request",void 0),(0,C.Cg)([l.attr],ri.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ri.prototype,"reverse",void 0),(0,C.Cg)([l.attr],ri.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],ri.prototype,"withTimestampFormatting",void 0);let ci=di=class extends ri{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t&&t!==e&&(this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.fetchData(),this.valueField||Qe.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),this.select.removeEventListener("change",this.selectChangeHandler)}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?li(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof di||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.options=t.map(e=>{var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});if(this.options.map(({value:e,label:t})=>{const i=document.createElement(this.optionElement);return i.textContent=t||e,i.value=e,i}).forEach(e=>{this.select.appendChild(e),this.resizeObserver.observe(e)}),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else{this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0);const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e)}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){Qe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Qe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Qe.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],ci.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],ci.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],ci.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],ci.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],ci.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],ci.prototype,"initialSelectedValue",void 0),ci=di=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],ci);const ui=(e,t)=>l.css`
813
+ `,Gt=(e,t)=>(0,s.checkboxTemplate)(e,t);class jt extends r.Checkbox{}const Vt=void 0,Yt={checkedIndicator:'\n <svg\n aria-hidden="true"\n part="checked-indicator"\n class="checked-indicator"\n viewBox="0 0 20 20"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n fill-rule="evenodd"\n clip-rule="evenodd"\n d="M8.143 12.6697L15.235 4.5L16.8 5.90363L8.23812 15.7667L3.80005 11.2556L5.27591 9.7555L8.143 12.6697Z"\n />\n </svg>\n ',indeterminateIndicator:'\n <div part="indeterminate-indicator" class="indeterminate-indicator"></div>\n '},Wt=jt.compose(Object.assign({baseName:"checkbox",template:Gt,styles:Bt,shadowOptions:Vt},Yt));var qt=i(62051),Kt=i.n(qt),Xt=i(40370),Qt=i(6884),Jt=i(96730),Zt=i(21281),ei=i(34193),ti=i(41119),ii=i(26347),oi=i(9033),ni=i(12066),ai=i(97156);class si extends((0,Xt.C)(s.FoundationElement)){constructor(){super(...arguments),this.withGridInit=!0,this.isSnapshot=!1,this.maxRows=Qt.OD.MAX_ROWS_250,this.maxView=Qt.OD.MAX_VIEW_1000,this.resourceName="",this.reverse=!1,this.rowId="ROW_REF",this.withTimestampFormatting=!0,this.requiresFullDataRefresh=!0,this.rowsSyncedWithStream=new Map,this.dataSubWasLoggedOff=!1,this.criteriaFromFilters=new Map,this.update=new ai.t(new Map)}criteriaChanged(e,t){const i=e!==(0,Jt.Q)(t,";");this.refetchIfInitializedAndChanged(i)}dataChanged(e){e&&(this.clearData(),this.reset())}requestChanged(e,t){const i=JSON.stringify(e)!==JSON.stringify(t);this.refetchIfInitializedAndChanged(i)}refetchIfInitializedAndChanged(e){this.datasource.initialized&&e&&(this.dataSub&&(this.dataSub.unsubscribe(),this.dataSub=void 0),this.fetchGenesisData(null))}set datasourceConfig(e){e&&Object.keys(e).forEach(t=>{void 0!==e[t]&&(this[t]=e[t])})}disconnectedCallback(){var e,t;super.disconnectedCallback(),this.clearData(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),null===(t=this.update)||void 0===t||t.unsubscribe(),delete this.dataSub,delete this.update,this.datasource.destroy(),delete this.datasource}reset(){this.requiresFullDataRefresh=!0,this.fetchGenesisData()}fetchGenesisData(){return(0,C.sH)(this,arguments,void 0,function*(e=!0){if(this.data)return void this.syncComponentData(this.data);const t=e||!this.datasource.initialized;t||(this.connect.dataLogoff(this.sourceRef),this.clearData());if(yield this.datasource.init(this.datasourceOptions(),t)){if(this.isSnapshot){const e=yield this.datasource.snapshotFiltered();return void this.syncComponentData(e)}Xe.debug(`requesting stream for ${this.resourceName}`),this.dataSub=this.datasource.stream.subscribe(e=>{e.DISCONNECTED&&this.handleError({message:`Genesis Datasource disconnected for ${this.resourceName}`,loggerType:"error"}),this.sourceRef=e.SOURCE_REF;const t=e.MESSAGE_TYPE;if(t&&t===Zt.Go.LOGOFF_ACK)this.dataSubWasLoggedOff=!0;else if(this.dataSubWasLoggedOff=!1,e.ROW){const t=(0,ei.d)(e);this.handleStreamUpdate(t)}else this.handleStreamUpdate(e)})}else this.handleError({message:`Genesis Datasource init failed for ${this.resourceName}`,loggerType:"error"})})}initDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.datasource.init(this.datasourceOptions(),!0)})}datasourceOptions(){return{criteria:this.buildCriteria(),fields:this.fields,isSnapshot:this.isSnapshot,orderBy:this.orderBy,resourceName:this.resourceName,request:this.request,reverse:this.reverse,maxRows:this.maxRows,maxView:this.maxView}}handleStreamUpdate(e){if(!e)return;e.hasOwnProperty("REPLY")?this.applyRequestServerData(e):this.applyDataserverData(e)}applyRequestServerData(e){var t,i;if(!Array.isArray(e.REPLY)||!(null===(t=e.MESSAGE_TYPE)||void 0===t?void 0:t.startsWith("REP_")))return void this.handleError({message:"received invalid RequestServerResult",loggerType:"error",loggerArgs:[e]});if(this.requiresFullDataRefresh){"ROW_REF"!==this.rowId&&(null===(i=e.REPLY)||void 0===i||i.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)}));const t=this.rowsSyncedWithStream.size>0?Array.from(this.rowsSyncedWithStream.values()):e.REPLY;return void this.syncComponentData(t)}this.handleStreamInserts(e.REPLY);const o=Array.from(this.rowsSyncedWithStream.values()).filter(t=>!e.REPLY.includes(t));this.handleStreamDeletes(o)}applyDataserverData(e){var t,i,o,n;if(this.requiresFullDataRefresh){null===(t=e.inserts)||void 0===t||t.forEach(e=>{this.rowsSyncedWithStream.set(e[this.rowId],e)});const i=Array.from(this.rowsSyncedWithStream.values());return void this.syncComponentData(i)}(null===(i=e.inserts)||void 0===i?void 0:i.length)>0&&this.handleStreamInserts(e.inserts),(null===(o=e.deletes)||void 0===o?void 0:o.length)>0&&this.handleStreamDeletes(e.deletes),(null===(n=e.updates)||void 0===n?void 0:n.length)>0&&this.handleStreamUpdates(e.updates)}buildCriteria(){var e;const t=(null===(e=this.criteria)||void 0===e?void 0:e.split(";"))||[];return(0,Jt.Q)(t.join(" && "),";")}setFilter(e,t){this.criteriaFromFilters.set(e,t),this.update.next(this.criteriaFromFilters)}removeFilter(e){this.criteriaFromFilters.delete(e),this.update.next(this.criteriaFromFilters)}handleError(e={}){const{message:t,loggerType:i,loggerArgs:o=[]}=e;t&&Xe[i](t,...o)}getFieldMetadata(e){var t;return null===(t=this.datasource.fieldMetadata)||void 0===t?void 0:t.find(t=>t.name===e)}getDefaultLabelFormat(e,t){return t===ti.w.DATE||t===ti.w.DATETIME?(0,ni.Ey)(e,t===ti.w.DATETIME):e}}function ri(e,t){var i;const o=new G.b;o.withExpression((new B.K).withField(null!==(i=e.labelField)&&void 0!==i?i:e.valueField).withValue(t).withSerialiser(U.n.containsIgnoreCase).build()),e.baseCriteria?e.criteria=`${e.baseCriteria} && ${o.build()}`:e.criteria=o.build()}var li;(0,C.Cg)([ii.dm],si.prototype,"connect",void 0),(0,C.Cg)([oi.yW],si.prototype,"datasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],si.prototype,"withGridInit",void 0),(0,C.Cg)([l.attr],si.prototype,"criteria",void 0),(0,C.Cg)([l.observable],si.prototype,"data",void 0),(0,C.Cg)([l.attr],si.prototype,"fields",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],si.prototype,"isSnapshot",void 0),(0,C.Cg)([l.attr],si.prototype,"maxRows",void 0),(0,C.Cg)([l.attr],si.prototype,"maxView",void 0),(0,C.Cg)([l.attr],si.prototype,"orderBy",void 0),(0,C.Cg)([l.attr],si.prototype,"request",void 0),(0,C.Cg)([l.attr],si.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],si.prototype,"reverse",void 0),(0,C.Cg)([l.attr],si.prototype,"rowId",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"with-timestamp-formatting"})],si.prototype,"withTimestampFormatting",void 0);let di=li=class extends si{constructor(){super(...arguments),this.emptyDataLabel="No matching records",this.allowCustomOptions=!1,this.initalSelectedValueInitialized=!1,this.isSnapshot=!0,this.baseCriteria="",this.resizeObserverCallback=e=>{e.forEach(e=>{this.checkOverflow(e.target)})},this.selectChangeHandler=e=>{var t;const i=e.target.value,o=null===(t=this.options)||void 0===t?void 0:t.find(e=>String(e.label)===i);!o&&this.allowCustomOptions&&this.select instanceof r.Combobox?this.select.$emit("value-change",{label:i,value:i}):this.select.$emit("value-change",o)}}initialSelectedValueChanged(e,t){t&&t!==e&&(this.select&&this.getDisplayForValue(t)===String(this.select.value||"")||(this.initalSelectedValueInitialized=!1,this.clearData(),this.fetchData()))}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t,i;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.optionElement=null!==(i=this.optionElement)&&void 0!==i?i:`${T(this.select)}-option`,this.select.addEventListener("change",this.selectChangeHandler),this.resizeObserver=new ResizeObserver(this.resizeObserverCallback),this.fetchData(),this.valueField||Xe.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label (e.g label-field="NAME")')})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.disconnect(),this.select.removeEventListener("change",this.selectChangeHandler)}fetchData(){this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&(this.select instanceof r.Combobox&&this.select.async&&this.initialSelectedValue?this.asyncModeIntialization():this.fetchGenesisData())}asyncModeIntialization(){return(0,C.sH)(this,void 0,void 0,function*(){(yield this.datasource.init(this.datasourceOptions(),!0))?ri(this,this.initialSelectedValue):this.handleError({message:`Genesis Datasource async mode initialization failed for ${this.resourceName}`,loggerType:"error"})})}clearData(){this.select&&(Array.from(this.select.children).forEach(e=>{e instanceof li||this.select.removeChild(e)}),this.select.value="",this.select.initialValue="")}checkOverflow(e){const t=e.shadowRoot.querySelector(".content");t&&(t.scrollWidth>t.clientWidth?e.setAttribute("title",e.textContent):e.removeAttribute("title"))}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values());if(t.length>0){this.options=t.map(e=>{var t;return{value:e[this.valueField],label:this.labelRowFormatter?this.labelRowFormatter(e):this.labelFormatter?this.labelFormatter(e[this.labelField]):this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});if(this.options.map(({value:e,label:t})=>{const i=document.createElement(this.optionElement);return i.textContent=t||e,i.value=e,i}).forEach(e=>{this.select.appendChild(e),this.resizeObserver.observe(e)}),!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async){this.resetCombobox();const e=this.getInitialLabel();l.DOM.queueUpdate(()=>{this.select.value=String(e),this.select instanceof r.Combobox&&this.select.async&&this.selectChangeHandler({target:{value:e}})}),this.initalSelectedValueInitialized=!0}}else{this.allowCustomOptions&&this.initialSelectedValue&&(!this.initalSelectedValueInitialized||this.select instanceof r.Combobox&&!this.select.async)&&(this.resetCombobox(),l.DOM.queueUpdate(()=>{this.select.value=String(this.initialSelectedValue)}),this.initalSelectedValueInitialized=!0);const e=document.createElement(this.optionElement);e.textContent=this.emptyDataLabel,e.value="",e.disabled=!0,this.select.appendChild(e)}}getInitialLabel(){return this.getDisplayForValue(this.initialSelectedValue)}getDisplayForValue(e){var t;if(null==e||0!==e&&!e)return"";const i=null===(t=this.options)||void 0===t?void 0:t.find(t=>t.value===e);return this.allowCustomOptions&&this.select instanceof r.Combobox?String(i?i.label:e):i?String(i.label):""}resetCombobox(){this.select&&this.select instanceof r.Combobox&&this.select.resetCombobox()}handleStreamInserts(e){Xe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Xe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Xe.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],di.prototype,"labelField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"option-element"})],di.prototype,"optionElement",void 0),(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],di.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"empty-data-label"})],di.prototype,"emptyDataLabel",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"allow-custom-options"})],di.prototype,"allowCustomOptions",void 0),(0,C.Cg)([l.observable],di.prototype,"labelFormatter",void 0),(0,C.Cg)([l.observable],di.prototype,"labelRowFormatter",void 0),(0,C.Cg)([l.observable],di.prototype,"initialSelectedValue",void 0),di=li=(0,C.Cg)([(0,l.customElement)({name:"options-datasource"})],di);const ci=(e,t)=>l.css`
814
814
  .combo-box-indicator {
815
815
  transition-property: transform;
816
816
  transition-duration: 0.2s;
@@ -822,7 +822,7 @@
822
822
  }
823
823
 
824
824
  ${(0,r.comboboxStyles)(e,t)}
825
- `,hi=(e,t)=>l.html`
825
+ `,ui=(e,t)=>l.html`
826
826
  <template
827
827
  aria-activedescendant="${e=>e.activeDescendant}"
828
828
  class="${e=>e.open?"open":""} ${e=>e.disabled?"disabled":""} ${e=>e.position}"
@@ -876,7 +876,7 @@
876
876
  ></slot>
877
877
  </div>
878
878
  </template>
879
- `;var pi,mi;class gi extends r.Combobox{constructor(){super(...arguments),pi.set(this,void 0),mi.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=Xt()(this.asyncSetFilter,t)}openChanged(){super.openChanged(),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),a=this.options?this.options.findIndex(n):-1,s=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[a])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==s?a:this.selectedIndex,e&&""!==e.trim()&&-1===a&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){const i=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(i)}filterOptions(){this.autocomplete&&this.autocomplete!==s.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,mi,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,mi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===s.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,pi,"f")||(0,C.GG)(this,pi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,pi,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof ci);t.length>0?(li(t[0],this.control.value),l.DOM.queueUpdate(()=>{this.control.value=e})):Qe.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===s.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}pi=new WeakMap,mi=new WeakMap,(0,C.Cg)([l.observable],gi.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],gi.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],gi.prototype,"async",void 0),(0,C.Cg)([l.attr],gi.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],gi.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],gi.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],gi.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],gi.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],gi.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],gi.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],gi.prototype,"scrollWhenSelectionChangesOptions",void 0);const vi={delegatesFocus:!0,mode:"open"},fi={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},bi=gi.compose(Object.assign({baseName:"combobox",template:hi,styles:ui,shadowOptions:vi},fi));var yi=i(98316);const wi=(e,t)=>l.css`
879
+ `;var hi,pi;class mi extends r.Combobox{constructor(){super(...arguments),hi.set(this,void 0),pi.set(this,!1),this.needManualChangeEventDispatch=!1,this.async=!1,this.debounce=500,this.caseSensitive=!1,this.ignoreInputClick=!1,this.filterMode="startsWith",this.scrollToSelectedWhenOpening=!1,this.scrollToSelectedWhenOpeningOptions={behavior:"auto",block:"nearest"},this.scrollWhenSelectionChanges=!1,this.scrollWhenSelectionChangesOptions={behavior:"auto",block:"center"},this.resetCombobox=()=>{this.selectedOptions=[],this.selectedIndex=-1,this.value="",this.control.value="",this.filter="",this.filterOptions()}}get activeDescendant(){var e,t;if(this.selectedOptions&&0!==this.selectedOptions.length)return this.ariaActiveDescendant=null===(e=this.selectedOptions[0])||void 0===e?void 0:e.id,null===(t=this.selectedOptions[0])||void 0===t?void 0:t.id}debounceChanged(e,t){this.debouncedInputHandler=Kt()(this.asyncSetFilter,t)}openChanged(){super.openChanged(),this.open?this.scrollToSelectedWhenOpening&&setTimeout(()=>{const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollToSelectedWhenOpeningOptions)},500):(this.manuallyDispatchChangeEvent(),this.filter="",this.filterOptions())}get value(){return l.Observable.track(this,"value"),this._ourValue}set value(e){var t,i,o;if(void 0===e)return;const n=`${this._ourValue}`;if(this.$fastController.isConnected&&this.options){const n=this.caseSensitive?t=>t.text===e:t=>t.text.toLowerCase()===String(e).toLowerCase(),a=this.options?this.options.findIndex(n):-1,s=null===(t=this.options[this.selectedIndex])||void 0===t?void 0:t.text,r=null===(i=this.options[a])||void 0===i?void 0:i.text;this.selectedIndex=r&&r!==s?a:this.selectedIndex,e&&""!==e.trim()&&-1===a&&(e=(null===(o=this.firstSelectedOption)||void 0===o?void 0:o.text)||e)}n!==e&&(this._ourValue=e,super.valueChanged(n,e),l.Observable.notify(this,"value"))}slottedOptionsChanged(e,t){const i=!!this.async;super.slottedOptionsChanged(e,t),this.updateValue(i)}filterOptions(){this.autocomplete&&this.autocomplete!==s.ComboboxAutocomplete.none||(this.filter="");const e=this.filter,t=this.caseSensitive?e:e.toLowerCase();this.filteredOptions=this._options.filter(e=>{const i=this.caseSensitive?e.text:e.text.toLowerCase();return"contains"===this.filterMode?i.includes(t):i.startsWith(t)}),this.isAutocompleteList&&(this.filteredOptions.length||t||(this.filteredOptions=this._options),this._options.forEach(e=>e.hidden=!this.filteredOptions.includes(e)))}clickHandler(e){if(!this.disabled)if(E(e,this))this.open=!1;else{if(O(e,this.indicator))return this.open=!this.open,void(this.open&&this.control.focus());if(!this.ignoreInputClick||!O(e,this.control))return super.clickHandler(e)}}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Enter":if((0,C.GG)(this,pi,this.open,"f"),!this.open)return this.open=!0,!0;break;case"ArrowDown":case"ArrowUp":if(!this.open)return this.open=!0,!0;if(this.scrollWhenSelectionChanges){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView(this.scrollWhenSelectionChangesOptions)}break;case"Escape":if(this.control.value!==this.currentValue)return this.filter="",this.filterOptions(),this.control.value=this.currentValue,this.selectItemByValue(this.currentValue),void(this.open=!1);if(!this.open)return!0}const i=super.keydownHandler(e);return"Enter"!==t?i:void 0}keyupHandler(e){var t;const i=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(i){case"Enter":return!(0,C.gn)(this,pi,"f");case"ArrowDown":case"ArrowUp":this.open&&this.firstSelectedOption&&this.autocomplete===s.ComboboxAutocomplete.both&&(this.needManualChangeEventDispatch=!0,this.currentValue=null===(t=this.firstSelectedOption)||void 0===t?void 0:t.value);break;case"Home":case"End":return;case"Backspace":case"Delete":const i=super.keyupHandler(e);return this.selectItemByValue(this.control.value),i}return super.keyupHandler(e)}get indicator(){return(0,C.gn)(this,hi,"f")||(0,C.GG)(this,hi,this.shadowRoot.querySelector('[part="indicator"]'),"f"),(0,C.gn)(this,hi,"f")}selectItemByValue(e){var t,i,o;this.selectedIndex=null!==(i=null===(t=this.options)||void 0===t?void 0:t.findIndex(t=>t.text===e))&&void 0!==i?i:-1,null===(o=this.options)||void 0===o||o.forEach((e,t)=>e.selected=t===this.selectedIndex)}inputHandler(e){this.async?this.debouncedInputHandler():super.inputHandler(e)}asyncSetFilter(){const e=this.control.value,t=this.slottedDatasource.assignedNodes().filter(e=>e instanceof di);t.length>0?(ri(t[0],this.control.value),l.DOM.queueUpdate(()=>{this.control.value=e})):Xe.warn("Options-datasource is not connected. Please add a datasource to use this functionality.")}manuallyDispatchChangeEvent(){this.needManualChangeEventDispatch&&this.firstSelectedOption&&this.autocomplete===s.ComboboxAutocomplete.both&&(this.dispatchEvent(new Event("change",{bubbles:!0})),this.needManualChangeEventDispatch=!1)}}hi=new WeakMap,pi=new WeakMap,(0,C.Cg)([l.observable],mi.prototype,"activeDescendant",null),(0,C.Cg)([l.observable],mi.prototype,"slottedDatasource",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mi.prototype,"async",void 0),(0,C.Cg)([l.attr],mi.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"case-sensitive"})],mi.prototype,"caseSensitive",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"ignore-input-click"})],mi.prototype,"ignoreInputClick",void 0),(0,C.Cg)([(0,l.attr)({attribute:"filter-mode"})],mi.prototype,"filterMode",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-to-selected-when-opening"})],mi.prototype,"scrollToSelectedWhenOpening",void 0),(0,C.Cg)([l.observable],mi.prototype,"scrollToSelectedWhenOpeningOptions",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"scroll-when-selection-changes"})],mi.prototype,"scrollWhenSelectionChanges",void 0),(0,C.Cg)([l.observable],mi.prototype,"scrollWhenSelectionChangesOptions",void 0);const gi={delegatesFocus:!0,mode:"open"},vi={indicator:'\n <svg\n class="combo-box-indicator"\n part="combo-box-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},fi=mi.compose(Object.assign({baseName:"combobox",template:ui,styles:ci,shadowOptions:gi},vi));var bi=i(98316);const yi=(e,t)=>l.css`
880
880
  :host {
881
881
  --light-size: 12px;
882
882
  --height: calc(var(--design-unit) * 2px + var(--light-size));
@@ -927,18 +927,18 @@
927
927
  text-overflow: ellipsis;
928
928
  white-space: nowrap;
929
929
  }
930
- `,Ci=l.html`
930
+ `,wi=l.html`
931
931
  <div class=${e=>(0,x.x)(["light",!0],[e.colour,!0])}></div>
932
932
  ${(0,l.when)(e=>e.showLabel,l.html`
933
933
  <div class="label">${e=>e.label}</div>
934
934
  `)}
935
- `;class xi extends s.FoundationElement{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}(0,C.Cg)([oi.dm],xi.prototype,"connect",void 0),(0,C.Cg)([yi.N],xi.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],xi.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],xi.prototype,"label",void 0),(0,C.Cg)([l.observable],xi.prototype,"colour",void 0);const $i=xi.compose({baseName:"connection-indicator",template:Ci,styles:wi}),Si=(e,t)=>l.css`
935
+ `;class Ci extends s.FoundationElement{constructor(){super(...arguments),this.showLabel=!1,this.label="disconnected",this.colour="red"}connectedCallback(){super.connectedCallback(),this.subscription=this.connect.isConnectedSubject.subscribe(e=>{this.label=this.getLabel(e),this.colour=e?"green":"red"})}disconnectedCallback(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe()}getLabel(e){if(!e)return"disconnected";return`${this.session.getSessionStorageItem("hostUrl")} ✔`}}(0,C.Cg)([ii.dm],Ci.prototype,"connect",void 0),(0,C.Cg)([bi.N],Ci.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-label"})],Ci.prototype,"showLabel",void 0),(0,C.Cg)([l.observable],Ci.prototype,"label",void 0),(0,C.Cg)([l.observable],Ci.prototype,"colour",void 0);const xi=Ci.compose({baseName:"connection-indicator",template:wi,styles:yi}),$i=(e,t)=>l.css`
936
936
  ${(0,r.dataGridStyles)(e,t)}
937
- `,Ei=(e,t)=>(0,s.dataGridTemplate)(e,t);class Oi extends r.DataGrid{}const Ti=void 0,ki={},Ii=Oi.compose(Object.assign({baseName:"data-grid",template:Ei,styles:Si,shadowOptions:Ti},ki)),Di=(e,t)=>l.css`
937
+ `,Si=(e,t)=>(0,s.dataGridTemplate)(e,t);class Ei extends r.DataGrid{}const Oi=void 0,Ti={},ki=Ei.compose(Object.assign({baseName:"data-grid",template:Si,styles:$i,shadowOptions:Oi},Ti)),Ii=(e,t)=>l.css`
938
938
  ${(0,r.dataGridCellStyles)(e,t)}
939
- `;class Ri extends r.DataGridCell{}const Ai=void 0,Ni={},Li=Ri.compose(Object.assign({baseName:"data-grid-cell",template:s.dataGridCellTemplate,styles:Di,shadowOptions:Ai},Ni)),Fi=(e,t)=>l.css`
939
+ `;class Di extends r.DataGridCell{}const Ri=void 0,Ai={},Ni=Di.compose(Object.assign({baseName:"data-grid-cell",template:s.dataGridCellTemplate,styles:Ii,shadowOptions:Ri},Ai)),Li=(e,t)=>l.css`
940
940
  ${(0,r.dataGridRowStyles)(e,t)}
941
- `;class Mi extends r.DataGridRow{}const _i=void 0,Hi={},zi=Mi.compose(Object.assign({baseName:"data-grid-row",template:s.dataGridRowTemplate,styles:Fi,shadowOptions:_i},Hi));var Pi=i(94343),Ui=i.n(Pi),Bi=i(58915),Gi=i.n(Bi),ji=i(7554),Vi=i.n(ji),Yi=i(49916),Wi=i.n(Yi),qi=i(33839),Ki=i.n(qi);class Xi{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}Ui().extend(Ki());class Qi{constructor(e=null,t="default"){const i=new Xi(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=Ui()(i.date).isLeapYear()?1:0)}getDay(e){return new Xi(new Date(this.year,this.number-1,e),this.lang)}}Ui().extend(Ki());class Ji{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new Xi(null,i),this.year=null!=e?e:this.today.year,this.month=new Qi(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new Qi(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new Qi(new Date(this.year-1,11),this.lang):new Qi(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new Qi(new Date(this.year+1,0),this.lang):new Qi(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new Qi(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new Qi(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new Qi(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new Qi(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new Qi(new Date(this.year,this.month.number-1-1),this.lang)}}const Zi=l.css`
941
+ `;class Fi extends r.DataGridRow{}const Mi=void 0,_i={},Hi=Fi.compose(Object.assign({baseName:"data-grid-row",template:s.dataGridRowTemplate,styles:Li,shadowOptions:Mi},_i));var zi=i(94343),Pi=i.n(zi),Ui=i(58915),Bi=i.n(Ui),Gi=i(7554),ji=i.n(Gi),Vi=i(49916),Yi=i.n(Vi),Wi=i(33839),qi=i.n(Wi);class Ki{constructor(e,t="default"){e=null!=e?e:new Date,this.Date=e,this.date=e.getDate(),this.day=e.toLocaleString(t,{weekday:"long"}),this.dayNumber=e.getDay()+1,this.dayShort=e.toLocaleString(t,{weekday:"short"}),this.year=e.getFullYear(),this.yearShort=Number(e.toLocaleString(t,{year:"2-digit"})),this.month=e.toLocaleString(t,{month:"long"}),this.monthShort=e.toLocaleString(t,{month:"short"}),this.monthNumber=e.getMonth()+1,this.timestamp=e.getTime()}}Pi().extend(qi());class Xi{constructor(e=null,t="default"){const i=new Ki(e,t);this.lang=t,this.name=i.month,this.number=i.monthNumber,this.year=i.year,this.numberOfDays=[31,28,31,30,31,30,31,31,30,31,30,31][this.number-1],2===this.number&&(this.numberOfDays+=Pi()(i.date).isLeapYear()?1:0)}getDay(e){return new Ki(new Date(this.year,this.number-1,e),this.lang)}}Pi().extend(qi());class Qi{constructor(e=null,t=null,i="default"){this.weekDays=Array.from({length:7}),this.today=new Ki(null,i),this.year=null!=e?e:this.today.year,this.month=new Xi(new Date(this.year,(t||this.today.monthNumber)-1),i),this.lang=i,this.weekDays.forEach((e,t)=>{const i=this.month.getDay(t);this.weekDays[i.dayNumber-1]=i.day})}getMonth(e){return new Xi(new Date(this.year,e-1),this.lang)}getPreviousMonth(){return 1===this.month.number?new Xi(new Date(this.year-1,11),this.lang):new Xi(new Date(this.year,this.month.number-2),this.lang)}getNextMonth(){return 1===this.month.number?new Xi(new Date(this.year+1,0),this.lang):new Xi(new Date(this.year,this.month.number+2),this.lang)}goToDate(e,t){this.month=new Xi(new Date(t,e-1),this.lang),this.year=t}goToNextYear(){this.year+=1,this.month=new Xi(new Date(this.year,0),this.lang)}goToPreviousYear(){this.year-=1,this.month=new Xi(new Date(this.year,11),this.lang)}goToNextMonth(){if(12===this.month.number)return this.goToNextYear();this.month=new Xi(new Date(this.year,this.month.number+1-1),this.lang)}goToPreviousMonth(){if(1===this.month.number)return this.goToPreviousYear();this.month=new Xi(new Date(this.year,this.month.number-1-1),this.lang)}}const Ji=l.css`
942
942
  :host {
943
943
  position: relative;
944
944
  }
@@ -1094,7 +1094,7 @@
1094
1094
  .date-toggle[readonly] .label {
1095
1095
  cursor: pointer;
1096
1096
  }
1097
- `,eo=[1,7],to=e=>l.html`
1097
+ `,Zi=[1,7],eo=e=>l.html`
1098
1098
  <${e}-text-field data-test-id="date-picker" readonly :value="${e=>e.formatDate}" part="date-toggle" class="date-toggle" @click="${e=>e.toggleCalendar()}">
1099
1099
  ${e=>e.label}
1100
1100
  <div class="input-icon-container" part="input-icon-container" slot="end"><${e}-icon variant="regular" name="calendar-alt" size="sm"></${e}-icon></div>
@@ -1113,7 +1113,7 @@
1113
1113
  </div>
1114
1114
  <div class="week-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
1115
1115
  ${(0,l.repeat)(e=>{var t;return null===(t=e.calendar)||void 0===t?void 0:t.weekDays},l.html`
1116
- ${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===eo.indexOf(t.index+1),l.html`
1116
+ ${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===Zi.indexOf(t.index+1),l.html`
1117
1117
  <span
1118
1118
  class="${(e,t)=>(0,x.x)(["disabled",-1!==t.parent.disabledDaysOfWeek.indexOf(t.index+1)])}"
1119
1119
  >
@@ -1124,7 +1124,7 @@
1124
1124
  </div>
1125
1125
  <div class="month-days ${e=>(0,x.x)(["hide-weekends",e.hideWeekends])}">
1126
1126
  ${(0,l.repeat)(e=>e.monthList,l.html`
1127
- ${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===eo.indexOf(e.dayNumber),l.html`
1127
+ ${(0,l.when)((e,t)=>!t.parent.hideWeekends||-1===Zi.indexOf(e.dayNumber),l.html`
1128
1128
  <button
1129
1129
  ?disabled="${(e,t)=>-1!==t.parent.disabledDaysOfWeek.indexOf(e.dayNumber)}"
1130
1130
  class="month-day
@@ -1139,44 +1139,44 @@
1139
1139
  </div>
1140
1140
  <slot name="bottom"></slot>
1141
1141
  </div>
1142
- `,io=l.html`
1143
- ${e=>to(T(e))}
1144
- `;var oo=i(28745);const no=[1,2,3,4,5,6,7],ao=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=no.filter(t=>-1===e.indexOf(t));let a=n.find(e=>e>t.dayNumber);a||(a=Math.min(...n));const s=t.dayNumber<a?a-t.dayNumber:a-t.dayNumber+7;return n.length?new Xi(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,s),i):(oo.v.warn("Date picker disabled days - all days of week have been disabled"),t)},so=void 0,ro={};class lo extends s.FoundationElement{constructor(){super(...arguments),this.format="MM-DD-YYYY",this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[]}formatChanged(e,t){t&&this.calendar&&(this.formatDate=Ui()(this.currentDate.Date).format(t))}inlineCalendarChanged(){this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){if(t&&this.calendar){const e=Ui()().localeData().longDateFormat("L");this.currentDate=new Xi(Ui()(t,e).toDate(),this.lang),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Ui()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}}connectedCallback(){var e;super.connectedCallback(),Ui().extend(Gi()),Ui().extend(Wi()),Ui().extend(Vi()),this.substringNumber=3;const t=this.value,i=t?Ui()(t,"MM-DD-YYYY"):Ui()();let o=new Xi(i.toDate(),this.lang);(null===(e=this.disabledDaysOfWeek)||void 0===e?void 0:e.length)&&(o=ao(this.disabledDaysOfWeek,o,this.lang)),this.currentDate=o,this.calendar=new Ji(this.currentDate.year,this.currentDate.monthNumber,this.lang),this.value=Ui()(this.currentDate.Date).format("MM-DD-YYYY"),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=Ui()(this.currentDate.Date).format(this.format),this.monthList=this.getMonthDaysGrid()}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return Ui()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){Ui()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Ui()(this.currentDate.Date).format(this.format),this.value=Ui()(e.Date).format("MM-DD-YYYY"),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],lo.prototype,"format",void 0),(0,C.Cg)([l.attr],lo.prototype,"lang",void 0),(0,C.Cg)([l.attr],lo.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],lo.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],lo.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],lo.prototype,"position",void 0),(0,C.Cg)([l.attr],lo.prototype,"label",void 0),(0,C.Cg)([l.attr],lo.prototype,"value",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],lo.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],lo.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],lo.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],lo.prototype,"monthList",void 0),(0,C.Cg)([l.observable],lo.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],lo.prototype,"calendar",void 0);const co=lo.compose(Object.assign({baseName:"date-picker",styles:Zi,template:io,shadowOptions:so},ro));var uo=i(83912);const ho=r.SwatchRGB.create(1,1,1),po=r.SwatchRGB.create(0,0,0),mo=(0,uo.parseColorHexRGB)("#585858"),go=r.SwatchRGB.create(mo.r,mo.g,mo.b),vo=(0,uo.parseColorHexRGB)("#ffffff"),fo=r.SwatchRGB.create(vo.r,vo.g,vo.b),bo=r.PaletteRGB.from(fo),yo=(0,uo.parseColorHexRGB)("#eeeeee"),wo=r.SwatchRGB.create(yo.r,yo.g,yo.b),Co=r.PaletteRGB.from(wo),xo=(0,uo.parseColorHexRGB)("#08c3a5"),$o=r.SwatchRGB.create(xo.r,xo.g,xo.b),So=r.PaletteRGB.from($o),{create:Eo}=s.DesignToken,Oo=Eo("fui-fill-color").withDefault(go),To=Eo({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(fo),ko=14;function Io(e,t){return e.colorContrast(t,ko)}const Do=Eo({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>Io(Eo("fui-card-palette").withDefault(bo).getValueFor(e),To.getValueFor(e))),Ro=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const a=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||a(o)||!n||"object"!=typeof n||Array.isArray(n)||a(n)?i[e]=o:i[e]=Ro(n,o)}),i)};var Ao=i(80273);const No={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class Lo{constructor(){this.value=null}}(0,C.Cg)([l.observable],Lo.prototype,"value",void 0);const Fo=new Lo,Mo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function _o(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const Ho={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,uo.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},zo=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,uo.parseColorHexRGB)(e))),Po=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):Po(e,o,n))})},Uo=["baseClass","baseName","shadowOptions","styles","template"],Bo=(e,t=Uo)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),Go=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:Bo(t)}},jo=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},Vo=()=>Fo,Yo=(...e)=>{const t=Fo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const a=i[o];return a?e(n,a):null}(e,t.customTokens)},Wo=(e,t)=>{const i=Ro(No,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,zo(o.color.accent.$value)),r.neutralPalette.setValueFor(e,zo(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),a=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,jo(n,Ao.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,jo(a,Ao.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,jo(n,Ao.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,jo(a,Ao.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,jo(n,Ao.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,jo(a,Ao.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,jo(n,Ao.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,jo(a,Ao.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,jo(n,Ao.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,jo(a,Ao.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,jo(n,Ao.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,jo(a,Ao.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,jo(n,Ao.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,jo(a,Ao.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,jo(n,Ao.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,jo(a,Ao.Du.plusSix)),i.customTokens&&Po(e,i.customTokens),Fo.value=structuredClone(i)},qo=zo("#08c3a5"),Ko=zo("#eeeeee"),Xo=r.StandardLuminance.DarkMode;const Qo=i(85109).O.ltr,Jo=4,Zo=4;var en=i(85090);const tn=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,on=l.css`
1142
+ `,to=l.html`
1143
+ ${e=>eo(T(e))}
1144
+ `;var io=i(28745);const oo=[1,2,3,4,5,6,7],no=(e,t,i)=>{if(o=t,-1===e.indexOf(o.dayNumber))return t;var o;const n=oo.filter(t=>-1===e.indexOf(t));let a=n.find(e=>e>t.dayNumber);a||(a=Math.min(...n));const s=t.dayNumber<a?a-t.dayNumber:a-t.dayNumber+7;return n.length?new Ki(((e,t=1)=>{const i=new Date(e);return i.setDate(e.getDate()+t),i})(t.Date,s),i):(io.v.warn("Date picker disabled days - all days of week have been disabled"),t)},ao=void 0,so={};class ro extends s.FoundationElement{constructor(){super(...arguments),this.format="MM-DD-YYYY",this.lang="en-US",this.visible=!1,this.position="bottom",this.disabledDaysOfWeek=[]}formatChanged(e,t){t&&this.calendar&&(this.formatDate=Pi()(this.currentDate.Date).format(t))}inlineCalendarChanged(){this.toggleVisibility()}hideWeekendsCalendarChanged(){this.toggleVisibility()}valueChanged(e,t){if(t&&this.calendar){const e=Pi()().localeData().longDateFormat("L");this.currentDate=new Ki(Pi()(t,e).toDate(),this.lang),this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.formatDate=Pi()(this.currentDate.Date).format(this.format),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}}connectedCallback(){var e;super.connectedCallback(),Pi().extend(Bi()),Pi().extend(Yi()),Pi().extend(ji()),this.substringNumber=3;const t=this.value,i=t?Pi()(t,"MM-DD-YYYY"):Pi()();let o=new Ki(i.toDate(),this.lang);(null===(e=this.disabledDaysOfWeek)||void 0===e?void 0:e.length)&&(o=no(this.disabledDaysOfWeek,o,this.lang)),this.currentDate=o,this.calendar=new Qi(this.currentDate.year,this.currentDate.monthNumber,this.lang),this.value=Pi()(this.currentDate.Date).format("MM-DD-YYYY"),this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year,this.formatDate=Pi()(this.currentDate.Date).format(this.format),this.monthList=this.getMonthDaysGrid()}updateHeaderText(){this.currentMonth=this.calendar.month.name,this.currentYear=this.calendar.year}toggleCalendar(){this.visible=!this.visible,this.toggleVisibility(),this.isCurrentCalendarMonth()||(this.calendar.goToDate(this.currentDate.monthNumber,this.currentDate.year),this.updateHeaderText())}toggleVisibility(){this.calendarDropdownClasses=(0,x.x)(["visible",this.visible],this.position,["inline",this.inlineCalendar],["hide-weekends",this.hideWeekends])}isSelectedDate(e){return Pi()(e.Date).isSame(this.currentDate.Date,"day")}isCurrentCalendarMonth(){return this.currentMonth===this.currentDate.monthNumber&&this.currentYear===this.currentDate.year}prevMonth(){this.calendar.goToPreviousMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}nextMonth(){this.calendar.goToNextMonth(),this.updateHeaderText(),this.monthList=this.getMonthDaysGrid()}selectDay(e){Pi()(e.Date).isSame(this.currentDate.Date)||(this.currentDate=e,e.monthNumber!==this.calendar.month.number&&this.prevMonth(),this.formatDate=Pi()(this.currentDate.Date).format(this.format),this.value=Pi()(e.Date).format("MM-DD-YYYY"),this.$emit("value-changed",this.value),this.toggleCalendar())}getMonthDaysGrid(){const e=this.calendar.month.getDay(1),t=this.calendar.getPreviousMonth(),i=e.dayNumber-1,o=this.calendar.month.numberOfDays+i,n=Array.from({length:o});for(let e=i;e<o;e+=1)n[e]=this.calendar.month.getDay(e+1-i);for(let e=0;e<i;e+=1){const o=i-(e+1);n[e]=t.getDay(t.numberOfDays-o)}return n}}(0,C.Cg)([l.attr],ro.prototype,"format",void 0),(0,C.Cg)([l.attr],ro.prototype,"lang",void 0),(0,C.Cg)([l.attr],ro.prototype,"visible",void 0),(0,C.Cg)([(0,l.attr)({attribute:"inline-calendar",mode:"boolean"})],ro.prototype,"inlineCalendar",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-weekends",mode:"boolean"})],ro.prototype,"hideWeekends",void 0),(0,C.Cg)([l.attr],ro.prototype,"position",void 0),(0,C.Cg)([l.attr],ro.prototype,"label",void 0),(0,C.Cg)([l.attr],ro.prototype,"value",void 0),(0,C.Cg)([l.observable],ro.prototype,"currentDate",void 0),(0,C.Cg)([l.observable],ro.prototype,"currentMonth",void 0),(0,C.Cg)([l.observable],ro.prototype,"currentYear",void 0),(0,C.Cg)([l.observable],ro.prototype,"calendarDropdownClasses",void 0),(0,C.Cg)([l.observable],ro.prototype,"formatDate",void 0),(0,C.Cg)([l.observable],ro.prototype,"monthList",void 0),(0,C.Cg)([l.observable],ro.prototype,"disabledDaysOfWeek",void 0),(0,C.Cg)([l.observable],ro.prototype,"calendar",void 0);const lo=ro.compose(Object.assign({baseName:"date-picker",styles:Ji,template:to,shadowOptions:ao},so));var co=i(83912);const uo=r.SwatchRGB.create(1,1,1),ho=r.SwatchRGB.create(0,0,0),po=(0,co.parseColorHexRGB)("#585858"),mo=r.SwatchRGB.create(po.r,po.g,po.b),go=(0,co.parseColorHexRGB)("#ffffff"),vo=r.SwatchRGB.create(go.r,go.g,go.b),fo=r.PaletteRGB.from(vo),bo=(0,co.parseColorHexRGB)("#eeeeee"),yo=r.SwatchRGB.create(bo.r,bo.g,bo.b),wo=r.PaletteRGB.from(yo),Co=(0,co.parseColorHexRGB)("#08c3a5"),xo=r.SwatchRGB.create(Co.r,Co.g,Co.b),$o=r.PaletteRGB.from(xo),{create:So}=s.DesignToken,Eo=So("fui-fill-color").withDefault(mo),Oo=So({name:"card-fill-color",cssCustomPropertyName:"fui-card-fill-color"}).withDefault(vo),To=14;function ko(e,t){return e.colorContrast(t,To)}const Io=So({name:"card-foreground-color",cssCustomPropertyName:"fui-card-foreground-color"}).withDefault(e=>ko(So("fui-card-palette").withDefault(fo).getValueFor(e),Oo.getValueFor(e))),Do=(e,t)=>{const i=structuredClone(e);return!t||"object"!=typeof t||Array.isArray(t)?void 0!==t?t:i:(Object.keys(t).forEach(e=>{const o=t[e],n=i[e];if(null==o)return;const a=e=>e instanceof Date;!o||"object"!=typeof o||Array.isArray(o)||a(o)||!n||"object"!=typeof n||Array.isArray(n)||a(n)?i[e]=o:i[e]=Do(n,o)}),i)};var Ro=i(80273);const Ao={design_tokens:{color:{accent:{$value:"#0EAFE2",$type:"color"},neutral:{$value:"#7C909B",$type:"color"}},fontFamily:{bodyFont:{$value:'Roboto, "Segoe UI", Arial, Helvetica, sans-serif',$type:"fontFamily"}},typography:{baseFontSize:{$value:"14px",$type:"dimension"},baseLineHeight:{$value:"20px",$type:"dimension"}},mode:{luminance:{$value:.23,$type:"number"}},style:{density:{$value:0,$type:"number"},baseHeightMultiplier:{$value:10,$type:"number"},borderRadius:{$value:4,$type:"number"},strokeWidth:{$value:1,$type:"number"}},space:{designUnit:{$value:4,$type:"number"}}}};class No{constructor(){this.value=null}}(0,C.Cg)([l.observable],No.prototype,"value",void 0);const Lo=new No,Fo=(e,t,i)=>{const o=i?(e,t)=>e.setValueFor(i,t):(e,t)=>e.withDefault(t);Object.keys(e).forEach(i=>{const n=`${i}Value`;t[n]&&o(e[i],t[n])})};function Mo(e){return(t,i)=>{t[i+"Changed"]=function(t,i){null!=i?e.setValueFor(this,i):e.deleteValueFor(this)}}}const _o={toView:e=>null==e?null:null==e?void 0:e.toColorString(),fromView(e){if(null==e)return null;const t=(0,co.parseColorHexRGB)(e);return t?r.SwatchRGB.create(t.r,t.g,t.b):null}},Ho=e=>r.PaletteRGB.from(r.SwatchRGB.from((0,co.parseColorHexRGB)(e))),zo=(e,t,i="")=>{Object.entries(t).forEach(([t,o])=>{const n=i?`${i}-${t}`:t;o&&"object"==typeof o&&("$value"in o?e.style.setProperty(`--${n}`,String(o.$value)):zo(e,o,n))})},Po=["baseClass","baseName","shadowOptions","styles","template"],Uo=(e,t=Po)=>Object.keys(e).filter(e=>!t.includes(e)).reduce((t,i)=>(t[i]=e[i],t),{}),Bo=e=>{const{definition:t}=e(),{shadowOptions:i,styles:o,template:n}=t;return{shadowOptions:i,styles:o,template:n,defaultConfig:Uo(t)}},Go=(e,t)=>{const i=e.match(/^(\d+)([a-z]+)/i),o=i[1],n=i[2];return Number(o)+t+n},jo=()=>Lo,Vo=(...e)=>{const t=Lo.value;if(!(null==t?void 0:t.customTokens)||0===e.length)return null;return function e(t,i){const[o,...n]=t;if(0===n.length){const e=i[o];return e&&e.$value?e:null}const a=i[o];return a?e(n,a):null}(e,t.customTokens)},Yo=(e,t)=>{const i=Do(Ao,t);const o=i.design_tokens;r.accentPalette.setValueFor(e,Ho(o.color.accent.$value)),r.neutralPalette.setValueFor(e,Ho(o.color.neutral.$value)),r.bodyFont.setValueFor(e,o.fontFamily.bodyFont.$value),r.baseLayerLuminance.setValueFor(e,o.mode.luminance.$value),r.density.setValueFor(e,o.style.density.$value),r.baseHeightMultiplier.setValueFor(e,o.style.baseHeightMultiplier.$value),r.controlCornerRadius.setValueFor(e,o.style.borderRadius.$value),r.strokeWidth.setValueFor(e,o.style.strokeWidth.$value),r.designUnit.setValueFor(e,o.space.designUnit.$value),r.typeRampBaseFontSize.setValueFor(e,o.typography.baseFontSize.$value),r.typeRampBaseLineHeight.setValueFor(e,o.typography.baseLineHeight.$value);const n=r.typeRampBaseFontSize.getValueFor(e),a=r.typeRampBaseLineHeight.getValueFor(e);r.typeRampMinus1FontSize.setValueFor(e,Go(n,Ro.Du.minusOne)),r.typeRampMinus1LineHeight.setValueFor(e,Go(a,Ro.Du.minusOne)),r.typeRampMinus2FontSize.setValueFor(e,Go(n,Ro.Du.minusTwo)),r.typeRampMinus2LineHeight.setValueFor(e,Go(a,Ro.Du.minusTwo)),r.typeRampPlus1FontSize.setValueFor(e,Go(n,Ro.Du.plusOne)),r.typeRampPlus1LineHeight.setValueFor(e,Go(a,Ro.Du.plusOne)),r.typeRampPlus2FontSize.setValueFor(e,Go(n,Ro.Du.plusTwo)),r.typeRampPlus2LineHeight.setValueFor(e,Go(a,Ro.Du.plusTwo)),r.typeRampPlus3FontSize.setValueFor(e,Go(n,Ro.Du.plusThree)),r.typeRampPlus3LineHeight.setValueFor(e,Go(a,Ro.Du.plusThree)),r.typeRampPlus4FontSize.setValueFor(e,Go(n,Ro.Du.plusFour)),r.typeRampPlus4LineHeight.setValueFor(e,Go(a,Ro.Du.plusFour)),r.typeRampPlus5FontSize.setValueFor(e,Go(n,Ro.Du.plusFive)),r.typeRampPlus5LineHeight.setValueFor(e,Go(a,Ro.Du.plusFive)),r.typeRampPlus6FontSize.setValueFor(e,Go(n,Ro.Du.plusSix)),r.typeRampPlus6LineHeight.setValueFor(e,Go(a,Ro.Du.plusSix)),i.customTokens&&zo(e,i.customTokens),Lo.value=structuredClone(i)},Wo=Ho("#08c3a5"),qo=Ho("#eeeeee"),Ko=r.StandardLuminance.DarkMode;const Xo=i(85109).O.ltr,Qo=4,Jo=4;var Zo=i(85090);const en=(e="normal",t="normal")=>`\n font-family: ${r.bodyFont};\n font-style: ${e};\n font-weight: ${t};\n`,tn=l.css`
1145
1145
  ${(0,s.display)("flex")}
1146
1146
  :host {
1147
1147
  flex: 1;
1148
1148
  }
1149
- `,nn=l.css`
1149
+ `,on=l.css`
1150
1150
  :host {
1151
- background-color: ${Oo};
1151
+ background-color: ${Eo};
1152
1152
  }
1153
1153
  `.withBehaviors((0,s.forcedColorsStylesheetBehavior)(l.css`
1154
1154
  :host {
1155
- background-color: ${en.A.ButtonFace};
1156
- box-shadow: 0 0 0 1px ${en.A.CanvasText};
1157
- color: ${en.A.ButtonText};
1155
+ background-color: ${Zo.A.ButtonFace};
1156
+ box-shadow: 0 0 0 1px ${Zo.A.CanvasText};
1157
+ color: ${Zo.A.ButtonText};
1158
1158
  }
1159
- `)),an=(e,t)=>l.css`
1159
+ `)),nn=(e,t)=>l.css`
1160
1160
  ${e.name} ${"h"+t} {
1161
1161
  margin: 0;
1162
1162
  }
1163
- `;class sn extends r.DesignSystemProvider{constructor(){super(),Mo(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:Ho}),_o(To)],sn.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:Ho}),_o(Do)],sn.prototype,"cardForegroundColor",void 0);const rn=sn.compose({baseName:"design-system-provider",template:l.html`
1163
+ `;class an extends r.DesignSystemProvider{constructor(){super(),Fo(o,n,this)}}(0,C.Cg)([(0,l.attr)({attribute:"card-fill-color",converter:_o}),Mo(Oo)],an.prototype,"cardFillColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"card-foreground-color",converter:_o}),Mo(Io)],an.prototype,"cardForegroundColor",void 0);const sn=an.compose({baseName:"design-system-provider",template:l.html`
1164
1164
  <slot></slot>
1165
1165
  `,styles:e=>{const t=(e=>l.css`
1166
- ${an(e,"1")}
1167
- ${an(e,"2")}
1168
- ${an(e,"3")}
1169
- ${an(e,"4")}
1170
- ${an(e,"5")}
1171
- ${an(e,"6")}
1166
+ ${nn(e,"1")}
1167
+ ${nn(e,"2")}
1168
+ ${nn(e,"3")}
1169
+ ${nn(e,"4")}
1170
+ ${nn(e,"5")}
1171
+ ${nn(e,"6")}
1172
1172
  `)(e);return t.addStylesTo(document),l.css`
1173
+ ${tn}
1173
1174
  ${on}
1174
- ${nn}
1175
1175
  ${t}
1176
1176
  :host * {
1177
- ${tn()}
1177
+ ${en()}
1178
1178
  }
1179
- `}});var ln=i(40543);const dn=l.css`
1179
+ `}});var rn=i(40543);const ln=l.css`
1180
1180
  :host {
1181
1181
  --dialog-close-icon-display: flex;
1182
1182
  --dialog-min-width: 358px;
@@ -1445,7 +1445,7 @@
1445
1445
  dialog[style*='position: fixed'] {
1446
1446
  margin: 0;
1447
1447
  }
1448
- `;var cn=i(70997);const un=l.html`
1448
+ `;var dn=i(70997);const cn=l.html`
1449
1449
  <slot>
1450
1450
  ${(0,l.when)(e=>e.notification,l.html`
1451
1451
  <div class="details">
@@ -1453,7 +1453,7 @@
1453
1453
  </div>
1454
1454
  `)}
1455
1455
  </slot>
1456
- `,hn=e=>l.html`
1456
+ `,un=e=>l.html`
1457
1457
  <dialog ${(0,l.ref)("mainElement")} part="dialog" type=${e=>e.type}>
1458
1458
  <div class="content-wrapper" part="content">
1459
1459
  <div part="top" class="top" ${(0,l.ref)("topElement")}>
@@ -1473,9 +1473,9 @@
1473
1473
  `)}
1474
1474
  </div>
1475
1475
  </div>
1476
- ${(0,cn.q)(e=>e.resizable,l.html`
1477
- <div class="content-container" part="content-container">${un}</div>
1478
- `,un)}
1476
+ ${(0,dn.q)(e=>e.resizable,l.html`
1477
+ <div class="content-container" part="content-container">${cn}</div>
1478
+ `,cn)}
1479
1479
  <div part="bottom" class="bottom">
1480
1480
  <slot name="bottom">
1481
1481
  ${(0,l.when)(e=>e.notification,l.html`
@@ -1505,13 +1505,13 @@
1505
1505
  <div class="resize-handle resize-handle-sw" data-direction="sw"></div>
1506
1506
  `)}
1507
1507
  </dialog>
1508
- `,pn=l.html`
1509
- ${e=>hn(T(e))}
1510
- `,mn={mode:"open",delegatesFocus:!0},gn={};class vn extends s.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||ln.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,a=this.startLeft,s=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,a=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,s=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,a=this.startLeft+t,s=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,a=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,s=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(a-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(s-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){a<0&&(o+=a,a=0);const e=l-a;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){s<0&&(n+=s,s=0);const e=d-s;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${a}px`,this.mainElement.style.top=`${s}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){Qe.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}}(0,C.Cg)([l.observable],vn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],vn.prototype,"type",void 0),(0,C.Cg)([l.attr],vn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],vn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],vn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],vn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],vn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],vn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],vn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],vn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],vn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],vn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],vn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],vn.prototype,"open",null),(0,C.Cg)([l.volatile],vn.prototype,"resizeIconName",null);class fn extends vn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const bn=fn.compose(Object.assign({baseName:"dialog",styles:dn,template:pn,shadowOptions:mn},gn)),yn=(e,t)=>l.css`
1508
+ `,hn=l.html`
1509
+ ${e=>un(T(e))}
1510
+ `,pn={mode:"open",delegatesFocus:!0},mn={};class gn extends s.FoundationElement{constructor(){super(...arguments),this.type="default",this.position="center",this.showCloseIcon=!0,this.resizable=!1,this.minWidth=300,this.minHeight=200,this.isResizing=!1,this.currentResizeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.startLeft=0,this.startTop=0,this.resizeOffsetX=0,this.resizeOffsetY=0,this.originalWidth="",this.originalHeight="",this.originalPosition="",this.originalLeft="",this.originalTop="",this.originalMargin="",this.isMaximized=!1,this.hasBeenResized=!1}notificationChanged(){this.notification&&(this.showCloseIcon=!1)}connectedCallback(){super.connectedCallback(),window.HTMLDialogElement||rn.A.registerDialog(this.mainElement),this.mainElement.addEventListener("close",()=>{this.onCloseCallback&&this.onCloseCallback(),this.$emit("close")}),this.hasAttribute("open")&&this.shadowRoot.querySelector("dialog").setAttribute("open",""),this.setupResizeHandlers()}disconnectedCallback(){super.disconnectedCallback(),this.removeResizeHandlers()}setupResizeHandlers(){if(!this.resizable)return;const e=window.innerWidth,t=window.innerHeight;let i=this.minWidth,o=this.minHeight;void 0!==this.initialWidth&&(i=Math.max(this.minWidth,Math.min(this.initialWidth,e))),void 0!==this.initialHeight&&(o=Math.max(this.minHeight,Math.min(this.initialHeight,t))),this.originalWidth=this.mainElement.style.width||`${i}px`,this.originalHeight=this.mainElement.style.height||`${o}px`,this.originalPosition=this.mainElement.style.position||"",this.originalLeft=this.mainElement.style.left||"",this.originalTop=this.mainElement.style.top||"",this.originalMargin=this.mainElement.style.margin||"",this.mainElement.style.height=`${o}px`,this.mainElement.style.minHeight=`${this.minHeight}px`,this.mainElement.style.width=`${i}px`,this.mainElement.style.minWidth=`${this.minWidth}px`,this.originalWidth=this.mainElement.style.width,this.originalHeight=this.mainElement.style.height;this.shadowRoot.querySelectorAll(".resize-handle").forEach(e=>{e.addEventListener("mousedown",this.handleResizeStart.bind(this)),e.addEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}removeResizeHandlers(){var e;document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this));const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".resize-handle");null==t||t.forEach(e=>{e.removeEventListener("dblclick",this.handleEdgeDoubleClick.bind(this))})}handleEdgeDoubleClick(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation();const t=e.target.dataset.direction;if(!["n","s","e","w"].includes(t))return;const i=this.mainElement.getBoundingClientRect(),o=window.innerWidth,n=window.innerHeight;switch(this.mainElement.style.position="fixed",this.mainElement.style.margin="0",t){case"n":this.mainElement.style.height=`${i.bottom}px`,this.mainElement.style.top="0px";break;case"s":this.mainElement.style.height=n-i.top+"px";break;case"e":this.mainElement.style.width=o-i.left+"px";break;case"w":this.mainElement.style.width=`${i.right}px`,this.mainElement.style.left="0px"}this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}handleResizeStart(e){if(!this.resizable)return;e.preventDefault(),e.stopPropagation(),this.isResizing=!0;const t=e.target;this.currentResizeHandle=t.dataset.direction,this.startX=e.clientX,this.startY=e.clientY;const i=this.mainElement.getBoundingClientRect();switch(this.startWidth=i.width,this.startHeight=i.height,this.startLeft=i.left,this.startTop=i.top,this.resizeOffsetX=0,this.resizeOffsetY=0,this.currentResizeHandle){case"n":this.resizeOffsetY=e.clientY-i.top;break;case"s":this.resizeOffsetY=e.clientY-i.bottom;break;case"e":this.resizeOffsetX=e.clientX-i.right;break;case"w":this.resizeOffsetX=e.clientX-i.left;break;case"ne":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.top;break;case"nw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.top;break;case"se":this.resizeOffsetX=e.clientX-i.right,this.resizeOffsetY=e.clientY-i.bottom;break;case"sw":this.resizeOffsetX=e.clientX-i.left,this.resizeOffsetY=e.clientY-i.bottom}this.mainElement.style.position="fixed",this.mainElement.style.left=`${i.left}px`,this.mainElement.style.top=`${i.top}px`,this.mainElement.style.margin="0",document.addEventListener("mousemove",this.handleResizeMove.bind(this)),document.addEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.add("resizing")}handleResizeMove(e){if(!this.isResizing||!this.currentResizeHandle)return;e.preventDefault();const t=e.clientX-this.startX-this.resizeOffsetX,i=e.clientY-this.startY-this.resizeOffsetY;let o=this.startWidth,n=this.startHeight,a=this.startLeft,s=this.startTop,r=!1;switch(this.currentResizeHandle){case"se":o=this.startWidth+t,n=this.startHeight+i;break;case"sw":o=this.startWidth-t,n=this.startHeight+i,a=this.startLeft+t,r=!0;break;case"ne":o=this.startWidth+t,n=this.startHeight-i,s=this.startTop+i,r=!0;break;case"nw":o=this.startWidth-t,n=this.startHeight-i,a=this.startLeft+t,s=this.startTop+i,r=!0;break;case"e":o=this.startWidth+t;break;case"w":o=this.startWidth-t,a=this.startLeft+t,r=!0;break;case"s":n=this.startHeight+i;break;case"n":n=this.startHeight-i,s=this.startTop+i,r=!0}const l=window.innerWidth,d=window.innerHeight;if(this.resizable){if(o<this.minWidth){const e=this.minWidth-o;o=this.minWidth,this.currentResizeHandle.includes("w")&&(a-=e)}if(n<this.minHeight){const e=this.minHeight-n;n=this.minHeight,this.currentResizeHandle.includes("n")&&(s-=e)}if(this.currentResizeHandle.includes("e")){const e=l-this.startLeft;o>e&&(o=e)}if(this.currentResizeHandle.includes("s")){const e=d-this.startTop;n>e&&(n=e)}if(this.currentResizeHandle.includes("w")){a<0&&(o+=a,a=0);const e=l-a;o>e&&(o=e)}if(this.currentResizeHandle.includes("n")){s<0&&(n+=s,s=0);const e=d-s;n>e&&(n=e)}}this.mainElement.style.width=`${o}px`,this.mainElement.style.height=`${n}px`,r&&(this.mainElement.style.left=`${a}px`,this.mainElement.style.top=`${s}px`)}handleResizeEnd(e){if(!this.isResizing)return;e.preventDefault(),this.isResizing=!1,this.currentResizeHandle=null,this.resizeOffsetX=0,this.resizeOffsetY=0,document.removeEventListener("mousemove",this.handleResizeMove.bind(this)),document.removeEventListener("mouseup",this.handleResizeEnd.bind(this)),this.mainElement.classList.remove("resizing");const t=this.mainElement.style.width,i=this.mainElement.style.height;t===this.originalWidth&&i===this.originalHeight||(this.hasBeenResized=!0),this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})}get open(){return this.mainElement.hasAttribute("open")}get resizeIconName(){return this.hasBeenResized||this.isMaximized?"compress":"expand"}close(){this.mainElement.close()}dismiss(){var e,t,i,o;(null===(o=null===(i=null===(t=null===(e=this.notification)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.mainElement.close(),this.remove()}catch(e){Xe.error(e)}}maximize(){this.resizable&&this.mainElement&&(this.mainElement.style.position="fixed",this.mainElement.style.left="0px",this.mainElement.style.top="0px",this.mainElement.style.margin="0",this.mainElement.style.width="100vw",this.mainElement.style.height="100vh",this.isMaximized=!0,this.hasBeenResized=!0,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight}))}resetSize(){this.resizable&&this.mainElement&&(this.hasBeenResized||this.isMaximized?(this.mainElement.style.width=this.originalWidth,this.mainElement.style.height=this.originalHeight,this.mainElement.style.position=this.originalPosition,this.mainElement.style.left=this.originalLeft,this.mainElement.style.top=this.originalTop,this.mainElement.style.margin=this.originalMargin,this.isMaximized=!1,this.hasBeenResized=!1,this.$emit("resize",{width:this.mainElement.offsetWidth,height:this.mainElement.offsetHeight})):this.maximize())}}(0,C.Cg)([l.observable],gn.prototype,"notification",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],gn.prototype,"type",void 0),(0,C.Cg)([l.attr],gn.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-close-icon"})],gn.prototype,"showCloseIcon",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"resizable"})],gn.prototype,"resizable",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-width"})],gn.prototype,"minWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"min-height"})],gn.prototype,"minHeight",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-width"})],gn.prototype,"initialWidth",void 0),(0,C.Cg)([(0,l.attr)({attribute:"initial-height"})],gn.prototype,"initialHeight",void 0),(0,C.Cg)([l.observable],gn.prototype,"onShowCallback",void 0),(0,C.Cg)([l.observable],gn.prototype,"onCloseCallback",void 0),(0,C.Cg)([l.observable],gn.prototype,"isMaximized",void 0),(0,C.Cg)([l.observable],gn.prototype,"hasBeenResized",void 0),(0,C.Cg)([l.volatile],gn.prototype,"open",null),(0,C.Cg)([l.volatile],gn.prototype,"resizeIconName",null);class vn extends gn{show(){this.onShowCallback&&this.onShowCallback(),this.mainElement.show()}}const fn=vn.compose(Object.assign({baseName:"dialog",styles:ln,template:hn,shadowOptions:pn},mn)),bn=(e,t)=>l.css`
1511
1511
  ${(0,r.disclosureStyles)(e,t)}
1512
- `,wn=(e,t)=>(0,s.disclosureTemplate)(e,t);class Cn extends s.Disclosure{}const xn=void 0,$n={},Sn=Cn.compose(Object.assign({baseName:"disclosure",template:wn,styles:yn,shadowOptions:xn},$n)),En=(e,t)=>l.css`
1512
+ `,yn=(e,t)=>(0,s.disclosureTemplate)(e,t);class wn extends s.Disclosure{}const Cn=void 0,xn={},$n=wn.compose(Object.assign({baseName:"disclosure",template:yn,styles:bn,shadowOptions:Cn},xn)),Sn=(e,t)=>l.css`
1513
1513
  ${(0,r.dividerStyles)(e,t)}
1514
- `,On=(e,t)=>(0,s.dividerTemplate)(e,t);class Tn extends s.Divider{}const kn=void 0,In={},Dn=Tn.compose(Object.assign({baseName:"divider",template:On,styles:En,shadowOptions:kn},In)),Rn=(e,t,i)=>l.css`
1514
+ `,En=(e,t)=>(0,s.dividerTemplate)(e,t);class On extends s.Divider{}const Tn=void 0,kn={},In=On.compose(Object.assign({baseName:"divider",template:En,styles:Sn,shadowOptions:Tn},kn)),Dn=(e,t,i)=>l.css`
1515
1515
  :host {
1516
1516
  --dropdown-opener-height-multiplier: 0.7px;
1517
1517
  --menu-item-height-multiplier: 0.7px;
@@ -1574,9 +1574,9 @@
1574
1574
  var(--menu-item-height-multiplier)
1575
1575
  );
1576
1576
  }
1577
- `,An=(e,t)=>l.css`
1578
- ${Rn("foundation",e,t)}
1579
- `,Nn=(e,t)=>l.html`
1577
+ `,Rn=(e,t)=>l.css`
1578
+ ${Dn("foundation",e,t)}
1579
+ `,An=(e,t)=>l.html`
1580
1580
  ${(0,l.repeat)(()=>e,l.html`
1581
1581
  ${(0,l.when)(e=>e.isDisabled&&e.isDisabled(),l.html`
1582
1582
  <${t}-menu-item class="menu-item" disabled>${e=>e.name}</${t}-menu-item>
@@ -1597,12 +1597,12 @@
1597
1597
  `)}
1598
1598
  ${e=>e.name}
1599
1599
  ${(0,l.when)(e=>e.submenu,l.html`
1600
- <${t}-menu>${e=>Nn(e.submenu,t)}</${t}-menu>
1600
+ <${t}-menu>${e=>An(e.submenu,t)}</${t}-menu>
1601
1601
  `)}
1602
1602
  </${t}-menu-item>
1603
1603
  `)}
1604
1604
  `)}
1605
- `,Ln=e=>l.html`
1605
+ `,Nn=e=>l.html`
1606
1606
  <div class="actions-container" part="actions-container">
1607
1607
  <${e}-button
1608
1608
  id="actiosnMenuTrigger"
@@ -1619,12 +1619,12 @@
1619
1619
  class="actions-menu ${e=>e.classNames}"
1620
1620
  part="actions-menu"
1621
1621
  >
1622
- ${t=>Nn(t.allItems,e)}
1622
+ ${t=>An(t.allItems,e)}
1623
1623
  </${e}-menu>
1624
1624
  </div>
1625
- `,Fn=l.html`
1626
- ${e=>Ln(T(e))}
1627
- `;class Mn extends s.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.x)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,C.Cg)([l.observable],Mn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Mn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Mn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Mn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Mn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Mn.prototype,"open",void 0),(0,C.Cg)([l.attr],Mn.prototype,"buttonAppearance",void 0);const _n=Mn.compose({baseName:"dropdown-menu",styles:An,template:Fn});var Hn=i(84686);const zn=l.css`
1625
+ `,Ln=l.html`
1626
+ ${e=>Nn(T(e))}
1627
+ `;class Fn extends s.FoundationElement{constructor(){super(...arguments),this.autoClose=!0,this.disabled=!1,this.name="Dropdown Menu",this.open=!1,this.clickOutside=e=>this.handleClickOutside(e)}connectedCallback(){super.connectedCallback(),this.addEventListener("onMenuClick",this.onDropdownMenuItemClick)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside)}handleClickOutside(e){E(e,this)&&(this.open=!1)}openChanged(){this.classNames=(0,x.x)(["hidden",!this.open]),this.open?document.addEventListener("mousedown",this.clickOutside):document.removeEventListener("mousedown",this.clickOutside)}toggleDropdownMenuVisibility(){this.open=!this.open}onDropdownMenuItemClick(){this.autoClose&&(this.open=!1)}get allItems(){return this.items}}(0,C.Cg)([l.observable],Fn.prototype,"items",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Fn.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-button",mode:"boolean"})],Fn.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Fn.prototype,"classNames",void 0),(0,C.Cg)([l.attr],Fn.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({attribute:"open",mode:"boolean"})],Fn.prototype,"open",void 0),(0,C.Cg)([l.attr],Fn.prototype,"buttonAppearance",void 0);const Mn=Fn.compose({baseName:"dropdown-menu",styles:Rn,template:Ln});var _n=i(84686);const Hn=l.css`
1628
1628
  .environment-indicator {
1629
1629
  font-size: 12px;
1630
1630
  display: inline-flex;
@@ -1651,7 +1651,7 @@
1651
1651
  .environment-indicator.lg .icon {
1652
1652
  font-size: calc(var(--design-unit) * 3.5px);
1653
1653
  }
1654
- `,Pn=l.html`
1654
+ `,zn=l.html`
1655
1655
  ${e=>{return t=T(e),l.html`
1656
1656
  ${(0,l.when)(e=>e.config,l.html`
1657
1657
  <div
@@ -1676,7 +1676,7 @@
1676
1676
  </div>
1677
1677
  `)}
1678
1678
  `;var t}}
1679
- `;var Un=i(17190);const Bn="default",Gn={level:Bn,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},jn=[Gn,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],Vn=(0,Un.r)(),Yn=s.DI.createInterface(e=>e.instance(Vn),e=>e.instance(Vn)),Wn=s.DI.createInterface("EnvironmentIndicatorConfig");function qn(){return(0,C.sH)(this,arguments,void 0,function*(e={configs:[]}){const{configs:t,currentLevel:i}=e,o={currentLevel:i,configs:t&&t.length>0?t:[Gn]};s.DI.getOrCreateDOMContainer().register(s.Registration.instance(Yn,Vn),s.Registration.instance(Wn,o)),Vn.publish(o)})}const Kn=(0,Xe.createLogger)("EnvironmentIndicator");class Xn extends s.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=Gn,this.envConfigs=jn}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=s.DI.getOrCreateDOMContainer().get(Yn);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):Kn.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=s.DI.getOrCreateDOMContainer().get(Wn);if(e)return e}catch(e){return}}(),this.subscribeToDiConfig(),this.config=this.getEnvConfigByLevel()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeConfig&&(this.unsubscribeConfig(),this.unsubscribeConfig=void 0)}getAttributesConfig(){const e={};return["label","size","showIcon","icon","iconSize","backgroundColor","textColor"].filter(e=>!!this[e]).forEach(t=>{e[t]=this[t]}),e||{}}getCurrentEnvironmentLevel(){if(this.level)return this.level;if(this.diConfig)try{const{currentLevel:e}=this.diConfig;if(e)return e}catch(e){Kn.error(e)}return Hn.H6!==Bn?Hn.H6:this.useDefaultConfig?Bn:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?Gn:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},Gn),{level:t}),e);if(this.diConfig){const{configs:i}=this.diConfig;if(i&&i.length>0){const o=i.find(({level:e})=>e===t);if(o)return Object.assign(Object.assign({},o),e)}}const i=this.envConfigs.find(({level:e})=>e===t);return i?Object.assign(Object.assign({},i),e):void 0}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);["level","label","show-icon","icon-size","size","background-color","text-color","icon"].includes(e)&&t!==i&&(this.config=this.getEnvConfigByLevel())}setEnvConfigs(e){this.envConfigs=e}}(0,C.Cg)([l.attr],Xn.prototype,"level",void 0),(0,C.Cg)([l.attr],Xn.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],Xn.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],Xn.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],Xn.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Xn.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Xn.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Xn.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],Xn.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],Xn.prototype,"config",void 0),(0,C.Cg)([l.observable],Xn.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],Xn.prototype,"diConfig",void 0);const Qn=Xn.compose({baseName:"environment-indicator",template:Pn,styles:zn}),Jn=e=>l.html`
1679
+ `;var Pn=i(17190);const Un="default",Bn={level:Un,showIcon:!1,iconSize:"sm",backgroundColor:"#2222ff",textColor:"#ffffff",label:"DEFAULT"},Gn=[Bn,{level:"dev",showIcon:!1,icon:"code",backgroundColor:"#ff6b35",label:"DEV"},{level:"prod",showIcon:!1,icon:"check-circle",backgroundColor:"#28a745",label:"PROD"}],jn=(0,Pn.r)(),Vn=s.DI.createInterface(e=>e.instance(jn),e=>e.instance(jn)),Yn=s.DI.createInterface("EnvironmentIndicatorConfig");function Wn(){return(0,C.sH)(this,arguments,void 0,function*(e={configs:[]}){const{configs:t,currentLevel:i}=e,o={currentLevel:i,configs:t&&t.length>0?t:[Bn]};s.DI.getOrCreateDOMContainer().register(s.Registration.instance(Vn,jn),s.Registration.instance(Yn,o)),jn.publish(o)})}const qn=(0,Ke.createLogger)("EnvironmentIndicator");class Kn extends s.FoundationElement{constructor(){super(...arguments),this.size="sm",this.textColor="#ffffff",this.icon="check-circle",this.iconSize="sm",this.useDefaultConfig=!1,this.config=Bn,this.envConfigs=Gn}envConfigsChanged(){this.config=this.getEnvConfigByLevel()}diConfigChanged(){this.config=this.getEnvConfigByLevel()}subscribeToDiConfig(){const e=s.DI.getOrCreateDOMContainer().get(Vn);e&&"function"==typeof e.subscribe?this.unsubscribeConfig=e.subscribe(e=>{this.diConfig=e}):qn.error("Observer not found or invalid in DI container")}connectedCallback(){super.connectedCallback(),this.diConfig=function(){try{const e=s.DI.getOrCreateDOMContainer().get(Yn);if(e)return e}catch(e){return}}(),this.subscribeToDiConfig(),this.config=this.getEnvConfigByLevel()}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribeConfig&&(this.unsubscribeConfig(),this.unsubscribeConfig=void 0)}getAttributesConfig(){const e={};return["label","size","showIcon","icon","iconSize","backgroundColor","textColor"].filter(e=>!!this[e]).forEach(t=>{e[t]=this[t]}),e||{}}getCurrentEnvironmentLevel(){if(this.level)return this.level;if(this.diConfig)try{const{currentLevel:e}=this.diConfig;if(e)return e}catch(e){qn.error(e)}return _n.H6!==Un?_n.H6:this.useDefaultConfig?Un:void 0}getEnvConfigByLevel(){const e=this.getAttributesConfig(),t=this.getCurrentEnvironmentLevel();if(!t)return this.useDefaultConfig?Bn:void 0;if(this.label)return Object.assign(Object.assign(Object.assign({},Bn),{level:t}),e);if(this.diConfig){const{configs:i}=this.diConfig;if(i&&i.length>0){const o=i.find(({level:e})=>e===t);if(o)return Object.assign(Object.assign({},o),e)}}const i=this.envConfigs.find(({level:e})=>e===t);return i?Object.assign(Object.assign({},i),e):void 0}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i);["level","label","show-icon","icon-size","size","background-color","text-color","icon"].includes(e)&&t!==i&&(this.config=this.getEnvConfigByLevel())}setEnvConfigs(e){this.envConfigs=e}}(0,C.Cg)([l.attr],Kn.prototype,"level",void 0),(0,C.Cg)([l.attr],Kn.prototype,"label",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"show-icon"})],Kn.prototype,"showIcon",void 0),(0,C.Cg)([l.attr],Kn.prototype,"size",void 0),(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],Kn.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],Kn.prototype,"textColor",void 0),(0,C.Cg)([l.attr],Kn.prototype,"icon",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],Kn.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"use-default-config"})],Kn.prototype,"useDefaultConfig",void 0),(0,C.Cg)([l.observable],Kn.prototype,"config",void 0),(0,C.Cg)([l.observable],Kn.prototype,"envConfigs",void 0),(0,C.Cg)([l.observable],Kn.prototype,"diConfig",void 0);const Xn=Kn.compose({baseName:"environment-indicator",template:zn,styles:Hn}),Qn=e=>l.html`
1680
1680
  <${e}-banner ${(0,l.ref)("banner")}>
1681
1681
  <div slot="content">
1682
1682
  <div>
@@ -1697,13 +1697,13 @@
1697
1697
  </${e}-button>
1698
1698
  `)}
1699
1699
  </${e}-banner>
1700
- `,Zn=l.html`
1701
- ${e=>Jn(T(e))}
1702
- `,ea={mode:"open",delegatesFocus:!0};class ta extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Qe.deprecated("ErrorBanner","Use `${prefix}-banner` instead.")}dismiss(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){Qe.error(e)}})}}(0,C.Cg)([l.observable],ta.prototype,"error",void 0),(0,C.Cg)([l.observable],ta.prototype,"notification",void 0);const ia=ta.compose({baseName:"error-banner",template:Zn,shadowOptions:ea});var oa;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(oa||(oa={}));const na=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.errorDetails)&&void 0!==i?i:"Something went wrong"}`},aa=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||Xe.LogLevel.Error},sa=(e,t)=>{const i=t.split("-")[0];let o=document.querySelector(`#${e}`);if(!o){o=document.createElement("div"),o.setAttribute("id",e);const t=document.createElement(`${i}-design-system-provider`);t.appendChild(o),document.body.appendChild(t)}return o},ra=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},la=(0,Xe.createLogger)("foundation-error"),da={alert:e=>{alert(na(e))},notification:(e,t)=>{var i,o,n,a,s,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=sa("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(s=null===(a=null==e?void 0:e.config)||void 0===a?void 0:a.notification)||void 0===s?void 0:s.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);sa("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);sa("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],a=document.createElement(`${n}-error-banner`),s=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return ra()})(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.error=e}},ca=(e,t,i)=>{la.log({message:na(e),level:aa(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{da[o]&&da[o](e,t,i)})};class ua{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return this.logLevel in Xe.LogLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class ha{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const pa=l.html`
1700
+ `,Jn=l.html`
1701
+ ${e=>Qn(T(e))}
1702
+ `,Zn={mode:"open",delegatesFocus:!0};class ea extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Xe.deprecated("ErrorBanner","Use `${prefix}-banner` instead.")}dismiss(){return(0,C.sH)(this,void 0,void 0,function*(){try{yield this.banner.dismiss(),this.remove()}catch(e){Xe.error(e)}})}}(0,C.Cg)([l.observable],ea.prototype,"error",void 0),(0,C.Cg)([l.observable],ea.prototype,"notification",void 0);const ta=ea.compose({baseName:"error-banner",template:Jn,shadowOptions:Zn});var ia;!function(e){e.ERROR_BOUNDARY_EVENT="error-boundary-event"}(ia||(ia={}));const oa=e=>{var t,i;return`${null!==(t=null==e?void 0:e.title)&&void 0!==t?t:"Error"}: ${null!==(i=null==e?void 0:e.errorDetails)&&void 0!==i?i:"Something went wrong"}`},na=e=>{var t;return(null==e?void 0:e.logLevel)||(null===(t=null==e?void 0:e.config)||void 0===t?void 0:t.logLevel)||Ke.LogLevel.Error},aa=(e,t)=>{const i=t.split("-")[0];let o=document.querySelector(`#${e}`);if(!o){o=document.createElement("div"),o.setAttribute("id",e);const t=document.createElement(`${i}-design-system-provider`);t.appendChild(o),document.body.appendChild(t)}return o},sa=()=>{const e=document.createElement("div");return e.setAttribute("id","error-banner-anchor"),e.style.position="relative",document.body.insertBefore(e,document.body.firstChild),e},ra=(0,Ke.createLogger)("foundation-error"),la={alert:e=>{alert(oa(e))},notification:(e,t)=>{var i,o,n,a,s,r,l,d,c,u,h,p,m;const g=t.split("-")[0],v=aa("notify-container",t);if(v)switch(v.style.position="fixed",null===(o=null===(i=null==e?void 0:e.config)||void 0===i?void 0:i.notification)||void 0===o?void 0:o.position){case"top-left":v.style.top="0",v.style.left="0";break;case"bottom-left":v.style.bottom="0",v.style.left="0";break;case"bottom-right":v.style.bottom="0",v.style.right="0";break;default:v.style.top="0",v.style.right="0"}const f=document.createElement(`${g}-toast`),b=document.createElement("div");b.setAttribute("slot","top"),b.textContent=null!==(n=e.title)&&void 0!==n?n:"Error";const y=document.createElement("div");y.setAttribute("slot","content"),y.textContent=(null==e?void 0:e.errorDetails)||"";const w=document.createElement("div");w.setAttribute("slot","date"),w.textContent=(new Date).toLocaleTimeString(),f.setAttribute("notify",(null===(s=null===(a=null==e?void 0:e.config)||void 0===a?void 0:a.notification)||void 0===s?void 0:s.type)||""),(null===(l=null===(r=null==e?void 0:e.config)||void 0===r?void 0:r.notification)||void 0===l?void 0:l.autoClose)&&f.setAttribute("auto-close",`${null===(c=null===(d=null==e?void 0:e.config)||void 0===d?void 0:d.notification)||void 0===c?void 0:c.autoClose}`),(null===(h=null===(u=null==e?void 0:e.config)||void 0===u?void 0:u.notification)||void 0===h?void 0:h.closeTimeout)&&f.setAttribute("close-timeout",`${null===(m=null===(p=null==e?void 0:e.config)||void 0===p?void 0:p.notification)||void 0===m?void 0:m.closeTimeout}`),f.appendChild(b),f.appendChild(y),f.appendChild(w),v.appendChild(f)},dialog:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-error-dialog`);aa("dialog-container",t).appendChild(o),o.error=e,o.show()},snackbar:(e,t)=>{const i=t.split("-")[0],o=document.createElement(`${i}-snackbar`);aa("snack-container",t).appendChild(o),o.error=e},banner:(e,t,i)=>{var o;const n=t.split("-")[0],a=document.createElement(`${n}-error-banner`),s=(e=>{for(var t,i;e&&!(e instanceof ShadowRoot);){const o=null===(t=null==e?void 0:e.getRootNode())||void 0===t?void 0:t.getElementById("error-banner-anchor");if(o)return o.style.position="relative",o;e=null===(i=null==e?void 0:e.getRootNode())||void 0===i?void 0:i.host}return sa()})(i);(null===(o=null==s?void 0:s.children)||void 0===o?void 0:o.length)>0&&(a.style.position="absolute",a.style.top="0",a.style.left="0",a.style.width="100%"),s.appendChild(a),a.error=e}},da=(e,t,i)=>{ra.log({message:oa(e),level:na(e)});Object.keys((null==e?void 0:e.config)||{}).forEach(o=>{la[o]&&la[o](e,t,i)})};class ca{withTitle(e){return this.title=e,this}withErrorDetails(e){return this.errorDetails=e,this}withLogLevel(e){return this.logLevel=e,this}withAlert(e){return this.alert=e,this}withNotification(e){return this.notification=e,this}withBanner(e){return this.banner=e,this}withSnackbar(e){return this.snackbar=e,this}withDialog(e){return this.dialog=e,this}build(){if(!this.title)throw new Error("Title is required");if(!this.errorDetails)throw new Error("Missing required param 'errorDetails'");let e={title:this.title,errorDetails:this.errorDetails},t={};return this.logLevel in Ke.LogLevel&&(e=Object.assign({logLevel:this.logLevel},e)),this.alert&&(t=Object.assign({alert:this.alert},t),e=Object.assign({config:t},e)),this.notification&&(t=Object.assign({notification:this.notification},t),e=Object.assign({config:t},e)),this.banner&&(t=Object.assign({banner:this.banner},t),e=Object.assign({config:t},e)),this.snackbar&&(t=Object.assign({snackbar:this.snackbar},t),e=Object.assign({config:t},e)),this.dialog&&(t=Object.assign({dialog:this.dialog},t),e=Object.assign({config:t},e)),e}}class ua{withPosition(e){return this.position=e,this}withAutoClose(e){return this.autoClose=e,this}withCloseTimeout(e){return this.closeTimeout=e,this}withType(e){return this.type=e,this}build(){let e={};return this.position&&(e=Object.assign({position:this.position},e)),this.autoClose&&(e=Object.assign({autoClose:this.autoClose},e)),this.closeTimeout&&(e=Object.assign({closeTimeout:this.closeTimeout},e)),this.type&&(e=Object.assign({type:this.type},e)),e}}const ha=l.html`
1703
1703
  <template ${(0,l.ref)("errorBoundary")}>
1704
1704
  <slot></slot>
1705
1705
  </template>
1706
- `,ma={mode:"open",delegatesFocus:!0};class ga extends s.FoundationElement{constructor(){super(...arguments),this.logger=(0,Xe.createLogger)("error-boundary"),this.closeTimeout=0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;if(e.connectedCallback.call(this),this.addEventListener(oa.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),ca(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void Qe.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe(e=>{if(!e.ROW)return;const t=null==e?void 0:e.ROW[0];if(e.SEQUENCE_ID>1){const e=t.HEADER,i=null==t?void 0:t.BODY,o=t.NOTIFY_SEVERITY;ca((new ua).withTitle(e).withErrorDetails(i).withNotification((new ha).withType(o).withAutoClose(!!this.closeTimeout).withCloseTimeout(this.closeTimeout).build()).build(),this.tagName,this.errorBoundary)}})}})}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}}(0,C.Cg)([l.observable],ga.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],ga.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],ga.prototype,"closeTimeout",void 0),(0,C.Cg)([ni.yW],ga.prototype,"datasource",void 0);const va=ga.compose({baseName:"error-boundary",template:pa,shadowOptions:ma}),fa=l.css`
1706
+ `,pa={mode:"open",delegatesFocus:!0};class ma extends s.FoundationElement{constructor(){super(...arguments),this.logger=(0,Ke.createLogger)("error-boundary"),this.closeTimeout=0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;if(e.connectedCallback.call(this),this.addEventListener(ia.ERROR_BOUNDARY_EVENT,e=>{e.stopImmediatePropagation(),da(e.detail,this.tagName,this.errorBoundary)}),this.resourceName){if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))return void Xe.debug(`Genesis Datasource init failed for ${this.resourceName}`);this.dataSub=null===(t=this.datasource.stream)||void 0===t?void 0:t.subscribe(e=>{if(!e.ROW)return;const t=null==e?void 0:e.ROW[0];if(e.SEQUENCE_ID>1){const e=t.HEADER,i=null==t?void 0:t.BODY,o=t.NOTIFY_SEVERITY;da((new ca).withTitle(e).withErrorDetails(i).withNotification((new ua).withType(o).withAutoClose(!!this.closeTimeout).withCloseTimeout(this.closeTimeout).build()).build(),this.tagName,this.errorBoundary)}})}})}disconnectedCallback(){var e,t;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.datasource)||void 0===t||t.destroy(),delete this.datasource}}(0,C.Cg)([l.observable],ma.prototype,"errorBoundary",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],ma.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],ma.prototype,"closeTimeout",void 0),(0,C.Cg)([oi.yW],ma.prototype,"datasource",void 0);const ga=ma.compose({baseName:"error-boundary",template:ha,shadowOptions:pa}),va=l.css`
1707
1707
  :host {
1708
1708
  --design-unit: 3;
1709
1709
  --dialog-max-width: 358px;
@@ -1722,7 +1722,7 @@
1722
1722
  overflow: hidden;
1723
1723
  min-height: var(--error-details-min-height);
1724
1724
  }
1725
- `,ba=e=>l.html`
1725
+ `,fa=e=>l.html`
1726
1726
  <${e}-dialog show-close-icon="false" ${(0,l.ref)("dialog")}>
1727
1727
  <h2 slot="top" class="title">${e=>{var t;return null===(t=e.error)||void 0===t?void 0:t.title}}</h2>
1728
1728
  <div class="details">${e=>{var t,i;return(null===(t=e.error)||void 0===t?void 0:t.errorDetails)||(null===(i=e.notification)||void 0===i?void 0:i.body)||"Place holder for error message"}}</div>
@@ -1739,9 +1739,9 @@
1739
1739
  </${e}-button>
1740
1740
  `)}
1741
1741
  </${e}-dialog>
1742
- `,ya=l.html`
1743
- ${e=>ba(T(e))}
1744
- `,wa={mode:"open",delegatesFocus:!0};class Ca extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Qe.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,a,s,r;(null===(o=null===(i=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.error.config.dialog.dismissingAction.action(),(null===(r=null===(s=null===(a=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===a?void 0:a.dialog)||void 0===s?void 0:s.dismissingAction)||void 0===r?void 0:r.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){Qe.error(e)}}}(0,C.Cg)([l.observable],Ca.prototype,"error",void 0),(0,C.Cg)([l.observable],Ca.prototype,"notification",void 0);const xa=Ca.compose({baseName:"error-dialog",template:ya,styles:fa,shadowOptions:wa});class $a extends s.FoundationElement{constructor(){super(...arguments),this.selectedFile=null,this.accept="",this.fileSizeLimitBytes=10485760,this.fileName="",this.isProcessing=!1}handleClick(){this.fileInput.value=null,this.fileInput.click()}onInputChange(e){var t;const i=null==e?void 0:e.target,o=Array.from(null!==(t=null==i?void 0:i.files)&&void 0!==t?t:[]),n=o.find(e=>e.size>this.fileSizeLimitBytes);if(n){const e=`File "${n.name}" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;return this.showError("File Size Error",e),void this.$emit("error",new Error(e))}this.onFileSelected(o)}clearSelection(){this.fileName="",this.selectedFile=null,this.isProcessing=!1,this.fileInput&&(this.fileInput.value=""),this.onFileCleared(),this.$emit("clear")}getSelectedFile(){return this.selectedFile}showError(e,t){ge({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],$a.prototype,"label",void 0),(0,C.Cg)([l.attr],$a.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],$a.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],$a.prototype,"fileName",void 0),(0,C.Cg)([l.observable],$a.prototype,"isProcessing",void 0);const Sa=(e,t,i)=>l.css`
1742
+ `,ba=l.html`
1743
+ ${e=>fa(T(e))}
1744
+ `,ya={mode:"open",delegatesFocus:!0};class wa extends s.FoundationElement{connectedCallback(){super.connectedCallback(),Xe.deprecated("ErrorDialog","Use `${prefix}-dialog` instead.")}show(){this.dialog.show()}dismiss(){var e,t,i,o,n,a,s,r;(null===(o=null===(i=null===(t=null===(e=this.error)||void 0===e?void 0:e.config)||void 0===t?void 0:t.dialog)||void 0===i?void 0:i.dismissingAction)||void 0===o?void 0:o.action)&&this.error.config.dialog.dismissingAction.action(),(null===(r=null===(s=null===(a=null===(n=this.notification)||void 0===n?void 0:n.config)||void 0===a?void 0:a.dialog)||void 0===s?void 0:s.dismissingAction)||void 0===r?void 0:r.action)&&this.notification.config.dialog.dismissingAction.action(),this.closeDialog()}closeDialog(){try{this.dialog.close(),this.remove()}catch(e){Xe.error(e)}}}(0,C.Cg)([l.observable],wa.prototype,"error",void 0),(0,C.Cg)([l.observable],wa.prototype,"notification",void 0);const Ca=wa.compose({baseName:"error-dialog",template:ba,styles:va,shadowOptions:ya});class xa extends s.FoundationElement{constructor(){super(...arguments),this.selectedFile=null,this.accept="",this.fileSizeLimitBytes=10485760,this.fileName="",this.isProcessing=!1}handleClick(){this.fileInput.value=null,this.fileInput.click()}onInputChange(e){var t;const i=null==e?void 0:e.target,o=Array.from(null!==(t=null==i?void 0:i.files)&&void 0!==t?t:[]),n=o.find(e=>e.size>this.fileSizeLimitBytes);if(n){const e=`File "${n.name}" exceeds size limit of ${this.fileSizeLimitBytes} bytes`;return this.showError("File Size Error",e),void this.$emit("error",new Error(e))}this.onFileSelected(o)}clearSelection(){this.fileName="",this.selectedFile=null,this.isProcessing=!1,this.fileInput&&(this.fileInput.value=""),this.onFileCleared(),this.$emit("clear")}getSelectedFile(){return this.selectedFile}showError(e,t){me({title:e,body:t,config:{toast:{type:"warning",autoClose:!0,closeTimeout:5e3}}},this.tagName)}}(0,C.Cg)([l.attr],xa.prototype,"label",void 0),(0,C.Cg)([l.attr],xa.prototype,"accept",void 0),(0,C.Cg)([(0,l.attr)({attribute:"file-size-limit-bytes"})],xa.prototype,"fileSizeLimitBytes",void 0),(0,C.Cg)([l.observable],xa.prototype,"fileName",void 0),(0,C.Cg)([l.observable],xa.prototype,"isProcessing",void 0);const $a=(e,t,i)=>l.css`
1745
1745
  /* Host */
1746
1746
  :host {
1747
1747
  display: flex;
@@ -1791,9 +1791,9 @@
1791
1791
  justify-content: center;
1792
1792
  z-index: 2;
1793
1793
  }
1794
- `,Ea=(e,t)=>l.css`
1795
- ${Sa("foundation",e,t)}
1796
- `,Oa=e=>l.html`
1794
+ `,Sa=(e,t)=>l.css`
1795
+ ${$a("foundation",e,t)}
1796
+ `,Ea=e=>l.html`
1797
1797
  <template>
1798
1798
  <div class="file-reader">
1799
1799
  ${(0,l.when)(e=>e.isProcessing,l.html`
@@ -1829,9 +1829,9 @@
1829
1829
  `)}
1830
1830
  </div>
1831
1831
  </template>
1832
- `,Ta=l.html`
1833
- ${e=>Oa(T(e))}
1834
- `;class ka extends $a{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=".json,application/json"}onFileSelected(e){var t,i;const o=e[0];if(o&&this.accept.includes("json")&&!(null===(i=null===(t=null==o?void 0:o.name)||void 0===t?void 0:t.toLowerCase())||void 0===i?void 0:i.endsWith(".json"))){const e="Selected file is not a JSON file";return this.showError("File Type Error",e),void this.$emit("error",new Error(e))}this.selectedFile=o,this.fileName=o.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.getSelectedFile()){this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{const t=yield this.getSelectedFile().text();let i;try{i=JSON.parse(t)}catch(e){return this.showError("Invalid JSON Format","The selected file contains invalid JSON"),void this.$emit("error",e)}this.fileContent=i,this.$emit("file-read",{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),null===(e=this.onFileRead)||void 0===e||e.call(this,this.fileContent)}catch(e){this.showError("File Processing Error","An error occurred while processing the file"),this.$emit("error",e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}}else this.showError("No File Selected","Please select a file to process")})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}}(0,C.Cg)([(0,l.attr)({attribute:"auto-process",mode:"boolean"})],ka.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],ka.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],ka.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],ka.prototype,"onFileRead",void 0);const Ia=ka.compose({baseName:"file-reader",styles:Ea,template:Ta});var Da=i(17465),Ra=i(32748);const Aa=l.css`
1832
+ `,Oa=l.html`
1833
+ ${e=>Ea(T(e))}
1834
+ `;class Ta extends xa{constructor(){super(),this.processingTimeout=null,this.autoProcess=!1,this.processingDelayMs=1e3,this.fileContent=null,this.accept=".json,application/json"}onFileSelected(e){var t,i;const o=e[0];if(o&&this.accept.includes("json")&&!(null===(i=null===(t=null==o?void 0:o.name)||void 0===t?void 0:t.toLowerCase())||void 0===i?void 0:i.endsWith(".json"))){const e="Selected file is not a JSON file";return this.showError("File Type Error",e),void this.$emit("error",new Error(e))}this.selectedFile=o,this.fileName=o.name,this.autoProcess&&this.handleFileProcessing()}onFileCleared(){this.fileContent=null,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}handleFileProcessing(){return(0,C.sH)(this,void 0,void 0,function*(){var e;if(this.getSelectedFile()){this.processingTimeout&&clearTimeout(this.processingTimeout),this.isProcessing=!0;try{const t=yield this.getSelectedFile().text();let i;try{i=JSON.parse(t)}catch(e){return this.showError("Invalid JSON Format","The selected file contains invalid JSON"),void this.$emit("error",e)}this.fileContent=i,this.$emit("file-read",{fileName:this.fileName,content:this.fileContent,file:this.getSelectedFile()}),null===(e=this.onFileRead)||void 0===e||e.call(this,this.fileContent)}catch(e){this.showError("File Processing Error","An error occurred while processing the file"),this.$emit("error",e)}finally{this.processingTimeout=window.setTimeout(()=>{this.isProcessing=!1,this.processingTimeout=null},this.processingDelayMs)}}else this.showError("No File Selected","Please select a file to process")})}getFileContent(){return this.fileContent}disconnectedCallback(){super.disconnectedCallback(),this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null)}}(0,C.Cg)([(0,l.attr)({attribute:"auto-process",mode:"boolean"})],Ta.prototype,"autoProcess",void 0),(0,C.Cg)([(0,l.attr)({attribute:"processing-delay-ms"})],Ta.prototype,"processingDelayMs",void 0),(0,C.Cg)([l.observable],Ta.prototype,"fileContent",void 0),(0,C.Cg)([l.observable],Ta.prototype,"onFileRead",void 0);const ka=Ta.compose({baseName:"file-reader",styles:Sa,template:Oa});var Ia=i(17465),Da=i(32748);const Ra=l.css`
1835
1835
  /* Host */
1836
1836
  :host {
1837
1837
  display: flex;
@@ -1879,7 +1879,7 @@
1879
1879
  fast-data-grid-row {
1880
1880
  align-items: center;
1881
1881
  }
1882
- `,Na=e=>l.html`
1882
+ `,Aa=e=>l.html`
1883
1883
  <template>
1884
1884
  <div class="file-selection">
1885
1885
  <input type="file" multiple ${(0,l.ref)("fileInput")}
@@ -1905,13 +1905,13 @@
1905
1905
  </${e}-data-grid>
1906
1906
  </div>
1907
1907
  </template>
1908
- `,La=l.html`
1909
- ${e=>Na(T(e))}
1910
- `,Fa=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Ma=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},_a=(e,t,i,o="GET",n,a,s="zero")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:a,headers:r,credentials:"include"}).then(e=>(0,C.sH)(void 0,void 0,void 0,function*(){var t;if(e.ok)return e.blob();{const i=yield e.json();n&&ge({title:null==i?void 0:i.MESSAGE_TYPE,body:null===(t=null==i?void 0:i.DETAILS)||void 0===t?void 0:t.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:"warning"}}},s),Qe.error(i||"An error occurred while downloading the file.")}})).then(e=>{if(e){const i=window.URL.createObjectURL(e),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),n&&ge({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},s),Qe.info("File downloaded successfully")}}).catch(e=>{Qe.error(e)})},Ha=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],za=["text/plain","text/csv"],Pa=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"],Ua=l.html`
1908
+ `,Na=l.html`
1909
+ ${e=>Aa(T(e))}
1910
+ `,La=e=>{const t=new FormData;return e.forEach(e=>{t.append(e.name,e)}),t},Fa=(e,t,i,o)=>{const n=new Headers;return n.append("SESSION_AUTH_TOKEN",i),o.post(e,{body:t,headers:n})},Ma=(e,t,i,o="GET",n,a,s="zero")=>{const r=new Headers;r.append("SESSION_AUTH_TOKEN",i),fetch(e,{method:o,body:a,headers:r,credentials:"include"}).then(e=>(0,C.sH)(void 0,void 0,void 0,function*(){var t;if(e.ok)return e.blob();{const i=yield e.json();n&&me({title:null==i?void 0:i.MESSAGE_TYPE,body:null===(t=null==i?void 0:i.DETAILS)||void 0===t?void 0:t.ERROR,config:{toast:{autoClose:!0,closeTimeout:5e3,type:"warning"}}},s),Xe.error(i||"An error occurred while downloading the file.")}})).then(e=>{if(e){const i=window.URL.createObjectURL(e),o=document.createElement("a");o.href=i,o.download=t,document.body.appendChild(o),o.click(),o.remove(),n&&me({title:"Success",body:"File downloaded successfully",config:{toast:{autoClose:!0,closeTimeout:5e3,type:"success"}}},s),Xe.info("File downloaded successfully")}}).catch(e=>{Xe.error(e)})},_a=["image/png","image/bmp","image/gif","image/jpeg","image/jpg"],Ha=["text/plain","text/csv"],za=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/pdf"],Pa=l.html`
1911
1911
  ${(0,l.when)(e=>e.rowData,l.html`
1912
- ${e=>"DATETIME"===e.columnDefinition.type?(0,ai.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
1912
+ ${e=>"DATETIME"===e.columnDefinition.type?(0,ni.zT)(e.rowData[e.columnDefinition.columnDataKey]):e.rowData[e.columnDefinition.columnDataKey]}
1913
1913
  `)}
1914
- `;class Ba extends $a{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName="ALL_FILE_ATTACHMENTS",this.uploadEventName="gwf/attachment-handler/upload",this.gridFields="",this.fileName="",this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(",").forEach(t=>{"image/*"===t?e=[...e,...Ha]:"office/*"===t?e=[...e,...Pa]:"text/*"===t?e=[...e,...za]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),(null===(t=this.filesGridColumnDefinitions)||void 0===t?void 0:t.length)||this.setColumnDefs()})}setupGrid(){void 0!==this.entityId&&void 0!==this.fieldName&&(this.gridCriteria=(new j.b).withExpression((new G.K).withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(const i of e.ROW)if(i.DETAILS)switch(i.DETAILS.OPERATION){case"INSERT":this.uploadedFilesList.unshift(i);break;case"MODIFY":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,i);break;case"DELETE":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Da.v.error(`Unsupported operation type: ${i.DETAILS.OPERATION}`)}}setRowData(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{var t;1===e.SEQUENCE_ID?this.uploadedFilesList=null!==(t=e.ROW)&&void 0!==t?t:[]:this.handleStreamRowOperation(e)},e=>{Da.v.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return(0,C.sH)(this,void 0,void 0,function*(){var e;const t=yield this.connect.getMetadata(this.uploadedFilesResourceName),i=[];this.gridFields.length>0?this.gridFields.split(" ").forEach(e=>{var o;const n=null===(o=t.FIELD)||void 0===o?void 0:o.find(t=>t.NAME===e);n?i.push(this.getColumnObject(n)):"DOWNLOAD"===e&&this.downloadEventName&&i.push(this.getDownloadColumn())}):(null===(e=t.FIELD)||void 0===e||e.forEach(e=>{i.push(this.getColumnObject(e))}),this.downloadEventName&&i.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=i})}getDownloadColumn(){const e=this.tagName.toLowerCase().split("-")[0];return{columnDataKey:"FILE_NAME",title:"File",cellTemplate:l.html`
1914
+ `;class Ua extends xa{constructor(){super(...arguments),this.acceptedFormats=[],this.selectedFiles=[],this.uploadedFilesResourceName="ALL_FILE_ATTACHMENTS",this.uploadEventName="gwf/attachment-handler/upload",this.gridFields="",this.fileName="",this.uploadedFilesList=[],this.filesGridColumnDefinitions=[]}acceptChanged(){let e=[];this.accept.length>0&&this.accept.split(",").forEach(t=>{"image/*"===t?e=[...e,..._a]:"office/*"===t?e=[...e,...za]:"text/*"===t?e=[...e,...Ha]:e.push(t)}),this.acceptedFormats=e}fieldNameChanged(){this.setupGrid()}entityIdChanged(){this.setupGrid()}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),(null===(t=this.filesGridColumnDefinitions)||void 0===t?void 0:t.length)||this.setColumnDefs()})}setupGrid(){void 0!==this.entityId&&void 0!==this.fieldName&&(this.gridCriteria=(new G.b).withExpression((new B.K).withField(this.fieldName).withValue(this.entityId).build()).build(),this.setRowData())}handleStreamRowOperation(e){let t;for(const i of e.ROW)if(i.DETAILS)switch(i.DETAILS.OPERATION){case"INSERT":this.uploadedFilesList.unshift(i);break;case"MODIFY":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1,i);break;case"DELETE":t=this.uploadedFilesList.findIndex(e=>e.FILE_ATTACHMENT_ID===i.FILE_ATTACHMENT_ID),this.uploadedFilesList.splice(t,1);break;default:Ia.v.error(`Unsupported operation type: ${i.DETAILS.OPERATION}`)}}setRowData(){return(0,C.sH)(this,void 0,void 0,function*(){yield this.connect.stream(this.uploadedFilesResourceName,e=>{var t;1===e.SEQUENCE_ID?this.uploadedFilesList=null!==(t=e.ROW)&&void 0!==t?t:[]:this.handleStreamRowOperation(e)},e=>{Ia.v.error(e)},{CRITERIA_MATCH:this.gridCriteria})})}setColumnDefs(){return(0,C.sH)(this,void 0,void 0,function*(){var e;const t=yield this.connect.getMetadata(this.uploadedFilesResourceName),i=[];this.gridFields.length>0?this.gridFields.split(" ").forEach(e=>{var o;const n=null===(o=t.FIELD)||void 0===o?void 0:o.find(t=>t.NAME===e);n?i.push(this.getColumnObject(n)):"DOWNLOAD"===e&&this.downloadEventName&&i.push(this.getDownloadColumn())}):(null===(e=t.FIELD)||void 0===e||e.forEach(e=>{i.push(this.getColumnObject(e))}),this.downloadEventName&&i.push(this.getDownloadColumn())),this.filesGridColumnDefinitions=i})}getDownloadColumn(){const e=this.tagName.toLowerCase().split("-")[0];return{columnDataKey:"FILE_NAME",title:"File",cellTemplate:l.html`
1915
1915
  <template>
1916
1916
  <div class="download-button-container">
1917
1917
  <${e}-button
@@ -1922,7 +1922,7 @@
1922
1922
  </${e}-button>
1923
1923
  </div>
1924
1924
  </template>
1925
- `}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:Ua}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){const t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0)for(const e of t)if(!(this.accept.split(",").includes(".msg")&&e.name&&e.name.endsWith("msg")||this.acceptedFormats.includes(e.type)))return void this.showError("File Type Error",`Not a valid file type. Accepted Formats are ${this.accept}`);this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit("file-selected",{files:this.selectedFiles})}onFileCleared(){this.fileName="",this.selectedFiles=[]}handleFileUpload(){return(0,C.sH)(this,void 0,void 0,function*(){try{const e=Fa(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Ma(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Da.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Da.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Da.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];_a(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],Ba.prototype,"gridCriteria",void 0),(0,C.Cg)([oi.dm],Ba.prototype,"connect",void 0),(0,C.Cg)([Ra.l],Ba.prototype,"http",void 0),(0,C.Cg)([yi.N],Ba.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],Ba.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],Ba.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],Ba.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],Ba.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],Ba.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],Ba.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],Ba.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Ba.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],Ba.prototype,"filesGridColumnDefinitions",void 0);const Ga=void 0,ja={},Va=Ba.compose(Object.assign({baseName:"file-upload",styles:Aa,template:La,shadowOptions:Ga},ja)),Ya=l.css`
1925
+ `}}getColumnObject(e){return{columnDataKey:e.NAME,title:e.NAME.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),type:e.TYPE,cellTemplate:Pa}}handleClick(){this.fileInput.value=null,this.fileInput.click()}onFileSelected(e){const t=Array.isArray(e)?e:[e];if(t.length>0&&this.acceptedFormats.length>0)for(const e of t)if(!(this.accept.split(",").includes(".msg")&&e.name&&e.name.endsWith("msg")||this.acceptedFormats.includes(e.type)))return void this.showError("File Type Error",`Not a valid file type. Accepted Formats are ${this.accept}`);this.selectedFiles=t,this.fileName=this.selectedFiles.map(e=>e.name.trim()).join(),this.$emit("file-selected",{files:this.selectedFiles})}onFileCleared(){this.fileName="",this.selectedFiles=[]}handleFileUpload(){return(0,C.sH)(this,void 0,void 0,function*(){try{const e=La(this.selectedFiles);e.append(this.uploadKey,this.entityId);const t=yield Fa(this.uploadEventName,e,this.session.getItem("authToken","session"),this.http);if(t.ERROR)return Ia.v.error(t.ERROR),void this.$emit("errorOut",t.ERROR);Ia.v.info(t),this.$emit("success",t),this.clearSelection()}catch(e){this.$emit("errorOut",e),Ia.v.error(e)}})}handleFileDownload(e){const t=this.tagName.toLowerCase().split("-")[0];Ma(this.downloadEventName(e),e.FILE_NAME,this.session.getItem("authToken","session"),"GET",!0,void 0,t)}}(0,C.Cg)([l.observable],Ua.prototype,"gridCriteria",void 0),(0,C.Cg)([ii.dm],Ua.prototype,"connect",void 0),(0,C.Cg)([Da.l],Ua.prototype,"http",void 0),(0,C.Cg)([bi.N],Ua.prototype,"session",void 0),(0,C.Cg)([(0,l.attr)({attribute:"uploaded-files-resource-name"})],Ua.prototype,"uploadedFilesResourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-event-name"})],Ua.prototype,"uploadEventName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"field-name"})],Ua.prototype,"fieldName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"entity-id"})],Ua.prototype,"entityId",void 0),(0,C.Cg)([(0,l.attr)({attribute:"upload-key"})],Ua.prototype,"uploadKey",void 0),(0,C.Cg)([(0,l.attr)({attribute:"grid-fields"})],Ua.prototype,"gridFields",void 0),(0,C.Cg)([l.observable],Ua.prototype,"fileName",void 0),(0,C.Cg)([l.observable],Ua.prototype,"uploadedFilesList",void 0),(0,C.Cg)([l.observable],Ua.prototype,"filesGridColumnDefinitions",void 0);const Ba=void 0,Ga={},ja=Ua.compose(Object.assign({baseName:"file-upload",styles:Ra,template:Na,shadowOptions:Ba},Ga)),Va=l.css`
1926
1926
  .filter-wrapper {
1927
1927
  border: 1px solid gray;
1928
1928
  border-radius: calc(var(--design-unit) * 2px);
@@ -1973,52 +1973,52 @@
1973
1973
  .flex-row foundation-select {
1974
1974
  flex: 1;
1975
1975
  }
1976
- `,Wa=(e="start",t="#879ba6")=>`\n <svg class="svg-icon" slot="${e}" width="16px" height="16px">\n <g transform="matrix(1 0 0 1 -1865 -3576 )">\n <path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />\n </g>\n </svg>\n`,qa=l.html`
1977
- <div class="close-icon" @click=${e=>e.clear()}>${Wa()}</div>
1978
- `;function Ka(e){var t,i,o;return null!==(o=null===(i=null===(t=null==e?void 0:e.event)||void 0===t?void 0:t.target)||void 0===i?void 0:i.value)&&void 0!==o?o:"all"}const Xa=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],Qa=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
1976
+ `,Ya=(e="start",t="#879ba6")=>`\n <svg class="svg-icon" slot="${e}" width="16px" height="16px">\n <g transform="matrix(1 0 0 1 -1865 -3576 )">\n <path d="M 15.8825 14.185499999999998 L 9.697000000000001 8 L 14.825000000000001 2.872 L 15.8825 1.814499999999999 C 16.0385 1.6584999999999992 16.0385 1.4049999999999994 15.8825 1.2489999999999988 L 14.751 0.11749999999999972 C 14.594999999999999 -0.03850000000000087 14.3415 -0.03850000000000087 14.1855 0.11749999999999972 L 8 6.303000000000001 L 1.8145 0.11699999999999999 C 1.6585 -0.03900000000000059 1.4050000000000002 -0.03900000000000059 1.2489999999999999 0.11699999999999999 L 0.11699999999999999 1.2485 C -0.039000000000000014 1.4044999999999996 -0.039000000000000014 1.6579999999999995 0.11699999999999999 1.814 L 6.303000000000001 8 L 0.11699999999999999 14.185499999999998 C -0.039000000000000014 14.3415 -0.039000000000000014 14.594999999999999 0.11699999999999999 14.751000000000001 L 1.2485 15.8825 C 1.4045 16.0385 1.658 16.0385 1.814 15.8825 L 8 9.697 L 13.128 14.825 L 14.1855 15.8825 C 14.3415 16.0385 14.594999999999999 16.0385 14.751 15.8825 L 15.8825 14.751000000000001 C 16.0385 14.594999999999999 16.0385 14.3415 15.8825 14.185499999999998 Z " fill-rule="nonzero" fill="${t}" stroke="none" transform="matrix(1 0 0 1 1865 3576 )" />\n </g>\n </svg>\n`,Wa=l.html`
1977
+ <div class="close-icon" @click=${e=>e.clear()}>${Ya()}</div>
1978
+ `;function qa(e){var t,i,o;return null!==(o=null===(i=null===(t=null==e?void 0:e.event)||void 0===t?void 0:t.target)||void 0===i?void 0:i.value)&&void 0!==o?o:"all"}const Ka=[{name:"All",value:"all",selected:!0},{name:"True",value:"true"},{name:"False",value:"false"},{name:"N/A",value:"null"}],Xa=(e,t)=>{switch(e.type){case"number":return(e=>l.html`
1979
1979
  <div class="flex-row">
1980
1980
  <div>${e=>e.label}</div>
1981
- ${qa}
1981
+ ${Wa}
1982
1982
  </div>
1983
1983
  <div class="flex-row">
1984
1984
  <${e}-text-field
1985
1985
  ${(0,l.ref)("numFilterFieldMin")}
1986
1986
  type="number"
1987
- :value=${(0,P.O)(e=>e.numFilterMin)}
1987
+ :value=${(0,z.O)(e=>e.numFilterMin)}
1988
1988
  placeholder="min"
1989
1989
  ></${e}-text-field>
1990
1990
  <${e}-text-field
1991
1991
  ${(0,l.ref)("numFilterFieldMax")}
1992
1992
  type="number"
1993
- :value=${(0,P.O)(e=>e.numFilterMax)}
1993
+ :value=${(0,z.O)(e=>e.numFilterMax)}
1994
1994
  placeholder="max"
1995
1995
  ></${e}-text-field>
1996
1996
  </div>
1997
1997
  `)(t);case"date":return(e=>l.html`
1998
1998
  <div class="flex-row">
1999
1999
  <div>${e=>e.label}</div>
2000
- ${qa}
2000
+ ${Wa}
2001
2001
  </div>
2002
2002
  <div class="flex-row">
2003
2003
  <${e}-text-field
2004
2004
  ${(0,l.ref)("dateFilterFieldMin")}
2005
2005
  type="date"
2006
- :value=${(0,P.O)(e=>e.dateFilterMin)}
2006
+ :value=${(0,z.O)(e=>e.dateFilterMin)}
2007
2007
  ></${e}-text-field>
2008
2008
  <${e}-text-field
2009
2009
  ${(0,l.ref)("dateFilterFieldMax")}
2010
2010
  type="date"
2011
- :value=${(0,P.O)(e=>e.dateFilterMax)}
2011
+ :value=${(0,z.O)(e=>e.dateFilterMax)}
2012
2012
  ></${e}-text-field>
2013
2013
  </div>
2014
2014
  `)(t);case"boolean":return(e=>l.html`
2015
2015
  <div class="flex-row">
2016
2016
  <div>${e=>e.label}</div>
2017
- ${qa}
2017
+ ${Wa}
2018
2018
  </div>
2019
2019
  <div class="flex-row">
2020
- <${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(Ka(t))}}">
2021
- ${(0,l.repeat)(()=>Xa,l.html`
2020
+ <${e}-select @change="${(e,t)=>e.onBooleanFilterSelection(qa(t))}}">
2021
+ ${(0,l.repeat)(()=>Ka,l.html`
2022
2022
  <${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
2023
2023
  ${e=>e.name}
2024
2024
  </${e}-option>
@@ -2028,10 +2028,10 @@
2028
2028
  `)(t);case"enum":return(e=>l.html`
2029
2029
  <div class="flex-row">
2030
2030
  <div>${e=>e.label}</div>
2031
- ${qa}
2031
+ ${Wa}
2032
2032
  </div>
2033
2033
  <div class="flex-row">
2034
- <${e}-select @change="${(e,t)=>e.onEnumFilterSelection(Ka(t))}}">
2034
+ <${e}-select @change="${(e,t)=>e.onEnumFilterSelection(qa(t))}}">
2035
2035
  ${(0,l.repeat)(e=>e.enumFilterOptions,l.html`
2036
2036
  <${e}-option value="${e=>e.value}" selected="${e=>e.selected}">
2037
2037
  ${e=>e.name}
@@ -2042,20 +2042,20 @@
2042
2042
  `)(t);default:return(e=>l.html`
2043
2043
  <div class="flex-row">
2044
2044
  <div>${e=>e.label}</div>
2045
- ${qa}
2045
+ ${Wa}
2046
2046
  </div>
2047
2047
  <div class="flex-row">
2048
2048
  <${e}-text-field
2049
2049
  ${(0,l.ref)("textFilterField")}
2050
2050
  type="text"
2051
- :value=${(0,P.O)(e=>e.textFilter)}
2051
+ :value=${(0,z.O)(e=>e.textFilter)}
2052
2052
  />
2053
2053
  </div>
2054
- `)(t)}},Ja=e=>l.html`
2055
- <div class="filter-wrapper">${t=>Qa(t,e)}</div>
2056
- `,Za=l.html`
2057
- ${e=>Ja(T(e))}</div>
2058
- `;var es;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(es||(es={}));class ts extends s.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(es.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(es.change,{fieldName:this.fieldName,filter:i,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(es.clear,{fieldName:this.fieldName,target:this.target});const i=`${this.fieldName} >= ${e}`,o=`${this.fieldName} <= ${t}`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(es.change,{fieldName:this.fieldName,filter:n,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,"").replace("T","-")}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(es.clear,{fieldName:this.fieldName});const i=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,o=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(es.change,{fieldName:this.fieldName,filter:n,target:this.target})}connectedCallback(){var e;if(super.connectedCallback(),null===(e=this.enumOptions)||void 0===e?void 0:e.length){const e=this.enumOptions.includes("|")?"|":",",t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:"All",value:"all",selected:!0},...t]}}clear(){switch(this.type){case"number":this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case"date":this.dateFilterFieldMin.value="",this.dateFilterFieldMax.value="",this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case"text":this.textFilterField.value=""}this.$emit(es.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(es.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(es.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(es.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(es.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],ts.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],ts.prototype,"type",void 0),(0,C.Cg)([l.attr],ts.prototype,"label",void 0),(0,C.Cg)([l.attr],ts.prototype,"target",void 0),(0,C.Cg)([l.observable],ts.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],ts.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],ts.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],ts.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],ts.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],ts.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],ts.prototype,"enumFilterOptions",void 0);const is=ts.compose({baseName:"filter",template:Za,styles:Ya});var os=i(64324);const ns=(e,t)=>l.css`
2054
+ `)(t)}},Qa=e=>l.html`
2055
+ <div class="filter-wrapper">${t=>Xa(t,e)}</div>
2056
+ `,Ja=l.html`
2057
+ ${e=>Qa(T(e))}</div>
2058
+ `;var Za;!function(e){e.change="filter-changed",e.clear="filter-cleared"}(Za||(Za={}));class es extends s.FoundationElement{constructor(){super(...arguments),this.type="text",this.textFilter="",this.enumFilterOptions=[{name:"All",value:"all",selected:!0}]}textFilterChanged(e,t){if(!(null==t?void 0:t.length))return void this.$emit(Za.clear,{fieldName:this.fieldName,target:this.target});const i=`Expr.containsIgnoreCase(${this.fieldName},'${t}')`;this.$emit(Za.change,{fieldName:this.fieldName,filter:i,target:this.target})}numFilterMinChanged(e,t){this.numFilterMin=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}numFilterMaxChanged(e,t){this.numFilterMax=Number.isFinite(Number(t))?Number(t):void 0,this.handleNumericFilter(this.numFilterMin,this.numFilterMax)}handleNumericFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(Za.clear,{fieldName:this.fieldName,target:this.target});const i=`${this.fieldName} >= ${e}`,o=`${this.fieldName} <= ${t}`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(Za.change,{fieldName:this.fieldName,filter:n,target:this.target})}formatDate(e){if(Number.isFinite(e))return new Date(e).toISOString().slice(0,19).replace(/-/g,"").replace("T","-")}dateFilterMinChanged(e,t){this.dateMinMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}dateFilterMaxChanged(e,t){this.dateMaxMS=Date.parse(t),this.handleDateFilter(this.dateMinMS,this.dateMaxMS)}handleDateFilter(e,t){if(!Number.isFinite(e)&&!Number.isFinite(t))return void this.$emit(Za.clear,{fieldName:this.fieldName});const i=`Expr.dateTimeIsAfter(${this.fieldName}, '${this.formatDate(e)}')`,o=`Expr.dateTimeIsBefore(${this.fieldName}, '${this.formatDate(t)}')`,n=Number.isFinite(e)?Number.isFinite(t)?`(${i} && ${o})`:i:o;this.$emit(Za.change,{fieldName:this.fieldName,filter:n,target:this.target})}connectedCallback(){var e;if(super.connectedCallback(),null===(e=this.enumOptions)||void 0===e?void 0:e.length){const e=this.enumOptions.includes("|")?"|":",",t=this.enumOptions.split(e).map(e=>({name:e,value:e}));this.enumFilterOptions=[{name:"All",value:"all",selected:!0},...t]}}clear(){switch(this.type){case"number":this.numFilterFieldMin.value=void 0,this.numFilterFieldMax.value=void 0,this.numFilterMin=void 0,this.numFilterMax=void 0;break;case"date":this.dateFilterFieldMin.value="",this.dateFilterFieldMax.value="",this.dateMinMS=NaN,this.dateMaxMS=NaN;break;case"text":this.textFilterField.value=""}this.$emit(Za.clear,{fieldName:this.fieldName,target:this.target})}onBooleanFilterSelection(e){e&&"all"!==e?this.$emit(Za.change,{fieldName:this.fieldName,filter:`${this.fieldName} == ${e}`,target:this.target}):this.$emit(Za.clear,{fieldName:this.fieldName,target:this.target})}onEnumFilterSelection(e){e&&"all"!==e?this.$emit(Za.change,{fieldName:this.fieldName,filter:`${this.fieldName} == "${e}"`,target:this.target}):this.$emit(Za.clear,{fieldName:this.fieldName,target:this.target})}}(0,C.Cg)([l.attr],es.prototype,"fieldName",void 0),(0,C.Cg)([l.attr],es.prototype,"type",void 0),(0,C.Cg)([l.attr],es.prototype,"label",void 0),(0,C.Cg)([l.attr],es.prototype,"target",void 0),(0,C.Cg)([l.observable],es.prototype,"textFilter",void 0),(0,C.Cg)([l.observable],es.prototype,"numFilterMin",void 0),(0,C.Cg)([l.observable],es.prototype,"numFilterMax",void 0),(0,C.Cg)([l.observable],es.prototype,"dateFilterMin",void 0),(0,C.Cg)([l.observable],es.prototype,"dateFilterMax",void 0),(0,C.Cg)([l.attr],es.prototype,"enumOptions",void 0),(0,C.Cg)([l.observable],es.prototype,"enumFilterOptions",void 0);const ts=es.compose({baseName:"filter",template:Ja,styles:Va});var is=i(64324);const os=(e,t)=>l.css`
2059
2059
  .filter-bar {
2060
2060
  background-color: #2c2f33;
2061
2061
  padding: calc(var(--design-unit) * 2px);
@@ -2091,9 +2091,9 @@
2091
2091
  .toggle-collapsed {
2092
2092
  color: #48ed9c;
2093
2093
  }
2094
- `,as=e=>{switch(e){case"INT":case"DOUBLE":case"LONG":return"number";case"DATETIME":return"date";case"BOOLEAN":return"boolean";case"ENUM":return"enum";default:return"text"}},ss=l.html`
2094
+ `,ns=e=>{switch(e){case"INT":case"DOUBLE":case"LONG":return"number";case"DATETIME":return"date";case"BOOLEAN":return"boolean";case"ENUM":return"enum";default:return"text"}},as=l.html`
2095
2095
  <p>Fetching metadata for ${e=>e.resource}...</p>
2096
- `,rs=e=>l.html`
2096
+ `,ss=e=>l.html`
2097
2097
  <div
2098
2098
  class=${e=>(0,x.x)(["toggle",!0],["toggle-collapsed",e.collapsed])}
2099
2099
  @click="${e=>e.toggle()}"
@@ -2113,17 +2113,17 @@
2113
2113
  <${e}-filter
2114
2114
  label="${e=>e.UI_LABEL}"
2115
2115
  target="${(e,t)=>{var i;return null===(i=t.parent)||void 0===i?void 0:i.target}}"
2116
- type="${e=>as(e.TYPE)}"
2116
+ type="${e=>ns(e.TYPE)}"
2117
2117
  fieldName="${e=>e.NAME}"
2118
2118
  enumOptions="${e=>e.VALID_VALUES}"
2119
2119
  ></${e}-filter>
2120
2120
  `)}
2121
2121
  </div>
2122
2122
  </div>
2123
- `,ls=l.html`
2124
- ${e=>e.ready?rs(T(e)):ss}
2125
- `,ds=5;class cs extends s.FoundationElement{constructor(){super(...arguments),this.columns=ds,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,a=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(a=null===(t=this.labels.split(","))||void 0===t?void 0:t.map(e=>e.trim()),n=(null===(i=this.fields)||void 0===i?void 0:i.length)===(null==a?void 0:a.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?a[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,os.fL)(e)).join(" ")}resourceChanged(e,t){e!==t&&(null==e?void 0:e.length)&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{var t,i;if(this.fields=e.FIELD,null===(t=this.only)||void 0===t?void 0:t.length){const e=this.only.split(",").map(e=>e.trim()),t=(t,i)=>e.indexOf(t.NAME)>e.indexOf(i.NAME)?1:-1;this.fields=null===(i=this.fields)||void 0===i?void 0:i.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>Qe.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style["grid-template-columns"]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}}(0,C.Cg)([l.attr],cs.prototype,"resource",void 0),(0,C.Cg)([l.attr],cs.prototype,"only",void 0),(0,C.Cg)([l.attr],cs.prototype,"labels",void 0),(0,C.Cg)([l.attr],cs.prototype,"target",void 0),(0,C.Cg)([l.attr],cs.prototype,"columns",void 0),(0,C.Cg)([l.observable],cs.prototype,"ready",void 0),(0,C.Cg)([l.observable],cs.prototype,"fields",void 0),(0,C.Cg)([oi.dm],cs.prototype,"connect",void 0),(0,C.Cg)([l.observable],cs.prototype,"collapsed",void 0);const us=cs.compose({baseName:"filter-bar",template:ls,styles:ns});var hs;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(hs||(hs={}));const ps=e=>{const t=e?`-${e}`:"";return l.css`
2126
- ${t&&`@media only screen and ${hs[e]} {`}
2123
+ `,rs=l.html`
2124
+ ${e=>e.ready?ss(T(e)):as}
2125
+ `,ls=5;class ds extends s.FoundationElement{constructor(){super(...arguments),this.columns=ls,this.ready=!1,this.collapsed=!0}connectedCallback(){super.connectedCallback(),this.init()}initLabels(){var e,t,i,o;let n=!1,a=[];(null===(e=null==this?void 0:this.labels)||void 0===e?void 0:e.length)&&(a=null===(t=this.labels.split(","))||void 0===t?void 0:t.map(e=>e.trim()),n=(null===(i=this.fields)||void 0===i?void 0:i.length)===(null==a?void 0:a.length));for(let e=0;e<((null===(o=this.fields)||void 0===o?void 0:o.length)||0);e+=1){const t=n?a[e]:this.camelCasePreserveWhitespace(this.fields[e].NAME.replace(/_/g," "));this.fields[e].UI_LABEL=t}}camelCasePreserveWhitespace(e){return e.split(" ").map(e=>(0,is.fL)(e)).join(" ")}resourceChanged(e,t){e!==t&&(null==e?void 0:e.length)&&this.init()}init(){this.ready=!1,this.connect.getMetadata(this.resource).then(e=>{var t,i;if(this.fields=e.FIELD,null===(t=this.only)||void 0===t?void 0:t.length){const e=this.only.split(",").map(e=>e.trim()),t=(t,i)=>e.indexOf(t.NAME)>e.indexOf(i.NAME)?1:-1;this.fields=null===(i=this.fields)||void 0===i?void 0:i.filter(t=>e.includes(t.NAME)).sort(t)}this.ready=!0}).then(()=>this.initLabels()).then(()=>window.requestAnimationFrame(()=>{this.adjustColumnStyles()})).catch(e=>Xe.error(e))}adjustColumnStyles(){this.filterGrid&&(this.filterGrid.style["grid-template-columns"]=`repeat(${this.columns}, 1fr)`)}toggle(){this.ready&&(this.collapsed=!this.collapsed)}}(0,C.Cg)([l.attr],ds.prototype,"resource",void 0),(0,C.Cg)([l.attr],ds.prototype,"only",void 0),(0,C.Cg)([l.attr],ds.prototype,"labels",void 0),(0,C.Cg)([l.attr],ds.prototype,"target",void 0),(0,C.Cg)([l.attr],ds.prototype,"columns",void 0),(0,C.Cg)([l.observable],ds.prototype,"ready",void 0),(0,C.Cg)([l.observable],ds.prototype,"fields",void 0),(0,C.Cg)([ii.dm],ds.prototype,"connect",void 0),(0,C.Cg)([l.observable],ds.prototype,"collapsed",void 0);const cs=ds.compose({baseName:"filter-bar",template:rs,styles:os});var us;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(us||(us={}));const hs=e=>{const t=e?`-${e}`:"";return l.css`
2126
+ ${t&&`@media only screen and ${us[e]} {`}
2127
2127
  :host(.spacing${t}-1x) slot {
2128
2128
  gap: calc(var(--design-unit) * 2px);
2129
2129
  }
@@ -2240,7 +2240,7 @@
2240
2240
  align-content: space-evenly;
2241
2241
  }
2242
2242
  ${t&&"}"}
2243
- `},ms=l.css`
2243
+ `},ps=l.css`
2244
2244
  :host {
2245
2245
  width: 100%;
2246
2246
  height: 100%;
@@ -2252,17 +2252,17 @@
2252
2252
  display: flex;
2253
2253
  }
2254
2254
 
2255
- ${ps()}
2256
- ${ps("lg")}
2257
- ${ps("md")}
2258
- ${ps("sm")}
2259
- `,gs=l.html`
2255
+ ${hs()}
2256
+ ${hs("lg")}
2257
+ ${hs("md")}
2258
+ ${hs("sm")}
2259
+ `,ms=l.html`
2260
2260
  <template>
2261
2261
  <slot></slot>
2262
2262
  </template>
2263
- `,vs=void 0,fs={};class bs extends s.FoundationElement{}const ys=bs.compose(Object.assign({baseName:"flex-layout",styles:ms,template:gs,shadowOptions:vs},fs)),ws=(e,t)=>l.css`
2263
+ `,gs=void 0,vs={};class fs extends s.FoundationElement{}const bs=fs.compose(Object.assign({baseName:"flex-layout",styles:ps,template:ms,shadowOptions:gs},vs)),ys=(e,t)=>l.css`
2264
2264
  ${(0,r.flipperStyles)(e,t)}
2265
- `,Cs=(e,t)=>(0,s.flipperTemplate)(e,t);class xs extends r.Flipper{}const $s=void 0,Ss={next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '},Es=xs.compose(Object.assign({baseName:"flipper",template:Cs,styles:ws,shadowOptions:$s},Ss)),Os=225,Ts=l.css`
2265
+ `,ws=(e,t)=>(0,s.flipperTemplate)(e,t);class Cs extends r.Flipper{}const xs=void 0,$s={next:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n ',previous:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">\n <path\n d="M11.273 15.977L3.29 8 11.273.023l.704.704L4.71 8l7.266 7.273-.704.704z"\n />\n </svg>\n '},Ss=Cs.compose(Object.assign({baseName:"flipper",template:ws,styles:ys,shadowOptions:xs},$s)),Es=225,Os=l.css`
2266
2266
  /* Host */
2267
2267
  :host {
2268
2268
  display: inline-block;
@@ -2287,7 +2287,7 @@
2287
2287
  height: 100%;
2288
2288
  position: absolute;
2289
2289
  /* stylelint-disable-next-line function-name-case */
2290
- transition: transform ${Os.toString()}ms ease-in;
2290
+ transition: transform ${Es.toString()}ms ease-in;
2291
2291
  width: 20%;
2292
2292
  z-index: 2001;
2293
2293
  }
@@ -2346,7 +2346,7 @@
2346
2346
  opacity: 50%;
2347
2347
  position: absolute;
2348
2348
  /* stylelint-disable-next-line function-name-case */
2349
- transition: opacity ${Os.toString()}ms linear;
2349
+ transition: opacity ${Es.toString()}ms linear;
2350
2350
  width: 100%;
2351
2351
  z-index: 2000;
2352
2352
  }
@@ -2354,7 +2354,7 @@
2354
2354
  :host([visuallyhidden]) div.background {
2355
2355
  opacity: 0%;
2356
2356
  }
2357
- `,ks=e=>l.html`
2357
+ `,Ts=e=>l.html`
2358
2358
  <div ?closed=${e=>e.closed} ?visuallyhidden=${e=>e.visuallyhidden}>
2359
2359
  <div class="container">
2360
2360
  <div class="background" part="background" @click=${e=>e.closeFlyout()}></div>
@@ -2378,10 +2378,10 @@
2378
2378
  </div>
2379
2379
  </div>
2380
2380
  </div>
2381
- `,Is=l.html`
2382
- ${e=>ks(T(e))}
2383
- `;class Ds extends s.FoundationElement{constructor(){super(...arguments),this.position="right",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}closedChanged(){this.closed||(setTimeout(()=>this.visuallyhidden=!1,1),this.focusExit())}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,C.Cg)([l.attr],Ds.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ds.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ds.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Ds.prototype,"visuallyhidden",void 0);const Rs=void 0,As={},Ns=Ds.compose(Object.assign({baseName:"flyout",styles:Ts,template:Is,shadowOptions:Rs},As));var Ls;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Ls||(Ls={}));const Fs=e=>{const t=e?`-${e}`:"";return l.css`
2384
- ${t&&`@media only screen and ${Ls[e]} {`}
2381
+ `,ks=l.html`
2382
+ ${e=>Ts(T(e))}
2383
+ `;class Is extends s.FoundationElement{constructor(){super(...arguments),this.position="right",this.displayHeader=!0,this.closed=!0,this.visuallyhidden=!0}closedChanged(){this.closed||(setTimeout(()=>this.visuallyhidden=!1,1),this.focusExit())}closeFlyout(){this.visuallyhidden=!0}closingFinished(){this.visuallyhidden&&(this.closed=!0,this.$emit("closed"))}focusExit(){this.exit.focus()}}(0,C.Cg)([l.attr],Is.prototype,"position",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Is.prototype,"displayHeader",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Is.prototype,"closed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Is.prototype,"visuallyhidden",void 0);const Ds=void 0,Rs={},As=Is.compose(Object.assign({baseName:"flyout",styles:Os,template:ks,shadowOptions:Ds},Rs));var Ns;!function(e){e.sm="(max-width: 640px)",e.md="(min-width: 641px) and (max-width: 1023px)",e.lg="(min-width: 1024px)"}(Ns||(Ns={}));const Ls=e=>{const t=e?`-${e}`:"";return l.css`
2384
+ ${t&&`@media only screen and ${Ns[e]} {`}
2385
2385
  :host(.spacing${t}-1x) slot {
2386
2386
  gap: calc(var(--design-unit) * 2px);
2387
2387
  }
@@ -2466,32 +2466,32 @@
2466
2466
  place-items: stretch;
2467
2467
  }
2468
2468
  ${t&&"}"}
2469
- `},Ms=l.css`
2469
+ `},Fs=l.css`
2470
2470
  slot {
2471
2471
  width: 100%;
2472
2472
  height: 100%;
2473
2473
  display: grid;
2474
2474
  }
2475
2475
 
2476
- ${Fs()}
2477
- ${Fs("lg")}
2478
- ${Fs("md")}
2479
- ${Fs("sm")}
2480
- `,_s=l.html`
2476
+ ${Ls()}
2477
+ ${Ls("lg")}
2478
+ ${Ls("md")}
2479
+ ${Ls("sm")}
2480
+ `,Ms=l.html`
2481
2481
  <template>
2482
2482
  <slot></slot>
2483
2483
  </template>
2484
- `,Hs=void 0,zs={};class Ps{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const a=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,s=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
2484
+ `,_s=void 0,Hs={};class zs{constructor(e,t,i,o="1fr",n="1fr"){this.listenerCache=new WeakMap,this.query=window.matchMedia(e);const a=t&&l.cssPartial`grid-template-columns: repeat(${t}, ${o});`,s=i&&l.cssPartial`grid-template-rows: repeat(${i}, ${n});`;this.styles=l.css`
2485
2485
  slot {
2486
2486
  ${s||""}
2487
2487
  ${a||""}
2488
2488
  }
2489
- `}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class Us extends s.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Ls).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new Ps(Ls[e],this[`col-${e}-count`],this[`row-${e}-count`],this[`col-${e}-width`],this[`row-${e}-height`])}).filter(e=>!!e);const e=this["row-count"]&&l.cssPartial`grid-template-rows: repeat(${this["row-count"]}, ${this["row-height"]||"1fr"});`,t=this["col-count"]&&l.cssPartial`grid-template-columns: repeat(${this["col-count"]}, ${this["col-width"]||"1fr"});`;this.baseStyles=l.css`
2489
+ `}bind(e){let t=!1;const i=i=>{const{matches:o}=i;o&&!t?(e.$fastController.addStyles(this.styles),t=!0):!o&&t&&(this.styles&&e.$fastController.removeStyles(this.styles),t=!1)};i({matches:this.query.matches}),this.query.addEventListener("change",i),this.listenerCache.set(e,i)}unbind(e){const t=this.listenerCache.get(e);t&&(this.query.removeEventListener("change",t),this.listenerCache.delete(e)),this.styles&&e.$fastController.removeStyles(this.styles)}}class Ps extends s.FoundationElement{constructor(){super(...arguments),this.behaviors=[]}connectedCallback(){super.connectedCallback(),this.behaviors=Object.keys(Ns).map(e=>{if(this[`col-${e}-count`]||this[`row-${e}-count`])return new zs(Ns[e],this[`col-${e}-count`],this[`row-${e}-count`],this[`col-${e}-width`],this[`row-${e}-height`])}).filter(e=>!!e);const e=this["row-count"]&&l.cssPartial`grid-template-rows: repeat(${this["row-count"]}, ${this["row-height"]||"1fr"});`,t=this["col-count"]&&l.cssPartial`grid-template-columns: repeat(${this["col-count"]}, ${this["col-width"]||"1fr"});`;this.baseStyles=l.css`
2490
2490
  slot {
2491
2491
  ${e||""}
2492
2492
  ${t||""}
2493
2493
  }
2494
- `,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],Us.prototype,"col-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-width",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-height",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],Us.prototype,"row-sm-height",void 0);const Bs=Us.compose(Object.assign({baseName:"grid-layout",styles:Ms,template:_s,shadowOptions:Hs},zs)),Gs=l.html`
2494
+ `,this.$fastController.addStyles(this.baseStyles),this.$fastController.addBehaviors(this.behaviors)}disconnectedCallback(){super.disconnectedCallback(),this.$fastController.removeBehaviors(this.behaviors),this.baseStyles&&this.$fastController.removeStyles(this.baseStyles)}}(0,C.Cg)([l.attr],Ps.prototype,"col-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-width",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-lg-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-lg-width",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-md-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-md-width",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-sm-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"col-sm-width",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-height",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-lg-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-lg-height",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-md-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-md-height",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-sm-count",void 0),(0,C.Cg)([l.attr],Ps.prototype,"row-sm-height",void 0);const Us=Ps.compose(Object.assign({baseName:"grid-layout",styles:Fs,template:Ms,shadowOptions:_s},Hs)),Bs=l.html`
2495
2495
  <template>
2496
2496
  <style>
2497
2497
  :host {
@@ -2520,9 +2520,9 @@
2520
2520
  </style>
2521
2521
  <slot></slot>
2522
2522
  </template>
2523
- `,js=void 0,Vs={};class Ys extends s.FoundationElement{setGridItemProperties(e,t,i,o){if(t&&e&&i&&o){return`grid-row: ${0===t||0===o?"auto":`${t} / ${Number(t)+Number(o)}`}; grid-column: ${0===e||0===i?"auto":`${e} / ${Number(e)+Number(i)}`}`}}}(0,C.Cg)([(0,l.attr)({attribute:"col-number"})],Ys.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],Ys.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],Ys.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],Ys.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],Ys.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],Ys.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],Ys.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],Ys.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],Ys.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],Ys.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],Ys.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],Ys.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],Ys.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],Ys.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],Ys.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],Ys.prototype,"heightLg",void 0);const Ws=Ys.compose(Object.assign({baseName:"grid-layout-item",template:Gs,shadowOptions:js},Vs)),qs=(e,t)=>l.css`
2523
+ `,Gs=void 0,js={};class Vs extends s.FoundationElement{setGridItemProperties(e,t,i,o){if(t&&e&&i&&o){return`grid-row: ${0===t||0===o?"auto":`${t} / ${Number(t)+Number(o)}`}; grid-column: ${0===e||0===i?"auto":`${e} / ${Number(e)+Number(i)}`}`}}}(0,C.Cg)([(0,l.attr)({attribute:"col-number"})],Vs.prototype,"colNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-sm-number"})],Vs.prototype,"colSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-md-number"})],Vs.prototype,"colMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"col-lg-number"})],Vs.prototype,"colLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-number"})],Vs.prototype,"rowNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-sm-number"})],Vs.prototype,"rowSmNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-md-number"})],Vs.prototype,"rowMdNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"row-lg-number"})],Vs.prototype,"rowLgNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width"})],Vs.prototype,"width",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-sm"})],Vs.prototype,"widthSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-md"})],Vs.prototype,"widthMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"width-lg"})],Vs.prototype,"widthLg",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height"})],Vs.prototype,"height",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-sm"})],Vs.prototype,"heightSm",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-md"})],Vs.prototype,"heightMd",void 0),(0,C.Cg)([(0,l.attr)({attribute:"height-lg"})],Vs.prototype,"heightLg",void 0);const Ys=Vs.compose(Object.assign({baseName:"grid-layout-item",template:Bs,shadowOptions:Gs},js)),Ws=(e,t)=>l.css`
2524
2524
  ${(0,r.horizontalScrollStyles)(e,t)}
2525
- `,Ks=(e,t)=>(0,s.horizontalScrollTemplate)(e,t);class Xs extends r.HorizontalScroll{}const Qs={delegatesFocus:!0,mode:"open"},Js={nextFlipper:l.html`
2525
+ `,qs=(e,t)=>(0,s.horizontalScrollTemplate)(e,t);class Ks extends r.HorizontalScroll{}const Xs={delegatesFocus:!0,mode:"open"},Qs={nextFlipper:l.html`
2526
2526
  <foundation-flipper
2527
2527
  @click="${e=>e.scrollToNext()}"
2528
2528
  aria-hidden="${e=>e.flippersHiddenFromAT}"
@@ -2533,8 +2533,8 @@
2533
2533
  direction="previous"
2534
2534
  aria-hidden="${e=>e.flippersHiddenFromAT}"
2535
2535
  ></foundation-flipper>
2536
- `},Zs=Xs.compose(Object.assign({baseName:"horizontal-scroll",template:Ks,styles:qs,shadowOptions:Qs},Js));var er=i(70623),tr=i(32808),ir=i(10463),or=i(19037),nr=i(22984);const ar=()=>(er.Yv.add(nr.X7I,or.C91,ir.Cvc),er.tT.css()),sr=(e,t)=>l.css`
2537
- ${ar()}
2536
+ `},Js=Ks.compose(Object.assign({baseName:"horizontal-scroll",template:qs,styles:Ws,shadowOptions:Xs},Qs));var Zs=i(70623),er=i(32808),tr=i(10463),ir=i(19037),or=i(22984);const nr=()=>(Zs.Yv.add(or.X7I,ir.C91,tr.Cvc),Zs.tT.css()),ar=(e,t)=>l.css`
2537
+ ${nr()}
2538
2538
 
2539
2539
  .fa-stack-1x {
2540
2540
  font-size: 1em;
@@ -2608,7 +2608,7 @@
2608
2608
  height: auto;
2609
2609
  box-sizing: border-box;
2610
2610
  }
2611
- `,rr=e=>l.html`
2611
+ `,sr=e=>l.html`
2612
2612
  <template>
2613
2613
  <i
2614
2614
  ${(0,l.ref)("iElement")}
@@ -2626,9 +2626,9 @@
2626
2626
  </${e}-tooltip>
2627
2627
  `)}
2628
2628
  </template>
2629
- `,lr=l.html`
2630
- ${e=>rr(T(e))}
2631
- `,dr={mode:"open",delegatesFocus:!0},cr={};var ur;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(ur||(ur={}));const hr="1x",pr=["2xs","xs","sm","lg","xl","2xl",hr,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class mr extends s.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.size="sm",this.variant="solid"}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){super.connectedCallback(),this.loadIcon()}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren()}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,er.wu)({prefix:ur[this.variant],iconName:this.name}),t=(0,er.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],mr.prototype,"iElement",void 0),(0,C.Cg)([tr.k],mr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],mr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],mr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],mr.prototype,"isError",void 0),(0,C.Cg)([l.attr],mr.prototype,"name",void 0),(0,C.Cg)([l.attr],mr.prototype,"size",void 0),(0,C.Cg)([l.attr],mr.prototype,"variant",void 0);const gr=mr.compose(Object.assign({baseName:"icon",template:lr,styles:sr,shadowOptions:dr},cr)),vr=(e,t)=>l.css`
2629
+ `,rr=l.html`
2630
+ ${e=>sr(T(e))}
2631
+ `,lr={mode:"open",delegatesFocus:!0},dr={};var cr;!function(e){e.solid="fas",e.regular="far",e.brand="fab"}(cr||(cr={}));const ur="1x",hr=["2xs","xs","sm","lg","xl","2xl",ur,"2x","3x","4x","5x","6x","7x","8x","9x","10x","stack-1x","stack-2x"];class pr extends s.FoundationElement{constructor(){super(...arguments),this.isError=!1,this.size="sm",this.variant="solid"}nameChanged(e,t){t&&this.loadIcon()}sizeChanged(e,t){t&&this.loadIcon()}variantChanged(e,t){t&&this.loadIcon()}connectedCallback(){super.connectedCallback(),this.loadIcon()}disconnectedCallback(){super.disconnectedCallback(),this.iElement.replaceChildren()}getDefaultTooltipConfig(){this.name||(this.name="question-circle",this.size="1x",this.variant="regular")}loadIcon(){if(!this.iElement)return;this.tooltip&&(this.tooltipId||(this.tooltipId=this.uuid.createId()),this.getDefaultTooltipConfig());const e=(0,Zs.wu)({prefix:cr[this.variant],iconName:this.name}),t=(0,Zs.Kk)(e);t&&t.node&&(this.iElement.innerHTML="",Array.from(t.node).map(e=>this.iElement.appendChild(e)))}}(0,C.Cg)([l.observable],pr.prototype,"iElement",void 0),(0,C.Cg)([er.k],pr.prototype,"uuid",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tooltip-id"})],pr.prototype,"tooltipId",void 0),(0,C.Cg)([l.attr],pr.prototype,"tooltip",void 0),(0,C.Cg)([(0,l.attr)({attribute:"error",mode:"boolean"})],pr.prototype,"isError",void 0),(0,C.Cg)([l.attr],pr.prototype,"name",void 0),(0,C.Cg)([l.attr],pr.prototype,"size",void 0),(0,C.Cg)([l.attr],pr.prototype,"variant",void 0);const mr=pr.compose(Object.assign({baseName:"icon",template:rr,styles:ar,shadowOptions:lr},dr)),gr=(e,t)=>l.css`
2632
2632
  ${(0,r.listboxStyles)(e,t)}
2633
2633
 
2634
2634
  :host {
@@ -2639,11 +2639,11 @@
2639
2639
  border: calc(var(--stroke-width) * 1px) solid var(--neutral-stroke-rest);
2640
2640
  border-radius: calc(var(--control-corner-radius) * 1px);
2641
2641
  }
2642
- `,fr=(e,t)=>(0,s.listboxTemplate)(e,t);class br extends r.Listbox{}const yr=void 0,wr={},Cr=br.compose(Object.assign({baseName:"listbox",template:fr,styles:vr,shadowOptions:yr},wr)),xr=(e,t)=>l.css`
2642
+ `,vr=(e,t)=>(0,s.listboxTemplate)(e,t);class fr extends r.Listbox{}const br=void 0,yr={},wr=fr.compose(Object.assign({baseName:"listbox",template:vr,styles:gr,shadowOptions:br},yr)),Cr=(e,t)=>l.css`
2643
2643
  ${(0,r.optionStyles)(e,t)}
2644
- `,$r=(e,t)=>(0,s.listboxOptionTemplate)(e,t);class Sr extends r.ListboxOption{}const Er=void 0,Or={},Tr=Sr.compose(Object.assign({baseName:"option",template:$r,styles:xr,shadowOptions:Er},Or)),kr=(e,t)=>l.css`
2644
+ `,xr=(e,t)=>(0,s.listboxOptionTemplate)(e,t);class $r extends r.ListboxOption{}const Sr=void 0,Er={},Or=$r.compose(Object.assign({baseName:"option",template:xr,styles:Cr,shadowOptions:Sr},Er)),Tr=(e,t)=>l.css`
2645
2645
  ${(0,r.menuStyles)(e,t)}
2646
- `,Ir=(e,t)=>(0,s.menuTemplate)(e,t);class Dr extends r.Menu{}const Rr=void 0,Ar={},Nr=Dr.compose(Object.assign({baseName:"menu",template:Ir,styles:kr,shadowOptions:Rr},Ar)),Lr=(e,t)=>l.css`
2646
+ `,kr=(e,t)=>(0,s.menuTemplate)(e,t);class Ir extends r.Menu{}const Dr=void 0,Rr={},Ar=Ir.compose(Object.assign({baseName:"menu",template:kr,styles:Tr,shadowOptions:Dr},Rr)),Nr=(e,t)=>l.css`
2647
2647
  ${(0,r.menuItemStyles)(e,t)}
2648
2648
 
2649
2649
  :host, :host(.indent-0[aria-haspopup='menu']) {
@@ -2657,15 +2657,15 @@
2657
2657
  height: auto;
2658
2658
  width: auto;
2659
2659
  }
2660
- `,Fr=(e,t)=>(0,s.menuItemTemplate)(e,t);class Mr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const _r=void 0,Hr={expandCollapseGlyph:'\n <svg\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n '},zr=Mr.compose(Object.assign({baseName:"menu-item",template:Fr,styles:Lr,shadowOptions:_r},Hr)),Pr=l.css`
2661
- ${dn}
2660
+ `,Lr=(e,t)=>(0,s.menuItemTemplate)(e,t);class Fr extends r.MenuItem{connectedCallback(){super.connectedCallback(),this.addEventListener("click",()=>this.$emit("onMenuClick"))}}const Mr=void 0,_r={expandCollapseGlyph:'\n <svg\n class="expand-collapse-glyph"\n part="expand-collapse-glyph"\n viewBox="0 0 16 16"\n xmlns="http://www.w3.org/2000/svg">\n <path\n d="M4.023 15.273L11.29 8 4.023.727l.704-.704L12.71 8l-7.984 7.977-.704-.704z"\n />\n </svg>\n '},Hr=Fr.compose(Object.assign({baseName:"menu-item",template:Lr,styles:Nr,shadowOptions:Mr},_r)),zr=l.css`
2661
+ ${ln}
2662
2662
 
2663
2663
  :host([draggable])::part(top) {
2664
2664
  cursor: move;
2665
2665
  }
2666
- `,Ur=l.html`
2667
- ${pn}
2668
- `,Br={mode:"open",delegatesFocus:!0},Gr={};class jr extends vn{constructor(){super(...arguments),this.isDragging=!1,this.offsetX=0,this.offsetY=0,this.modalWidth=0,this.modalHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null,this.draggable=!1,this.onCloseCallback=()=>{this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}draggableChanged(e,t){var i,o;t?(this.onMouseDownBound=this.onMouseDown.bind(this),null===(i=this.mainElement)||void 0===i||i.addEventListener("mousedown",this.onMouseDownBound)):(this.onMouseDownBound&&(null===(o=this.mainElement)||void 0===o||o.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null),this.removeDraggableEventListeners())}show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}connectedCallback(){var e;super.connectedCallback(),this.draggable&&(this.onMouseDownBound=this.onMouseDown.bind(this),null===(e=this.mainElement)||void 0===e||e.addEventListener("mousedown",this.onMouseDownBound))}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeDraggableEventListeners(),this.onMouseDownBound&&(null===(e=this.mainElement)||void 0===e||e.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.offsetX=e.clientX-t.left,this.offsetY=e.clientY-t.top,this.modalWidth=t.width,this.modalHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.offsetX,n=e.clientY-this.offsetY;o=Math.max(0,Math.min(t-this.modalWidth,o)),n=Math.max(0,Math.min(i-this.modalHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],jr.prototype,"draggable",void 0);const Vr=jr.compose(Object.assign({baseName:"modal",template:Ur,styles:Pr,shadowOptions:Br},Gr)),Yr=230,Wr=l.css`
2666
+ `,Pr=l.html`
2667
+ ${hn}
2668
+ `,Ur={mode:"open",delegatesFocus:!0},Br={};class Gr extends gn{constructor(){super(...arguments),this.isDragging=!1,this.offsetX=0,this.offsetY=0,this.modalWidth=0,this.modalHeight=0,this.onMouseDownBound=null,this.onMouseMoveBound=null,this.onMouseUpBound=null,this.draggable=!1,this.onCloseCallback=()=>{this.draggable&&this.mainElement instanceof HTMLElement&&Object.assign(this.mainElement.style,{position:"",left:"",top:"",margin:""})}}draggableChanged(e,t){var i,o;t?(this.onMouseDownBound=this.onMouseDown.bind(this),null===(i=this.mainElement)||void 0===i||i.addEventListener("mousedown",this.onMouseDownBound)):(this.onMouseDownBound&&(null===(o=this.mainElement)||void 0===o||o.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null),this.removeDraggableEventListeners())}show(){var e,t;null===(e=this.onShowCallback)||void 0===e||e.call(this),null===(t=this.mainElement)||void 0===t||t.showModal()}connectedCallback(){var e;super.connectedCallback(),this.draggable&&(this.onMouseDownBound=this.onMouseDown.bind(this),null===(e=this.mainElement)||void 0===e||e.addEventListener("mousedown",this.onMouseDownBound))}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeDraggableEventListeners(),this.onMouseDownBound&&(null===(e=this.mainElement)||void 0===e||e.removeEventListener("mousedown",this.onMouseDownBound),this.onMouseDownBound=null)}isEventTargetInDraggableTarget(e){var t;return(null===(t=this.topElement)||void 0===t?void 0:t.contains(e.target))||this.isInsideTopSlot(e.target)}isInsideTopSlot(e){if(!this.topElementSlot)return!1;return this.topElementSlot.assignedNodes().some(t=>t===e||t.contains(e))}onMouseDown(e){if(!this.topElement||!this.isEventTargetInDraggableTarget(e)||this.isDragging)return;this.isDragging=!0;const t=this.mainElement.getBoundingClientRect();this.offsetX=e.clientX-t.left,this.offsetY=e.clientY-t.top,this.modalWidth=t.width,this.modalHeight=t.height,this.onMouseMoveBound=this.onMouseMove.bind(this),this.onMouseUpBound=this.onMouseUp.bind(this),document.addEventListener("mousemove",this.onMouseMoveBound),document.addEventListener("mouseup",this.onMouseUpBound)}onMouseMove(e){if(!this.isDragging||!this.mainElement)return;const t=window.innerWidth,i=window.innerHeight;let o=e.clientX-this.offsetX,n=e.clientY-this.offsetY;o=Math.max(0,Math.min(t-this.modalWidth,o)),n=Math.max(0,Math.min(i-this.modalHeight,n)),requestAnimationFrame(()=>{Object.assign(this.mainElement.style,{position:"absolute",left:`${o}px`,top:`${n}px`,margin:"0"})})}onMouseUp(){this.isDragging=!1,this.removeDraggableEventListeners()}removeDraggableEventListeners(){this.onMouseMoveBound&&(document.removeEventListener("mousemove",this.onMouseMoveBound),this.onMouseMoveBound=null),this.onMouseUpBound&&(document.removeEventListener("mouseup",this.onMouseUpBound),this.onMouseUpBound=null)}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gr.prototype,"draggable",void 0);const jr=Gr.compose(Object.assign({baseName:"modal",template:Pr,styles:zr,shadowOptions:Ur},Br)),Vr=230,Yr=l.css`
2669
2669
  :host {
2670
2670
  --scrollbar-width: 12px;
2671
2671
  --scrollbar-thumb-width: 8px;
@@ -2809,7 +2809,7 @@
2809
2809
 
2810
2810
  .visible {
2811
2811
  visibility: visible;
2812
- max-height: var(--custom-max-height, ${Yr.toString()}px);
2812
+ max-height: var(--custom-max-height, ${Vr.toString()}px);
2813
2813
  overflow: hidden;
2814
2814
  }
2815
2815
 
@@ -2906,7 +2906,7 @@
2906
2906
  resize: none;
2907
2907
  overflow: hidden;
2908
2908
  }
2909
- `;let qr=class extends ri{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Qe.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){Qe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Qe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Qe.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],qr.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],qr.prototype,"labelField",void 0),qr=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],qr);const Kr=(e="foundation")=>l.html`
2909
+ `;let Wr=class extends si{constructor(){super(...arguments),this.isSnapshot=!0,this.baseCriteria=""}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){var t;e.connectedCallback.call(this),this.baseCriteria=this.criteria,this.fields=this.labelField?null===(t=this.valueField)||void 0===t?void 0:t.concat(" ",this.labelField):this.valueField,this.select=this.parentElement,this.select&&this.valueField&&(this.resourceName&&this.connect.isConnected||this.data)&&this.fetchGenesisData(),this.valueField||Xe.warn('Specify field for values in options (e.g value-field="VALUE") and optionally field for label which is supported only in select and combobox (e.g label-field="NAME")')})}clearData(){this.select.options=[]}syncComponentData(e){var t;const i=(null!=e?e:Array.from(this.rowsSyncedWithStream.values())).map(e=>{var t;return{value:e[this.valueField],label:this.getDefaultLabelFormat(e[this.labelField],null===(t=this.getFieldMetadata(this.labelField))||void 0===t?void 0:t.type)}});(null===(t=this.select)||void 0===t?void 0:t.async)&&(this.select.loading=!1),this.select.options=i}handleStreamInserts(e){Xe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Xe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Xe.debug("handleStreamUpdates - Method not implemented.")}};(0,C.Cg)([(0,l.attr)({attribute:"value-field"})],Wr.prototype,"valueField",void 0),(0,C.Cg)([(0,l.attr)({attribute:"label-field"})],Wr.prototype,"labelField",void 0),Wr=(0,C.Cg)([(0,l.customElement)({name:"multiselect-datasource"})],Wr);const qr=(e="foundation")=>l.html`
2910
2910
  <label
2911
2911
  part="label"
2912
2912
  for="display-field"
@@ -2931,7 +2931,7 @@
2931
2931
  @click=${e=>e.toggle()}
2932
2932
  ?disabled="${e=>e.disabled}"
2933
2933
  ${(0,l.ref)("filterSearchInput")}
2934
- value=${(0,P.O)(e=>e.filterSearchValue,"string","input")}
2934
+ value=${(0,z.O)(e=>e.filterSearchValue,"string","input")}
2935
2935
  placeholder="${e=>e.getDisplayValue}"
2936
2936
  autocomplete="off"
2937
2937
  @input=${(e,t)=>e.inputHandler()}
@@ -3013,11 +3013,11 @@
3013
3013
  </section>
3014
3014
  </div>
3015
3015
  <slot
3016
- ${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof qr})}
3016
+ ${(0,l.slotted)({property:"slottedDatasource",filter:e=>e instanceof Wr})}
3017
3017
  ></slot>
3018
- `,Xr=l.html`
3019
- ${Kr()}
3020
- `,Qr=void 0,Jr={};class Zr extends s.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Lt.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),n=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${n}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=Xt()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,a;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(n=this.arrowIcon)||void 0===n||n.classList.remove("flipped"),null===(a=this.multiselectDropdown)||void 0===a||a.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Lt.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return l.html`
3018
+ `,Kr=l.html`
3019
+ ${qr()}
3020
+ `,Xr=void 0,Qr={};class Jr extends s.FoundationElement{constructor(){super(...arguments),this.name="",this.autoPosition=!0,this.all=!0,this.allSelected=!1,this.search=!0,this.disabled=!1,this.creatable=!1,this.async=!1,this.debounce=500,this.resizable=!1,this.filterByContains=!1,this.filterSearchValue="",this.clickOutside=e=>this.handleClickOutside(e),this.open=!1,this.options=[],this.selectedOptions=[],this.filteredAvailableOptions=[...this.options],this.position=Nt.BELOW,this.itemRenderer=this.defaultItemRenderer,this.initialisedOptions=!1,this.isResizing=!1,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.handleResizeStart=e=>{this.resizable&&this.multiselectDropdown&&(e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.startX=e.clientX,this.startY=e.clientY,this.startWidth=this.multiselectDropdown.offsetWidth,this.startHeight=this.multiselectDropdown.offsetHeight,this.multiselectDropdown.classList.add("is-resizing"),document.addEventListener("mousemove",this.handleResizeMove),document.addEventListener("mouseup",this.handleResizeEnd))},this.handleResizeMove=e=>{if(!this.isResizing||!this.multiselectDropdown)return;e.preventDefault();const t=e.clientX-this.startX,i=e.clientY-this.startY,o=Math.max(250,this.startWidth+t),n=Math.max(100,this.startHeight+i);this.multiselectDropdown&&(this.multiselectDropdown.style.width=`${o}px`,this.multiselectDropdown.style.maxHeight=`${n}px`)},this.handleResizeEnd=()=>{this.isResizing=!1,document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd),this.multiselectDropdown&&(this.multiselectDropdown.classList.remove("is-resizing"),this.multiselectDropdown.style.setProperty("--custom-max-height",this.multiselectDropdown.style.maxHeight),this.multiselectDropdown.style.removeProperty("max-height"))}}debounceChanged(e,t){this.debouncedInputHandler=Kt()(this.asyncSetFilter,t)}openChanged(e,t){var i,o,n,a;t?(document.addEventListener("mousedown",this.clickOutside),null===(i=this.arrowIcon)||void 0===i||i.classList.add("flipped"),null===(o=this.multiselectDropdown)||void 0===o||o.classList.add("visible")):(document.removeEventListener("mousedown",this.clickOutside),null===(n=this.arrowIcon)||void 0===n||n.classList.remove("flipped"),null===(a=this.multiselectDropdown)||void 0===a||a.classList.remove("visible"))}connectedCallback(){var e;super.connectedCallback(),this.position===Nt.ABOVE&&(null===(e=this.multiselectDropdown)||void 0===e||e.classList.add("position-above"))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("mousedown",this.clickOutside),document.removeEventListener("mousemove",this.handleResizeMove),document.removeEventListener("mouseup",this.handleResizeEnd)}defaultItemRenderer(e,t){return l.html`
3021
3021
  ${"string"==typeof e?l.html`
3022
3022
  <span part="option-label">${()=>t.getItemLabel(e)}</span>
3023
3023
  `:l.html`
@@ -3029,7 +3029,7 @@
3029
3029
  ${()=>t.getItemLabel(e)}
3030
3030
  </span>
3031
3031
  `}
3032
- `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<Yr&&o>n?Lt.ABOVE:Lt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Lt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Lt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?li(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Qe.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],Zr.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Zr.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"async",void 0),(0,C.Cg)([l.attr],Zr.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Zr.prototype,"resizable",void 0),(0,C.Cg)([l.attr],Zr.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],Zr.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],Zr.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Zr.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],Zr.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Zr.prototype,"loading",void 0),(0,C.Cg)([l.observable],Zr.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Zr.prototype,"open",void 0),(0,C.Cg)([l.observable],Zr.prototype,"options",void 0),(0,C.Cg)([l.observable],Zr.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Zr.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Zr.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],Zr.prototype,"position",void 0),(0,C.Cg)([l.observable],Zr.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],Zr.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],Zr.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],Zr.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],Zr.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],Zr.prototype,"showCreatable",null),(0,C.Cg)([l.observable],Zr.prototype,"optionsHeaderSlottedNodes",void 0);const el=Zr.compose(Object.assign({baseName:"multiselect",template:Xr,styles:Wr,shadowOptions:Qr},Jr));class tl{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){return(e=e.trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e:NaN}hasSeparator(e){return this._separator.test(e)}}const il=(e,t)=>l.css`
3032
+ `}toggle(){this.open||this.setDropdownPosition(),this.open=!this.open}optionsChanged(){this.allSelected&&!this.initialisedOptions&&(this.selectedOptions=this.options.map(e=>this.optionValueGetter(e))),this.filteredAvailableOptions=[...this.options]}selectedOptionsChanged(){this.$fastController.isConnected&&(this.initialisedOptions=!0)}setDropdownPosition(){let e=this.position;if(this.autoPosition){const t=this.getBoundingClientRect(),i=window.innerHeight,o=t.top,n=i-t.bottom;e=n<Vr&&o>n?Nt.ABOVE:Nt.BELOW}this.multiselectDropdown.classList.toggle("position-above",e===Nt.ABOVE),this.multiselectDropdown.classList.toggle("position-below",e===Nt.BELOW)}optionValueGetter(e){return"string"==typeof e?e:e.value}optionLabelGetter(e){return"string"==typeof e?e:e.label}getItemLabel(e){let t;return e?(t="string"==typeof e?e:this.optionLabelGetter(e)||this.optionValueGetter(e)||"",this.valueFormatter?this.valueFormatter(t):t):""}isOptionDisabled(e){return e&&"string"!=typeof e&&e.disabled||!1}get getDisplayValue(){let e="";switch(this.selectedOptions.length){case 0:e=this.getPlaceholder;break;case 1:{const t=this.options.find(e=>this.optionValueGetter(e)===this.selectedOptions[0]);e=this.getItemLabel(t);break}case this.options.length:e=`All ${this.name}`.trim();break;default:e=`${this.selectedOptions.length} Selected`}return e}get getPlaceholder(){return`Search ${this.name}`.trim().concat("...")}get isAllOptionsDisabled(){return this.options.length===this.options.filter(this.isOptionDisabled).length}get showCreatable(){return this.creatable&&this.filterSearchValue.length>0&&0===this.findExactMatchOptions().length}isOptionSelected(e){const t=this.optionValueGetter(e);return this.selectedOptions.some(i=>{if("object"==typeof e&&"object"==typeof e.value)try{return JSON.stringify(i)===JSON.stringify(t)}catch(e){return i===t}return i===t})}selectCheckboxOne(e){const t=this.optionValueGetter(e),i=this.selectedOptions.includes(t);this.selectedOptions=i?this.selectedOptions.filter(e=>e!==t):[...this.selectedOptions,t],this.$emit("selectionChange",this.selectedOptions)}checkboxKeyDown(e,t){return" "===t.key&&(t.preventDefault(),this.selectCheckboxOne(e)),!0}getEnabledOptionsCount(){return this.options.length-this.options.filter(this.isOptionDisabled).length}selectCheckboxAll(){const e=this.selectedOptions.length===this.getEnabledOptionsCount();this.selectedOptions=e?[]:this.options.filter(e=>!this.isOptionDisabled(e)).map(e=>this.optionValueGetter(e)),this.onAllSelectedCallback&&this.onAllSelectedCallback(!e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){this.open||(this.open=!0),this.async?(this.loading=!0,this.filteredAvailableOptions=[],this.debouncedInputHandler()):this.setFilter()}findExactMatchOptions(){const e=this.filterSearchValue.toLowerCase();return this.filteredAvailableOptions.filter(t=>{var i,o;const n="string"==typeof t?t:null!==(i=this.optionLabelGetter(t))&&void 0!==i?i:this.optionValueGetter(t);return(null!==(o=null==n?void 0:n.toLowerCase())&&void 0!==o?o:"")===e})}setFilter(){const e=this.filterSearchValue.toLowerCase();this.filteredAvailableOptions=this.options.filter(t=>{if(!e)return!0;if("string"==typeof t)return t.toLowerCase().includes(e);const i=t.label.toLowerCase(),o="object"==typeof t.value?(n=t.value,Object.values(n).some(t=>t.toLowerCase().includes(e))):String(t.value).toLowerCase().includes(e);var n;return i.includes(e)||o})}addOption(){this.options=[{value:this.filterSearchValue,label:this.filterSearchValue},...this.options],this.setFilter(),this.selectedOptions=[...this.selectedOptions,this.filterSearchValue]}asyncSetFilter(){this.slottedDatasource.length>0?ri(this.slottedDatasource[0],this.filterSearchValue):(this.loading=!1,Xe.warn("Multiselect-datasource is not connected. Please add a datasource to use this functionality."))}changeHandler(e){e.preventDefault(),e.stopImmediatePropagation()}handleClickOutside(e){E(e,this)&&(this.open=!1)}keydownHandler(e){const t=e.key;if(e.ctrlKey||e.shiftKey)return!0;switch(t){case"Escape":if(this.open){this.open=!1;break}break;case"ArrowUp":case"ArrowDown":if(!this.open){this.open=!0;break}break;default:return!0}}clear(e={}){const{clearSelectedValues:t=!0,clearFilterText:i=!0}=e;t&&(this.selectedOptions=[],this.$emit("selectionChange",this.selectedOptions)),i&&(this.filterSearchValue="",this.setFilter(),this.filterSearchInput&&(this.filterSearchInput.value="")),this.$emit("clear",{clearSelectedValues:t,clearFilterText:i})}}(0,C.Cg)([l.attr],Jr.prototype,"name",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"auto-position"})],Jr.prototype,"autoPosition",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"all",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"allSelected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"search",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"disabled",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"creatable",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"async",void 0),(0,C.Cg)([l.attr],Jr.prototype,"debounce",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Jr.prototype,"resizable",void 0),(0,C.Cg)([l.attr],Jr.prototype,"tabindex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"filter-by-contains"})],Jr.prototype,"filterByContains",void 0),(0,C.Cg)([l.observable],Jr.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Jr.prototype,"slottedDatasource",void 0),(0,C.Cg)([l.observable],Jr.prototype,"valueFormatter",void 0),(0,C.Cg)([l.observable],Jr.prototype,"loading",void 0),(0,C.Cg)([l.observable],Jr.prototype,"filterSearchValue",void 0),(0,C.Cg)([l.observable],Jr.prototype,"open",void 0),(0,C.Cg)([l.observable],Jr.prototype,"options",void 0),(0,C.Cg)([l.observable],Jr.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Jr.prototype,"filteredAvailableOptions",void 0),(0,C.Cg)([l.observable],Jr.prototype,"scrollContainer",void 0),(0,C.Cg)([l.attr],Jr.prototype,"position",void 0),(0,C.Cg)([l.observable],Jr.prototype,"onAllSelectedCallback",void 0),(0,C.Cg)([l.observable],Jr.prototype,"itemRenderer",void 0),(0,C.Cg)([l.volatile],Jr.prototype,"getDisplayValue",null),(0,C.Cg)([l.volatile],Jr.prototype,"getPlaceholder",null),(0,C.Cg)([l.volatile],Jr.prototype,"isAllOptionsDisabled",null),(0,C.Cg)([l.volatile],Jr.prototype,"showCreatable",null),(0,C.Cg)([l.observable],Jr.prototype,"optionsHeaderSlottedNodes",void 0);const Zr=Jr.compose(Object.assign({baseName:"multiselect",template:Kr,styles:Yr,shadowOptions:Xr},Qr));class el{constructor(e){const t=new Intl.NumberFormat(e).formatToParts(12345.6),i=[...new Intl.NumberFormat(e,{useGrouping:!1}).format(9876543210)].reverse(),o=new Map(i.map((e,t)=>[e,t]));this._group=new RegExp(`[${t.find(e=>"group"===e.type).value}]`,"g"),this._decimal=new RegExp(`[${t.find(e=>"decimal"===e.type).value}]`),this._separator=new RegExp(`[$${t.find(e=>"decimal"===e.type).value}](?:0*$|[^0]0+$)`),this._numeral=new RegExp(`[${i.join("")}]`,"g"),this._index=e=>o.get(e)}parse(e){return(e=e.trim().replace(this._group,"").replace(this._decimal,".").replace(this._numeral,this._index))?+e:NaN}hasSeparator(e){return this._separator.test(e)}}const tl=(e,t)=>l.css`
3033
3033
  ${(0,r.numberFieldStyles)(e,t)}
3034
3034
  ::part(label) {
3035
3035
  color: var(--neutral-foreground-rest);
@@ -3063,7 +3063,7 @@
3063
3063
  .label-hidden {
3064
3064
  margin: 0;
3065
3065
  }
3066
- `,ol=(e,t)=>l.html`
3066
+ `,il=(e,t)=>l.html`
3067
3067
  <template class="${e=>e.readOnly?"readonly":""}">
3068
3068
  <label
3069
3069
  part="label"
@@ -3132,7 +3132,7 @@
3132
3132
  ${(0,s.endSlotTemplate)(e,t)}
3133
3133
  </div>
3134
3134
  </template>
3135
- `,nl=9,al=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(12345.6).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},sl=(e,t)=>{const{decimalSeparator:i}=al(0,t);return"."===i?e:e.replace(/\./g,i)},rl=(e,t,i)=>Intl.NumberFormat(t,i).format(Number(e)),ll=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,a=n?e.length-o-1:0,s=t.minimumFractionDigits,r=t.maximumFractionDigits;if(a>=s&&a<=r)return e;let l=e;if(a<s){n||(l=e+".");l+="0".repeat(s-a)}if(a>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},dl=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,a=null!=o?o:12;let s;if(i)s=((e,t)=>String(new tl(t).parse(String(e))))(n,t);else{const{decimalSeparator:e}=al(0,t);if("."!==e){s=n.replace(new RegExp(`\\${e}`,"g"),".");const t=s.indexOf(".");-1!==t&&(s=s.substring(0,t))}else s=n}s=String(s);if(!/^-?\d*\.?\d+$/.test(s))return"";if(void 0!==a){if(s.replace(".","").replace(/^0+/,"").length>a){const e=s.indexOf(".");if(-1!==e){const t=s.substring(0,e),i=t.length;if(i>=a)return s.substring(0,a);{const o=a-i;return`${t}.${s.substring(e+1).substring(0,o)}`}}return s.substring(0,a)}}return s},cl=(e,t,i)=>((e,t,i)=>{const{decimalSeparator:o}=al(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`${n}(\\d*?)(0+)$`),s=e.match(a);if(s){const e=s[1],i=s[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,dl(e,t,void 0,i),t),ul=(e,t,i=!0,o,n,a)=>{let s=parseFloat(dl(e,t,i,a));return isNaN(s)?s="":(s=Math.min(s,null!=n?n:s),s=Math.max(s,null!=o?o:s)),String(s)},hl=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const a=Math.pow(10,-n);return parseFloat(a.toFixed(n))}};class pl extends r.NumberField{constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?hl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),a=n.length-1,s=parseInt(n.charAt(a))+1;if(s<=nl){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=nl?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?hl(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),a=n.length-1,s=parseInt(n.charAt(a))-1;if(s>=0){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=nl.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=ul(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(this.isUserInput=!0,this.withFormatting&&!new tl(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=cl(this.control.value,this.locale,this.maximumInputPrecision);this.value=ll(e,this.options),this.control&&(this.control.value=ll(sl(e,this.locale),this.options)),this.$emit("input")}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&(this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")}))}valueChanged(e,t){if(null==t&&this.control)this.control.value="";else if(null!=t&&t!==e){if(!this.isUserInput)return this.value=ul(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.control&&(this.control.value=this.withFormatting&&this.value?rl(this.value,this.locale,this.options):this.value)});const e=t;l.DOM.queueUpdate(()=>{this.control&&(""!==this.control.value&&""!==this.value?(this.control.value=sl(String(e),this.locale),this.value=this.withFormatting?cl(this.control.value,this.locale,this.maximumInputPrecision):this.control.value):this.control.value=e)})}}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=ul(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?ll(e,this.options):e),this.control.value=this.withFormatting&&this.value?rl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],pl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pl.prototype,"hideStep",void 0),(0,C.Cg)([l.attr],pl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],pl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],pl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],pl.prototype,"maximumInputPrecision",void 0);const ml={delegatesFocus:!0,mode:"open"},gl={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},vl=pl.compose(Object.assign({baseName:"number-field",template:ol,styles:il,shadowOptions:ml},gl)),fl=(e,t)=>l.css`
3135
+ `,ol=9,nl=(e,t)=>{var i;return{decimalSeparator:(null===(i=new Intl.NumberFormat(t).formatToParts(12345.6).find(e=>"decimal"===e.type))||void 0===i?void 0:i.value)||"."}},al=(e,t)=>{const{decimalSeparator:i}=nl(0,t);return"."===i?e:e.replace(/\./g,i)},sl=(e,t,i)=>Intl.NumberFormat(t,i).format(Number(e)),rl=(e,t)=>{if(!e||""===e)return e;const i=Number(e);if(isNaN(i))return e;const o=e.indexOf("."),n=-1!==o,a=n?e.length-o-1:0,s=t.minimumFractionDigits,r=t.maximumFractionDigits;if(a>=s&&a<=r)return e;let l=e;if(a<s){n||(l=e+".");l+="0".repeat(s-a)}if(a>r){const t=n?e.substring(0,o):e,i=(n?e.substring(o+1):"").substring(0,r);l=0===r?t:`${t}.${i}`}return l},ll=(e,t,i=!0,o)=>{if(null==e||""===e)return"";const n="number"==typeof e?e.toString():e,a=null!=o?o:12;let s;if(i)s=((e,t)=>String(new el(t).parse(String(e))))(n,t);else{const{decimalSeparator:e}=nl(0,t);if("."!==e){s=n.replace(new RegExp(`\\${e}`,"g"),".");const t=s.indexOf(".");-1!==t&&(s=s.substring(0,t))}else s=n}s=String(s);if(!/^-?\d*\.?\d+$/.test(s))return"";if(void 0!==a){if(s.replace(".","").replace(/^0+/,"").length>a){const e=s.indexOf(".");if(-1!==e){const t=s.substring(0,e),i=t.length;if(i>=a)return s.substring(0,a);{const o=a-i;return`${t}.${s.substring(e+1).substring(0,o)}`}}return s.substring(0,a)}}return s},dl=(e,t,i)=>((e,t,i)=>{const{decimalSeparator:o}=nl(0,i),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`${n}(\\d*?)(0+)$`),s=e.match(a);if(s){const e=s[1],i=s[2],o=String(t);if(!isNaN(Number(t))){if(o.includes(".")){const t=o.split(".")[1],n=Math.max(0,i.length-(t.length-e.length));return o+"0".repeat(n)}return o+"."+e+i}}return String(t)})(e,ll(e,t,void 0,i),t),cl=(e,t,i=!0,o,n,a)=>{let s=parseFloat(ll(e,t,i,a));return isNaN(s)?s="":(s=Math.min(s,null!=n?n:s),s=Math.max(s,null!=o?o:s)),String(s)},ul=e=>{try{const t="string"==typeof e?e:e.toString(),i=t.indexOf(".");if(-1===i)return 1;const o=t.substring(i+1).length;if(0===o)return 1;const n=Math.pow(10,-o);return parseFloat(n.toFixed(o))}catch(t){const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return 1;const n=i.substring(o+1).length;if(0===n)return 1;const a=Math.pow(10,-n);return parseFloat(a.toFixed(n))}};class hl extends r.NumberField{constructor(){super(...arguments),this.autocomplete="off",this.hideStep=!1,this.value="",this.withFormatting=!1,this.locale="en-US",this.autoStepPrecision=!1,this.maximumInputPrecision=12,this.options={maximumFractionDigits:3,minimumFractionDigits:0}}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}stepUp(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?ul(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)+t).toString();const n=i.substring(o+1),a=n.length-1,s=parseInt(n.charAt(a))+1;if(s<=ol){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))+t;o<=ol?(e=o+e,t=0):(e="0"+e,t=1)}return 1===t?parseInt(i.substring(0,o))+1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)+t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=cl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}stepDown(){if(/^-?\d*\.?\d+$/.test(this.value)&&""!==this.value){let e;e=this.autoStepPrecision?ul(this.value):this.step;const t=((e,t)=>{try{const i="string"==typeof e?e:e.toString(),o=i.indexOf(".");if(-1===o)return(parseInt(i)-t).toString();const n=i.substring(o+1),a=n.length-1,s=parseInt(n.charAt(a))-1;if(s>=0){const e=n.substring(0,a)+s;return i.substring(0,o+1)+e}{let e="",t=1;for(let i=a;i>=0;i-=1){const o=parseInt(n.charAt(i))-t;o>=0?(e=o+e,t=0):(e=ol.toString()+e,t=1)}return 1===t?parseInt(i.substring(0,o))-1+"."+e:i.substring(0,o+1)+e}}catch(i){return(("string"==typeof e?parseFloat(e):e)-t).toString()}})(this.value,e);this.value=t.toString()}else{const e=this.min>0?this.min:this.max<0?this.max:this.min?0:0-this.step;this.value=e.toString()}this.control&&(void 0!==this.min||void 0!==this.max?this.control.value=cl(this.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision):this.control.value=this.value),this.handleTextInput()}hasSeparatorWithoutDecimals(){return new RegExp("[.]$")}handleTextInput(){this.control&&"-"!==this.control.value&&"-0"!==this.control.value&&(this.isUserInput=!0,this.withFormatting&&!new el(this.locale).hasSeparator(this.control.value)?l.DOM.queueUpdate(()=>{const e=dl(this.control.value,this.locale,this.maximumInputPrecision);this.value=rl(e,this.options),this.control&&(this.control.value=rl(al(e,this.locale),this.options)),this.$emit("input")}):this.withFormatting||this.hasSeparatorWithoutDecimals().test(this.control.value)||l.DOM.queueUpdate(()=>{var e;this.control&&(this.control.value=this.control.value.replace(/[^0-9\-+e.]/g,"")),this.value=(null===(e=this.control)||void 0===e?void 0:e.value)||"",this.$emit("input")}))}valueChanged(e,t){if(null==t&&this.control)this.control.value="";else if(null!=t&&t!==e){if(!this.isUserInput)return this.value=cl(this.value,this.locale,!1,this.min,this.max,this.maximumInputPrecision),void l.DOM.queueUpdate(()=>{this.control&&(this.control.value=this.withFormatting&&this.value?sl(this.value,this.locale,this.options):this.value)});const e=t;l.DOM.queueUpdate(()=>{this.control&&(""!==this.control.value&&""!==this.value?(this.control.value=al(String(e),this.locale),this.value=this.withFormatting?dl(this.control.value,this.locale,this.maximumInputPrecision):this.control.value):this.control.value=e)})}}handleBlur(){if(!this.control)return;this.isUserInput=!1;const e=cl(this.control.value,this.locale,this.withFormatting,this.min,this.max,this.maximumInputPrecision);e&&/^-?\d*\.?\d+$/.test(e)&&(this.value=this.withFormatting?rl(e,this.options):e),this.control.value=this.withFormatting&&this.value?sl(this.value,this.locale,this.options):e,this.$emit("input")}}(0,C.Cg)([l.attr],hl.prototype,"autocomplete",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],hl.prototype,"hideStep",void 0),(0,C.Cg)([l.attr],hl.prototype,"value",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],hl.prototype,"withFormatting",void 0),(0,C.Cg)([l.attr],hl.prototype,"locale",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],hl.prototype,"autoStepPrecision",void 0),(0,C.Cg)([l.attr],hl.prototype,"maximumInputPrecision",void 0);const pl={delegatesFocus:!0,mode:"open"},ml={stepDownGlyph:'\n <svg class="step-down-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 8C5.02785 8 4.45387 9.2649 5.16108 10.0731L10.6829 16.3838C11.3801 17.1806 12.6197 17.1806 13.3169 16.3838L18.8388 10.0731C19.5459 9.2649 18.972 8 17.898 8H6.1018Z"/>\n </svg>\n ',stepUpGlyph:'\n <svg class="step-up-glyph" viewBox="0 0 24 24" width="1rem" height="1rem" xmlns="http://www.w3.org/2000/svg">\n <path d="M6.1018 16.9814C5.02785 16.9814 4.45387 15.7165 5.16108 14.9083L10.6829 8.59762C11.3801 7.80079 12.6197 7.80079 13.3169 8.59762L18.8388 14.9083C19.5459 15.7165 18.972 16.9814 17.898 16.9814H6.1018Z"/>\n </svg>\n '},gl=hl.compose(Object.assign({baseName:"number-field",template:il,styles:tl,shadowOptions:pl},ml)),vl=(e,t)=>l.css`
3136
3136
  :host {
3137
3137
  display: block;
3138
3138
  }
@@ -3155,7 +3155,7 @@
3155
3155
  ::slotted(*) {
3156
3156
  padding-left: 20px;
3157
3157
  }
3158
- `,bl=(e,t)=>l.html`
3158
+ `,fl=(e,t)=>l.html`
3159
3159
  <template role="option">
3160
3160
  <div class="label" part="label" role="presentation">${e=>e.groupLabel}</div>
3161
3161
 
@@ -3163,19 +3163,19 @@
3163
3163
  <slot></slot>
3164
3164
  </div>
3165
3165
  </template>
3166
- `;class yl extends s.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],yl.prototype,"groupLabel",void 0);const wl=yl.compose({baseName:"optgroup",template:bl,styles:fl});var Cl=i(92277);var xl=i(72154),$l=i.n(xl),Sl=i(57565),El=i.n(Sl),Ol=i(13160),Tl=i(24669),kl=i(5709),Il=i(45230);const Dl={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>(0,C.sH)(void 0,void 0,void 0,function*(){const t=(0,oi.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===ei.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,Il.Ol)().sendForStream(e,i,o)}},Rl=s.DI.createInterface(e=>e.instance(Dl)),Al="system-health-changed";var Nl;const Ll=(0,Xe.createLogger)("network-monitor",{level:Xe.LogLevel.Info}),Fl=Date.now(),Ml=(null===(Nl=window.navigator)||void 0===Nl?void 0:Nl.userAgent)?$l().parse(window.navigator.userAgent):void 0,_l=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:El()(e,void 0,2,t);class Hl{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;Ll.info("Run health checks, triggered by",_l(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?Ll.debug(`Network connected at ${i}`):Ll.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),a=this.preFlightSocketChecks(n);if(a||Ll.debug("Socket pre-flight checks failed"),!o||!a){Ll.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let s=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:a}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=a,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,a,r;try{Ll.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(a=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},a)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===ei.Go.MSG_NACK||(0,ei.z2)(h,Ol.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?Ll.debug(`${o} is healthy at ${i}`):Ll.warn(`${o} is not healthy at ${i}`),h&&Ll.debug(`${o} messaged at ${i}`,_l(h)),p&&Ll.error(`${o} errored at ${i}`,_l(p)),m&&Ll.warn(`${o} timed out at ${i}`),g&&(Ll.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),s&&(s=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return Ll.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});Ll.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:s,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(Ll.level=this.config.logLevel)}create(){this.resources?Ll.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,a=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let s="";(0,ei.z2)(a,Ol.v.NOT_FOUND)?s="Please check the resource is running.":(0,ei.z2)(a,Ol.v.FORBIDDEN)&&(s="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),Ll.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,s,n)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&Ll.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?Ll.debug:Ll.warn)("Emitting 'system-health-changed' event",_l(this.status)),null==i||i.dispatchEvent(new CustomEvent(Al,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(Ll.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return(0,C.sH)(this,void 0,void 0,function*(){return Ll.debug("User requested report stability to Genesis."),Ll.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const a=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),s=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:Ml,username:l,isHealthy:a,lastUpdated:s,nextUpdate:r,firstUpdated:Fl,runAllChecks:()=>{Ll.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return Ll.debug("Socket not configured"),!1;if(e.isReconnecting)return Ll.debug("Socket reconnecting"),!1;if(e.isConnecting)return Ll.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return Ll.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Ll.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return Ll.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,ai.zT)(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}(0,C.Cg)([Rl],Hl.prototype,"config",void 0),(0,C.Cg)([kl.S5],Hl.prototype,"socketStatus",void 0),(0,C.Cg)([Tl.a4],Hl.prototype,"connectEvents",void 0),(0,C.Cg)([Cl.KJ],Hl.prototype,"user",void 0),(0,C.Cg)([l.observable],Hl.prototype,"status",void 0);const zl=s.DI.createInterface(e=>e.singleton(Hl));var Pl=i(6526);const Ul=(e,t)=>l.css`
3166
+ `;class bl extends s.ListboxOption{connectedCallback(){super.connectedCallback(),this.disabled=!0}}(0,C.Cg)([(0,l.attr)({attribute:"label"})],bl.prototype,"groupLabel",void 0);const yl=bl.compose({baseName:"optgroup",template:fl,styles:vl});var wl=i(92277);var Cl=i(72154),xl=i.n(Cl),$l=i(57565),Sl=i.n($l),El=i(13160),Ol=i(24669),Tl=i(5709),kl=i(45230);const Il={windowEvents:["online","offline","pageshow"],documentEvents:["visibilitychange"],genesisConnectEvents:["stream","commit"],ignoredGenesisResources:[],startDelay:5e3,checkInterval:1e4,checkTimeout:3e3,resourceChecks:e=>(0,C.sH)(void 0,void 0,void 0,function*(){const t=(0,ii.tn)(),i=yield t.getMoreColumns(e),o=Date.now(),n=i;return{isConnected:i.MESSAGE_TYPE===Zt.Go.MORE_COLUMNS_ACK,lastUpdated:o,lastMessage:n}}),resourceDataLogon:({message:e,functions:t})=>{const{onMessage:i,onError:o}=t;(0,kl.Ol)().sendForStream(e,i,o)}},Dl=s.DI.createInterface(e=>e.instance(Il)),Rl="system-health-changed";var Al;const Nl=(0,Ke.createLogger)("network-monitor",{level:Ke.LogLevel.Info}),Ll=Date.now(),Fl=(null===(Al=window.navigator)||void 0===Al?void 0:Al.userAgent)?xl().parse(window.navigator.userAgent):void 0,Ml=(e,t={depthLimit:10,edgesLimit:10})=>e instanceof Event?`'${e.type}' Event`:"string"==typeof e?e:Sl()(e,void 0,2,t);class _l{constructor(){this.unsubscribableObservers=[],this.runAllChecks=(e,t)=>(0,C.sH)(this,void 0,void 0,function*(){if(!this.isReady||this.isRunningChecks&&!t)return;Nl.info("Run health checks, triggered by",Ml(e),"| Active resources",this.resources.size),this.isRunningChecks=!0,this.synchroniseCheckInterval();let i=this.getFormattedTimestamp(this.getNowTimestamp());const o=yield this.isOnlineCheck();o?Nl.debug(`Network connected at ${i}`):Nl.warn(`Network disconnected at ${i}`);const n=this.normaliseSerializedSocketStatus(this.socketStatus.serialize(),o),a=this.preFlightSocketChecks(n);if(a||Nl.debug("Socket pre-flight checks failed"),!o||!a){Nl.debug("Aborting remaining health checks");const e=[...this.resources].reduce((e,[t,i])=>{const n=e[i.resourceName];return n?(n.sourceRef=[...n.sourceRef,i.message.SOURCE_REF],e):Object.assign(Object.assign({},e),{[i.resourceName]:this.normaliseResourceHealth({name:i.resourceName,sourceRef:[i.message.SOURCE_REF],isConnected:i.isConnected,lastUpdated:i.lastUpdated},o)})},{});return this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:e,resourcesAllConnected:!1,socket:n}),void(this.isRunningChecks=!1)}let s=!0;const r=[];this.resources.forEach((e,t)=>{const{resourceName:o,message:n,functions:a}=e,{resourceChecks:l=this.config.resourceChecks,resourceDataLogon:d=this.config.resourceDataLogon}=a,{SOURCE_REF:c}=n;let u,h,p,m,g,v=!1;r.push((()=>(0,C.sH)(this,void 0,void 0,function*(){var n,a,r;try{Nl.debug(`Running health check against ${o}`);const e=yield Promise.race([l(c,t),(a=this.config.checkTimeout,r=()=>({isConnected:!1,lastUpdated:this.getNowTimestamp(),timeout:!0}),new Promise(e=>{setTimeout(()=>{e(r())},a)}))]);v=e.isConnected,u=e.lastUpdated,h=e.lastMessage,m=e.timeout}catch(e){v=!1,u=this.getNowTimestamp(),p=e,h=null!==(n=null==e?void 0:e.receivedMessage)&&void 0!==n?n:e}return g=(null==h?void 0:h.MESSAGE_TYPE)===Zt.Go.MSG_NACK||(0,Zt.z2)(h,El.v.NOT_FOUND),i=this.getFormattedTimestamp(null!=u?u:this.getNowTimestamp()),v?Nl.debug(`${o} is healthy at ${i}`):Nl.warn(`${o} is not healthy at ${i}`),h&&Nl.debug(`${o} messaged at ${i}`,Ml(h)),p&&Nl.error(`${o} errored at ${i}`,Ml(p)),m&&Nl.warn(`${o} timed out at ${i}`),g&&(Nl.error(`${o} issue, re-attempting data logon at ${i}`),d(e)),s&&(s=v),{name:o,sourceRef:[c],isConnected:v,lastUpdated:u,lastError:p}}))())});const l=(yield Promise.allSettled(r)).reduce((e,t)=>{if("fulfilled"===t.status){const i=e[t.value.name];return i?(i.sourceRef=[...i.sourceRef,...t.value.sourceRef],e):Object.assign(Object.assign({},e),{[t.value.name]:this.normaliseResourceHealth(t.value)})}return Nl.warn("Unexpected promise rejection occurred. Please check any custom resourceChecks return MonitoredResourceChecksResult."),e},{});Nl.debug("Health checks complete"),this.reportSystemHealth({isAuthenticated:this.user.isAuthenticated,isOnline:o,resources:l,resourcesAllConnected:s,socket:n}),this.isRunningChecks=!1}),void 0!==this.config.logLevel&&(Nl.level=this.config.logLevel)}create(){this.resources?Nl.warn("NetworkMonitor already created. If this is intentional, please call NetworkMonitor.destroy first."):(this.addListeners(),this.resources=new Map,setTimeout(()=>{this.isReady=!0,this.synchroniseCheckInterval(),this.runAllChecks("NetworkMonitor.create()")},this.config.startDelay))}destroy(){this.removeListeners(),clearInterval(this.internalId),this.resources.clear(),this.resources=void 0,this.status=void 0,this.isReady=void 0}isOnlineCheck(){return Promise.resolve(navigator.onLine)}addResource(e,t){this.resources||this.create(),this.resources.set(e,t)}removeResource(e){this.resources.delete(e)}addListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.addEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.addEventListener(e,this.runAllChecks)),this.config.genesisConnectEvents.includes("stream")&&this.unsubscribableObservers.push(this.connectEvents.addStreamListener(({detail:e})=>{const{functions:t,message:i,resourceName:o,stream:n}=e;this.config.ignoredGenesisResources.includes(o)||this.addResource(n,{functions:t,message:i,resourceName:o})},({detail:e})=>{const{resourceName:t,stream:i}=e;this.config.ignoredGenesisResources.includes(t)||this.removeResource(i)},({detail:e})=>{var t;const{resourceName:i,stream:o,error:n}=e,a=null!==(t=n.receivedMessage)&&void 0!==t?t:n;let s="";(0,Zt.z2)(a,El.v.NOT_FOUND)?s="Please check the resource is running.":(0,Zt.z2)(a,El.v.FORBIDDEN)&&(s="You are not authorised to access this resource, removing it from monitoring.",this.removeResource(o)),Nl.error(`${i} errored at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,s,n)})),this.config.genesisConnectEvents.includes("commit")&&this.unsubscribableObservers.push(this.connectEvents.addCommitListener(e=>{this.config.ignoredGenesisResources.includes(e.detail.eventName)||this.runAllChecks(e)})),this.unsubscribableObservers.push(this.connectEvents.addMetadataListener(({detail:e})=>{const{resourceName:t,error:i}=e;i&&Nl.error(`${t} had an unrecoverable error at ${this.getFormattedTimestamp(this.getNowTimestamp())}.`,"Please check the resource is running.",i)}))}removeListeners(){var e,t;null===(e=this.config.windowEvents)||void 0===e||e.forEach(e=>window.removeEventListener(e,this.runAllChecks)),null===(t=this.config.documentEvents)||void 0===t||t.forEach(e=>document.removeEventListener(e,this.runAllChecks)),this.unsubscribableObservers.forEach(e=>e()),this.unsubscribableObservers.length=0}reportSystemHealth(e){var t;const i=null!==(t=this.config.eventEmitter)&&void 0!==t?t:document;this.status=this.normaliseEventDetail(e);(this.status.isHealthy?Nl.debug:Nl.warn)("Emitting 'system-health-changed' event",Ml(this.status)),null==i||i.dispatchEvent(new CustomEvent(Rl,{detail:this.status,bubbles:i!==document,composed:!0})),this.status.socket.reconnectionLimitReached&&(Nl.debug("Network monitoring no longer required. Please check your network and reload your application."),this.destroy())}reportStabilityToGenesis(e){return(0,C.sH)(this,void 0,void 0,function*(){return Nl.debug("User requested report stability to Genesis."),Nl.info("Please attach this data to your Genesis Support request: \n",JSON.stringify(e,null,2)),!0})}normaliseResourceHealth(e,t=!0){var i;const o=!!t&&e.isConnected,n=null!==(i=e.lastUpdated)&&void 0!==i?i:this.getNowTimestamp();return Object.assign(Object.assign({},e),{isConnected:o,lastUpdated:n})}normaliseSerializedSocketStatus(e,t=!0){const i=!!t&&e.isConnected,o=!i;return Object.assign(Object.assign({},e),{isConnected:i,isDisconnected:o})}normaliseEventDetail(e){var t,i,o,n;const a=!!((null===(t=e.socket)||void 0===t?void 0:t.isConfigured)?e.isOnline&&(null===(i=e.socket)||void 0===i?void 0:i.isConnected)&&e.resourcesAllConnected:e.isOnline),s=null!==(o=e.lastUpdated)&&void 0!==o?o:this.getNowTimestamp(),r=null!==(n=e.nextUpdate)&&void 0!==n?n:this.getNextTimestamp(),l=e.isAuthenticated&&this.user?this.user.username:void 0,d=Object.assign(Object.assign({},e),{browserInformation:Fl,username:l,isHealthy:a,lastUpdated:s,nextUpdate:r,firstUpdated:Ll,runAllChecks:()=>{Nl.debug("User activated run checks command starting."),this.runAllChecks("user requested")},reportStabilityToGenesis:()=>this.reportStabilityToGenesis(d)});return d}preFlightSocketChecks(e){if(!e.isConfigured)return Nl.debug("Socket not configured"),!1;if(e.isReconnecting)return Nl.debug("Socket reconnecting"),!1;if(e.isConnecting)return Nl.debug("Socket connecting"),!1;if(e.isDisconnected){const t=e.isDisconnectedByServer?`by the server, code: ${e.closedCode}, reason: ${e.closedReason}`:"";return Nl.debug(`Socket disconnected ${t}`),e.reconnectionLimitReached&&Nl.debug("Socket reconnection limit reached"),!1}const t=this.user.isAuthenticated?"with":"without";return Nl.debug(`Socket connected ${t} valid session`),!0}getFormattedTimestamp(e){return(0,ni.zT)(e)}getNowTimestamp(){return Date.now()}getNextTimestamp(){return new Date(Date.now()+this.config.checkInterval).getTime()}synchroniseCheckInterval(){clearInterval(this.internalId),this.internalId=setInterval(()=>this.runAllChecks("check interval"),this.config.checkInterval)}}(0,C.Cg)([Dl],_l.prototype,"config",void 0),(0,C.Cg)([Tl.S5],_l.prototype,"socketStatus",void 0),(0,C.Cg)([Ol.a4],_l.prototype,"connectEvents",void 0),(0,C.Cg)([wl.KJ],_l.prototype,"user",void 0),(0,C.Cg)([l.observable],_l.prototype,"status",void 0);const Hl=s.DI.createInterface(e=>e.singleton(_l));var zl=i(6526);const Pl=(e,t)=>l.css`
3167
3167
  ${(0,r.progressStyles)(e,t)}
3168
3168
  :host {
3169
3169
  height: calc(var(--design-unit) * 2px);
3170
3170
  }
3171
- `,Bl=(e,t)=>(0,s.progressTemplate)(e,t);class Gl extends r.Progress{}const jl=void 0,Vl={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},Yl=Gl.compose(Object.assign({baseName:"progress",template:Bl,styles:Ul,shadowOptions:jl},Vl));function Wl(e){return new Proxy(e,{get:(e,t,...i)=>{if(["withPrefix","withShadowRootMode","withElementDisambiguation"].includes(t))throw new Error("Modification of the Design System is not allowed.");return Reflect.get(e,t,...i)}})}const ql=(e,t="foundation",i,a)=>{e&&Mo(null!=i?i:o,null!=a?a:n,e);return Wl(s.DesignSystem.getOrCreate(e).withPrefix(t))},Kl="app",Xl="component";ql().register(Yl({prefix:"next-update"}));class Ql extends s.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=Kl,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case Pl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case Pl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case Pl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Xl&&Qe.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){Ll.level=this.logLevel}statusChanged(e,t){this.updateClassNames(),this.$fastController.isConnected&&(!1!==(null==t?void 0:t.isHealthy)||this.isOpen||this.onOpen(),!0===(null==t?void 0:t.isHealthy)&&this.isOpen&&!this.wasOpenedByUser&&this.onClose(),this.startTimeTillNextUpdateCountdown())}updateClassNames(){this.isOnlineClassNames=(0,x.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,x.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,x.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,x.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,x.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,x.x)(this.isHealthyClassNames,["open",this.isOpen],["dismissed",this.isDismissed])}startTimeTillNextUpdateCountdown(){const e=this.status.nextUpdate-Date.now();let t=e,i=100;clearInterval(this.timeTillNextUpdateInterval),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},this.timeTillNextUpdateInterval=setInterval(()=>{t-=1e3,i=Math.floor(t/e*100),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},t<0&&clearInterval(this.timeTillNextUpdateInterval)},1e3)}connectedCallback(){super.connectedCallback(),this.networkMonitor.create(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.networkMonitor.destroy(),this.removeEventListeners()}get isSocketHealthy(){return this.status.isOnline&&(!this.status.socket.isConfigured||this.status.socket.isConfigured&&this.status.socket.isConnected)}get validResourceList(){var e;return(null===(e=this.resourceList)||void 0===e?void 0:e.length)>0}eventBridge(){var e;return null!==(e=this.config.eventEmitter)&&void 0!==e?e:document}addEventListeners(){this.eventBridge().addEventListener(Al,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(Al,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
3171
+ `,Ul=(e,t)=>(0,s.progressTemplate)(e,t);class Bl extends r.Progress{}const Gl=void 0,jl={indeterminateIndicator1:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>',indeterminateIndicator2:'<span class="indeterminate-indicator-1" part="indeterminate-indicator-1"></span>'},Vl=Bl.compose(Object.assign({baseName:"progress",template:Ul,styles:Pl,shadowOptions:Gl},jl));function Yl(e){return new Proxy(e,{get:(e,t,...i)=>{if(["withPrefix","withShadowRootMode","withElementDisambiguation"].includes(t))throw new Error("Modification of the Design System is not allowed.");return Reflect.get(e,t,...i)}})}const Wl=(e,t="foundation",i,a)=>{e&&Fo(null!=i?i:o,null!=a?a:n,e);return Yl(s.DesignSystem.getOrCreate(e).withPrefix(t))},ql="app",Kl="component";Wl().register(Vl({prefix:"next-update"}));class Xl extends s.FoundationElement{constructor(){super(...arguments),this.timeTillNextUpdate={totalMs:1e4,remainMs:1e4,remainPercent:100},this.mode=ql,this.status={isOnline:!0,isHealthy:!0,browserInformation:{},socket:{},resources:{}},this.onSystemHealthChanged=e=>{this.status=e.detail,this.resourceList=Object.values(this.status.resources).sort((e,t)=>Number(t.isConnected)-Number(e.isConnected))},this.onOpen=(e=!1)=>{this.isOpen=!0,this.wasOpenedByUser=e,this.isDismissed=!1},this.onClose=()=>{this.isOpen=!1,this.wasOpenedByUser=!1,this.isDismissed=!1},this.onDismiss=()=>{this.isDismissed||this.status.isHealthy?this.onClose():this.isDismissed=!0},this.onUpdateStatus=()=>{this.status.runAllChecks()},this.onReportStatus=()=>{this.status.reportStabilityToGenesis()},this.onReloadWindow=()=>{location.reload()},this.onDocumentKeydown=e=>{if(!e.defaultPrevented)switch(e.key){case zl.Is.ArrowUp:e.ctrlKey&&e.altKey&&!this.isOpen&&(this.onOpen(!0),e.preventDefault());break;case zl.Is.ArrowDown:e.ctrlKey&&e.altKey&&this.isOpen&&(this.onClose(),e.preventDefault());break;case zl.F9:this.isOpen&&(this.onDismiss(),e.preventDefault())}}}isOpenChanged(){this.updateTemplateClassNames()}isDismissedChanged(){this.updateTemplateClassNames()}modeChanged(){this.$fastController.isConnected&&this.mode===Kl&&Xe.warn("SystemHealthOverlay has support for app overlays only right now.")}logLevelChanged(){Nl.level=this.logLevel}statusChanged(e,t){this.updateClassNames(),this.$fastController.isConnected&&(!1!==(null==t?void 0:t.isHealthy)||this.isOpen||this.onOpen(),!0===(null==t?void 0:t.isHealthy)&&this.isOpen&&!this.wasOpenedByUser&&this.onClose(),this.startTimeTillNextUpdateCountdown())}updateClassNames(){this.isOnlineClassNames=(0,x.x)(["healthy",this.status.isOnline],["unhealthy",!this.status.isOnline]),this.isHealthyClassNames=(0,x.x)(["healthy",this.status.isHealthy],["unhealthy",!this.status.isHealthy]),this.isSocketHealthyClassNames=(0,x.x)(["healthy",this.isSocketHealthy],["unhealthy",!this.isSocketHealthy]),this.resourcesAllConnectedClassNames=(0,x.x)(["healthy",this.status.resourcesAllConnected],["unhealthy",!this.status.resourcesAllConnected],["hidden",!this.validResourceList]),this.updateTemplateClassNames()}updateTemplateClassNames(){this.templateClassNames=(0,x.x)(["open",this.isOpen],["dismissed",this.isDismissed]),this.containerClassNames=(0,x.x)(this.isHealthyClassNames,["open",this.isOpen],["dismissed",this.isDismissed])}startTimeTillNextUpdateCountdown(){const e=this.status.nextUpdate-Date.now();let t=e,i=100;clearInterval(this.timeTillNextUpdateInterval),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},this.timeTillNextUpdateInterval=setInterval(()=>{t-=1e3,i=Math.floor(t/e*100),this.timeTillNextUpdate={totalMs:e,remainMs:t,remainPercent:i},t<0&&clearInterval(this.timeTillNextUpdateInterval)},1e3)}connectedCallback(){super.connectedCallback(),this.networkMonitor.create(),this.addEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.networkMonitor.destroy(),this.removeEventListeners()}get isSocketHealthy(){return this.status.isOnline&&(!this.status.socket.isConfigured||this.status.socket.isConfigured&&this.status.socket.isConnected)}get validResourceList(){var e;return(null===(e=this.resourceList)||void 0===e?void 0:e.length)>0}eventBridge(){var e;return null!==(e=this.config.eventEmitter)&&void 0!==e?e:document}addEventListeners(){this.eventBridge().addEventListener(Rl,this.onSystemHealthChanged,!0),document.addEventListener("keydown",this.onDocumentKeydown)}removeEventListeners(){this.eventBridge().removeEventListener(Rl,this.onSystemHealthChanged,!0),document.removeEventListener("keydown",this.onDocumentKeydown)}static getCheckmarkTemplate(e){return e?l.html`
3172
3172
  <span class="checkmark">&#x2714;</span>
3173
3173
  `:l.html`
3174
3174
  <span class="checkmark">&#10008;</span>
3175
- `}}(0,C.Cg)([Rl],Ql.prototype,"config",void 0),(0,C.Cg)([zl],Ql.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],Ql.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],Ql.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],Ql.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],Ql.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],Ql.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],Ql.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],Ql.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],Ql.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],Ql.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],Ql.prototype,"status",void 0);const Jl=(e,t)=>l.html`
3175
+ `}}(0,C.Cg)([Dl],Xl.prototype,"config",void 0),(0,C.Cg)([Hl],Xl.prototype,"networkMonitor",void 0),(0,C.Cg)([l.observable],Xl.prototype,"resourceList",void 0),(0,C.Cg)([l.observable],Xl.prototype,"isOpen",void 0),(0,C.Cg)([l.observable],Xl.prototype,"wasOpenedByUser",void 0),(0,C.Cg)([l.observable],Xl.prototype,"isDismissed",void 0),(0,C.Cg)([l.observable],Xl.prototype,"templateClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"containerClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"isOnlineClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"isHealthyClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"isSocketHealthyClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"resourcesAllConnectedClassNames",void 0),(0,C.Cg)([l.observable],Xl.prototype,"timeTillNextUpdate",void 0),(0,C.Cg)([l.observable],Xl.prototype,"saveDataCallback",void 0),(0,C.Cg)([l.attr],Xl.prototype,"mode",void 0),(0,C.Cg)([(0,l.attr)({attribute:"log-level",converter:l.nullableNumberConverter})],Xl.prototype,"logLevel",void 0),(0,C.Cg)([l.observable],Xl.prototype,"status",void 0);const Ql=(e,t)=>l.html`
3176
3176
  <template class="${e=>e.templateClassNames}">
3177
3177
  <header class="${e=>e.isHealthyClassNames}" part="header">
3178
- <h1>System ${e=>(0,os.fL)(e.isHealthyClassNames)}</h1>
3178
+ <h1>System ${e=>(0,is.fL)(e.isHealthyClassNames)}</h1>
3179
3179
  ${(0,l.when)(e=>!e.status.isHealthy,l.html`
3180
3180
  <span class="data-warning">Data Validity Unknown</span>
3181
3181
  `)}
@@ -3204,7 +3204,7 @@
3204
3204
  </header>
3205
3205
  <div class="container ${e=>e.containerClassNames}" part="container">
3206
3206
  <section class="network-section ${e=>e.isOnlineClassNames}" part="network-section">
3207
- <h2>Network ${e=>(0,os.fL)(e.status.isOnline?"online":"offline")}</h2>
3207
+ <h2>Network ${e=>(0,is.fL)(e.status.isOnline?"online":"offline")}</h2>
3208
3208
  <dl class="resource-list">
3209
3209
  <div class="resource ${e=>e.isOnlineClassNames}">
3210
3210
  <div class="attributes">
@@ -3224,11 +3224,11 @@
3224
3224
  `)}
3225
3225
  <div class="platform-type">
3226
3226
  <dt>Platform Type</dt>
3227
- <dd>${e=>{var t;return(0,os.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
3227
+ <dd>${e=>{var t;return(0,is.fL)(null===(t=e.status.browserInformation.platform)||void 0===t?void 0:t.type)}}</dd>
3228
3228
  </div>
3229
3229
  <div class="os-name">
3230
3230
  <dt>OS Name</dt>
3231
- <dd>${e=>{var t;return(0,os.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
3231
+ <dd>${e=>{var t;return(0,is.fL)(null===(t=e.status.browserInformation.os)||void 0===t?void 0:t.name)}}</dd>
3232
3232
  </div>
3233
3233
  <div class="os-version">
3234
3234
  <dt>OS Version</dt>
@@ -3238,7 +3238,7 @@
3238
3238
  <div class="attributes">
3239
3239
  <div class="browser-name">
3240
3240
  <dt>Browser Name</dt>
3241
- <dd>${e=>{var t;return(0,os.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
3241
+ <dd>${e=>{var t;return(0,is.fL)(null===(t=e.status.browserInformation.browser)||void 0===t?void 0:t.name)}}</dd>
3242
3242
  </div>
3243
3243
  <div class="browser-version">
3244
3244
  <dt>Browser Version</dt>
@@ -3246,16 +3246,16 @@
3246
3246
  </div>
3247
3247
  <div class="first-updated">
3248
3248
  <dt>First updated</dt>
3249
- <dd>${e=>(0,ai.zT)(e.status.firstUpdated)}</dd>
3249
+ <dd>${e=>(0,ni.zT)(e.status.firstUpdated)}</dd>
3250
3250
  </div>
3251
3251
  <div class="last-updated">
3252
3252
  <dt>Last updated</dt>
3253
- <dd>${e=>(0,ai.zT)(e.status.lastUpdated)}</dd>
3253
+ <dd>${e=>(0,ni.zT)(e.status.lastUpdated)}</dd>
3254
3254
  </div>
3255
3255
  ${(0,l.when)(e=>!e.status.socket.reconnectionLimitReached,l.html`
3256
3256
  <div class="next-update">
3257
3257
  <dt>Next update</dt>
3258
- <dd>${e=>(0,ai.zT)(e.status.nextUpdate)}</dd>
3258
+ <dd>${e=>(0,ni.zT)(e.status.nextUpdate)}</dd>
3259
3259
  </div>
3260
3260
  <div class="next-update-progress">
3261
3261
  <dt></dt>
@@ -3268,13 +3268,13 @@
3268
3268
  `)}
3269
3269
  </div>
3270
3270
  <div class="controls">
3271
- ${e=>Ql.getCheckmarkTemplate(e.status.isOnline)}
3271
+ ${e=>Xl.getCheckmarkTemplate(e.status.isOnline)}
3272
3272
  </div>
3273
3273
  </div>
3274
3274
  </dl>
3275
3275
  </section>
3276
3276
  <section class="socket-section ${e=>e.isSocketHealthyClassNames}" part="socket-section">
3277
- <h2>WebSocket ${e=>(0,os.fL)(e.isSocketHealthyClassNames)}</h2>
3277
+ <h2>WebSocket ${e=>(0,is.fL)(e.isSocketHealthyClassNames)}</h2>
3278
3278
  <dl class="resource-list">
3279
3279
  <div class="resource ${e=>e.isSocketHealthyClassNames}">
3280
3280
  <div class="attributes">
@@ -3314,7 +3314,7 @@
3314
3314
  </div>
3315
3315
  </div>
3316
3316
  <div class="controls">
3317
- ${e=>Ql.getCheckmarkTemplate(e.isSocketHealthy)}
3317
+ ${e=>Xl.getCheckmarkTemplate(e.isSocketHealthy)}
3318
3318
  </div>
3319
3319
  </div>
3320
3320
  </dl>
@@ -3323,7 +3323,7 @@
3323
3323
  class="resource-section ${e=>e.resourcesAllConnectedClassNames}"
3324
3324
  part="resource-section"
3325
3325
  >
3326
- <h2>Resources ${e=>(0,os.fL)(e.resourcesAllConnectedClassNames)}</h2>
3326
+ <h2>Resources ${e=>(0,is.fL)(e.resourcesAllConnectedClassNames)}</h2>
3327
3327
  <dl class="resource-list">
3328
3328
  ${(0,l.repeat)(e=>e.resourceList,l.html`
3329
3329
  <div class="resource ${e=>e.isConnected?"healthy":"unhealthy"}">
@@ -3338,7 +3338,7 @@
3338
3338
  </div>
3339
3339
  <div class="last-checked">
3340
3340
  <dt>Checked</dt>
3341
- <dd>${e=>(0,ai.zT)(e.lastUpdated)}</dd>
3341
+ <dd>${e=>(0,ni.zT)(e.lastUpdated)}</dd>
3342
3342
  </div>
3343
3343
  <div class="subscriptions">
3344
3344
  <dt>Subscriptions</dt>
@@ -3350,7 +3350,7 @@
3350
3350
  </div>
3351
3351
  </div>
3352
3352
  <div class="controls">
3353
- ${e=>Ql.getCheckmarkTemplate(e.isConnected)}
3353
+ ${e=>Xl.getCheckmarkTemplate(e.isConnected)}
3354
3354
  </div>
3355
3355
  </div>
3356
3356
  `)}
@@ -3358,7 +3358,7 @@
3358
3358
  </section>
3359
3359
  </div>
3360
3360
  </template>
3361
- `,Zl=(e,t)=>l.css`
3361
+ `,Jl=(e,t)=>l.css`
3362
3362
  :host {
3363
3363
  --font-family: Menlo, Consolas, monospace;
3364
3364
 
@@ -3629,7 +3629,7 @@
3629
3629
  padding: 0.2em 0.5em;
3630
3630
  background-color: var(--color-unhealthy-opacity-20);
3631
3631
  }
3632
- `,ed=void 0,td={},id=Ql.compose(Object.assign({baseName:"system-health-overlay",template:Jl,styles:Zl,shadowOptions:ed},td));var od=i(4934);const nd={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class ad extends s.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,od.n4)(this.target,this,this.buildOptions()))}placementChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}offsetChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}flipChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}buildOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset||[0,0]}},{name:"flip",enabled:this.flip}]}}toggle(){this.show=!this.show}disconnectedCallback(){super.disconnectedCallback(),this.popper&&(this.popper.destroy(),this.popper=null)}}(0,C.Cg)([l.attr],ad.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ad.prototype,"show",void 0),(0,C.Cg)([l.attr],ad.prototype,"event",void 0),(0,C.Cg)([l.attr],ad.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:nd})],ad.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ad.prototype,"flip",void 0);const sd=l.css`
3632
+ `,Zl=void 0,ed={},td=Xl.compose(Object.assign({baseName:"system-health-overlay",template:Ql,styles:Jl,shadowOptions:Zl},ed));var id=i(4934);const od={toView:e=>JSON.stringify(e),fromView:e=>null==e?e:JSON.parse(e)};class nd extends s.FoundationElement{constructor(){super(...arguments),this.show=!1,this.event="click",this.placement="bottom",this.flip=!1}selectorChanged(e,t){t!==e&&(this.popper&&this.popper.destroy(),this.target&&this.target.removeEventListener(this.event,this.toggle.bind(this)),this.target=this.getRootNode().querySelector(this.selector),this.target.addEventListener(this.event,this.toggle.bind(this)),this.popper=(0,id.n4)(this.target,this,this.buildOptions()))}placementChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}offsetChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}flipChanged(){this.popper&&this.popper.setOptions(this.buildOptions())}buildOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset||[0,0]}},{name:"flip",enabled:this.flip}]}}toggle(){this.show=!this.show}disconnectedCallback(){super.disconnectedCallback(),this.popper&&(this.popper.destroy(),this.popper=null)}}(0,C.Cg)([l.attr],nd.prototype,"selector",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],nd.prototype,"show",void 0),(0,C.Cg)([l.attr],nd.prototype,"event",void 0),(0,C.Cg)([l.attr],nd.prototype,"placement",void 0),(0,C.Cg)([(0,l.attr)({converter:od})],nd.prototype,"offset",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],nd.prototype,"flip",void 0);const ad=l.css`
3633
3633
  :host {
3634
3634
  display: none;
3635
3635
  inset: unset !important;
@@ -3639,39 +3639,39 @@
3639
3639
  :host([show]) {
3640
3640
  display: block;
3641
3641
  }
3642
- `,rd=l.html`
3642
+ `,sd=l.html`
3643
3643
  <template>
3644
3644
  <slot></slot>
3645
3645
  </template>
3646
- `,ld=ad.compose({baseName:"popper",styles:sd,template:rd}),dd=(e,t)=>l.css`
3646
+ `,rd=nd.compose({baseName:"popper",styles:ad,template:sd}),ld=(e,t)=>l.css`
3647
3647
  ${(0,r.progressRingStyles)(e,t)}
3648
- `,cd=(e,t)=>(0,s.progressRingTemplate)(e,t);class ud extends r.Progress{}const hd=void 0,pd={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},md=ud.compose(Object.assign({baseName:"progress-ring",template:cd,styles:dd,shadowOptions:hd},pd)),gd=(e,t)=>l.css`
3648
+ `,dd=(e,t)=>(0,s.progressRingTemplate)(e,t);class cd extends r.Progress{}const ud=void 0,hd={indeterminateIndicator:'\n <svg class="progress" part="progress" viewBox="0 0 16 16">\n <circle class="background" part="background" cx="8px" cy="8px" r="7px"></circle>\n <circle class="indeterminate-indicator-1" part="indeterminate-indicator-1" cx="8px" cy="8px" r="7px"></circle>\n </svg>\n '},pd=cd.compose(Object.assign({baseName:"progress-ring",template:dd,styles:ld,shadowOptions:ud},hd)),md=(e,t)=>l.css`
3649
3649
  ${(0,r.radioStyles)(e,t)}
3650
- `,vd=(e,t)=>(0,s.radioTemplate)(e,t);class fd extends r.Radio{}const bd=void 0,yd={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},wd=fd.compose(Object.assign({baseName:"radio",template:vd,styles:gd,shadowOptions:bd},yd)),Cd=(e,t)=>l.css`
3650
+ `,gd=(e,t)=>(0,s.radioTemplate)(e,t);class vd extends r.Radio{}const fd=void 0,bd={checkedIndicator:'\n <div part="checked-indicator" class="checked-indicator"></div>\n '},yd=vd.compose(Object.assign({baseName:"radio",template:gd,styles:md,shadowOptions:fd},bd)),wd=(e,t)=>l.css`
3651
3651
  ${(0,r.radioGroupStyles)(e,t)}
3652
- `,xd=(e,t)=>(0,s.radioGroupTemplate)(e,t);class $d extends r.RadioGroup{}const Sd=void 0,Ed={},Od=$d.compose(Object.assign({baseName:"radio-group",template:xd,styles:Cd,shadowOptions:Sd},Ed)),Td=l.css`
3652
+ `,Cd=(e,t)=>(0,s.radioGroupTemplate)(e,t);class xd extends r.RadioGroup{}const $d=void 0,Sd={},Ed=xd.compose(Object.assign({baseName:"radio-group",template:Cd,styles:wd,shadowOptions:$d},Sd)),Od=l.css`
3653
3653
  /* Host */
3654
3654
  :host {
3655
3655
  display: flex;
3656
3656
  flex-direction: column;
3657
3657
  width: 100%;
3658
3658
  }
3659
- `,kd=e=>l.html`
3659
+ `,Td=e=>l.html`
3660
3660
  <template>
3661
3661
  <${e}-scheduler-timezone
3662
- :timezone=${(0,P.O)(e=>e.timezone)}
3662
+ :timezone=${(0,z.O)(e=>e.timezone)}
3663
3663
  @change=${(e,t)=>e.handleChange(t.event,"timezone")}
3664
3664
  ></${e}-scheduler-timezone>
3665
3665
  <${e}-scheduler-cron-builder
3666
- :cron=${(0,P.O)(e=>e.cron)}
3666
+ :cron=${(0,z.O)(e=>e.cron)}
3667
3667
  @change=${(e,t)=>e.handleChange(t.event,"cronExpression")}
3668
3668
  min-minute-interval=${e=>e.minMinuteInterval}
3669
3669
  ?disable-tooltips=${e=>e.disableTooltips}
3670
3670
  ></${e}-scheduler-cron-builder>
3671
3671
  </template>
3672
- `,Id=l.html`
3673
- ${e=>kd(T(e))}
3674
- `;class Dd extends s.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Dd.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Dd.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Dd.prototype,"timezone",void 0),(0,C.Cg)([l.observable],Dd.prototype,"cron",void 0),(0,C.Cg)([l.observable],Dd.prototype,"cronConfig",void 0);const Rd=void 0,Ad={},Nd=Dd.compose(Object.assign({baseName:"scheduler",styles:Td,template:Id,shadowOptions:Rd},Ad)),Ld=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},n={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),e.logLevel in Xe.LogLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),pe(o,t,i)};var Fd,Md,_d;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(Fd||(Fd={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(Md||(Md={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(_d||(_d={}));const Hd=[{value:"2",label:"Monday"},{value:"3",label:"Tuesday"},{value:"4",label:"Wednesday"},{value:"5",label:"Thursday"},{value:"6",label:"Friday"},{value:"7",label:"Saturday"},{value:"1",label:"Sunday"}],zd=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],Pd=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}];var Ud;!function(e){e.updateCronConfig="update-cron-config"}(Ud||(Ud={}));const Bd=e=>Number(e)>1?`/${e}`:"";const Gd=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function jd(e,t,i,o=!1,n=Gd){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,a]=e.split("#");return n(o,t,i)&&n(a,1,4)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,a]=e.split("-");return n(o,t,i)&&n(a,t,i)}return!!e.includes(",")&&e.split(",").every(e=>jd(e,t,i,o,n))}function Vd(e,t){return{type:Fd.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?Md.WEEK:Md.WORK_WEEK}}function Yd(e){const t=e.includes("/");return{type:Fd.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Wd(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:Fd.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function qd(e){return{type:Fd.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const Kd=(e,t,i,o)=>{let n;return n="?"===t?{type:_d.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:_d.DATE,dayDate:t},e===Fd.YEARLY&&(n.month=i),n};function Xd(e,t,i,o=Kd){return{type:Fd.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(Fd.YEARLY,e,t,i.split("/")[0])}}function Qd(e,t,i,o=Kd){return{type:Fd.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(Fd.MONTHLY,e,t,i.split("/")[0])}}const Jd=l.css`
3672
+ `,kd=l.html`
3673
+ ${e=>Td(T(e))}
3674
+ `;class Id extends s.FoundationElement{constructor(){super(...arguments),this.disableTooltips=!1,this.timezone="",this.cron=""}cronConfigChanged(){var e,t;this.timezone=(null===(e=this.cronConfig)||void 0===e?void 0:e.timezone)||"",this.cron=(null===(t=this.cronConfig)||void 0===t?void 0:t.cronExpression)||""}handleChange(e,t){e.stopPropagation();const{value:i}=e.target;this.cronConfig=Object.assign(Object.assign({},this.cronConfig),{[t]:i}),this.$emit("change",this.cronConfig)}}(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Id.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Id.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],Id.prototype,"timezone",void 0),(0,C.Cg)([l.observable],Id.prototype,"cron",void 0),(0,C.Cg)([l.observable],Id.prototype,"cronConfig",void 0);const Dd=void 0,Rd={},Ad=Id.compose(Object.assign({baseName:"scheduler",styles:Od,template:kd,shadowOptions:Dd},Rd)),Nd=(e,t,i)=>{if(!e.title)throw new Error("Title is required");if(!e.body)throw new Error("Missing required param 'body'");let o={title:e.title,body:e.body,iconName:e.iconName},n={};e.createdAt&&(o=Object.assign({createdAt:e.createdAt},o)),e.logLevel in Ke.LogLevel&&(o=Object.assign({logLevel:e.logLevel},o)),e.toast&&(n=Object.assign({toast:e.toast},n),o=Object.assign({config:n},o)),he(o,t,i)};var Ld,Fd,Md;!function(e){e.MINUTES="Minutes",e.HOURLY="Hourly",e.DAILY="Daily",e.WEEKLY="Weekly",e.MONTHLY="Monthly",e.YEARLY="Yearly"}(Ld||(Ld={})),function(e){e.WEEK="Week",e.WORK_WEEK="Work week"}(Fd||(Fd={})),function(e){e.DATE="Date",e.DAY_OF_MONTH="Day of month"}(Md||(Md={}));const _d=[{value:"2",label:"Monday"},{value:"3",label:"Tuesday"},{value:"4",label:"Wednesday"},{value:"5",label:"Thursday"},{value:"6",label:"Friday"},{value:"7",label:"Saturday"},{value:"1",label:"Sunday"}],Hd=[{value:"1",label:"First"},{value:"2",label:"Second"},{value:"3",label:"Third"},{value:"4",label:"Fourth"},{value:"-1",label:"Last"}],zd=[{value:"1",label:"January"},{value:"2",label:"February"},{value:"3",label:"March"},{value:"4",label:"April"},{value:"5",label:"May"},{value:"6",label:"June"},{value:"7",label:"July"},{value:"8",label:"August"},{value:"9",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}];var Pd;!function(e){e.updateCronConfig="update-cron-config"}(Pd||(Pd={}));const Ud=e=>Number(e)>1?`/${e}`:"";const Bd=(e,t,i)=>{const o=Number(e);return!isNaN(o)&&o<=i&&o>=t};function Gd(e,t,i,o=!1,n=Bd){if("*"===e)return!0;if(o&&("?"===e||"L"===e))return!0;if(o&&e.endsWith("L"))return n(e.slice(0,-1),t,i);if(e.startsWith("*/"))return n(e.substring(2),1,i);if(e.startsWith("0/"))return n(e.substring(2),1,i);if(o&&e.includes("#")){const[o,a]=e.split("#");return n(o,t,i)&&n(a,1,4)}if(n(e,t,i))return!0;if(e.includes("-")){const[o,a]=e.split("-");return n(o,t,i)&&n(a,t,i)}return!!e.includes(",")&&e.split(",").every(e=>Gd(e,t,i,o,n))}function jd(e,t){return{type:Ld.DAILY,frequency:e.startsWith("*/")?e.split("*/")[1]:"1",weekType:"?"===t?Fd.WEEK:Fd.WORK_WEEK}}function Vd(e){const t=e.includes("/");return{type:Ld.HOURLY,frequency:t?e.split("/")[1]:"1",during:t?"every_hour":"specific_hours",hours:t?void 0:e}}function Yd(e,t="*"){const i="*"!==t&&"0/1"!==t;return{type:Ld.MINUTES,frequency:e.includes("/")?e.split("/")[1]:"1",during:i?"specific_hours":"every_hour",hours:i?t:void 0}}function Wd(e){return{type:Ld.WEEKLY,selectedDays:"*"!==e?new Set(e.split(",")):new Set}}const qd=(e,t,i,o)=>{let n;return n="?"===t?{type:Md.DAY_OF_MONTH,day:o.split(/[L#]/)[0],weekNumber:o.includes("#")?o.split("#")[1]:"-1"}:{type:Md.DATE,dayDate:t},e===Ld.YEARLY&&(n.month=i),n};function Kd(e,t,i,o=qd){return{type:Ld.YEARLY,frequency:2===i.split("/").length?i.split("/")[1]:"1",dateOrDay:o(Ld.YEARLY,e,t,i.split("/")[0])}}function Xd(e,t,i,o=qd){return{type:Ld.MONTHLY,frequency:t.startsWith("*/")?t.split("*/")[1]:"1",dateOrDay:o(Ld.MONTHLY,e,t,i.split("/")[0])}}const Qd=l.css`
3675
3675
  .input-container {
3676
3676
  display: flex;
3677
3677
  flex-direction: column;
@@ -3707,8 +3707,8 @@
3707
3707
  width: 100%;
3708
3708
  height: 0;
3709
3709
  }
3710
- `,Zd=l.css`
3711
- ${Jd}
3710
+ `,Jd=l.css`
3711
+ ${Qd}
3712
3712
  /* Host */
3713
3713
  :host {
3714
3714
  display: flex;
@@ -3768,32 +3768,32 @@
3768
3768
  font-size: var(--type-ramp-minus-1-font-size);
3769
3769
  white-space: nowrap;
3770
3770
  }
3771
- `;var ec=i(20633);const tc=(e,t,i)=>l.html`
3771
+ `;var Zd=i(20633);const ec=(e,t,i)=>l.html`
3772
3772
  <${t}-icon tooltip="${()=>e}" name="${()=>i}"></${t}-icon>
3773
- `,ic=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var a;if(((null==(a=i)?void 0:a.hasOwnProperty("bubbles"))||(null==a?void 0:a.hasOwnProperty("cancelable"))||(null==a?void 0:a.hasOwnProperty("composed"))||(null==a?void 0:a.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},oc=l.css`
3774
- ${Jd}
3775
- `,nc="\n <p>Select one or more hours.</p>\n",ac=l.html`
3773
+ `,tc=e=>class extends e{$emit(...e){const[t,i,o]=((...e)=>{let[t,i,o]=e,n=i;var a;if(((null==(a=i)?void 0:a.hasOwnProperty("bubbles"))||(null==a?void 0:a.hasOwnProperty("cancelable"))||(null==a?void 0:a.hasOwnProperty("composed"))||(null==a?void 0:a.hasOwnProperty("broadcast")))&&(o=i,n=void 0),"string"!=typeof t)throw new Error("$emit event types must be typeof string.");return[t,n,o]})(...e);if(null==o?void 0:o.broadcast){const e=new CustomEvent(t,Object.assign({detail:i,bubbles:!0,composed:!0,cancelable:!0},o));return e.broadcast=!0,this.dispatchEvent(e)}return super.$emit(t,i,o)}},ic=l.css`
3774
+ ${Qd}
3775
+ `,oc="\n <p>Select one or more hours.</p>\n",nc=l.html`
3776
3776
  ${e=>{return t=e.prefix,l.html`
3777
3777
  <template>
3778
3778
  <div class="input-container">
3779
- <label class="label">Of ${e=>e.disableTooltips?"":tc("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
3779
+ <label class="label">Of ${e=>e.disableTooltips?"":ec("\n <p>Controls the daily frequency:</p>\n <ul>\n <li><strong>Week:</strong> allows you to configure the frequency of repeating days, including both weekdays and weekends.</li>\n <li><strong>Work week:</strong> runs the schedule at the specified time on every weekday (Monday - Friday). When this option is selected you cannot change the day frequency, it's every weekday.</li>\n </ul>\n",t)}</label>
3780
3780
  <${t}-select
3781
3781
  data-test-id="select-week-type"
3782
- :value=${(0,P.O)(e=>e.weekType)}
3782
+ :value=${(0,z.O)(e=>e.weekType)}
3783
3783
  @change="${e=>e.updateCronConfig()}"
3784
3784
  >
3785
- <${t}-option data-test-id="${Md.WEEK}">
3786
- ${Md.WEEK}
3785
+ <${t}-option data-test-id="${Fd.WEEK}">
3786
+ ${Fd.WEEK}
3787
3787
  </${t}-option>
3788
- <${t}-option data-test-id="${Md.WORK_WEEK}">
3789
- ${Md.WORK_WEEK}
3788
+ <${t}-option data-test-id="${Fd.WORK_WEEK}">
3789
+ ${Fd.WORK_WEEK}
3790
3790
  </${t}-option>
3791
3791
  </${t}-select>
3792
3792
  </div>
3793
3793
  </template>
3794
3794
  `;var t}}
3795
- `;let sc=class extends(ic(s.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||Md.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Ud.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],sc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],sc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],sc.prototype,"config",void 0),(0,C.Cg)([l.observable],sc.prototype,"weekType",void 0),sc=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:ac,styles:oc})],sc);const rc=l.css`
3796
- ${Jd}
3795
+ `;let ac=class extends(tc(s.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix=""}configChanged(){var e;this.weekType=(null===(e=this.config)||void 0===e?void 0:e.weekType)||Fd.WORK_WEEK}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{weekType:this.weekType}),this.$emit(Pd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],ac.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],ac.prototype,"prefix",void 0),(0,C.Cg)([l.observable],ac.prototype,"config",void 0),(0,C.Cg)([l.observable],ac.prototype,"weekType",void 0),ac=(0,C.Cg)([(0,l.customElement)({name:"daily-recurrence",template:nc,styles:ic})],ac);const sc=l.css`
3796
+ ${Qd}
3797
3797
  :host {
3798
3798
  display: flex;
3799
3799
  flex-direction: column;
@@ -3814,43 +3814,43 @@
3814
3814
  .day-date-number-field::part(root) {
3815
3815
  width: 40%;
3816
3816
  }
3817
- `,lc=e=>l.html`
3817
+ `,rc=e=>l.html`
3818
3818
  <div class="input-container">
3819
3819
  <label class="label">Month</label>
3820
- <${e}-select data-test-id="month-dropdown" :value=${(0,P.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
3821
- ${(0,l.repeat)(()=>Pd,l.html`
3820
+ <${e}-select data-test-id="month-dropdown" :value=${(0,z.O)(e=>e.selectedMonth)} @change="${e=>e.updateCronConfig()}" >
3821
+ ${(0,l.repeat)(()=>zd,l.html`
3822
3822
  <${e}-option value="${e=>e.value}">
3823
3823
  ${e=>e.label}
3824
3824
  </${e}-option>
3825
3825
  `)}
3826
3826
  </${e}-select>
3827
3827
  </div>
3828
- `,dc=e=>l.html`
3828
+ `,lc=e=>l.html`
3829
3829
  ${(e=>l.html`
3830
3830
  <div class="input-container">
3831
3831
  <label class="label">On</label>
3832
3832
  <${e}-select
3833
3833
  data-test-id="select-day-or-date"
3834
- :value=${(0,P.O)(e=>e.dayOrDate)}
3834
+ :value=${(0,z.O)(e=>e.dayOrDate)}
3835
3835
  @change="${e=>e.updateCronConfig()}"
3836
3836
  >
3837
- <${e}-option data-test-id="${_d.DATE}">
3838
- ${_d.DATE}
3837
+ <${e}-option data-test-id="${Md.DATE}">
3838
+ ${Md.DATE}
3839
3839
  </${e}-option>
3840
- <${e}-option data-test-id="${_d.DAY_OF_MONTH}">
3841
- ${_d.DAY_OF_MONTH}
3840
+ <${e}-option data-test-id="${Md.DAY_OF_MONTH}">
3841
+ ${Md.DAY_OF_MONTH}
3842
3842
  </${e}-option>
3843
3843
  </${e}-select>
3844
3844
  </div>
3845
3845
  `)(e)}
3846
- ${(0,cn.q)(e=>e.dayOrDate===_d.DATE,(e=>l.html`
3846
+ ${(0,dn.q)(e=>e.dayOrDate===Md.DATE,(e=>l.html`
3847
3847
  <div class="row">
3848
- ${(0,l.when)(e=>e.config.type===Fd.YEARLY,l.html`
3849
- ${lc(e)}
3848
+ ${(0,l.when)(e=>e.config.type===Ld.YEARLY,l.html`
3849
+ ${rc(e)}
3850
3850
  `)}
3851
3851
  <div class="input-container">
3852
- <label class="label"> ${e=>e.config.type===Fd.MONTHLY?"Day date":"Day"}</label>
3853
- <${e}-select data-test-id="day-date-dropdown" :value=${(0,P.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
3852
+ <label class="label"> ${e=>e.config.type===Ld.MONTHLY?"Day date":"Day"}</label>
3853
+ <${e}-select data-test-id="day-date-dropdown" :value=${(0,z.O)(e=>e.dayDate)} @change="${e=>e.updateCronConfig()}" >
3854
3854
  ${(0,l.repeat)(()=>Array.from({length:31},(e,t)=>t+1),l.html`
3855
3855
  <${e}-option value="${e=>e}">
3856
3856
  ${e=>e}
@@ -3862,17 +3862,17 @@
3862
3862
 
3863
3863
  `)(e),(e=>l.html`
3864
3864
  <div class="day-of-month-row">
3865
- ${(0,l.when)(e=>e.config.type===Fd.YEARLY,l.html`
3866
- ${lc(e)}
3865
+ ${(0,l.when)(e=>e.config.type===Ld.YEARLY,l.html`
3866
+ ${rc(e)}
3867
3867
  `)}
3868
3868
  <div class="input-container">
3869
3869
  <label class="label">Day of Month</label>
3870
3870
  <${e}-select
3871
3871
  data-test-id="select-week-number"
3872
- :value=${(0,P.O)(e=>e.weekNumber)}
3872
+ :value=${(0,z.O)(e=>e.weekNumber)}
3873
3873
  @change="${e=>e.updateCronConfig()}"
3874
3874
  >
3875
- ${(0,l.repeat)(()=>zd,l.html`
3875
+ ${(0,l.repeat)(()=>Hd,l.html`
3876
3876
  <${e}-option value="${e=>e.value}">
3877
3877
  ${e=>e.label}
3878
3878
  </${e}-option>
@@ -3883,10 +3883,10 @@
3883
3883
  <label class="label">Day</label>
3884
3884
  <${e}-select
3885
3885
  data-test-id="select-week-day"
3886
- :value=${(0,P.O)(e=>e.day)}
3886
+ :value=${(0,z.O)(e=>e.day)}
3887
3887
  @change="${e=>e.updateCronConfig()}"
3888
3888
  >
3889
- ${(0,l.repeat)(()=>Hd,l.html`
3889
+ ${(0,l.repeat)(()=>_d,l.html`
3890
3890
  <${e}-option value="${e=>e.value}">
3891
3891
  ${e=>e.label}
3892
3892
  </${e}-option>
@@ -3895,24 +3895,24 @@
3895
3895
  </div>
3896
3896
  </div>
3897
3897
  `)(e))}
3898
- `,cc=l.html`
3899
- ${e=>dc(e.prefix)}
3900
- `;let uc=class extends(ic(s.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=_d.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==Fd.YEARLY&&this.config.type!==Fd.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||_d.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===Fd.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===_d.DAY_OF_MONTH?(this.weekNumber=this.config.dateOrDay.weekNumber||"1",this.day=this.config.dateOrDay.day||"1"):this.dayDate=this.config.dateOrDay.dayDate||"1"}getDayOrDateConfig(){let e;return e=this.dayOrDate===_d.DATE?{type:_d.DATE,dayDate:this.dayDate||"1"}:{type:_d.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===Fd.MONTHLY?this.config=Object.assign(Object.assign({},this.config),{dateOrDay:this.getDayOrDateConfig()}):this.config=Object.assign(Object.assign({},this.config),{dateOrDay:Object.assign(Object.assign({},this.getDayOrDateConfig()),{month:this.selectedMonth||"1"})}),this.$emit(Ud.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],uc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],uc.prototype,"config",void 0),(0,C.Cg)([l.observable],uc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],uc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],uc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],uc.prototype,"day",void 0),(0,C.Cg)([l.observable],uc.prototype,"selectedMonth",void 0),uc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:cc,styles:rc})],uc);const hc=l.css`
3901
- ${Jd}
3898
+ `,dc=l.html`
3899
+ ${e=>lc(e.prefix)}
3900
+ `;let cc=class extends(tc(s.FoundationElement)){constructor(){super(...arguments),this.prefix="",this.dayOrDate=Md.DATE,this.weekNumber="1",this.day="1",this.selectedMonth="1"}configChanged(){this.config.type!==Ld.YEARLY&&this.config.type!==Ld.MONTHLY||(this.dayOrDate=this.config.dateOrDay.type||Md.DATE,this.setFieldsFromConfig())}setFieldsFromConfig(){this.config.type===Ld.YEARLY&&(this.selectedMonth=this.config.dateOrDay.month),this.config.dateOrDay.type===Md.DAY_OF_MONTH?(this.weekNumber=this.config.dateOrDay.weekNumber||"1",this.day=this.config.dateOrDay.day||"1"):this.dayDate=this.config.dateOrDay.dayDate||"1"}getDayOrDateConfig(){let e;return e=this.dayOrDate===Md.DATE?{type:Md.DATE,dayDate:this.dayDate||"1"}:{type:Md.DAY_OF_MONTH,day:this.day||"1",weekNumber:this.weekNumber||"1"},e}updateCronConfig(){this.config.type===Ld.MONTHLY?this.config=Object.assign(Object.assign({},this.config),{dateOrDay:this.getDayOrDateConfig()}):this.config=Object.assign(Object.assign({},this.config),{dateOrDay:Object.assign(Object.assign({},this.getDayOrDateConfig()),{month:this.selectedMonth||"1"})}),this.$emit(Pd.updateCronConfig,this.config)}};(0,C.Cg)([l.observable],cc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],cc.prototype,"config",void 0),(0,C.Cg)([l.observable],cc.prototype,"dayOrDate",void 0),(0,C.Cg)([l.observable],cc.prototype,"dayDate",void 0),(0,C.Cg)([l.observable],cc.prototype,"weekNumber",void 0),(0,C.Cg)([l.observable],cc.prototype,"day",void 0),(0,C.Cg)([l.observable],cc.prototype,"selectedMonth",void 0),cc=(0,C.Cg)([(0,l.customElement)({name:"monthly-yearly-recurrence",template:dc,styles:sc})],cc);const uc=l.css`
3901
+ ${Qd}
3902
3902
  .weekdays-row {
3903
3903
  display: flex;
3904
3904
  gap: calc(var(--design-unit) * 3px);
3905
3905
  flex-wrap: wrap;
3906
3906
  }
3907
- `,pc=l.html`
3907
+ `,hc=l.html`
3908
3908
  ${e=>{return t=e.prefix,l.html`
3909
3909
  <template>
3910
3910
  <div class="input-container">
3911
3911
  <label class="label">
3912
- On ${e=>e.disableTooltips?"":tc("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
3912
+ On ${e=>e.disableTooltips?"":ec("\n <p>Select which days to run this recurrence on. It's not valid to select no days, so if there is only a single day selected then its checkbox is disabled. </p>\n <p>If you need to change the day you can enable other days which will allow you to disable days until you only have a single day selected again.</p>\n",t)}
3913
3913
  </label>
3914
3914
  <div class="weekdays-row">
3915
- ${(0,l.repeat)(()=>Hd,l.html`
3915
+ ${(0,l.repeat)(()=>_d,l.html`
3916
3916
  <${t}-checkbox
3917
3917
  part="weekdays-checkbox"
3918
3918
  class="weekdays-checkbox"
@@ -3928,12 +3928,12 @@
3928
3928
  </div>
3929
3929
  </template>
3930
3930
  `;var t}}
3931
- `;let mc=class extends(ic(s.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set([...this.config.selectedDays]):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Ud.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],mc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],mc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],mc.prototype,"config",void 0),(0,C.Cg)([l.observable],mc.prototype,"selectedDays",void 0),mc=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:pc,styles:hc})],mc),(0,ec.N)(sc,mc,uc);const gc=(e,t)=>l.html`
3931
+ `;let pc=class extends(tc(s.FoundationElement)){constructor(){super(...arguments),this.disableTooltips=!1,this.prefix="",this.selectedDays=new Set}configChanged(){var e;this.selectedDays=(null===(e=this.config)||void 0===e?void 0:e.selectedDays)?new Set([...this.config.selectedDays]):new Set}isDisabled(e){return 1===this.selectedDays.size&&this.selectedDays.has(e)}checkboxChangeHandler(e){const{checked:t,value:i}=e.target;t?this.selectedDays.add(i):this.selectedDays.size>1&&this.selectedDays.delete(i),this.updateCronConfig()}updateCronConfig(){this.config=Object.assign(Object.assign({},this.config),{selectedDays:this.selectedDays}),this.$emit(Pd.updateCronConfig,this.config)}};(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],pc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.observable],pc.prototype,"prefix",void 0),(0,C.Cg)([l.observable],pc.prototype,"config",void 0),(0,C.Cg)([l.observable],pc.prototype,"selectedDays",void 0),pc=(0,C.Cg)([(0,l.customElement)({name:"weekly-recurrence",template:hc,styles:uc})],pc),(0,Zd.N)(ac,pc,cc);const mc=(e,t)=>l.html`
3932
3932
  <monthly-yearly-recurrence
3933
3933
  :prefix=${()=>e}
3934
3934
  :config=${()=>t.cronConfig}
3935
3935
  ></monthly-yearly-recurrence>
3936
- `,vc=(e,t,i)=>l.html`
3936
+ `,gc=(e,t,i)=>l.html`
3937
3937
  <div class="input-container">
3938
3938
  ${(0,l.when)(()=>i,l.html`
3939
3939
  <label class="label">${i}</label>
@@ -3942,7 +3942,7 @@
3942
3942
  class="frequency-select"
3943
3943
  ?disabled=${()=>t.isDailyFrequencyDisabled}
3944
3944
  data-test-id="frequency-dropdown"
3945
- :value=${(0,P.O)(()=>t.frequency)}
3945
+ :value=${(0,z.O)(()=>t.frequency)}
3946
3946
  @change="${()=>t.handleChange("frequency")}"
3947
3947
  >
3948
3948
  ${(0,l.repeat)(()=>t.frequencyList,l.html`
@@ -3951,25 +3951,25 @@
3951
3951
  <div slot="end" class="suffix-label">${()=>t.frequencySuffix}</div>
3952
3952
  </${e}-select>
3953
3953
  </div>
3954
- `,fc=(e,t,i,o)=>l.html`
3954
+ `,vc=(e,t,i,o)=>l.html`
3955
3955
  <div class="input-container">
3956
3956
  <label class="label">Time </label>
3957
3957
  <div class="flex-row">
3958
3958
  ${(0,l.when)(()=>i,l.html`
3959
- <${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,P.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
3959
+ <${e}-select class="time-select" data-test-id="hours-dropdown" :value=${(0,z.O)(()=>t.hours)} @change="${()=>t.handleChange("hours")}" >
3960
3960
  ${(0,l.repeat)(()=>Array.from({length:24},(e,t)=>t),l.html`
3961
3961
  <${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
3962
3962
  `)}
3963
3963
  <div slot="end" class="suffix-label">hr</div>
3964
3964
  </${e}-select>`)}
3965
3965
  ${(0,l.when)(()=>o,l.html`
3966
- <${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,P.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
3966
+ <${e}-select class="time-select" data-test-id="mins-dropdown" :value=${(0,z.O)(()=>t.minutes)} @change="${()=>t.handleChange("minutes")}" >
3967
3967
  ${(0,l.repeat)(()=>Array.from({length:60},(e,t)=>t),l.html`
3968
3968
  <${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
3969
3969
  `)}
3970
3970
  <div slot="end" class="suffix-label">min</div>
3971
3971
  </${e}-select>`)}
3972
- <${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,P.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
3972
+ <${e}-select class="time-select" data-test-id="seconds-dropdown" :value=${(0,z.O)(()=>t.seconds)} @change="${()=>t.handleChange("seconds")}" >
3973
3973
  ${(0,l.repeat)(()=>Array.from({length:60},(e,t)=>t),l.html`
3974
3974
  <${e}-option value="${e=>e}"> ${e=>e} </${e}-option>
3975
3975
  `)}
@@ -3977,16 +3977,16 @@
3977
3977
  </${e}-select>
3978
3978
  </div>
3979
3979
  </div>
3980
- `,bc=(e,t,i)=>{switch(e){case Fd.MINUTES:return l.html`
3980
+ `,fc=(e,t,i)=>{switch(e){case Ld.MINUTES:return l.html`
3981
3981
  <div class="minutes-options-row">
3982
3982
  <div class="input-container">
3983
3983
  <label class="label"
3984
3984
  >During
3985
- ${()=>i.disableTooltips?"":tc("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
3985
+ ${()=>i.disableTooltips?"":ec("\n <p>Which hours in the day to run this schedule for:</p>\n <ul>\n <li><strong>Every hour:</strong> runs the minute schedule during every hour of the day.</li>\n <li><strong>Specific hours:</strong> specify which hours the minute schedule runs for. For example, just trading hours. Selecting every hour will configure the schedule as <strong>Every hour</strong>.</li>\n </ul>\n",t)}</label
3986
3986
  >
3987
3987
  <${t}-select
3988
3988
  data-test-id="during-select"
3989
- :value=${(0,P.O)(()=>i.during)}
3989
+ :value=${(0,z.O)(()=>i.during)}
3990
3990
  @change="${()=>i.handleDuringChange()}"
3991
3991
  >
3992
3992
  ${(0,l.repeat)(()=>i.duringOptions,l.html`
@@ -4002,7 +4002,7 @@
4002
4002
  ${(0,l.when)(()=>i.isSpecificHours,l.html`
4003
4003
  <div class="input-container">
4004
4004
  <label class="label"
4005
- >Hours ${tc(nc,t)}</label
4005
+ >Hours ${ec(oc,t)}</label
4006
4006
  >
4007
4007
  <${t}-multiselect
4008
4008
  class="time-select"
@@ -4017,31 +4017,31 @@
4017
4017
  `)}
4018
4018
  </div>
4019
4019
  <div class="row">
4020
- ${vc(t,i,"Every")}
4021
- ${fc(t,i,!1,!1)}
4020
+ ${gc(t,i,"Every")}
4021
+ ${vc(t,i,!1,!1)}
4022
4022
  </div>
4023
- `;case Fd.HOURLY:return l.html`
4023
+ `;case Ld.HOURLY:return l.html`
4024
4024
  <div class="row">
4025
4025
  <div class="input-container">
4026
4026
  <label class="label"
4027
4027
  >Mode
4028
- ${()=>i.disableTooltips?"":tc("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
4028
+ ${()=>i.disableTooltips?"":ec("\n <p>Select the type of hourly recurrence:</p>\n <ul>\n <li><strong>Interval:</strong> runs at a repeating interval of hours (e.g. every 2 hours).</li>\n <li><strong>Selected Hours:</strong> allows you to choose specific hours of the day (e.g. 9, 10, and 14).</li>\n </ul>\n",t)}</label
4029
4029
  >
4030
4030
  <${t}-select
4031
4031
  data-test-id="hourly-during-select"
4032
- :value=${(0,P.O)(()=>i.during)}
4032
+ :value=${(0,z.O)(()=>i.during)}
4033
4033
  @change="${()=>i.handleDuringChange()}"
4034
4034
  >
4035
4035
  <${t}-option value="every_hour">Interval</${t}-option>
4036
4036
  <${t}-option value="specific_hours">Selected Hours</${t}-option>
4037
4037
  </${t}-select>
4038
4038
  </div>
4039
- ${(0,l.when)(()=>"every_hour"===i.during,vc(t,i,"Every"))}
4039
+ ${(0,l.when)(()=>"every_hour"===i.during,gc(t,i,"Every"))}
4040
4040
  ${(0,l.when)(()=>i.isSpecificHours,l.html`
4041
4041
  <div class="break"></div>
4042
4042
  <div class="input-container">
4043
4043
  <label class="label">
4044
- Hours ${tc(nc,t)}
4044
+ Hours ${ec(oc,t)}
4045
4045
  </label>
4046
4046
  <${t}-multiselect
4047
4047
  class="time-select"
@@ -4053,9 +4053,9 @@
4053
4053
  ></${t}-multiselect>
4054
4054
  </div>
4055
4055
  `)}
4056
- ${fc(t,i,!1,!0)}
4056
+ ${vc(t,i,!1,!0)}
4057
4057
  </div>
4058
- `;case Fd.DAILY:return l.html`
4058
+ `;case Ld.DAILY:return l.html`
4059
4059
  ${((e,t)=>l.html`
4060
4060
  <daily-recurrence
4061
4061
  :prefix=${()=>e}
@@ -4064,10 +4064,10 @@
4064
4064
  ></daily-recurrence>
4065
4065
  `)(t,i)}
4066
4066
  <div class="row">
4067
- ${vc(t,i,"Every")}
4068
- ${fc(t,i,!0,!0)}
4067
+ ${gc(t,i,"Every")}
4068
+ ${vc(t,i,!0,!0)}
4069
4069
  </div>
4070
- `;case Fd.WEEKLY:return l.html`
4070
+ `;case Ld.WEEKLY:return l.html`
4071
4071
  <div class="row">
4072
4072
  ${((e,t)=>l.html`
4073
4073
  <weekly-recurrence
@@ -4075,63 +4075,63 @@
4075
4075
  :config=${()=>t.cronConfig}
4076
4076
  ?disable-tooltips=${()=>t.disableTooltips}
4077
4077
  ></weekly-recurrence>
4078
- `)(t,i)} ${fc(t,i,!0,!0)}
4078
+ `)(t,i)} ${vc(t,i,!0,!0)}
4079
4079
  </div>
4080
- `;case Fd.MONTHLY:return l.html`
4080
+ `;case Ld.MONTHLY:return l.html`
4081
4081
  <div class="row">
4082
- ${vc(t,i,"Every")}
4083
- ${fc(t,i,!0,!0)}
4082
+ ${gc(t,i,"Every")}
4083
+ ${vc(t,i,!0,!0)}
4084
4084
  </div>
4085
- ${gc(t,i)}
4086
- `;case Fd.YEARLY:return l.html`
4087
- <div class="row">${fc(t,i,!0,!0)}</div>
4088
- ${gc(t,i)}
4089
- `;default:return l.html``}},yc=e=>l.html`
4085
+ ${mc(t,i)}
4086
+ `;case Ld.YEARLY:return l.html`
4087
+ <div class="row">${vc(t,i,!0,!0)}</div>
4088
+ ${mc(t,i)}
4089
+ `;default:return l.html``}},bc=e=>l.html`
4090
4090
  <template>
4091
4091
  <div class="container">
4092
4092
  <div class="input-container">
4093
4093
  <label class="label"
4094
4094
  >Recurrence
4095
4095
  ${(0,l.when)(e=>!e.disableTooltips,l.html`
4096
- ${t=>tc(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<30?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
4096
+ ${t=>ec(`\n <p>Select how often the event should occur:</p>\n <ul>\n${!t.minMinuteInterval||t.minMinuteInterval<30?"<li><strong>Minutes:</strong> Runs at every interval of minutes from the hour. Can be for every or specific hours.</li>":""}\n <li><strong>Hourly:</strong> Runs at a specific time in the hour, for one or more hours in the day.</li>\n <li><strong>Daily:</strong> Runs at a specific time of day, for a frequency interval of days per week (or work week).</li>\n <li><strong>Weekly:</strong> Runs at a specific time of day, for specific days of the week.</li>\n <li><strong>Monthly:</strong> Runs at a specific time of day in monthly intervals, on a specific date or day of month .</li>\n <li><strong>Yearly:</strong> Runs at a specific time, every year on a specific date or day of month.</li>\n </ul>\n`,e)}
4097
4097
  `)}
4098
4098
  </label>
4099
4099
  <${e}-select
4100
4100
  data-test-id="select-recurrence"
4101
- :value=${(0,P.O)(e=>e.recurrence)}
4101
+ :value=${(0,z.O)(e=>e.recurrence)}
4102
4102
  @change="${e=>e.handleRecurrenceChange()}"
4103
4103
  >
4104
4104
  ${(0,l.when)(e=>e.isMinutesRecurrenceEnabled,l.html`
4105
- <${e}-option data-test-id="${Fd.MINUTES}">
4106
- ${Fd.MINUTES}
4105
+ <${e}-option data-test-id="${Ld.MINUTES}">
4106
+ ${Ld.MINUTES}
4107
4107
  </${e}-option>
4108
4108
  `)}
4109
- <${e}-option data-test-id="${Fd.HOURLY}">
4110
- ${Fd.HOURLY}
4109
+ <${e}-option data-test-id="${Ld.HOURLY}">
4110
+ ${Ld.HOURLY}
4111
4111
  </${e}-option>
4112
- <${e}-option data-test-id="${Fd.DAILY}">
4113
- ${Fd.DAILY}
4112
+ <${e}-option data-test-id="${Ld.DAILY}">
4113
+ ${Ld.DAILY}
4114
4114
  </${e}-option>
4115
- <${e}-option data-test-id="${Fd.WEEKLY}">
4116
- ${Fd.WEEKLY}
4115
+ <${e}-option data-test-id="${Ld.WEEKLY}">
4116
+ ${Ld.WEEKLY}
4117
4117
  </${e}-option>
4118
- <${e}-option data-test-id="${Fd.MONTHLY}">
4119
- ${Fd.MONTHLY}
4118
+ <${e}-option data-test-id="${Ld.MONTHLY}">
4119
+ ${Ld.MONTHLY}
4120
4120
  </${e}-option>
4121
- <${e}-option data-test-id="${Fd.YEARLY}">
4122
- ${Fd.YEARLY}
4121
+ <${e}-option data-test-id="${Ld.YEARLY}">
4122
+ ${Ld.YEARLY}
4123
4123
  </${e}-option>
4124
4124
  </${e}-select>
4125
4125
  </div>
4126
4126
 
4127
4127
  ${(0,l.repeat)(e=>[`${e.recurrence}-${e.during}`],l.html`
4128
- ${(t,i)=>bc(i.parent.recurrence,e,i.parent)}
4128
+ ${(t,i)=>fc(i.parent.recurrence,e,i.parent)}
4129
4129
  `,{recycle:!1})}
4130
4130
  </div>
4131
4131
  </template>
4132
- `,wc=l.html`
4133
- ${e=>yc(T(e))}
4134
- `;class Cc extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Wd,buildConfigForHourlyRecurrence:Yd,buildConfigForDailyRecurrence:Vd,buildConfigForWeeklyRecurrence:qd,buildConfigForMonthlyRecurrence:Qd,buildConfigForYearlyRecurrence:Xd},this.recurrence=Fd.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:Fd.DAILY,weekType:Md.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=jd)=>{const i=e.trim().split(" ");if(6!=i.length)return!1;const[o,n,a,s,r,l]=i;return t(o,0,59)&&t(n,0,59)&&t(a,0,23)&&t(s,1,31,!0)&&t(r,1,12)&&t(l,0,7,!0)})(this.cron))return void Ld({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void Ld({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case Fd.MINUTES:return"Minute(s)";case Fd.HOURLY:return"Hour(s)";case Fd.DAILY:return"Day(s)";case Fd.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case Fd.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Fd.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Fd.DAILY:return Array.from({length:31},(e,t)=>t+1);case Fd.MONTHLY:case Fd.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Fd.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;24===t.length?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===Fd.DAILY&&this.cronConfig.weekType===Md.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Ud.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Ud.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Fd.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:Fd.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Fd.HOURLY:const s=this.getBaseConfigFields(),{hours:r}=s,l=(0,C.Tt)(s,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:Fd.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Fd.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Fd.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Md.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Fd.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Fd.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Fd.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Fd.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:_d.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Fd.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Fd.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:_d.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:Ld({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==Fd.MINUTES&&this.cronConfig.type!==Fd.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Fd.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case Fd.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case Fd.DAILY:this.cron=function(e,t=Bd){const i=e.weekType===Md.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Md.WORK_WEEK?"2-6":"?"}`}(e,Bd);break;case Fd.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case Fd.MONTHLY:this.cron=function(e,t=Bd){const{dateOrDay:i,minutes:o,hours:n,seconds:a,frequency:s}=e,r=t(s);return i.type===_d.DATE?`${a} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${a} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Bd);break;case Fd.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===_d.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:Ld({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,a,s,r,l]=i;if("?"!==l&&"?"!==s)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,a));if(/^(0|\*)\/\d+$/.test(a))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("?"===s&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("2-6"===l||"?"===l&&("*"===s||s.startsWith("*")))return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(s,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(s)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(s,r,l)):Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(s,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==Fd.MINUTES&&e.type!==Fd.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Fd.HOURLY&&e.type!==Fd.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],Cc.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],Cc.prototype,"cron",void 0),(0,C.Cg)([l.observable],Cc.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],Cc.prototype,"frequency",void 0),(0,C.Cg)([l.observable],Cc.prototype,"during",void 0),(0,C.Cg)([l.volatile],Cc.prototype,"duringOptions",null),(0,C.Cg)([l.observable],Cc.prototype,"hours",void 0),(0,C.Cg)([l.observable],Cc.prototype,"minutes",void 0),(0,C.Cg)([l.observable],Cc.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],Cc.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],Cc.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],Cc.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],Cc.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],Cc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],Cc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],Cc.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],Cc.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],Cc.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],Cc.prototype,"timezone",void 0);const xc=void 0,$c={},Sc=Cc.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Zd,template:wc,shadowOptions:xc},$c)),Ec=l.css`
4132
+ `,yc=l.html`
4133
+ ${e=>bc(T(e))}
4134
+ `;class wc extends s.FoundationElement{constructor(){super(...arguments),this.getConfigs={buildConfigForMinutesRecurrence:Yd,buildConfigForHourlyRecurrence:Vd,buildConfigForDailyRecurrence:jd,buildConfigForWeeklyRecurrence:Wd,buildConfigForMonthlyRecurrence:Xd,buildConfigForYearlyRecurrence:Kd},this.recurrence=Ld.DAILY,this.cron="",this.value=this.cron,this.cronConfig={type:Ld.DAILY,weekType:Fd.WEEK,hours:"0",minutes:"0",seconds:"0"},this.frequency="1",this.during="every_hour",this.hours="0",this.minutes="0",this.seconds="0",this.disableTooltips=!1,this.timezone=""}cronChanged(){if(this.cron)try{if(!((e,t=Gd)=>{const i=e.trim().split(" ");if(6!=i.length)return!1;const[o,n,a,s,r,l]=i;return t(o,0,59)&&t(n,0,59)&&t(a,0,23)&&t(s,1,31,!0)&&t(r,1,12)&&t(l,0,7,!0)})(this.cron))return void Nd({title:"Cron Scheduler",body:"Invalid Cron Expression",toast:{type:"critical"}},T(this));this.setsFieldsFromCronEx()}catch(e){return console.error("Error:",e),void Nd({title:"Cron Scheduler",body:e,toast:{type:"critical"}},T(this))}}get duringOptions(){return[{label:"Every hour",value:"every_hour"},{label:"Specific hours",value:"specific_hours"}]}get frequencySuffix(){switch(this.cronConfig.type){case Ld.MINUTES:return"Minute(s)";case Ld.HOURLY:return"Hour(s)";case Ld.DAILY:return"Day(s)";case Ld.MONTHLY:return"Month(s)";default:return""}}get frequencyList(){switch(this.cronConfig.type){case Ld.MINUTES:const e=[1,2,3,4,5,6,10,12,15,20,30],t=this.minMinuteInterval?Number(this.minMinuteInterval):1;return e.filter(e=>e>=t);case Ld.HOURLY:return Array.from({length:23},(e,t)=>t+1);case Ld.DAILY:return Array.from({length:31},(e,t)=>t+1);case Ld.MONTHLY:case Ld.YEARLY:return Array.from({length:12},(e,t)=>t+1);case Ld.WEEKLY:return[1];default:return[]}}get hourOptions(){return Array.from({length:24},(e,t)=>({label:t.toString(),value:t.toString()}))}get selectedHours(){return this.hours&&"*"!==this.hours&&"0"!==this.hours?this.hours.split(","):"*"===this.hours?this.hourOptions.map(e=>e.value):[this.hours]}handleHoursChange(e){const t=e.detail;24===t.length?(this.hours="*",this.frequency="1",this.cronConfig.frequency="1"):t&&0!==t.length?this.hours=t.sort((e,t)=>Number(e)-Number(t)).join(","):this.hours="0",this.handleChange("hours")}get isMinutesRecurrenceEnabled(){return!this.minMinuteInterval||Number(this.minMinuteInterval)<=30}get isSpecificHours(){return"specific_hours"===this.during}get isDailyFrequencyDisabled(){return this.cronConfig.type===Ld.DAILY&&this.cronConfig.weekType===Fd.WORK_WEEK}minMinuteIntervalChanged(){this.minMinuteInterval>=60&&console.warn("Minimum minute interval has no effect on schedules with an hourly or longer recurrance")}connectedCallback(){super.connectedCallback(),this.addEventListener(Pd.updateCronConfig,this.handleCronConfigUpdate)}disconnectedCallback(){this.removeEventListener(Pd.updateCronConfig,this.handleCronConfigUpdate)}getBaseConfigFields(){return{frequency:this.frequency,hours:this.hours,minutes:this.minutes,seconds:this.seconds}}handleRecurrenceChange(){switch(this.recurrence){case Ld.MINUTES:const e=this.getBaseConfigFields(),{minutes:t}=e,i=(0,C.Tt)(e,["minutes"]);this.during="every_hour",this.hours="*";const o=[1,2,3,4,5,6,10,12,15,20,30],n=this.minMinuteInterval?Number(this.minMinuteInterval):1,a=o.find(e=>e>=n)||1;this.cronConfig=Object.assign(Object.assign({type:Ld.MINUTES},i),{frequency:a.toString(),during:"every_hour",hours:"*"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ld.HOURLY:const s=this.getBaseConfigFields(),{hours:r}=s,l=(0,C.Tt)(s,["hours"]);this.during="every_hour",this.hours="0",this.cronConfig=Object.assign(Object.assign({type:Ld.HOURLY},l),{frequency:"1",during:"every_hour",hours:"0"}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ld.DAILY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ld.DAILY},this.getBaseConfigFields()),{frequency:"1",weekType:Fd.WEEK}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ld.WEEKLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ld.WEEKLY},this.getBaseConfigFields()),{frequency:"1",selectedDays:new Set(["2"])}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ld.MONTHLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ld.MONTHLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Md.DATE,dayDate:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;case Ld.YEARLY:("*"===this.hours||this.hours.includes(","))&&(this.hours="0"),this.cronConfig=Object.assign(Object.assign({type:Ld.YEARLY},this.getBaseConfigFields()),{frequency:"1",dateOrDay:{type:Md.DATE,dayDate:"1",month:"1"}}),this.generateCronExpressionFromConfig(this.cronConfig);break;default:Nd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}}handleChange(e){if("frequency"===e&&0===Number(this.frequency))throw new Error("Frequency must be greater than 0");this.cronConfig[e]=this[e],this.generateCronExpressionFromConfig(this.cronConfig)}handleDuringChange(){"every_hour"===this.during?this.hours="*":"*"===this.hours&&(this.hours="0"),this.cronConfig.type!==Ld.MINUTES&&this.cronConfig.type!==Ld.HOURLY||(this.cronConfig.during=this.during,this.cronConfig.hours=this.hours),this.generateCronExpressionFromConfig(this.cronConfig)}handleCronConfigUpdate({detail:e}){this.cronConfig=Object.assign(Object.assign({},this.getBaseConfigFields()),e),this.generateCronExpressionFromConfig(this.cronConfig)}generateCronExpressionFromConfig(e){switch(e.type){case Ld.MINUTES:this.cron=function(e){const t="specific_hours"===e.during&&e.hours?e.hours:"*";return`${e.seconds} 0/${e.frequency} ${t} ? * *`}(e);break;case Ld.HOURLY:this.cron=function(e){return"specific_hours"===e.during&&e.hours&&"*"!==e.hours?`${e.seconds} ${e.minutes} ${e.hours} ? * *`:`${e.seconds} ${e.minutes} 0/${e.frequency} ? * *`}(e);break;case Ld.DAILY:this.cron=function(e,t=Ud){const i=e.weekType===Fd.WORK_WEEK?"?":`*${t(e.frequency)}`;return`${e.seconds} ${e.minutes} ${e.hours} ${i} * ${e.weekType===Fd.WORK_WEEK?"2-6":"?"}`}(e,Ud);break;case Ld.WEEKLY:this.cron=function(e){const t=[...e.selectedDays].join(",")||"*";return`${e.seconds} ${e.minutes} ${e.hours} ? * ${t}`}(e);break;case Ld.MONTHLY:this.cron=function(e,t=Ud){const{dateOrDay:i,minutes:o,hours:n,seconds:a,frequency:s}=e,r=t(s);return i.type===Md.DATE?`${a} ${o} ${n} ${i.dayDate} *${r} ?`:"-1"===i.weekNumber?`${a} ${o} ${n} ? *${r} ${i.day}L`:`${e.seconds} ${o} ${n} ? *${r} ${i.day}#${i.weekNumber}`}(e,Ud);break;case Ld.YEARLY:this.cron=function(e){const{dateOrDay:t,minutes:i,seconds:o,hours:n}=e;return t.type===Md.DATE?`${o} ${i} ${n} ${t.dayDate} ${t.month} ?`:"-1"===t.weekNumber?`${o} ${i} ${n} ? ${t.month} ${t.day}L`:`${o} ${i} ${n} ? ${t.month} ${t.day}#${t.weekNumber}`}(e);break;default:Nd({title:"Cron Scheduler",body:"Recurrence type should be one of the known types: Daily, Weekly,Monthly or Yearly",toast:{type:"critical"}},T(this))}this.value=this.cron,this.$emit("change")}setsFieldsFromCronEx(){this.cronConfig=function(e,t){if(!e)return;const i=e.split(" "),[o,n,a,s,r,l]=i;if("?"!==l&&"?"!==s)throw new Error("Support for specifying both a day-of-week AND a day-of-month parameter is not implemented");if(/^(0|\*)\/\d+$/.test(n))return Object.assign({seconds:o},t.buildConfigForMinutesRecurrence(n,a));if(/^(0|\*)\/\d+$/.test(a))return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("?"===s&&"*"===l)return Object.assign({minutes:n,seconds:o},t.buildConfigForHourlyRecurrence(a));if("2-6"===l||"?"===l&&("*"===s||s.startsWith("*")))return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForDailyRecurrence(s,l));if(/^([1-7](,[1-7])*)$/.test(l)||"*"===l)return Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForWeeklyRecurrence(l));if(l.includes("L")||l.includes("#")||/^([1-9]|[12]\d|3[01])$/.test(s)&&"?"===l)return"*"==r||r.startsWith("*/")?Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForMonthlyRecurrence(s,r,l)):Object.assign({hours:a,minutes:n,seconds:o},t.buildConfigForYearlyRecurrence(s,r,l));throw new Error("Invalid Cron Expression")}(this.cron,this.getConfigs),this.recurrence=this.cronConfig.type,this.frequency=this.cronConfig.frequency;const e=this.cronConfig;"minutes"in e&&(this.minutes=e.minutes),e.type!==Ld.MINUTES&&e.type!==Ld.HOURLY||(this.during=e.during||"every_hour",e.hours&&(this.hours=e.hours)),this.seconds=e.seconds,e.type!==Ld.HOURLY&&e.type!==Ld.MINUTES&&(this.hours=e.hours)}}(0,C.Cg)([l.observable],wc.prototype,"recurrence",void 0),(0,C.Cg)([l.observable],wc.prototype,"cron",void 0),(0,C.Cg)([l.observable],wc.prototype,"cronConfig",void 0),(0,C.Cg)([l.observable],wc.prototype,"frequency",void 0),(0,C.Cg)([l.observable],wc.prototype,"during",void 0),(0,C.Cg)([l.volatile],wc.prototype,"duringOptions",null),(0,C.Cg)([l.observable],wc.prototype,"hours",void 0),(0,C.Cg)([l.observable],wc.prototype,"minutes",void 0),(0,C.Cg)([l.observable],wc.prototype,"seconds",void 0),(0,C.Cg)([l.volatile],wc.prototype,"frequencySuffix",null),(0,C.Cg)([l.volatile],wc.prototype,"frequencyList",null),(0,C.Cg)([l.volatile],wc.prototype,"hourOptions",null),(0,C.Cg)([l.volatile],wc.prototype,"selectedHours",null),(0,C.Cg)([(0,l.attr)({attribute:"min-minute-interval"})],wc.prototype,"minMinuteInterval",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"disable-tooltips"})],wc.prototype,"disableTooltips",void 0),(0,C.Cg)([l.volatile],wc.prototype,"isMinutesRecurrenceEnabled",null),(0,C.Cg)([l.volatile],wc.prototype,"isSpecificHours",null),(0,C.Cg)([l.volatile],wc.prototype,"isDailyFrequencyDisabled",null),(0,C.Cg)([l.attr],wc.prototype,"timezone",void 0);const Cc=void 0,xc={},$c=wc.compose(Object.assign({baseName:"scheduler-cron-builder",styles:Jd,template:yc,shadowOptions:Cc},xc)),Sc=l.css`
4135
4135
  /* Host */
4136
4136
  :host {
4137
4137
  display: flex;
@@ -4158,7 +4158,7 @@
4158
4158
  .timezone-combobox::part(listbox) {
4159
4159
  max-height: 20vh;
4160
4160
  }
4161
- `,Oc=e=>l.html`
4161
+ `,Ec=e=>l.html`
4162
4162
  <template>
4163
4163
  <div class="container">
4164
4164
  <label class="label">Time Zone</label>
@@ -4166,7 +4166,7 @@
4166
4166
  data-test-id="cron-scheduler-timezone"
4167
4167
  autocomplete="both"
4168
4168
  class="timezone-combobox"
4169
- value="${(0,P.O)(e=>e.timezone)}"
4169
+ value="${(0,z.O)(e=>e.timezone)}"
4170
4170
  >
4171
4171
  ${(0,l.repeat)(e=>e.timeZones,l.html`
4172
4172
  <${e}-option value="${e=>e}">${e=>e}</${e}-option>
@@ -4174,9 +4174,9 @@
4174
4174
  </${e}-combobox>
4175
4175
  </div>
4176
4176
  </template>
4177
- `,Tc=l.html`
4178
- ${e=>Oc(T(e))}
4179
- `;class kc extends s.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){Ld({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Da.v.error(e)}})}}(0,C.Cg)([l.observable],kc.prototype,"timezone",void 0),(0,C.Cg)([oi.dm],kc.prototype,"connect",void 0),(0,C.Cg)([l.observable],kc.prototype,"timeZones",void 0);const Ic=void 0,Dc={},Rc=kc.compose(Object.assign({baseName:"scheduler-timezone",styles:Ec,template:Tc,shadowOptions:Ic},Dc)),Ac=l.css`
4177
+ `,Oc=l.html`
4178
+ ${e=>Ec(T(e))}
4179
+ `;class Tc extends s.FoundationElement{constructor(){super(...arguments),this.timezone="",this.value=this.timezone}timezoneChanged(){this.value=this.timezone,this.$emit("change")}connectedCallback(){super.connectedCallback(),this.getTimeZones()}getTimeZones(){return(0,C.sH)(this,void 0,void 0,function*(){const e=["Europe/London","America/New_York"];try{const t=yield this.connect.request("VALID_TIME_ZONE",{REQUEST:{}});if(!t.REPLY||!Array.isArray(t.REPLY))throw new Error("Invalid data returned for Timezones");this.timeZones=t.REPLY.map(e=>e.ZONE_ID).sort((t,i)=>e.includes(t)&&!e.includes(i)?-1:!e.includes(t)&&e.includes(i)?1:t.localeCompare(i))}catch(e){Nd({title:"Cron Scheduler",body:"Unable to fetch timezones data.",toast:{type:"critical"}},"rapid"),Ia.v.error(e)}})}}(0,C.Cg)([l.observable],Tc.prototype,"timezone",void 0),(0,C.Cg)([ii.dm],Tc.prototype,"connect",void 0),(0,C.Cg)([l.observable],Tc.prototype,"timeZones",void 0);const kc=void 0,Ic={},Dc=Tc.compose(Object.assign({baseName:"scheduler-timezone",styles:Sc,template:Oc,shadowOptions:kc},Ic)),Rc=l.css`
4180
4180
  .search-bar-combobox {
4181
4181
  width: 100%;
4182
4182
  min-width: auto;
@@ -4269,7 +4269,7 @@
4269
4269
  .close-icon {
4270
4270
  color: var(--accent-fill-rest);
4271
4271
  }
4272
- `,Nc=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Lc=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Fc=e=>l.html`
4272
+ `,Ac=(e="start")=>'\n<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="10px" height="10px">\n <g transform="matrix(1 0 0 1 -256 -14 )">\n <path class="cross-icon" fill="white" d="M 9.9265625 8.865937499999998 L 6.060625000000001 5 L 9.265625 1.795 L 9.9265625 1.1340624999999993 C 10.0240625 1.0365624999999996 10.0240625 0.8781249999999996 9.9265625 0.7806249999999992 L 9.219375 0.07343749999999982 C 9.121875 -0.024062500000000542 8.9634375 -0.024062500000000542 8.8659375 0.07343749999999982 L 5 3.9393750000000005 L 1.1340625 0.073125 C 1.0365625 -0.02437500000000037 0.8781250000000002 -0.02437500000000037 0.7806249999999999 0.073125 L 0.073125 0.7803125 C -0.024375000000000008 0.8778124999999998 -0.024375000000000008 1.0362499999999997 0.073125 1.13375 L 3.9393750000000005 5 L 0.073125 8.865937499999998 C -0.024375000000000008 8.9634375 -0.024375000000000008 9.121875 0.073125 9.219375000000001 L 0.7803125 9.9265625 C 0.8778125000000001 10.0240625 1.03625 10.0240625 1.13375 9.9265625 L 5 6.060625 L 8.205 9.265625 L 8.8659375 9.9265625 C 8.9634375 10.0240625 9.121875 10.0240625 9.219375 9.9265625 L 9.9265625 9.219375000000001 C 10.0240625 9.121875 10.0240625 8.9634375 9.9265625 8.865937499999998 Z " fill-rule="nonzero" fill="#c9c9c9" stroke="none" fill-opacity="0.8" transform="matrix(1 0 0 1 256 14 )"/>\n </g>\n</svg>\n',Nc=()=>'\n<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="30px" height="30px" class="bi bi-plus" viewBox="0 0 16 16">\n <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>\n</svg>',Lc=e=>l.html`
4273
4273
 
4274
4274
  <label part="label" for="control" data-test-id="label" class=${e=>{var t;return(0,x.x)("label",["label-hidden",!(null===(t=e.defaultSlottedNodes)||void 0===t?void 0:t.length)])}}
4275
4275
  >
@@ -4348,10 +4348,10 @@
4348
4348
  <${e}-tooltip class="tooltip" anchor="search-clear-button">
4349
4349
  Clear Search Terms
4350
4350
  </${e}-tooltip>
4351
- `,Mc=l.html`
4352
- ${e=>Fc(T(e))}
4353
- `,_c=10,Hc=3,zc=1,Pc=(e,t)=>(new j.b).withExpression((new G.K).withField(e).withValue(t).withSerialiser(B.n.containsIgnoreCase).build()).build();class Uc extends s.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=Hc,this.position=Lt.BELOW,this.placeholder="Start typing to search",this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g," "),this.addOrReplaceSelectedText=(e,t,i)=>(null==t?void 0:t.length)>0?e.replace(t,i):e.concat(i)}clear(){this.selectedOptions=[],this.combobox.currentValue="",this.$emit("selectionChange",[])}clearSearch(){this.clear()}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){const e=[];this.combobox.selectedOptions.forEach(t=>{var i,o,n;const a=t.value,s=this.searchTerm.trim();e.push({field:a,term:s,label:(null===(i=this.options.find(e=>e.field===a))||void 0===i?void 0:i.label(s))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===a))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===a))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},_c)})}pasteHandler(e){var t;this.loading=!0;const i=e.clipboardData.getData("text/plain"),o=this.normalizeDelimiter(i),n=null===(t=window.getSelection())||void 0===t?void 0:t.toString(),a=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==a?void 0:a.length)>=this.minlength&&(this.combobox.value=a,this.searchTerm=a,this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(i=>i.field===t.field&&i.term.trim()===e.trim()))}}(0,C.Cg)([l.observable],Uc.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Uc.prototype,"options",void 0),(0,C.Cg)([l.observable],Uc.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Uc.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Uc.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Uc.prototype,"position",void 0),(0,C.Cg)([l.attr],Uc.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Uc.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Uc.prototype,"loading",void 0),(0,C.Cg)([l.observable],Uc.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Uc.prototype,"filteredOptions",void 0);const Bc=void 0,Gc={},jc=Uc.compose(Object.assign({baseName:"search-bar",template:Mc,styles:Ac,shadowOptions:Bc},Gc)),Vc=(e,t)=>l.css`
4354
- ${ui(e,t)}
4351
+ `,Fc=l.html`
4352
+ ${e=>Lc(T(e))}
4353
+ `,Mc=10,_c=3,Hc=1,zc=(e,t)=>(new G.b).withExpression((new B.K).withField(e).withValue(t).withSerialiser(U.n.containsIgnoreCase).build()).build();class Pc extends s.FoundationElement{constructor(){super(...arguments),this.searchTerm="",this.appearance="neutral",this.minlength=_c,this.position=Nt.BELOW,this.placeholder="Start typing to search",this.selectedOptions=[],this.normalizeDelimiter=e=>e.trim().replace(/\t|\r\n|\n|\r|,/g," "),this.addOrReplaceSelectedText=(e,t,i)=>(null==t?void 0:t.length)>0?e.replace(t,i):e.concat(i)}clear(){this.selectedOptions=[],this.combobox.currentValue="",this.$emit("selectionChange",[])}clearSearch(){this.clear()}inputdeleted(){this.selectedOptions.length>0&&this.unselectOption(this.selectedOptions[this.selectedOptions.length-1])}changeHandler(){const e=[];this.combobox.selectedOptions.forEach(t=>{var i,o,n;const a=t.value,s=this.searchTerm.trim();e.push({field:a,term:s,label:(null===(i=this.options.find(e=>e.field===a))||void 0===i?void 0:i.label(s))||t.text,createCriteria:null===(o=this.options.find(e=>e.field===a))||void 0===o?void 0:o.createCriteria,resourceType:null===(n=this.options.find(e=>e.field===a))||void 0===n?void 0:n.resourceType})}),this.selectedOptions=[...this.selectedOptions,...e],this.selectedOptions=this.selectedOptions.filter((e,t,i)=>t===i.findIndex(t=>e.field===t.field&&e.term===t.term)),this.combobox.value="",this.combobox.open=!1,this.$emit("selectionChange",this.selectedOptions),l.DOM.queueUpdate(()=>{setTimeout(()=>{this.selectedOptionsDiv.scrollTo(this.selectedOptionsDiv.scrollWidth,0)},Mc)})}pasteHandler(e){var t;this.loading=!0;const i=e.clipboardData.getData("text/plain"),o=this.normalizeDelimiter(i),n=null===(t=window.getSelection())||void 0===t?void 0:t.toString(),a=this.addOrReplaceSelectedText(this.combobox.value,n,o);(null==a?void 0:a.length)>=this.minlength&&(this.combobox.value=a,this.searchTerm=a,this.combobox.open=!0),this.loading=!1}hasSelectedOption(e,t){return this.selectedOptions.some(i=>i.term===e&&i.field===t)}unselectOption(e){this.selectedOptions=this.selectedOptions.filter(t=>t!==e),this.$emit("selectionChange",this.selectedOptions)}inputHandler(){return(0,C.sH)(this,void 0,void 0,function*(){this.loading=!0,this.searchTerm=this.combobox.value,this.combobox.value.length>=this.minlength&&this.filterSelectedOptions(this.combobox.value),this.loading=!1})}filterSelectedOptions(e){this.filteredOptions=this.options.filter(t=>!this.selectedOptions.find(i=>i.field===t.field&&i.term.trim()===e.trim()))}}(0,C.Cg)([l.observable],Pc.prototype,"defaultSlottedNodes",void 0),(0,C.Cg)([l.observable],Pc.prototype,"options",void 0),(0,C.Cg)([l.observable],Pc.prototype,"searchTerm",void 0),(0,C.Cg)([l.attr],Pc.prototype,"appearance",void 0),(0,C.Cg)([l.attr],Pc.prototype,"minlength",void 0),(0,C.Cg)([l.attr],Pc.prototype,"position",void 0),(0,C.Cg)([l.attr],Pc.prototype,"placeholder",void 0),(0,C.Cg)([l.attr],Pc.prototype,"disabled",void 0),(0,C.Cg)([l.observable],Pc.prototype,"loading",void 0),(0,C.Cg)([l.observable],Pc.prototype,"selectedOptions",void 0),(0,C.Cg)([l.observable],Pc.prototype,"filteredOptions",void 0);const Uc=void 0,Bc={},Gc=Pc.compose(Object.assign({baseName:"search-bar",template:Fc,styles:Rc,shadowOptions:Uc},Bc)),jc=(e,t)=>l.css`
4354
+ ${ci(e,t)}
4355
4355
  .control {
4356
4356
  width: auto;
4357
4357
  padding-left: calc(${r.designUnit} * 1px);
@@ -4372,7 +4372,7 @@
4372
4372
  min-width: 150px;
4373
4373
  max-width: 169px;
4374
4374
  }
4375
- `,Yc=(e,t)=>l.html`
4375
+ `,Vc=(e,t)=>l.html`
4376
4376
  <template
4377
4377
  aria-disabled="${e=>e.ariaDisabled}"
4378
4378
  autocomplete="${e=>e.autocomplete}"
@@ -4424,7 +4424,7 @@
4424
4424
  ></slot>
4425
4425
  </div>
4426
4426
  </template>
4427
- `;class Wc extends r.Combobox{constructor(){super(...arguments),this.minlength=zc,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){switch(e.key){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],Wc.prototype,"minlength",void 0);const qc={delegatesFocus:!0,mode:"open"},Kc={},Xc=Wc.compose(Object.assign({baseName:"search-bar-combobox",template:Yc,styles:Vc,shadowOptions:qc},Kc)),Qc=l.css`
4427
+ `;class Yc extends r.Combobox{constructor(){super(...arguments),this.minlength=Hc,this.previousLength=-1,this.changeListener=e=>{this.previousLength=0}}connectedCallback(){super.connectedCallback(),this.addEventListener("change",this.changeListener)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("change",this.changeListener)}clickHandler(e){if(!this.disabled){if(this.open){const t=e.target.closest("option,[role=option]");if(!t||t.disabled)return;this.selectedOptions=[t],this.control.value=t.text,this.value=this.control.value,this.$emit("change")}this.control.focus()}}keyupHandler(e){switch(e.key){case"Backspace":case"Delete":this.previousLength<0?this.$emit("inputdeleted"):this.previousLength=this.previousLength-1;break;case"Enter":if(this.open&&-1!==this.selectedIndex){const e=this.slottedOptions[0];this.selectedOptions=[e],this.control.value=e.text,this.value=this.control.value,this.$emit("change")}}super.keyupHandler(e)}keydownHandler(e){switch(e.key){case"ArrowUp":case"ArrowDown":return this.control.value.length<this.minlength?void 0:super.keydownHandler(e);case"Enter":return-1!==this.selectedIndex&&super.keydownHandler(e);case"Tab":if(!this.open)return!0;e.shiftKey?this.selectPreviousOption():this.selectNextOption();break;default:return super.keydownHandler(e)}}inputHandler(e){this.control.value.length>=this.minlength?this.open=!0:(e.stopImmediatePropagation(),this.open=!1),this.value=this.control.value,this.previousLength=this.control.value.length}openChanged(){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),void this.focusAndScrollOptionIntoView();this.ariaControls="",this.ariaExpanded="false"}}(0,C.Cg)([l.attr],Yc.prototype,"minlength",void 0);const Wc={delegatesFocus:!0,mode:"open"},qc={},Kc=Yc.compose(Object.assign({baseName:"search-bar-combobox",template:Vc,styles:jc,shadowOptions:Wc},qc)),Xc=l.css`
4428
4428
  :host {
4429
4429
  display: block;
4430
4430
  width: 100%;
@@ -4617,7 +4617,7 @@
4617
4617
  .section-link.state-none {
4618
4618
  color: var(--neutral-foreground-rest);
4619
4619
  }
4620
- `,Jc=l.html`
4620
+ `,Qc=l.html`
4621
4621
  ${e=>{return t=T(e),l.html`
4622
4622
  <template>
4623
4623
  <div
@@ -4662,7 +4662,7 @@
4662
4662
  </div>
4663
4663
  </template>
4664
4664
  `;var t}}
4665
- `,Zc=(0,Xe.createLogger)("SectionNavigator"),eu="section-navigator",tu={setState:`${eu}-set-state`,setStates:`${eu}-set-states`,clearState:`${eu}-clear-state`,clearAllStates:`${eu}-clear-all-states`},iu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},ou={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class nu extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=iu,this.stateIcons=ou,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return Zc.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){Zc.error("Error updating spacer:",e)}}else Zc.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Zc.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Zc.error("Error scrolling to section:",e)}else Zc.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},nu.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,nu.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Zc.error("Error setting up scroll detection:",e)}else Zc.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const a=n.offsetTop+n.clientHeight/2,s=Math.abs(a-e);s<i&&(i=s,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){Zc.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Zc.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Zc.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Zc.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const a=Object.assign(Object.assign({},i),{sectionName:n}),s=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}catch(e){Zc.error("Error handling generic state event:",e)}},this.addEventListener(tu.setState,this.handleSetStateRef),this.addEventListener(tu.setStates,this.handleSetStatesRef),this.addEventListener(tu.clearState,this.handleClearStateRef),this.addEventListener(tu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(tu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(tu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(tu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(tu.clearAllStates,this.handleGenericStateEventRef,!0)):Zc.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void Zc.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Zc.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void Zc.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Zc.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void Zc.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Zc.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void Zc.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Zc.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(Zc.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Zc.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||ou[e]:(Zc.warn("State name is required"),ou.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(tu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(tu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(tu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(tu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(tu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(tu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(tu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(tu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}nu.SCROLL_END_TIMEOUT=150,nu.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],nu.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],nu.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],nu.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],nu.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],nu.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],nu.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],nu.prototype,"activeSection",void 0);const au={mode:"open"},su={},ru=nu.compose(Object.assign({baseName:"foundation-section-navigator",template:Jc,styles:Qc,shadowOptions:au},su)),lu=(e,t)=>l.css`
4665
+ `,Jc=(0,Ke.createLogger)("SectionNavigator"),Zc="section-navigator",eu={setState:`${Zc}-set-state`,setStates:`${Zc}-set-states`,clearState:`${Zc}-clear-state`,clearAllStates:`${Zc}-clear-all-states`},tu={active:"Active",inactive:"Inactive",pending:"Pending",disabled:"Disabled",error:"Error",completed:"Completed"},iu={active:{name:"circle-dot",variant:"solid"},inactive:{name:"times-circle",variant:"regular"},pending:{name:"clock",variant:"solid"},disabled:{name:"ban",variant:"solid"},error:{name:"times",variant:"solid"},completed:{name:"check",variant:"solid"}};class ou extends s.FoundationElement{constructor(){super(...arguments),this.sections=[],this.scrollBehavior="top",this.stateTooltips=tu,this.stateIcons=iu,this.disableAutoScrollDetection=!1,this.userClickedSection=!1,this.isUserScrolling=!1,this.sectionItems=[],this.activeSection=""}sectionsChanged(){this.setSectionItems(),this.setActiveSection(),this.updateScrollDetection()}disableAutoScrollDetectionChanged(){this.updateScrollDetection()}scrollBehaviorChanged(){this.updateSpacer()}connectedCallback(){super.connectedCallback(),this.setSectionItems(),this.setActiveSection(),this.updateSpacer(),this.setupStateEventListeners(),this.updateScrollDetection()}setSectionItems(){if(!Array.isArray(this.sections))return Jc.warn("Sections must be an array"),void(this.sectionItems=[]);this.sectionItems=this.sections}setActiveSection(){this.sectionItems.length>0&&!this.activeSection&&(this.activeSection=this.sectionItems[0].name)}handleSectionClick(e){this.activeSection=e,this.userClickedSection=!0,this.scrollToSection(e)}updateSpacer(){var e;if(this.sectionContent){if(null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0,"top"===this.scrollBehavior)try{const e=this.sectionContent.clientHeight,t=this.sectionContent.querySelector(".content-section:last-child");if(t){const i=t.offsetHeight,o=20,n=Math.max(0,e-i-o);this.spacerElement=document.createElement("div"),this.spacerElement.className="scroll-spacer",this.spacerElement.style.height=`${n}px`,this.spacerElement.style.pointerEvents="none",this.sectionContent.appendChild(this.spacerElement)}}catch(e){Jc.error("Error updating spacer:",e)}}else Jc.warn("Section content element not found")}scrollToSection(e){if(this.sectionContent)try{const t=this.sectionContent.querySelector(`[data-section="${e}"]`);if(!t)return void Jc.warn(`Section "${e}" not found`);const i=t.offsetTop-this.sectionContent.offsetTop;this.sectionContent.scrollTo({top:i,behavior:"smooth"}),this.setupScrollEndDetection()}catch(e){Jc.error("Error scrolling to section:",e)}else Jc.warn("Section content not available")}updateScrollDetection(){this.cleanupScrollDetection(),!this.disableAutoScrollDetection&&this.sectionContent&&this.setupScrollDetection()}setupScrollDetection(){if(this.sectionContent)try{this.scrollCheckHandler=()=>{this.isUserScrolling&&!this.userClickedSection&&(this.scrollDebounceTimeout&&clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=window.setTimeout(()=>{this.updateActiveSectionBasedOnScrollPosition()},ou.SCROLL_DEBOUNCE_TIMEOUT))},this.sectionContent.addEventListener("scroll",this.scrollCheckHandler,{passive:!0});const e=()=>{this.isUserScrolling=!0},t=()=>{this.isUserScrolling=!1,this.userClickedSection=!1};let i;this.sectionContent.addEventListener("wheel",e,{passive:!0}),this.sectionContent.addEventListener("touchstart",e,{passive:!0}),this.sectionContent.addEventListener("mousedown",e,{passive:!0}),this.sectionContent.addEventListener("scrollend",t,{passive:!0}),this.sectionContent.addEventListener("scroll",()=>{clearTimeout(i),i=window.setTimeout(t,ou.SCROLL_END_TIMEOUT)},{passive:!0})}catch(e){Jc.error("Error setting up scroll detection:",e)}else Jc.warn("Section content not available for scroll detection")}updateActiveSectionBasedOnScrollPosition(){if(!this.sectionContent)return;const e=this.sectionContent.scrollTop+this.sectionContent.clientHeight/2;let t=null,i=1/0;this.sectionItems.forEach(o=>{const n=this.sectionContent.querySelector(`[data-section="${o.name}"]`);if(n){const a=n.offsetTop+n.clientHeight/2,s=Math.abs(a-e);s<i&&(i=s,t=o.name)}}),t&&t!==this.activeSection&&(this.activeSection=t)}setupScrollEndDetection(){this.sectionContent&&(this.cleanupScrollEndDetection(),this.scrollEndHandler=()=>{this.userClickedSection=!1,this.cleanupScrollEndDetection()},this.sectionContent.addEventListener("scroll",this.scrollEndHandler,{passive:!0}))}cleanupScrollEndDetection(){this.scrollEndHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollEndHandler),this.scrollEndHandler=void 0)}cleanupScrollDetection(){this.scrollCheckHandler&&this.sectionContent&&(this.sectionContent.removeEventListener("scroll",this.scrollCheckHandler),this.scrollCheckHandler=void 0),this.scrollDebounceTimeout&&(clearTimeout(this.scrollDebounceTimeout),this.scrollDebounceTimeout=void 0),this.cleanupScrollEndDetection()}setupStateEventListeners(){this.sectionContent?(this.handleSetStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.addState(t,i)}catch(e){Jc.error("Error handling set-state event:",e)}},this.handleSetStatesRef=e=>{try{const{sectionName:t,stateNames:i}=e.detail;this.addStates(t,i)}catch(e){Jc.error("Error handling set-states event:",e)}},this.handleClearStateRef=e=>{try{const{sectionName:t,stateName:i}=e.detail;this.clearState(t,i)}catch(e){Jc.error("Error handling clear-state event:",e)}},this.handleClearAllStatesRef=e=>{try{const{sectionName:t}=e.detail;t?this.clearAllStates(t):this.clearAllStatesInAllSections()}catch(e){Jc.error("Error handling clear-all-states event:",e)}},this.handleGenericStateEventRef=e=>{try{const t=e.type,i=e.detail;if(null==i?void 0:i.sectionName)return;const o=e.target.closest("[data-section]");let n=null==o?void 0:o.getAttribute("data-section");if(!n){const t=e.target.closest("[slot]");n=(null==t?void 0:t.getAttribute("slot"))||this.activeSection}n||(n=this.activeSection),e.stopPropagation(),e.preventDefault();const a=Object.assign(Object.assign({},i),{sectionName:n}),s=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}catch(e){Jc.error("Error handling generic state event:",e)}},this.addEventListener(eu.setState,this.handleSetStateRef),this.addEventListener(eu.setStates,this.handleSetStatesRef),this.addEventListener(eu.clearState,this.handleClearStateRef),this.addEventListener(eu.clearAllStates,this.handleClearAllStatesRef),this.sectionContent.addEventListener(eu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(eu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(eu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.addEventListener(eu.clearAllStates,this.handleGenericStateEventRef,!0)):Jc.warn("Section content not available for event listeners")}updateSectionStates(e,t){const i=this.sectionItems.findIndex(t=>t.name===e);if(-1!==i){const e=Object.assign(Object.assign({},this.sectionItems[i]),{states:t});this.sectionItems=[...this.sectionItems.slice(0,i),e,...this.sectionItems.slice(i+1)]}}addState(e,t){if(!e||!t)return void Jc.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Jc.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[];if(!o.includes(t)){const i=[...o,t];this.updateSectionStates(e,i)}}addStates(e,t){if(!e||!Array.isArray(t))return void Jc.warn("Section name and state names array are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Jc.warn(`Section "${e}" not found`);const o=[...this.sectionItems[i].states||[]];t.forEach(e=>{o.includes(e)||o.push(e)}),this.updateSectionStates(e,o)}clearState(e,t){if(!e||!t)return void Jc.warn("Section name and state name are required");const i=this.sectionItems.findIndex(t=>t.name===e);if(-1===i)return void Jc.warn(`Section "${e}" not found`);const o=this.sectionItems[i].states||[],n=o.indexOf(t);if(n>-1){const t=o.filter((e,t)=>t!==n);this.updateSectionStates(e,t)}}clearAllStates(e){if(!e)return void Jc.warn("Section name is required");-1!==this.sectionItems.findIndex(t=>t.name===e)?this.updateSectionStates(e,[]):Jc.warn(`Section "${e}" not found`)}clearAllStatesInAllSections(){this.sectionItems=this.sectionItems.map(e=>Object.assign(Object.assign({},e),{states:[]}))}getStateTooltip(e){return e?this.stateTooltips[e]||"":(Jc.warn("State name is required"),"")}getSectionStateClass(e){if(!e)return Jc.warn("Section is required"),"state-none";const t=e.states||[];if(0===t.length)return"state-none";if(t.length>1)return"state-multiple";return`state-${t[0]}`}getStateIcon(e){return e?this.stateIcons[e]||iu[e]:(Jc.warn("State name is required"),iu.active)}disconnectedCallback(){var e;super.disconnectedCallback(),this.handleSetStateRef&&this.removeEventListener(eu.setState,this.handleSetStateRef),this.handleSetStatesRef&&this.removeEventListener(eu.setStates,this.handleSetStatesRef),this.handleClearStateRef&&this.removeEventListener(eu.clearState,this.handleClearStateRef),this.handleClearAllStatesRef&&this.removeEventListener(eu.clearAllStates,this.handleClearAllStatesRef),this.handleGenericStateEventRef&&this.sectionContent&&(this.sectionContent.removeEventListener(eu.setState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(eu.setStates,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(eu.clearState,this.handleGenericStateEventRef,!0),this.sectionContent.removeEventListener(eu.clearAllStates,this.handleGenericStateEventRef,!0)),this.cleanupScrollDetection(),null===(e=this.spacerElement)||void 0===e||e.remove(),this.spacerElement=void 0}}ou.SCROLL_END_TIMEOUT=150,ou.SCROLL_DEBOUNCE_TIMEOUT=100,(0,C.Cg)([l.observable],ou.prototype,"sections",void 0),(0,C.Cg)([(0,l.attr)({attribute:"scroll-behavior"})],ou.prototype,"scrollBehavior",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-tooltips"})],ou.prototype,"stateTooltips",void 0),(0,C.Cg)([(0,l.attr)({attribute:"state-icons"})],ou.prototype,"stateIcons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"disable-auto-scroll-detection",mode:"boolean"})],ou.prototype,"disableAutoScrollDetection",void 0),(0,C.Cg)([l.observable],ou.prototype,"sectionItems",void 0),(0,C.Cg)([l.observable],ou.prototype,"activeSection",void 0);const nu={mode:"open"},au={},su=ou.compose(Object.assign({baseName:"foundation-section-navigator",template:Qc,styles:Xc,shadowOptions:nu},au)),ru=(e,t)=>l.css`
4666
4666
  ${(0,r.radioGroupStyles)(e,t)}
4667
4667
  ::slotted(foundation-segmented-item:first-of-type) {
4668
4668
  border-radius: calc(var(--control-corner-radius) * 1px) 0 0
@@ -4675,7 +4675,7 @@
4675
4675
  calc(var(--control-corner-radius) * 1px) 0;
4676
4676
  border-left-width: 0;
4677
4677
  }
4678
- `,du=(e,t)=>(0,s.radioGroupTemplate)(e,t);class cu extends s.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const uu=void 0,hu={},pu=cu.compose(Object.assign({baseName:"segmented-control",template:du,styles:lu,shadowOptions:uu},hu)),mu=(e,t)=>l.css`
4678
+ `,lu=(e,t)=>(0,s.radioGroupTemplate)(e,t);class du extends s.RadioGroup{valueChanged(){void 0===this.value&&this.slottedRadioButtons&&this.slottedRadioButtons.forEach(e=>{e.checked=!1}),super.valueChanged()}}const cu=void 0,uu={},hu=du.compose(Object.assign({baseName:"segmented-control",template:lu,styles:ru,shadowOptions:cu},uu)),pu=(e,t)=>l.css`
4679
4679
  ${(0,r.radioStyles)(e,t)}
4680
4680
  :host {
4681
4681
  padding: calc(var(--design-unit) * 2px) calc(var(--design-unit) * 4px);
@@ -4686,7 +4686,7 @@
4686
4686
  :host([aria-checked='true']) {
4687
4687
  background: var(--accent-foreground-rest);
4688
4688
  }
4689
- `,gu=(e,t)=>l.html`
4689
+ `,mu=(e,t)=>l.html`
4690
4690
  <template
4691
4691
  role="radio"
4692
4692
  aria-checked="${e=>e.checked}"
@@ -4700,7 +4700,7 @@
4700
4700
  <slot></slot>
4701
4701
  </span>
4702
4702
  </template>
4703
- `;class vu extends r.Radio{}const fu=void 0,bu={},yu=vu.compose(Object.assign({baseName:"segmented-item",template:gu,styles:mu,shadowOptions:fu},bu)),wu=(e,t)=>l.css`
4703
+ `;class gu extends r.Radio{}const vu=void 0,fu={},bu=gu.compose(Object.assign({baseName:"segmented-item",template:mu,styles:pu,shadowOptions:vu},fu)),yu=(e,t)=>l.css`
4704
4704
  ${(0,r.selectStyles)(e,t)}
4705
4705
 
4706
4706
  :host(:not([size]):not([multiple]):not([open]):focus-visible), :host([multiple]:focus-visible), :host([size]:focus-visible),
@@ -4708,19 +4708,19 @@
4708
4708
  box-shadow: none;
4709
4709
  outline: none;
4710
4710
  }
4711
- `,Cu=(e,t)=>(0,s.selectTemplate)(e,t);class xu extends r.Select{slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const $u=void 0,Su={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},Eu=xu.compose(Object.assign({baseName:"select",template:Cu,styles:wu,shadowOptions:$u},Su)),Ou=(e,t)=>l.css`
4711
+ `,wu=(e,t)=>(0,s.selectTemplate)(e,t);class Cu extends r.Select{slottedOptionsChanged(e,t){const i=this.value;super.slottedOptionsChanged(e,t),this.selectedIndex=-1;const o=[];this.slottedOptions&&this.slottedOptions.forEach(e=>{const t=e.nodeName.toLowerCase();if(t.endsWith("-optgroup")){const t=Array.from(e.children).filter(e=>{const t=e.nodeName.toLowerCase();return"option"===e.getAttribute("role")||t.endsWith("-option")});o.push(...t)}else("option"===e.getAttribute("role")||t.endsWith("-option"))&&o.push(e)}),this.options=o,i&&(this.value=i),-1===this.selectedIndex&&this.options.length>0&&(this.selectedIndex=0)}focusAndScrollOptionIntoView(e=this.firstSelectedOption){this.contains(function(e){const t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement:document.activeElement}(this))&&null!==e&&(e.focus(),requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest"})}))}openChanged(e,t){if(this.collapsible){if(this.open)return this.ariaControls=this.listboxId,this.ariaExpanded="true",this.setPositioning(),this.focusAndScrollOptionIntoView(),this.indexWhenOpened=this.selectedIndex,void l.DOM.queueUpdate(()=>this.focus());this.ariaControls="",this.ariaExpanded="false"}}keydownHandler(e){switch(e.key){case"ArrowDown":case"ArrowUp":if(this.open){const e=this.options[this.selectedIndex];null==e||e.scrollIntoView({block:"center",behavior:"auto"})}else this.open=!0}return super.keydownHandler(e)}}const xu=void 0,$u={indicator:'\n <svg\n class="select-indicator"\n part="select-indicator"\n viewBox="0 0 12 7"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path\n d="M11.85.65c.2.2.2.5 0 .7L6.4 6.84a.55.55 0 01-.78 0L.14 1.35a.5.5 0 11.71-.7L6 5.8 11.15.65c.2-.2.5-.2.7 0z"\n />\n </svg>\n '},Su=Cu.compose(Object.assign({baseName:"select",template:wu,styles:yu,shadowOptions:xu},$u)),Eu=(e,t)=>l.css`
4712
4712
  ${(0,r.skeletonStyles)(e,t)}
4713
- `,Tu=(e,t)=>(0,s.skeletonTemplate)(e,t);class ku extends r.Skeleton{}const Iu=void 0,Du={},Ru=ku.compose(Object.assign({baseName:"skeleton",template:Tu,styles:Ou,shadowOptions:Iu},Du)),Au=(e,t)=>l.css`
4713
+ `,Ou=(e,t)=>(0,s.skeletonTemplate)(e,t);class Tu extends r.Skeleton{}const ku=void 0,Iu={},Du=Tu.compose(Object.assign({baseName:"skeleton",template:Ou,styles:Eu,shadowOptions:ku},Iu)),Ru=(e,t)=>l.css`
4714
4714
  ${(0,r.sliderStyles)(e,t)}
4715
4715
  .track-progress {
4716
4716
  background-color: var(--accent-fill-rest);
4717
4717
  border-radius: calc(var(--control-corner-radius) * 1px);
4718
4718
  }
4719
- `;var Nu=i(17733),Lu=i(54120);const Fu=(e,t)=>l.html`
4719
+ `;var Au=i(17733),Nu=i(54120);const Lu=(e,t)=>l.html`
4720
4720
  <template
4721
4721
  role="slider"
4722
4722
  class="${e=>e.readOnly?"readonly":""}
4723
- ${e=>e.orientation||Nu.t.horizontal}"
4723
+ ${e=>e.orientation||Au.t.horizontal}"
4724
4724
  tabindex="${e=>e.disabled?null:0}"
4725
4725
  aria-valuetext="${e=>e.valueTextFormatter(e.value)}"
4726
4726
  aria-valuenow="${e=>e.value}"
@@ -4735,7 +4735,7 @@
4735
4735
  <div ${(0,l.ref)("track")} part="track-container" class="track">
4736
4736
  <div
4737
4737
  class="track-progress"
4738
- style="${e=>{const t=1-(0,Lu.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
4738
+ style="${e=>{const t=1-(0,Nu.AB)(0,1,(parseInt(e.value)-e.min)/(e.max-e.min)),i=Math.round(100*(1-t));return"horizontal"===e.orientation?e.isDragging?`height: calc(var(--track-width) * 1px); width: ${i}%;`:`height: calc(var(--track-width) * 1px); width: ${i}%; transition: all 0.2s ease;`:e.isDragging?`width: calc(var(--track-width) * 1px); height: ${i}%;`:`width: calc(var(--track-width) * 1px); height: ${i}%; transition: all 0.2s ease;`}}"
4739
4739
  ></div>
4740
4740
  </div>
4741
4741
  <slot></slot>
@@ -4749,9 +4749,9 @@
4749
4749
  </div>
4750
4750
  </div>
4751
4751
  </template>
4752
- `;class Mu extends r.Slider{}const _u=void 0,Hu={thumb:'\n <div class="thumb-cursor"></div>\n '},zu=Mu.compose(Object.assign({baseName:"slider",template:Fu,styles:Au,shadowOptions:_u},Hu)),Pu=(e,t)=>l.css`
4752
+ `;class Fu extends r.Slider{}const Mu=void 0,_u={thumb:'\n <div class="thumb-cursor"></div>\n '},Hu=Fu.compose(Object.assign({baseName:"slider",template:Lu,styles:Ru,shadowOptions:Mu},_u)),zu=(e,t)=>l.css`
4753
4753
  ${(0,r.sliderLabelStyles)(e,t)}
4754
- `,Uu=(e,t)=>(0,s.sliderLabelTemplate)(e,t);class Bu extends r.SliderLabel{}const Gu=void 0,ju={},Vu=Bu.compose(Object.assign({baseName:"slider-label",template:Uu,styles:Pu,shadowOptions:Gu},ju)),Yu="default",Wu={DEFAULT:Yu,ERROR:"error",SUCCESS:"success"},qu=1e4,Ku={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Xu=l.css`
4754
+ `,Pu=(e,t)=>(0,s.sliderLabelTemplate)(e,t);class Uu extends r.SliderLabel{}const Bu=void 0,Gu={},ju=Uu.compose(Object.assign({baseName:"slider-label",template:Pu,styles:zu,shadowOptions:Bu},Gu)),Vu="default",Yu={DEFAULT:Vu,ERROR:"error",SUCCESS:"success"},Wu=1e4,qu={DISMISS:"dismiss",AUTO_DISMISS:"autoDismiss"},Ku=l.css`
4755
4755
  @keyframes append-from-left-animate {
4756
4756
  from {
4757
4757
  transform: translateX(100%);
@@ -4872,7 +4872,7 @@
4872
4872
  flex: 1;
4873
4873
  overflow: hidden;
4874
4874
  }
4875
- `,Qu=e=>l.html`
4875
+ `,Xu=e=>l.html`
4876
4876
  <div
4877
4877
  role="alert"
4878
4878
  aria-live="polite"
@@ -4901,10 +4901,10 @@
4901
4901
  </div>
4902
4902
  `)}
4903
4903
  </div>
4904
- `,Ju=l.html`
4905
- ${e=>Qu(T(e))}
4906
- `,Zu={mode:"open",delegatesFocus:!0};class eh extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=qu,this.autoClose=!0,this.type=Yu,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(Ku.DISMISS,this.dismissEventListener)}errorChanged(e,t){var i,o,n;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Yu}notificationChanged(e,t){var i,o,n,a,s,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Yu,this.autoClose=null===(r=null===(s=null===(a=null==t?void 0:t.config)||void 0===a?void 0:a.snackbar)||void 0===s?void 0:s.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:qu}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(Ku.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Ku.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],eh.prototype,"error",void 0),(0,C.Cg)([l.observable],eh.prototype,"notification",void 0),(0,C.Cg)([l.observable],eh.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],eh.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],eh.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],eh.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],eh.prototype,"type",void 0);const th=eh.compose({baseName:"snackbar",styles:Xu,template:Ju,shadowOptions:Zu}),ih=(e,t)=>l.css`
4907
- ${ar()}
4904
+ `,Qu=l.html`
4905
+ ${e=>Xu(T(e))}
4906
+ `,Ju={mode:"open",delegatesFocus:!0};class Zu extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=Wu,this.autoClose=!0,this.type=Vu,this.dismissEventListener=this.handleDissmis.bind(this)}autoCloseChanged(){this.autoClose&&(this.timeoutRef=setTimeout(()=>{this.handleDissmis(!0)},this.closeTimeout)),!this.autoClose&&this.timeoutRef&&clearTimeout(this.timeoutRef)}connectedCallback(){super.connectedCallback(),this.addEventListener(qu.DISMISS,this.dismissEventListener)}errorChanged(e,t){var i,o,n;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Vu}notificationChanged(e,t){var i,o,n,a,s,r,l,d,c;this.type=null!==(n=null===(o=null===(i=null==t?void 0:t.config)||void 0===i?void 0:i.snackbar)||void 0===o?void 0:o.type)&&void 0!==n?n:Vu,this.autoClose=null===(r=null===(s=null===(a=null==t?void 0:t.config)||void 0===a?void 0:a.snackbar)||void 0===s?void 0:s.autoClose)||void 0===r||r,this.closeTimeout=null!==(c=null===(d=null===(l=null==t?void 0:t.config)||void 0===l?void 0:l.snackbar)||void 0===d?void 0:d.closeTimeout)&&void 0!==c?c:Wu}handleDissmis(e=!1){this.deleteAnimation="snackbar-delete",this.snackbar.onanimationend=()=>{this.dismiss(),e&&this.dispatchEvent(new CustomEvent(qu.AUTO_DISMISS,{bubbles:!0,composed:!0,detail:this.identifier}))}}dismiss(){this.remove(),this.timeoutRef&&clearTimeout(this.timeoutRef)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(qu.DISMISS,this.dismissEventListener),this.timeoutRef&&clearTimeout(this.timeoutRef)}}(0,C.Cg)([l.observable],Zu.prototype,"error",void 0),(0,C.Cg)([l.observable],Zu.prototype,"notification",void 0),(0,C.Cg)([l.observable],Zu.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"identifier"})],Zu.prototype,"identifier",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],Zu.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close",mode:"boolean"})],Zu.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"type"})],Zu.prototype,"type",void 0);const eh=Zu.compose({baseName:"snackbar",styles:Ku,template:Qu,shadowOptions:Ju}),th=(e,t)=>l.css`
4907
+ ${nr()}
4908
4908
 
4909
4909
  .fa-stack {
4910
4910
  display: inline-block;
@@ -4929,14 +4929,14 @@
4929
4929
  .fa-stack-1x {
4930
4930
  z-index: 1;
4931
4931
  }
4932
- `,oh=l.html`
4932
+ `,ih=l.html`
4933
4933
  <span
4934
4934
  class=${e=>`fa-stack fa-${e.size}`}
4935
4935
  style=${e=>`vertical-align: ${e["vertical-align"]};`}
4936
4936
  >
4937
4937
  <slot></slot>
4938
4938
  </span>
4939
- `;class nh extends s.FoundationElement{constructor(){super(...arguments),this.size=hr,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],nh.prototype,"size",void 0),(0,C.Cg)([l.attr],nh.prototype,"vertical-align",void 0);const ah=nh.compose({baseName:"stacking-icons",template:oh,styles:ih}),sh=l.css`
4939
+ `;class oh extends s.FoundationElement{constructor(){super(...arguments),this.size=ur,this["vertical-align"]="baseline"}}(0,C.Cg)([l.attr],oh.prototype,"size",void 0),(0,C.Cg)([l.attr],oh.prototype,"vertical-align",void 0);const nh=oh.compose({baseName:"stacking-icons",template:ih,styles:th}),ah=l.css`
4940
4940
  .status-pill {
4941
4941
  font-size: 12px;
4942
4942
  display: inline-flex;
@@ -4970,7 +4970,7 @@
4970
4970
  .status-pill-image {
4971
4971
  height: 14px;
4972
4972
  }
4973
- `,rh=l.html`
4973
+ `,sh=l.html`
4974
4974
  ${e=>{return t=T(e),l.html`
4975
4975
  ${(0,l.when)(e=>e.isCountdownVisible&&!(e.hideWhenCountdownCompleted&&e.isCountdownExpired),l.html`
4976
4976
  <div
@@ -5001,7 +5001,7 @@
5001
5001
  </div>
5002
5002
  `)}
5003
5003
  `;var t}}
5004
- `,lh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const a=Math.floor(i/60),s=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),a&&r.push(`${a}m`),!a&&s&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!a&&!s||r.push("< 1h");break;default:n&&r.push(`${n}h`),a&&r.push(`${a}m`),s&&r.push(`${s}s`)}return r.length?r.join(" "):"0s"};class dh extends s.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))Qe.warn("invalid date-countdown value passed. Must be a number");else{e=parseInt(e);const t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),1e3)}}updateCountdown(e){const t=(new Date).getTime(),i=Math.floor(e.getTime()-t),o=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0!==o&&!isNaN(o)&&t<o)return this.isCountdownVisible=!1,this.countdown=null,void(this.isCountdownExpired=!1);this.isCountdownVisible=!0,i<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=lh(i,this.dateCountdownUnit)}updateVisibilityFromStartTime(){const e=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0===e||isNaN(e))this.isCountdownVisible=!0;else{const t=Date.now();this.isCountdownVisible=t>=e}}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}}(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],dh.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],dh.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],dh.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],dh.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],dh.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],dh.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],dh.prototype,"textColor",void 0),(0,C.Cg)([l.attr],dh.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],dh.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],dh.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],dh.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],dh.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],dh.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],dh.prototype,"countdown",void 0),(0,C.Cg)([l.observable],dh.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],dh.prototype,"isCountdownVisible",void 0);const ch=dh.compose({baseName:"status-pill",styles:sh,template:rh}),uh=(e,t)=>l.css`
5004
+ `,rh=(e,t="second")=>{let i=e/1e3;const o=Math.floor(i/86400);i%=86400;const n=Math.floor(i/3600);i%=3600;const a=Math.floor(i/60),s=Math.floor(i%60),r=[];switch(o&&r.push(`${o}d`),t){case"minute":n&&r.push(`${n}h`),a&&r.push(`${a}m`),!a&&s&&r.push("< 1m");break;case"hour":n&&r.push(`${n}h`),n||!a&&!s||r.push("< 1h");break;default:n&&r.push(`${n}h`),a&&r.push(`${a}m`),s&&r.push(`${s}s`)}return r.length?r.join(" "):"0s"};class lh extends s.FoundationElement{constructor(){super(...arguments),this.iconSize="sm",this.dateCountdownCompletedMessage="Expired",this.dateCountdownUnit="second",this.hideWhenCountdownCompleted=!1,this.isCountdownExpired=!1,this.isCountdownVisible=!0}dateCountdownChanged(e,t){if(e!==t){if(!t)return void this.clearCountdownTimer();this.isCountdownExpired=!1,this.setUpDateCountdown(t)}}dateCountdownVisibleAfterChanged(e,t){e!==t&&this.updateVisibilityFromStartTime()}connectedCallback(){this.updateVisibilityFromStartTime(),super.connectedCallback()}disconnectedCallback(){this.clearCountdownTimer(),super.disconnectedCallback()}setUpDateCountdown(e){if(this.clearCountdownTimer(),isNaN(parseInt(e)))Xe.warn("invalid date-countdown value passed. Must be a number");else{e=parseInt(e);const t=new Date(e);this.updateCountdown(t),this.dateInterval=setInterval(()=>this.updateCountdown(t),1e3)}}updateCountdown(e){const t=(new Date).getTime(),i=Math.floor(e.getTime()-t),o=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0!==o&&!isNaN(o)&&t<o)return this.isCountdownVisible=!1,this.countdown=null,void(this.isCountdownExpired=!1);this.isCountdownVisible=!0,i<=0?this.hideWhenCountdownCompleted?(this.isCountdownExpired=!0,this.clearCountdownTimer()):(this.countdown=this.dateCountdownCompletedMessage,clearInterval(this.dateInterval)):this.countdown=rh(i,this.dateCountdownUnit)}updateVisibilityFromStartTime(){const e=void 0!==this.dateCountdownVisibleAfter&&null!==this.dateCountdownVisibleAfter?Number(this.dateCountdownVisibleAfter):void 0;if(void 0===e||isNaN(e))this.isCountdownVisible=!0;else{const t=Date.now();this.isCountdownVisible=t>=e}}clearCountdownTimer(){this.dateInterval&&(clearInterval(this.dateInterval),this.dateInterval=null),this.countdown=null}}(0,C.Cg)([(0,l.attr)({attribute:"background-color"})],lh.prototype,"backgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-name"})],lh.prototype,"iconName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-src"})],lh.prototype,"iconSrc",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial"})],lh.prototype,"iconInitial",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-initial-background-color"})],lh.prototype,"iconInitialBackgroundColor",void 0),(0,C.Cg)([(0,l.attr)({attribute:"icon-size"})],lh.prototype,"iconSize",void 0),(0,C.Cg)([(0,l.attr)({attribute:"text-color"})],lh.prototype,"textColor",void 0),(0,C.Cg)([l.attr],lh.prototype,"text",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown"})],lh.prototype,"dateCountdown",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-completed-message"})],lh.prototype,"dateCountdownCompletedMessage",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-unit"})],lh.prototype,"dateCountdownUnit",void 0),(0,C.Cg)([(0,l.attr)({attribute:"date-countdown-visible-after"})],lh.prototype,"dateCountdownVisibleAfter",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"hide-when-countdown-completed"})],lh.prototype,"hideWhenCountdownCompleted",void 0),(0,C.Cg)([l.observable],lh.prototype,"countdown",void 0),(0,C.Cg)([l.observable],lh.prototype,"isCountdownExpired",void 0),(0,C.Cg)([l.observable],lh.prototype,"isCountdownVisible",void 0);const dh=lh.compose({baseName:"status-pill",styles:ah,template:sh}),ch=(e,t)=>l.css`
5005
5005
  .tree-item {
5006
5006
  cursor: default;
5007
5007
  }
@@ -5111,8 +5111,8 @@
5111
5111
  width: calc(100% - 28px);
5112
5112
  background-color: var(--accent-fill-rest); /* Choose a color */
5113
5113
  }
5114
- `,hh=e=>l.html`
5115
- ${(0,cn.q)(e=>e.orientation===s.TabsOrientation.vertical,l.html`
5114
+ `,uh=e=>l.html`
5115
+ ${(0,dn.q)(e=>e.orientation===s.TabsOrientation.vertical,l.html`
5116
5116
  <${e}-tree-item ${(0,l.ref)("treeItem")}
5117
5117
  class=${e=>(0,x.x)("tree-item",["cursor-pointer",e.showCursorPointer])}
5118
5118
  @click="${(e,t)=>e.$emit("tab-clicked",e.tabPosition-1)}">
@@ -5155,13 +5155,13 @@
5155
5155
  `)}
5156
5156
  </div>
5157
5157
  `)}
5158
- `,ph=l.html`
5159
- ${e=>hh(T(e))}
5160
- `;class mh extends s.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=s.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],mh.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],mh.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],mh.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],mh.prototype,"orientation",void 0);const gh=void 0,vh={},fh=mh.compose(Object.assign({baseName:"stepper-tab",template:ph,styles:uh,shadowOptions:gh},vh)),bh=()=>l.html`
5158
+ `,hh=l.html`
5159
+ ${e=>uh(T(e))}
5160
+ `;class ph extends s.FoundationElement{constructor(){super(...arguments),this.slot="tab",this.orientation=s.TabsOrientation.vertical}isCompleted(){return this.completed}selectedChanged(){this.treeItem&&(this.treeItem.selected=this.selected)}disconnectedCallback(){super.disconnectedCallback(),this.completed=void 0,this.error=void 0,this.selected=void 0}}(0,C.Cg)([l.attr],ph.prototype,"slot",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"selected",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"completed",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"error",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"isLast",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],ph.prototype,"showCursorPointer",void 0),(0,C.Cg)([(0,l.attr)({attribute:"tab-position"})],ph.prototype,"tabPosition",void 0),(0,C.Cg)([l.attr],ph.prototype,"orientation",void 0);const mh=void 0,gh={},vh=ph.compose(Object.assign({baseName:"stepper-tab",template:hh,styles:ch,shadowOptions:mh},gh)),fh=()=>l.html`
5161
5161
  <template slot="tab-panel" role="stepper-tab-panel">
5162
5162
  <slot></slot>
5163
5163
  </template>
5164
- `;class yh extends s.FoundationElement{}const wh=void 0,Ch={},xh=yh.compose(Object.assign({baseName:"stepper-tab-panel",template:bh,shadowOptions:wh},Ch)),$h=(e,t)=>l.css`
5164
+ `;class bh extends s.FoundationElement{}const yh=void 0,wh={},Ch=bh.compose(Object.assign({baseName:"stepper-tab-panel",template:fh,shadowOptions:yh},wh)),xh=(e,t)=>l.css`
5165
5165
  ${(0,r.switchStyles)(e,t)}
5166
5166
  .checked-indicator {
5167
5167
  transform: scale(1.3);
@@ -5174,20 +5174,20 @@
5174
5174
  .checked-indicator {
5175
5175
  border-radius: calc(var(--control-corner-radius) * 2px);
5176
5176
  }
5177
- `,Sh=(e,t)=>(0,s.switchTemplate)(e,t);class Eh extends r.Switch{}const Oh=void 0,Th={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},kh=Eh.compose(Object.assign({baseName:"switch",template:Sh,styles:$h,shadowOptions:Oh},Th)),Ih=(e,t)=>l.css`
5177
+ `,$h=(e,t)=>(0,s.switchTemplate)(e,t);class Sh extends r.Switch{}const Eh=void 0,Oh={switch:'<div class="checked-indicator" part="checked-indicator"></div>'},Th=Sh.compose(Object.assign({baseName:"switch",template:$h,styles:xh,shadowOptions:Eh},Oh)),kh=(e,t)=>l.css`
5178
5178
  ${(0,r.tabStyles)(e,t)}
5179
5179
 
5180
5180
  :host {
5181
5181
  user-select: none;
5182
5182
  }
5183
- `,Dh=(e,t)=>(0,s.tabTemplate)(e,t);class Rh extends r.Tab{}const Ah=void 0,Nh={},Lh=Rh.compose(Object.assign({baseName:"tab",template:Dh,styles:Ih,shadowOptions:Ah},Nh)),Fh=(e,t)=>l.css`
5183
+ `,Ih=(e,t)=>(0,s.tabTemplate)(e,t);class Dh extends r.Tab{}const Rh=void 0,Ah={},Nh=Dh.compose(Object.assign({baseName:"tab",template:Ih,styles:kh,shadowOptions:Rh},Ah)),Lh=(e,t)=>l.css`
5184
5184
  ${(0,r.tabPanelStyles)(e,t)}
5185
5185
 
5186
5186
  :host {
5187
5187
  height: 100%;
5188
5188
  padding: 0;
5189
5189
  }
5190
- `,Mh=(e,t)=>(0,s.tabPanelTemplate)(e,t);class _h extends r.TabPanel{}const Hh=void 0,zh={},Ph=_h.compose(Object.assign({baseName:"tab-panel",template:Mh,styles:Fh,shadowOptions:Hh},zh)),Uh=(e,t)=>l.css`
5190
+ `,Fh=(e,t)=>(0,s.tabPanelTemplate)(e,t);class Mh extends r.TabPanel{}const _h=void 0,Hh={},zh=Mh.compose(Object.assign({baseName:"tab-panel",template:Fh,styles:Lh,shadowOptions:_h},Hh)),Ph=(e,t)=>l.css`
5191
5191
  ${(0,r.tabsStyles)(e,t)}
5192
5192
 
5193
5193
  :host {
@@ -5204,22 +5204,22 @@
5204
5204
  :host([scrollable]) ::slotted([role='tab']) {
5205
5205
  flex: 0 0 auto;
5206
5206
  }
5207
- `,Bh=(e,t)=>(0,s.tabsTemplate)(e,t);class Gh extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Gh.prototype,"scrollable",void 0);const jh=void 0,Vh={},Yh=Gh.compose(Object.assign({baseName:"tabs",template:Bh,styles:Uh,shadowOptions:jh},Vh)),Wh=(e,t)=>l.css`
5207
+ `,Uh=(e,t)=>(0,s.tabsTemplate)(e,t);class Bh extends r.Tabs{constructor(){super(...arguments),this.scrollable=!1}get currentTabIndex(){return this.activeTabIndex}}(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Bh.prototype,"scrollable",void 0);const Gh=void 0,jh={},Vh=Bh.compose(Object.assign({baseName:"tabs",template:Uh,styles:Ph,shadowOptions:Gh},jh)),Yh=(e,t)=>l.css`
5208
5208
  ${(0,r.textAreaStyles)(e,t)}
5209
5209
  :host .control {
5210
5210
  padding: calc(var(--design-unit) * 3px);
5211
5211
  }
5212
- `,qh=(e,t)=>(0,s.textAreaTemplate)(e,t);class Kh extends r.TextArea{}const Xh=void 0,Qh={},Jh=Kh.compose(Object.assign({baseName:"text-area",template:qh,styles:Wh,shadowOptions:Xh},Qh)),{create:Zh}=s.DesignToken,ep=Zh("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),tp=(e,t)=>l.css`
5212
+ `,Wh=(e,t)=>(0,s.textAreaTemplate)(e,t);class qh extends r.TextArea{}const Kh=void 0,Xh={},Qh=qh.compose(Object.assign({baseName:"text-area",template:Wh,styles:Yh,shadowOptions:Kh},Xh)),{create:Jh}=s.DesignToken,Zh=Jh("active-color-scheme").withDefault(e=>r.baseLayerLuminance.getValueFor(e)===r.StandardLuminance.LightMode?"light":"dark"),ep=(e,t)=>l.css`
5213
5213
  ${(0,r.textFieldStyles)(e,t)}
5214
5214
 
5215
5215
  input {
5216
- color-scheme: ${ep};
5216
+ color-scheme: ${Zh};
5217
5217
  }
5218
5218
 
5219
5219
  .label-hidden {
5220
5220
  margin: 0;
5221
5221
  }
5222
- `,ip=(e,t)=>l.html`
5222
+ `,tp=(e,t)=>l.html`
5223
5223
  <template
5224
5224
  class="
5225
5225
  ${e=>e.readOnly?"readonly":""}
@@ -5281,7 +5281,7 @@
5281
5281
  ${(0,s.endSlotTemplate)(e,t)}
5282
5282
  </div>
5283
5283
  </template>
5284
- `;class op extends r.TextField{constructor(){super(...arguments),this.autocomplete="off",this.autocapitalize="off"}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}}(0,C.Cg)([l.attr],op.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],op.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],op.prototype,"step",void 0);const np={mode:"open",delegatesFocus:!0},ap={},sp=op.compose(Object.assign({baseName:"text-field",template:ip,styles:tp,shadowOptions:np},ap)),rp=l.css`
5284
+ `;class ip extends r.TextField{constructor(){super(...arguments),this.autocomplete="off",this.autocapitalize="off"}autocompleteChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocomplete=this.autocomplete)}autocapitalizeChanged(){this.proxy instanceof HTMLInputElement&&(this.proxy.autocapitalize=this.autocapitalize)}}(0,C.Cg)([l.attr],ip.prototype,"autocomplete",void 0),(0,C.Cg)([l.attr],ip.prototype,"autocapitalize",void 0),(0,C.Cg)([l.attr],ip.prototype,"step",void 0);const op={mode:"open",delegatesFocus:!0},np={},ap=ip.compose(Object.assign({baseName:"text-field",template:tp,styles:ep,shadowOptions:op},np)),sp=l.css`
5285
5285
  @keyframes append-animate {
5286
5286
  from {
5287
5287
  transform: translateX(100%);
@@ -5392,7 +5392,7 @@
5392
5392
  margin-left: auto;
5393
5393
  color: #879ba6;
5394
5394
  }
5395
- `,lp=(e="zero")=>l.html`
5395
+ `,rp=(e="zero")=>l.html`
5396
5396
  <div
5397
5397
  role="alert"
5398
5398
  part="root"
@@ -5419,13 +5419,13 @@
5419
5419
  </div>
5420
5420
  </div>
5421
5421
  </div>
5422
- `,dp=l.html`
5423
- ${e=>lp(T(e))}
5424
- `,cp={mode:"open",delegatesFocus:!0},up={};class hp extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],hp.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],hp.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],hp.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],hp.prototype,"notificationIcon",void 0);const pp=hp.compose(Object.assign({baseName:"toast",styles:rp,template:dp,shadowOptions:cp},up)),mp=(e,t)=>l.css`
5422
+ `,lp=l.html`
5423
+ ${e=>rp(T(e))}
5424
+ `,dp={mode:"open",delegatesFocus:!0},cp={};class up extends s.FoundationElement{constructor(){super(...arguments),this.deleteAnimation="",this.closeTimeout=1e4,this.autoClose=!1,this.closeTimer=null}connectedCallback(){super.connectedCallback(),this.autoClose&&(this.closeTimer=setTimeout(()=>{this.deleteAnimation="toast-delete",this.toast.onanimationend=()=>{this.remove()}},this.closeTimeout))}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.closeTimer),this.closeTimer=null}close(){this.remove()}}(0,C.Cg)([l.observable],up.prototype,"deleteAnimation",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout"})],up.prototype,"closeTimeout",void 0),(0,C.Cg)([(0,l.attr)({attribute:"auto-close"})],up.prototype,"autoClose",void 0),(0,C.Cg)([(0,l.attr)({attribute:"notification-icon"})],up.prototype,"notificationIcon",void 0);const hp=up.compose(Object.assign({baseName:"toast",styles:sp,template:lp,shadowOptions:dp},cp)),pp=(e,t)=>l.css`
5425
5425
  ${(0,r.toolbarStyles)(e,t)}
5426
- `,gp=(e,t)=>(0,s.toolbarTemplate)(e,t);class vp extends r.Toolbar{}const fp=void 0,bp={},yp=vp.compose(Object.assign({baseName:"toolbar",template:gp,styles:mp,shadowOptions:fp},bp)),wp=(e,t)=>l.css`
5426
+ `,mp=(e,t)=>(0,s.toolbarTemplate)(e,t);class gp extends r.Toolbar{}const vp=void 0,fp={},bp=gp.compose(Object.assign({baseName:"toolbar",template:mp,styles:pp,shadowOptions:vp},fp)),yp=(e,t)=>l.css`
5427
5427
  ${(0,r.tooltipStyles)(e,t)}
5428
- `,Cp=(e,t)=>(0,s.tooltipTemplate)(e,t);class xp extends r.Tooltip{}const $p=void 0,Sp={},Ep=xp.compose(Object.assign({baseName:"tooltip",template:Cp,styles:wp,shadowOptions:$p},Sp)),Op=(e,t)=>l.css`
5428
+ `,wp=(e,t)=>(0,s.tooltipTemplate)(e,t);class Cp extends r.Tooltip{}const xp=void 0,$p={},Sp=Cp.compose(Object.assign({baseName:"tooltip",template:wp,styles:yp,shadowOptions:xp},$p)),Ep=(e,t)=>l.css`
5429
5429
  ${(0,r.treeItemStyles)(e,t)}
5430
5430
  :host {
5431
5431
  --focus-stroke-width: 0;
@@ -5442,9 +5442,9 @@
5442
5442
  .positioning-region {
5443
5443
  height: calc(((var(--base-height-multiplier) + var(--density)) * var(--design-unit)) * 1px);
5444
5444
  }
5445
- `,Tp=(e,t)=>(0,s.treeItemTemplate)(e,t);class kp extends r.TreeItem{}const Ip=void 0,Dp={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>\n </svg>'},Rp=kp.compose(Object.assign({baseName:"tree-item",template:Tp,styles:Op,shadowOptions:Ip},Dp)),Ap=(e,t)=>l.css`
5445
+ `,Op=(e,t)=>(0,s.treeItemTemplate)(e,t);class Tp extends r.TreeItem{}const kp=void 0,Ip={expandCollapseGlyph:'\n <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" class="expand-collapse-glyph">\n <path d="M5.00001 12.3263C5.00124 12.5147 5.05566 12.699 5.15699 12.8578C5.25831 13.0167 5.40243 13.1437 5.57273 13.2242C5.74304 13.3047 5.9326 13.3354 6.11959 13.3128C6.30659 13.2902 6.4834 13.2152 6.62967 13.0965L10.8988 8.83532C11.0739 8.69473 11.2153 8.51658 11.3124 8.31402C11.4096 8.11146 11.46 7.88966 11.46 7.66499C11.46 7.44033 11.4096 7.21853 11.3124 7.01597C11.2153 6.81341 11.0739 6.63526 10.8988 6.49467L6.62967 2.22347C6.48274 2.10422 6.30501 2.02912 6.11712 2.00691C5.92923 1.9847 5.73889 2.01628 5.56823 2.09799C5.39757 2.17969 5.25358 2.30817 5.153 2.46849C5.05241 2.62882 4.99936 2.8144 5.00001 3.00369V12.3263Z"></path>\n </svg>'},Dp=Tp.compose(Object.assign({baseName:"tree-item",template:Op,styles:Ep,shadowOptions:kp},Ip)),Rp=(e,t)=>l.css`
5446
5446
  ${(0,r.treeViewStyles)(e,t)}
5447
- `,Np=(e,t)=>(0,s.treeViewTemplate)(e,t);class Lp extends s.TreeView{}const Fp=void 0,Mp={},_p=Lp.compose(Object.assign({baseName:"tree-view",template:Np,styles:Ap,shadowOptions:Fp},Mp)),Hp=(e,t)=>l.css`
5447
+ `,Ap=(e,t)=>(0,s.treeViewTemplate)(e,t);class Np extends s.TreeView{}const Lp=void 0,Fp={},Mp=Np.compose(Object.assign({baseName:"tree-view",template:Ap,styles:Rp,shadowOptions:Lp},Fp)),_p=(e,t)=>l.css`
5448
5448
  .container {
5449
5449
  position: relative;
5450
5450
  width: 100%;
@@ -5464,7 +5464,7 @@
5464
5464
  overflow: hidden;
5465
5465
  text-overflow: ellipsis;
5466
5466
  }
5467
- `,zp=e=>l.html`
5467
+ `,Hp=e=>l.html`
5468
5468
  <div class="container" value=${e=>e.value}>
5469
5469
  <${e}-text-field
5470
5470
  class="url-input"
@@ -5479,9 +5479,9 @@
5479
5479
  <a class="url-input-link" href=${e=>e.value} target="_blank">${e=>e.value}</a>
5480
5480
  `)}
5481
5481
  </div>
5482
- `,Pp=l.html`
5483
- ${e=>zp(T(e))}
5484
- `,Up=void 0,Bp={};class Gp extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Gp.prototype,"value",void 0),(0,C.Cg)([l.observable],Gp.prototype,"focused",void 0);const jp=Gp.compose(Object.assign({baseName:"url-input",template:Pp,styles:Hp,shadowOptions:Up},Bp)),Vp={foundationAccordion:m,foundationAiCriteriaSearch:we,foundationAiIndicator:Se,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:De,foundationAnchoredRegion:Me,foundationAvatar:Ge,foundationBadge:Ke,foundationBanner:ot,foundationBreadcrumb:dt,foundationBreadcrumbItem:gt,foundationButton:Ct,foundationCalendar:Tt,foundationCard:Nt,foundationCategorizedMultiselect:Bt,foundationCheckbox:qt,foundationCombobox:bi,foundationConnectionIndicator:$i,foundationDataGrid:Ii,foundationDataGridCell:Li,foundationDataGridRow:zi,foundationDatePicker:co,foundationDesignSystemProvider:rn,foundationDialog:bn,foundationDisclosure:Sn,foundationDivider:Dn,foundationDropdownMenu:_n,foundationErrorBanner:ia,foundationErrorBoundary:va,foundationErrorDialog:xa,foundationFileReader:Ia,foundationFileUpload:Va,foundationFilter:is,foundationFilterBar:us,foundationFlexLayout:ys,foundationFlipper:Es,foundationFlyout:Ns,foundationGridLayout:Bs,foundationGridLayoutItem:Ws,foundationHorizontalScroll:Zs,foundationIcon:gr,foundationListbox:Cr,foundationListboxOption:Tr,foundationMenu:Nr,foundationMenuItem:zr,foundationModal:Vr,foundationMultiselect:el,foundationNumberField:vl,foundationOptgroup:wl,foundationPopper:ld,foundationProgress:Yl,foundationProgressRing:md,foundationRadio:wd,foundationRadioGroup:Od,foundationScheduler:Nd,foundationSchedulerCronBuilder:Sc,foundationSchedulerTimezone:Rc,foundationSearchBar:jc,foundationSearchBarCombobox:Xc,foundationSegmentedControl:pu,foundationSegmentedItem:yu,foundationSelect:Eu,foundationSkeleton:Ru,foundationSlider:zu,foundationSliderLabel:Vu,foundationSnackbar:th,foundationStackingIcons:ah,foundationStatusPill:ch,foundationEnvironmentIndicator:Qn,foundationStepperTab:fh,foundationStepperTabPanel:xh,foundationSwitch:kh,foundationSystemHealthOverlay:id,foundationTab:Lh,foundationTabPanel:Ph,foundationTabs:Yh,foundationTextArea:Jh,foundationTextField:sp,foundationToast:pp,foundationToolbar:yp,foundationTooltip:Ep,foundationTreeItem:Rp,foundationTreeView:_p,foundationUrlInput:jp,foundationSectionNavigator:ru,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Yp extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let Wp=class extends ri{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){Qe.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){Qe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Qe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Qe.debug("handleStreamUpdates - Method not implemented.")}};Wp=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Wp);const qp=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],Kp=[...qp,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Xp={type:"NULL",maxRules:1,invisible:!0},Qp=["int","short","long","bigdecimal","double"],Jp=["date","date-time"],Zp=["enum",...Qp,"string",...Jp,"boolean"],em=[{type:"equal",nbInputs:1,applyTo:Zp,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:Zp,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Qp,...Jp],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Qp,...Jp],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...Zp].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...Zp].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Qp,...Jp],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Qp,...Jp],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...Zp],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...Zp],optgroup:"Null"}];var tm=i(93678);const im=i.n(tm)()();function om(e,t,i){const o=function e(o){const n=im(o);if(n.groupId===t)return n.children=i(n.children),n;const a=[];let s=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(a.push(i),s=!0):a.push(t)}else a.push(t);return n.children=a,s?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function nm(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function am(e,t){const i=nm(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function sm(e,t){const i=nm(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function rm(e,t,i){return om(e,t,e=>[...e,i])}const lm="group-root";function dm(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:lm,children:e.children.map(e=>i(e,2))})}function cm(e){const t=e.children.map(e=>"children"in e?cm(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const um=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,hm=e=>`${um(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,pm=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},mm=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},gm=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function vm(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var fm;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(fm||(fm={}));const bm=l.css`
5482
+ `,zp=l.html`
5483
+ ${e=>Hp(T(e))}
5484
+ `,Pp=void 0,Up={};class Bp extends r.TextField{constructor(){super(...arguments),this.value=""}saveUrl(e){this.value=e.startsWith("http")?e:"https://"+e,this.focused=!1}focus(){this.focused=!0}}(0,C.Cg)([l.observable],Bp.prototype,"value",void 0),(0,C.Cg)([l.observable],Bp.prototype,"focused",void 0);const Gp=Bp.compose(Object.assign({baseName:"url-input",template:zp,styles:_p,shadowOptions:Pp},Up)),jp={foundationAccordion:m,foundationAiCriteriaSearch:ye,foundationAiIndicator:$e,foundationAccordionItem:w,foundationActionsMenu:A,foundationAnchor:Ie,foundationAnchoredRegion:Fe,foundationAvatar:Be,foundationBadge:qe,foundationBanner:it,foundationBreadcrumb:lt,foundationBreadcrumbItem:mt,foundationButton:wt,foundationCalendar:Ot,foundationCard:At,foundationCategorizedMultiselect:Ut,foundationCheckbox:Wt,foundationCombobox:fi,foundationConnectionIndicator:xi,foundationDataGrid:ki,foundationDataGridCell:Ni,foundationDataGridRow:Hi,foundationDatePicker:lo,foundationDesignSystemProvider:sn,foundationDialog:fn,foundationDisclosure:$n,foundationDivider:In,foundationDropdownMenu:Mn,foundationErrorBanner:ta,foundationErrorBoundary:ga,foundationErrorDialog:Ca,foundationFileReader:ka,foundationFileUpload:ja,foundationFilter:ts,foundationFilterBar:cs,foundationFlexLayout:bs,foundationFlipper:Ss,foundationFlyout:As,foundationGridLayout:Us,foundationGridLayoutItem:Ys,foundationHorizontalScroll:Js,foundationIcon:mr,foundationListbox:wr,foundationListboxOption:Or,foundationMenu:Ar,foundationMenuItem:Hr,foundationModal:jr,foundationMultiselect:Zr,foundationNumberField:gl,foundationOptgroup:yl,foundationPopper:rd,foundationProgress:Vl,foundationProgressRing:pd,foundationRadio:yd,foundationRadioGroup:Ed,foundationScheduler:Ad,foundationSchedulerCronBuilder:$c,foundationSchedulerTimezone:Dc,foundationSearchBar:Gc,foundationSearchBarCombobox:Kc,foundationSegmentedControl:hu,foundationSegmentedItem:bu,foundationSelect:Su,foundationSkeleton:Du,foundationSlider:Hu,foundationSliderLabel:ju,foundationSnackbar:eh,foundationStackingIcons:nh,foundationStatusPill:dh,foundationEnvironmentIndicator:Xn,foundationStepperTab:vh,foundationStepperTabPanel:Ch,foundationSwitch:Th,foundationSystemHealthOverlay:td,foundationTab:Nh,foundationTabPanel:zh,foundationTabs:Vh,foundationTextArea:Qh,foundationTextField:ap,foundationToast:hp,foundationToolbar:bp,foundationTooltip:Sp,foundationTreeItem:Dp,foundationTreeView:Mp,foundationUrlInput:Gp,foundationSectionNavigator:su,register(e,...t){if(e)for(const i in this)"register"!==i&&this[i]().register(e,...t)}};class Vp extends l.CSSDirective{constructor(e){super(),this.tokenMap=e}createTokenPartial(e,t){return l.cssPartial`${e}: ${t}`}createTokensCSS(){const e=[];for(const[t,i]of Object.entries(this.tokenMap))e.push(this.createTokenPartial(t,i).createCSS());return e}createCSS(){return this.createTokensCSS().join(";")}}let Yp=class extends si{constructor(){super(...arguments),this.isSnapshot=!0}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.dataGrid=this.parentElement,this.dataGrid&&this.resourceName&&this.connect.isConnected&&this.fetchGenesisData()})}getColumnDefs(e){return null==e?void 0:e.flatMap(e=>this.fields&&!this.fields.includes(e.name)?[]:{columnDataKey:e.name})}clearData(){Xe.debug("clearData - Method not implemented.")}syncComponentData(e){const t=null!=e?e:Array.from(this.rowsSyncedWithStream.values()),i=this.getColumnDefs(this.datasource.fieldMetadata);this.dataGrid.columnDefinitions=i,this.dataGrid.rowsData=t}handleStreamInserts(e){Xe.debug("handleStreamInserts - Method not implemented.")}handleStreamDeletes(e){Xe.debug("handleStreamDeletes - Method not implemented.")}handleStreamUpdates(e){Xe.debug("handleStreamUpdates - Method not implemented.")}};Yp=(0,C.Cg)([(0,l.customElement)({name:"data-grid-datasource"})],Yp);const Wp=[{type:"AND",maxRules:"many"},{type:"OR",maxRules:"many"}],qp=[...Wp,{type:"NOT",maxRules:2},{type:"NAND",maxRules:"many"},{type:"NOR",maxRules:"many"},{type:"XOR",maxRules:2}],Kp={type:"NULL",maxRules:1,invisible:!0},Xp=["int","short","long","bigdecimal","double"],Qp=["date","date-time"],Jp=["enum",...Xp,"string",...Qp,"boolean"],Zp=[{type:"equal",nbInputs:1,applyTo:Jp,optgroup:"Equality"},{type:"not_equal",nbInputs:1,applyTo:Jp,optgroup:"Equality"},{type:"greater",nbInputs:1,applyTo:[...Xp,...Qp],optgroup:"Comparison"},{type:"less",nbInputs:1,applyTo:[...Xp,...Qp],optgroup:"Comparison"},{type:"contains",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"starts_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"ends_with",nbInputs:1,applyTo:["string"],optgroup:"String"},{type:"one_of",nbInputs:"many",applyTo:[...Jp].filter(e=>"boolean"!==e)},{type:"not_any_of",nbInputs:"many",applyTo:[...Jp].filter(e=>"boolean"!==e)},{type:"within_inclusive",nbInputs:2,applyTo:[...Xp,...Qp],optgroup:"Range"},{type:"within_exclusive",nbInputs:2,applyTo:[...Xp,...Qp],optgroup:"Range"},{type:"is_null",nbInputs:0,applyTo:[...Jp],optgroup:"Null"},{type:"not_null",nbInputs:0,applyTo:[...Jp],optgroup:"Null"}];var em=i(93678);const tm=i.n(em)()();function im(e,t,i){const o=function e(o){const n=tm(o);if(n.groupId===t)return n.children=i(n.children),n;const a=[];let s=!1;for(const t of n.children)if("children"in t){const i=e(t);i?(a.push(i),s=!0):a.push(t)}else a.push(t);return n.children=a,s?n:null}(e);if(!o)throw new Error(`Unable to find group with groupId ${t}`);return o}function om(e,t,i){return function e(o){for(const n of o.children){if(i(n,t))return o;if("children"in n){const t=e(n);if(t)return t}}return null}(e)}function nm(e,t){const i=om(e,t,(e,t)=>"children"in e&&e.groupId===t);if(!i)throw new Error(`No parent group found for group with ID ${t}`);return i}function am(e,t){const i=om(e,t,(e,t)=>"ruleId"in e&&e.ruleId===t);if(!i)throw new Error(`No parent group found for rule with ID ${t}`);return i}function sm(e,t,i){return im(e,t,e=>[...e,i])}const rm="group-root";function lm(e,t){const i=(e,o)=>{return"children"in e?function(e,o){return Object.assign(Object.assign({},e),{level:o,config:t.getConfig(),groupId:t.getGroupId(),children:e.children.map(e=>i(e,o+1))})}(e,o):(n=e,Object.assign(Object.assign({},n),{ruleId:t.getRuleId(),config:t.getConfig()}));var n};return Object.assign(Object.assign({},e),{config:t.getConfig(),level:1,groupId:rm,children:e.children.map(e=>i(e,2))})}function dm(e){const t=e.children.map(e=>"children"in e?dm(e):function(e){const{operator:t,field:i,value:o}=e;return{operator:t,field:i,value:o}}(e));return{combinator:e.combinator,children:t}}const cm=e=>`${e.getUTCFullYear()}-${String(e.getUTCMonth()+1).padStart(2,"0")}-${String(e.getUTCDate()).padStart(2,"0")}`,um=e=>`${cm(e)}T${String(e.getUTCHours()).padStart(2,"0")}:${String(e.getUTCMinutes()).padStart(2,"0")}:${String(e.getUTCSeconds()).padStart(2,"0")}`,hm=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.input)&&void 0!==o?o:e.field.input},pm=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type},mm=e=>{const t={},i=[],o=e=>[...e].sort((e,t)=>"fieldId"in e&&"fieldId"in t?e.fieldId.localeCompare(t.fieldId):"type"in e&&"type"in t?e.type.localeCompare(t.type):0);e.forEach(e=>{if(e.optgroup){const i=e.optgroup;t[i]||(t[i]=[]),t[i].push(e)}else i.push(e)});const n=[];return Object.keys(t).sort().forEach(e=>{n.push({optgroup:e,xs:o(t[e])})}),[...n,...o(i)]};function gm(e,t,i){if(!e.shadowRoot||!(null==t?void 0:t.customStyles))return;const o=t.customStyles[i];if(o){const t=document.createElement("style");t.textContent=o,e.shadowRoot.firstChild?e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild):e.shadowRoot.appendChild(t)}}var vm;!function(e){e.AddGroup="add-group",e.DelGroup="del-group",e.AddRule="add-rule",e.DelRule="del-rule",e.UpdateGroup="update-group",e.UpdateRule="update-rule",e.FieldSelected="field-selected",e.OperatorSelected="operator-selected",e.ValueUpdated="value-updated",e.RemoveVarArg="remove-variadic-operand"}(vm||(vm={}));const fm=l.css`
5485
5485
  :host {
5486
5486
  --item-vertical-spacing: 4px;
5487
5487
  --item-border-radius: 5px;
@@ -5655,7 +5655,7 @@
5655
5655
  .rules-list > *:last-child::after {
5656
5656
  display: none;
5657
5657
  }
5658
- `,ym=l.css`
5658
+ `,bm=l.css`
5659
5659
  .rules-group-container {
5660
5660
  border: 1px solid #ccc;
5661
5661
  margin-bottom: 10px;
@@ -5698,10 +5698,10 @@
5698
5698
  list-style: none;
5699
5699
  padding-left: 0;
5700
5700
  }
5701
- `;function wm(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}const Cm=l.html`
5701
+ `;function ym(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}const wm=l.html`
5702
5702
  ${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.radio,{radioTag:n,radioGroupTag:a}=o?{radioTag:o.input,radioGroupTag:o.group}:{radioTag:"input",radioGroupTag:"div"};return l.html`
5703
5703
  <div class="btn-group group-conditions">
5704
- ${wm(e=>"input"!==n,l.html`
5704
+ ${ym(e=>"input"!==n,l.html`
5705
5705
  <${a}
5706
5706
  class="radio-group-container"
5707
5707
  name="combinator"
@@ -5739,7 +5739,7 @@
5739
5739
  `)}
5740
5740
  </div>
5741
5741
  `}}
5742
- `,xm=l.html`
5742
+ `,Cm=l.html`
5743
5743
  ${e=>{var t,i,o,n,a,s,r,d;const c=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button",u=`Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${null===(a=null===(n=null===(o=e.config)||void 0===o?void 0:o.combinators)||void 0===n?void 0:n[0])||void 0===a?void 0:a.type})`,h=`Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${null===(d=null===(r=null===(s=e.config)||void 0===s?void 0:s.combinators)||void 0===r?void 0:r[0])||void 0===d?void 0:d.type})`;return l.html`
5744
5744
  <div class="btn-group float-end group-actions">
5745
5745
  ${(0,l.when)(e=>e.allowAddRule,l.html`
@@ -5776,13 +5776,13 @@
5776
5776
  `)}
5777
5777
  </div>
5778
5778
  `}}
5779
- `,$m=l.html`
5779
+ `,xm=l.html`
5780
5780
  <div class="rules-group-container">
5781
- <div class="rules-group-header">${xm} ${Cm}</div>
5781
+ <div class="rules-group-header">${Cm} ${wm}</div>
5782
5782
  <div class="rules-group-body">
5783
5783
  <div class="rules-list">
5784
5784
  ${(0,l.repeat)(e=>{var t,i;return null!==(i=null===(t=e.model)||void 0===t?void 0:t.children)&&void 0!==i?i:[]},l.html`
5785
- ${wm(e=>"children"in e,l.html`
5785
+ ${ym(e=>"children"in e,l.html`
5786
5786
  <expression-group
5787
5787
  :config=${(e,t)=>t.parent.config}
5788
5788
  :styles=${(e,t)=>t.parent.styles}
@@ -5806,7 +5806,7 @@
5806
5806
  </div>
5807
5807
  </div>
5808
5808
  </div>
5809
- `;let Sm=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),vm(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent(fm.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent(fm.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(fm.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent(fm.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Sm.prototype,"config",void 0),(0,C.Cg)([l.observable],Sm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Sm.prototype,"model",void 0),(0,C.Cg)([l.observable],Sm.prototype,"index",void 0),(0,C.Cg)([l.volatile],Sm.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],Sm.prototype,"allowAddGroup",null),Sm=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:$m,styles:ym,shadowOptions:{delegatesFocus:!0}})],Sm);const Em=l.html`
5809
+ `;let $m=class extends l.FASTElement{connectedCallback(){super.connectedCallback(),gm(this,this.styles,"group")}get allowAddRule(){return!!this.model&&("many"===this.model.combinator.maxRules||this.model.children.length<this.model.combinator.maxRules)}get allowAddGroup(){var e,t;return!!this.model&&(1!==this.model.combinator.maxRules&&(!(2===this.model.combinator.maxRules&&this.model.children.length>=2)&&(!(null===(e=this.config)||void 0===e?void 0:e.maxNesting)||(null===(t=this.config)||void 0===t?void 0:t.maxNesting)<1||this.config.maxNesting>this.model.level)))}dispatchAddRule(e){if(e.stopPropagation(),!this.allowAddRule)throw new Error("Cannot add extra rules to group");const t={parentGroupId:this.model.groupId};this.dispatchEvent(new CustomEvent(vm.AddRule,{detail:t,bubbles:!0,composed:!0}))}dispatchAddGroup(e){if(e.stopPropagation(),!this.allowAddGroup)throw new Error("Cannot add further nested groups");const t={parentGroupId:this.model.groupId,newGroup:{level:this.model.level+1}};this.dispatchEvent(new CustomEvent(vm.AddGroup,{detail:t,bubbles:!0,composed:!0}))}dispatchDeleteGroup(e){e.stopPropagation();const t={groupId:this.model.groupId};this.dispatchEvent(new CustomEvent(vm.DelGroup,{detail:t,bubbles:!0,composed:!0}))}handleCombinatorChange(e){e.stopPropagation();const t=e.target.value;this.updateCombinator(t)}handleCustomCombinatorChange(e){var t;if(e.stopPropagation(),!(null===(t=this.model)||void 0===t?void 0:t.groupId)||!e.target)return;const i=e.target.getAttribute("value");if(!i)throw new Error("No value found in the custom radio group event target");this.updateCombinator(i)}updateCombinator(e){var t,i;const o=this.config.combinators.find(({type:t})=>t===e);if(!o)throw new Error(`Cannot find selected combinator ${e}`);(null===(i=null===(t=this.model)||void 0===t?void 0:t.combinator)||void 0===i?void 0:i.type)!==o.type&&this.dispatchGroupDataUpdated(o)}dispatchGroupDataUpdated(e){const t={groupId:this.model.groupId,newData:{combinator:e}};this.dispatchEvent(new CustomEvent(vm.UpdateGroup,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],$m.prototype,"config",void 0),(0,C.Cg)([l.observable],$m.prototype,"styles",void 0),(0,C.Cg)([l.observable],$m.prototype,"model",void 0),(0,C.Cg)([l.observable],$m.prototype,"index",void 0),(0,C.Cg)([l.volatile],$m.prototype,"allowAddRule",null),(0,C.Cg)([l.volatile],$m.prototype,"allowAddGroup",null),$m=(0,C.Cg)([(0,l.customElement)({name:"expression-group",template:xm,styles:bm,shadowOptions:{delegatesFocus:!0}})],$m);const Sm=l.html`
5810
5810
  <div class="query-builder">
5811
5811
  ${(0,l.when)(e=>null!==e.model,l.html`
5812
5812
  <expression-group
@@ -5816,7 +5816,7 @@
5816
5816
  ></expression-group>
5817
5817
  `)}
5818
5818
  </div>
5819
- `,Om=l.html`
5819
+ `,Em=l.html`
5820
5820
  ${e=>{var t,i,o,n,a,s;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(s=null===(a=e.styles)||void 0===a?void 0:a.customElements)||void 0===s?void 0:s.optgroup)||"optgroup";return l.html`
5821
5821
  <${r}
5822
5822
  class="form-select"
@@ -5847,7 +5847,7 @@
5847
5847
  `)}
5848
5848
  </${r}>
5849
5849
  `}}
5850
- `;let Tm=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),vm(this,this.styles,"field")}get groupedFieldss(){return gm(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(fm.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Tm.prototype,"fields",void 0),(0,C.Cg)([l.observable],Tm.prototype,"field",void 0),(0,C.Cg)([l.observable],Tm.prototype,"config",void 0),(0,C.Cg)([l.observable],Tm.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Tm.prototype,"groupedFieldss",null),Tm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Om})],Tm);const km=l.html`
5850
+ `;let Om=class extends l.FASTElement{constructor(){super(...arguments),this.fields=[]}connectedCallback(){super.connectedCallback(),gm(this,this.styles,"field")}get groupedFieldss(){return mm(this.fields)}dispatchFieldsChanged(e){e.stopPropagation();const t={fieldId:e.target.value};this.dispatchEvent(new CustomEvent(vm.FieldSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Om.prototype,"fields",void 0),(0,C.Cg)([l.observable],Om.prototype,"field",void 0),(0,C.Cg)([l.observable],Om.prototype,"config",void 0),(0,C.Cg)([l.observable],Om.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Om.prototype,"groupedFieldss",null),Om=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-field",template:Em})],Om);const Tm=l.html`
5851
5851
  ${e=>{var t,i,o,n,a,s;const r=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",d=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option",c=(null===(s=null===(a=e.styles)||void 0===a?void 0:a.customElements)||void 0===s?void 0:s.optgroup)||"optgroup";return l.html`
5852
5852
  <${r}
5853
5853
  class="form-select"
@@ -5880,7 +5880,7 @@
5880
5880
  `)}
5881
5881
  </${r}>
5882
5882
  `}}
5883
- `;let Im=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),vm(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return gm(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(fm.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Im.prototype,"operators",void 0),(0,C.Cg)([l.observable],Im.prototype,"operator",void 0),(0,C.Cg)([l.observable],Im.prototype,"field",void 0),(0,C.Cg)([l.observable],Im.prototype,"config",void 0),(0,C.Cg)([l.observable],Im.prototype,"styles",void 0),(0,C.Cg)([l.volatile],Im.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],Im.prototype,"groupedOperators",null),Im=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:km})],Im);const Dm=e=>["short","int","long"].includes(e),Rm=e=>["double","bigdecimal"].includes(e),Am=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Dm(e)?/^[+-]?[0-9]+$/:Rm(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},Nm=l.css`
5883
+ `;let km=class extends l.FASTElement{constructor(){super(...arguments),this.operators=[],this.field=null}connectedCallback(){super.connectedCallback(),gm(this,this.styles,"operator")}get allowedOperators(){const e=e=>{var t,i,o;return null===(o=null===(i=null===(t=this.field)||void 0===t?void 0:t.operators)||void 0===i?void 0:i.includes(e.type))||void 0===o||o},t=e=>{var t,i,o,n;return null===(n=null===(i=null===(t=null==e?void 0:e.applyTo)||void 0===t?void 0:t.includes)||void 0===i?void 0:i.call(t,null===(o=this.field)||void 0===o?void 0:o.type))||void 0===n||n};return this.operators.filter(i=>e(i)&&t(i))}get groupedOperators(){return mm(this.allowedOperators)}handleOperatorChange(e){e.stopPropagation();const t={operatorId:e.target.value};this.dispatchEvent(new CustomEvent(vm.OperatorSelected,{detail:t,bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],km.prototype,"operators",void 0),(0,C.Cg)([l.observable],km.prototype,"operator",void 0),(0,C.Cg)([l.observable],km.prototype,"field",void 0),(0,C.Cg)([l.observable],km.prototype,"config",void 0),(0,C.Cg)([l.observable],km.prototype,"styles",void 0),(0,C.Cg)([l.volatile],km.prototype,"allowedOperators",null),(0,C.Cg)([l.volatile],km.prototype,"groupedOperators",null),km=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-operator",template:Tm})],km);const Im=e=>["short","int","long"].includes(e),Dm=e=>["double","bigdecimal"].includes(e),Rm=(e,t)=>{var i,o;return null===(o=null===(i=(e=>Im(e)?/^[+-]?[0-9]+$/:Dm(e)?/[+-]?([0-9]*[.])?[0-9]+/:null)(e))||void 0===i?void 0:i.test(t))||void 0===o||o?null:"Invalid number format"},Am=l.css`
5884
5884
  .text-input.error {
5885
5885
  color: red;
5886
5886
  }
@@ -5889,8 +5889,8 @@
5889
5889
  display: inline-grid;
5890
5890
  align-items: center;
5891
5891
  }
5892
- `,Lm=l.html`
5893
- ${e=>{var t,i;const o=pm(e),n="datetime-local"===o?"datetimeLocal":o,a=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
5892
+ `,Nm=l.html`
5893
+ ${e=>{var t,i;const o=hm(e),n="datetime-local"===o?"datetimeLocal":o,a=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i[n])||"input";return l.html`
5894
5894
  <${a}
5895
5895
  type="${o}"
5896
5896
  class="text-input ${e=>(0,x.x)(["error",e.validationError])}"
@@ -5898,7 +5898,7 @@
5898
5898
  @blur=${(e,t)=>e.handleInputChange(t.event)}
5899
5899
  />
5900
5900
  `}}
5901
- `,Fm=l.html`
5901
+ `,Lm=l.html`
5902
5902
  ${e=>{var t,i,o,n;const a=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.select)||"select",s=(null===(n=null===(o=e.styles)||void 0===o?void 0:o.customElements)||void 0===n?void 0:n.option)||"option";return l.html`
5903
5903
  <${a}
5904
5904
  class="form-select"
@@ -5916,7 +5916,7 @@
5916
5916
  `)}
5917
5917
  </${a}>
5918
5918
  `}}
5919
- `,Mm=l.html`
5919
+ `,Fm=l.html`
5920
5920
  ${e=>{var t,i;const o=null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.checkbox,n=o||"input";return l.html`
5921
5921
  <label>
5922
5922
  <${n}
@@ -5928,15 +5928,15 @@
5928
5928
  True
5929
5929
  </label>
5930
5930
  `}}
5931
+ `,Mm=l.html`
5932
+ <div>Input type "${e=>hm(e)}" not yet supported.</div>
5931
5933
  `,_m=l.html`
5932
- <div>Input type "${e=>pm(e)}" not yet supported.</div>
5933
- `,Hm=l.html`
5934
- ${e=>{const t=pm(e);return l.html`
5934
+ ${e=>{const t=hm(e);return l.html`
5935
5935
  <div class="value-and-validation">
5936
- ${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Lm)}
5937
- ${(0,l.when)(()=>"select"===t,Fm)}
5938
- ${(0,l.when)(()=>"checkbox"===t,Mm)}
5939
- ${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),_m)}
5936
+ ${(0,l.when)(()=>["text","number","date","datetime-local"].includes(t),Nm)}
5937
+ ${(0,l.when)(()=>"select"===t,Lm)}
5938
+ ${(0,l.when)(()=>"checkbox"===t,Fm)}
5939
+ ${(0,l.when)(()=>!["text","number","select","checkbox","date","datetime-local"].includes(t),Mm)}
5940
5940
  ${(0,l.when)(e=>e.validationMsg,l.html`
5941
5941
  <p class="validation-msg">${e=>e.validationMsg}</p>
5942
5942
  `)}
@@ -5953,11 +5953,11 @@
5953
5953
  `}}
5954
5954
  `)}
5955
5955
  `}}
5956
- `,zm=l.html`
5957
- ${wm(e=>e.field,Hm,l.html`
5956
+ `,Hm=l.html`
5957
+ ${ym(e=>e.field,_m,l.html`
5958
5958
  <div>Select a field to set value</div>
5959
5959
  `)}
5960
- `;let Pm=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),vm(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Am(mm(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&Dm(mm(this))?parseInt(t.value):this.field&&Rm(mm(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(fm.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(fm.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],Pm.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Pm.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],Pm.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],Pm.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],Pm.prototype,"field",void 0),(0,C.Cg)([l.observable],Pm.prototype,"operator",void 0),(0,C.Cg)([l.observable],Pm.prototype,"value",void 0),(0,C.Cg)([l.observable],Pm.prototype,"config",void 0),(0,C.Cg)([l.observable],Pm.prototype,"styles",void 0),Pm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:zm,styles:Nm,shadowOptions:{delegatesFocus:!0}})],Pm);const Um=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Bm(e,t),Bm=(e,t)=>{var i,o;switch(mm(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return um(new Date);case"date-time":return hm(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const n="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(n).length)throw new Error("Enums require configured values");return Object.keys(n)[0]}}},Gm=(e,t)=>{var i,o,n,a;const s=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=s(0))&&void 0!==i?i:Um(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=s(0))&&void 0!==o?o:Um(e,t),null!==(n=s(1))&&void 0!==n?n:Um(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(a=s(0))&&void 0!==a?a:Um(e,t)]}}},jm=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},Vm=e=>!e&&0!==e,Ym=l.css`
5960
+ `;let zm=class extends l.FASTElement{constructor(){super(...arguments),this.variadic=!1,this.validationError=!1,this.field=null,this.operator=null}connectedCallback(){super.connectedCallback(),gm(this,this.styles,"value")}validateInput(e){if(!this.field)return null;return["validation"in this.field?this.field.validation(e):null,Rm(pm(this),e)].filter(e=>!!e).join(", ")||null}handleInputChange(e){e.stopPropagation();const t=e.target;if("checkbox"!==t.type&&"select-one"!==t.type){const e=this.validateInput(t.value);if(e)return this.validationError=!0,void(this.validationMsg=e);this.validationError=!1,this.validationMsg=null}let i;i="checkbox"===t.getAttribute("role")?t.checked:"select-one"===t.type?e.target.value:this.field&&Im(pm(this))?parseInt(t.value):this.field&&Dm(pm(this))?parseFloat(t.value):t.value,this.value=i;const o={value:i,index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(vm.ValueUpdated,{detail:o,bubbles:!0,composed:!0}))}handleRemoveVariadicOperand(){if(!this.variadic)throw new Error("Cannot remove inputs for non-variadic operator");const e={index:parseInt(this.valueIndex)};this.dispatchEvent(new CustomEvent(vm.RemoveVarArg,{detail:e,bubbles:!0,composed:!0}))}};(0,C.Cg)([(0,l.attr)({attribute:"value-index"})],zm.prototype,"valueIndex",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],zm.prototype,"variadic",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean",attribute:"validation-error"})],zm.prototype,"validationError",void 0),(0,C.Cg)([(0,l.attr)({attribute:"validation-msg"})],zm.prototype,"validationMsg",void 0),(0,C.Cg)([l.observable],zm.prototype,"field",void 0),(0,C.Cg)([l.observable],zm.prototype,"operator",void 0),(0,C.Cg)([l.observable],zm.prototype,"value",void 0),(0,C.Cg)([l.observable],zm.prototype,"config",void 0),(0,C.Cg)([l.observable],zm.prototype,"styles",void 0),zm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule-value",template:Hm,styles:Am,shadowOptions:{delegatesFocus:!0}})],zm);const Pm=(e,t)=>void 0!==t.field.defaultValue?t.field.defaultValue:Um(e,t),Um=(e,t)=>{var i,o;switch(pm(Object.assign(Object.assign({},t),{operator:e}))){case"string":return"";case"boolean":return!1;case"date":return cm(new Date);case"date-time":return um(new Date);case"double":case"int":case"bigdecimal":case"short":case"long":return 0;case"enum":{const n="enum"===(null===(i=null==e?void 0:e.valueType)||void 0===i?void 0:i.type)?null===(o=null==e?void 0:e.valueType)||void 0===o?void 0:o.values:"enum"===t.field.type?t.field.values:{};if(0===Object.keys(n).length)throw new Error("Enums require configured values");return Object.keys(n)[0]}}},Bm=(e,t)=>{var i,o,n,a;const s=(r=e,l=t,e=>{var t,i,o;if((null===(t=null==r?void 0:r.valueType)||void 0===t?void 0:t.type)!==(null===(o=null===(i=l.operator)||void 0===i?void 0:i.valueType)||void 0===o?void 0:o.type))return null;if(!("value"in l)||!l.value||!l.operator)return null;const n=1===l.operator.nbInputs?[l.value]:l.value;return e>=n.length?null:n[e]});var r,l;switch(e.nbInputs){case 0:return{field:t.field,operator:e,value:void 0};case 1:return{field:t.field,operator:e,value:null!==(i=s(0))&&void 0!==i?i:Pm(e,t)};case 2:return{field:t.field,operator:e,value:[null!==(o=s(0))&&void 0!==o?o:Pm(e,t),null!==(n=s(1))&&void 0!==n?n:Pm(e,t)]};case"many":return{field:t.field,operator:e,value:[null!==(a=s(0))&&void 0!==a?a:Pm(e,t)]}}},Gm=(e,t,i)=>{switch(e.operator.nbInputs){case 0:throw new Error("Cannot set the value for a UniraryOperator");case 1:return{field:e.field,operator:e.operator,value:t};case 2:case"many":if(!("value"in e)||!Array.isArray(e.value))throw new Error("Invalid value shape for rule");return{field:e.field,operator:e.operator,value:e.value.map((e,o)=>o===i?t:e)}}},jm=e=>!e&&0!==e,Vm=l.css`
5961
5961
  .rule-container {
5962
5962
  border: 1px solid #eee;
5963
5963
  margin-bottom: 5px;
@@ -6016,7 +6016,7 @@
6016
6016
  expression-rule-value {
6017
6017
  display: flex;
6018
6018
  }
6019
- `,Wm=l.html`
6019
+ `,Ym=l.html`
6020
6020
  ${e=>{var t,i;const o=(null===(i=null===(t=e.styles)||void 0===t?void 0:t.customElements)||void 0===i?void 0:i.button)||"button";return l.html`
6021
6021
  <div class="rule-container ${e=>(0,x.x)(["error",e.error])}">
6022
6022
  <div class="rule-content">
@@ -6076,11 +6076,11 @@ class="margin"
6076
6076
  </div>
6077
6077
  </div>
6078
6078
  `}}
6079
- `;let qm=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),vm(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==mm(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(Vm)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,Um(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(fm.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(fm.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(fm.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(fm.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:jm(this.model,t,i)};this.dispatchEvent(new CustomEvent(fm.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(fm.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Gm(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],qm.prototype,"config",void 0),(0,C.Cg)([l.observable],qm.prototype,"styles",void 0),(0,C.Cg)([l.observable],qm.prototype,"model",void 0),(0,C.Cg)([l.observable],qm.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],qm.prototype,"error",void 0),(0,C.Cg)([l.volatile],qm.prototype,"operandIterator",null),qm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Wm,styles:Ym,shadowOptions:{delegatesFocus:!0}})],qm);let Km=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=dm(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=cm(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(fm.AddGroup,this.handleAddGroup),this.addEventListener(fm.DelGroup,this.handleDeleteGroup),this.addEventListener(fm.AddRule,this.handleAddRule),this.addEventListener(fm.DelRule,this.handleDeleteRule),this.addEventListener(fm.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(fm.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(fm.AddGroup,this.handleAddGroup),this.removeEventListener(fm.DelGroup,this.handleDeleteGroup),this.removeEventListener(fm.AddRule,this.handleAddRule),this.removeEventListener(fm.DelRule,this.handleDeleteRule),this.removeEventListener(fm.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(fm.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:lm,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=rm(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=rm(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=om(i=this.model,am(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=om(i=this.model,sm(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===lm?Object.assign(Object.assign({},e),i):om(e,am(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return om(e,sm(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],Km.prototype,"config",void 0),(0,C.Cg)([l.observable],Km.prototype,"styles",void 0),(0,C.Cg)([l.observable],Km.prototype,"model",void 0),Km=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Em,styles:bm})],Km);let Xm=class extends Km{};Xm=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:bm,template:Em})],Xm);const Qm=["int","short","long"],Jm=["double","bigdecimal"],Zm=[...Qm,...Jm],eg=["date","date-time"],tg=["string","enum"],ig=["boolean"],og=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function ng(e){switch(og(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function ag(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function sg(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function rg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function lg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=og(e);if(tg.includes(i))return t;if(Zm.includes(i))return t.toString();if(ig.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(eg.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function dg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?dg(e,t):t(e)).filter(Boolean)}}function cg(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=og(e);if(tg.includes(i))return t;if(Qm.includes(i))return parseInt(t);if(Jm.includes(i))return parseFloat(t);if(ig.includes(i))return t;if(eg.includes(i)){const e=new Date(parseInt(t));return"date"===i?um(e):hm(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const ug={template:Em,styles:bm};var hg;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(hg||(hg={}));const pg=[{type:hg.logicalOperations.AND,maxRules:"many"},{type:hg.logicalOperations.OR,maxRules:"many"}],mg={EQUALS:hg.operations.EQUALS,NOT_EQUALS:hg.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:hg.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:hg.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:hg.operations.LESS_THAN,LESS_THAN_OR_EQUAL:hg.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:hg.operations.IS_CURRENT,IS_PREVIOUS:hg.operations.IS_PREVIOUS},gg=e=>({type:"enum",input:"select",values:e}),vg=gg({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),fg=gg({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),bg=[{type:mg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...tg,...ig,...Zm,...eg],tooltip:"Check the equality of the field compared to a set value"},{type:mg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...tg,...ig,...Zm,...eg],tooltip:"Check that the field is different from a set value"},{type:mg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...ig,...Zm,...eg],tooltip:"Check if the field value is null"},{type:mg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...ig,...Zm,...eg],tooltip:"Check if the field value is not null"},{type:mg.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:mg.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:mg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:mg.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:mg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field value is greater than a specified number"},{type:mg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:mg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field value is less than a specified number"},{type:mg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field value is less than or equal to a specified number"},{type:mg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is before a specified date/time"},{type:mg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is after a specified date/time"},{type:mg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or before a specified date/time"},{type:mg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...eg],tooltip:"Check if the field is on or after a specified date/time"},{type:mg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:fg,optgroup:"Relative Period"},{type:mg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...eg],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:vg,optgroup:"Relative Period"}];function yg(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function wg(e,t){switch(t){case mg.IS_NULL_OR_BLANK:return rg(e,hg.methodCall.IS_NULL_OR_BLANK,[]);case mg.NOT_NULL_OR_BLANK:return rg(e,hg.methodCall.NOT_NULL_OR_BLANK,[]);case mg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return rg(e,hg.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return rg(e,hg.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case mg.IS_CURRENT:case mg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return rg(e,hg.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===mg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function Cg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=lg(e),n=ng(o),a=yg(o.operator.type);switch(a){case mg.EQUALS:case mg.NOT_EQUALS:case mg.GREATER_THAN:case mg.GREATER_THAN_OR_EQUAL:case mg.LESS_THAN:case mg.LESS_THAN_OR_EQUAL:return ag(o,a,n);case mg.IS_NULL:return sg(o,hg.operations.EQUALS,{TYPE:"NULL"});case mg.NOT_NULL:return sg(o,hg.operations.NOT_EQUALS,{TYPE:"NULL"});case mg.IS_NULL_OR_BLANK:case mg.NOT_NULL_OR_BLANK:case mg.CONTAINS:case mg.CONTAINS_WORDS_STARTING_WITH:case mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case mg.IS_CURRENT:case mg.IS_PREVIOUS:return wg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function xg(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function $g(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?mg[mg.IS_NULL]:mg[mg.NOT_NULL];return bg.find(t=>t.type===e)}const i=xg(t.OPERATION,e);return bg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function Sg(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return cg($g({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Eg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[mg[mg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[mg[mg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[mg[mg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[mg[mg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===hg.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[mg["CURRENT"===t.PARAMETERS[2].VALUE?mg.IS_CURRENT:mg.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:bg.find(e=>e.type===i),value:o}}function Og(e,t){return{combinator:pg.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Og(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Sg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Eg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Tg=class extends Km{ruleConfigChanged(e,t){this.config=Object.assign({combinators:pg,operators:bg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Og(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=dg(e,Cg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Tg.prototype,"ruleConfig",void 0),Tg=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:bm,template:Em})],Tg);const kg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},Ig=[{type:kg.PLUS,label:"Add (+)",applyTo:[...Zm],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:kg.MINUS,label:"Subtract (-)",applyTo:[...Zm],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:kg.MULTIPLY,label:"Multiply (*)",applyTo:[...Zm],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:kg.DIVIDE,label:"Divide (/)",applyTo:[...Zm],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:kg.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:kg.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function Dg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=lg(e),n=ng(o),a=o.operator.type;switch(a){case kg.TRIM:case kg.CONVERT_TO_DATE:case kg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case kg.TRIM:return rg(e,hg.methodCall.TRIM,[]);case kg.CONVERT_TO_DATE:return rg(e,hg.methodCall.LONG_TO_DATE,[]);case kg.CONVERT_TO_DATE_TIME:return rg(e,hg.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case kg.PLUS:case kg.MINUS:case kg.DIVIDE:case kg.MULTIPLY:return ag(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Rg(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return cg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return Ig.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Ag(e,t){return{combinator:Xp,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Ag(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Rg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[kg[kg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[kg[kg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[kg[kg.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:Ig.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ng=class extends Km{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Ag(t.fields,i);this.config={combinators:[Xp],operators:Ig,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Dg(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ng.prototype,"valueConfig",void 0),Ng=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:bm,template:Em})],Ng);const Lg=l.html`
6079
+ `;let Wm=class extends l.FASTElement{constructor(){super(...arguments),this.error=!1}connectedCallback(){super.connectedCallback(),gm(this,this.styles,"rule"),this.config.partialRuleValidationWarning&&(this.error=(e=>{if(!e.field||!e.operator)return!0;if(0===e.operator.nbInputs)return!1;if(!("value"in e))throw new Error("No value set as required for operator");return"boolean"!==pm(e)&&!!(Array.isArray(e.value)?e.value:[e.value]).some(jm)})(this.model))}variadicRule(e){return"many"===e.operator.nbInputs&&"value"in e&&Array.isArray(e.value)}get operandIterator(){var e,t,i;if("many"===(null===(e=this.model.operator)||void 0===e?void 0:e.nbInputs)){if(!this.variadicRule(this.model))throw new Error("Varargs disabled for many nbInputs");return Array(this.model.value.length).fill(!0)}return Array(null!==(i=null===(t=this.model.operator)||void 0===t?void 0:t.nbInputs)&&void 0!==i?i:0).fill(!0)}operandValue(e){if(this.model.operator){if(1===this.model.operator.nbInputs&&"value"in this.model)return this.model.value;if((2===this.model.operator.nbInputs||"many"===this.model.operator.nbInputs)&&"value"in this.model&&Array.isArray(this.model.value))return this.model.value[e];throw new Error("Invalid operand lookup")}}dispatchAddVarArg(){if(!this.variadicRule(this.model))throw new Error("Cannot add inputs for non-variadic operator, or invalid format");const e={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:[...this.model.value,Pm(this.model.operator,this.model)]}};this.dispatchEvent(new CustomEvent(vm.UpdateRule,{detail:e,bubbles:!0,composed:!0}))}handleRemoveVarArg(e){const{index:t}=e.detail;if(!this.variadicRule(this.model))throw new Error("Cannot remove inputs for non-variadic operator, or invalid format");const i={ruleId:this.model.ruleId,newData:{operator:this.model.operator,field:this.model.field,value:this.model.value.filter((e,i)=>i!==t)}};this.dispatchEvent(new CustomEvent(vm.UpdateRule,{detail:i,bubbles:!0,composed:!0}))}dispatchDeleteRule(e){e.stopPropagation();const t={ruleId:this.model.ruleId};this.dispatchEvent(new CustomEvent(vm.DelRule,{detail:t,bubbles:!0,composed:!0}))}handleFieldSelected(e){var t;e.stopPropagation();const{fieldId:i}=e.detail,o=null!==(t=this.config.fields.find(e=>e.fieldId===i))&&void 0!==t?t:null,n={ruleId:this.model.ruleId,newData:{field:o,value:null,operator:null}};this.dispatchEvent(new CustomEvent(vm.UpdateRule,{detail:n,bubbles:!0,composed:!0}))}handleValueChanged(e){e.stopPropagation();const{value:t,index:i}=e.detail,o={ruleId:this.model.ruleId,newData:Gm(this.model,t,i)};this.dispatchEvent(new CustomEvent(vm.UpdateRule,{detail:o,bubbles:!0,composed:!0}))}handleOperatorSelected(e){var t;e.stopPropagation();const{operatorId:i}=e.detail;if(!i)return;const o=null!==(t=this.config.operators.find(e=>e.type===i))&&void 0!==t?t:null;if(!o)throw new Error(`Unable to find operator of type ${i}`);this.dispatchEvent(new CustomEvent(vm.UpdateRule,{detail:{ruleId:this.model.ruleId,newData:Bm(o,this.model)},bubbles:!0,composed:!0}))}};(0,C.Cg)([l.observable],Wm.prototype,"config",void 0),(0,C.Cg)([l.observable],Wm.prototype,"styles",void 0),(0,C.Cg)([l.observable],Wm.prototype,"model",void 0),(0,C.Cg)([l.observable],Wm.prototype,"index",void 0),(0,C.Cg)([(0,l.attr)({mode:"boolean"})],Wm.prototype,"error",void 0),(0,C.Cg)([l.volatile],Wm.prototype,"operandIterator",null),Wm=(0,C.Cg)([(0,l.customElement)({name:"expression-rule",template:Ym,styles:Vm,shadowOptions:{delegatesFocus:!0}})],Wm);let qm=class extends l.FASTElement{constructor(){super(...arguments),this.model=null,this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!1,this.handleAddGroup=this._handleAddGroup.bind(this),this.handleAddRule=this._handleAddRule.bind(this),this.handleDeleteGroup=this._handleDeleteGroup.bind(this),this.handleDeleteRule=this._handleDeleteRule.bind(this),this.handleUpdateGroupData=this._handleUpdateGroupData.bind(this),this.handleUpdateRuleData=this._handleUpdateRuleData.bind(this)}configChanged(e,t){this.isValidConfig(t)?t.model?(this.ruleCount=0,this.groupCount=0,this.userUpdatingModel=!0,this.model=lm(t.model,this),this.userUpdatingModel=!1):null===this.model&&this.initBaseModel():console.warn("Invalid config passed to ExpressionBuilder. Verify you've defined operators, fields, and combinators.")}modelChanged(e,t){if(!t||this.userUpdatingModel)return;const i=dm(t);this.dispatchChangeEvent(i)}dispatchChangeEvent(e){this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}getConfig(){return this.config}getGroupId(){return this.groupCount+=1,`group-${this.groupCount}`}getRuleId(){return this.ruleCount+=1,`rule-${this.ruleCount}`}connectedCallback(){if(super.connectedCallback(),this.addEventListener(vm.AddGroup,this.handleAddGroup),this.addEventListener(vm.DelGroup,this.handleDeleteGroup),this.addEventListener(vm.AddRule,this.handleAddRule),this.addEventListener(vm.DelRule,this.handleDeleteRule),this.addEventListener(vm.UpdateGroup,this.handleUpdateGroupData),this.addEventListener(vm.UpdateRule,this.handleUpdateRuleData),!this.isValidConfig(this.config))return this.config&&console.warn("Config detected during connectedCallback but it isn't valid"),void(this.config=null);this.config.model||this.initBaseModel()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(vm.AddGroup,this.handleAddGroup),this.removeEventListener(vm.DelGroup,this.handleDeleteGroup),this.removeEventListener(vm.AddRule,this.handleAddRule),this.removeEventListener(vm.DelRule,this.handleDeleteRule),this.removeEventListener(vm.UpdateGroup,this.handleUpdateGroupData),this.removeEventListener(vm.UpdateRule,this.handleUpdateRuleData)}isValidConfig(e){var t,i,o;return Boolean(e&&(null===(t=e.combinators)||void 0===t?void 0:t.length)&&(null===(i=e.operators)||void 0===i?void 0:i.length)&&(null===(o=e.fields)||void 0===o?void 0:o.length))}initBaseModel(){if(!this.isValidConfig(this.config))throw new Error("Invalid config set on ExpressionBuilder. Verify you've defined operators, fields, and combinators.");this.model={children:[],level:1,groupId:rm,config:this.config,combinator:this.config.combinators[0]}}_handleAddGroup(e){const{parentGroupId:t,newGroup:i}=e.detail,o={groupId:this.getGroupId(),level:i.level,children:[],config:this.config,combinator:this.config.combinators[0]};this.model=sm(this.model,t,o)}_handleAddRule(e){const{parentGroupId:t}=e.detail,i={ruleId:this.getRuleId(),config:this.config,field:null,operator:null,value:null};this.model=sm(this.model,t,i)}_handleDeleteGroup(e){const{groupId:t}=e.detail;var i,o;this.model=im(i=this.model,nm(i,o=t).groupId,e=>e.filter(e=>!("groupId"in e)||e.groupId!==o))}_handleDeleteRule(e){const{ruleId:t}=e.detail;var i,o;this.model=im(i=this.model,am(i,o=t).groupId,e=>e.filter(e=>!("ruleId"in e)||e.ruleId!==o))}_handleUpdateGroupData(e){const{groupId:t,newData:i}=e.detail;this.model=function(e,t,i){return t===rm?Object.assign(Object.assign({},e),i):im(e,nm(e,t).groupId,e=>e.map(e=>"groupId"in e&&e.groupId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}_handleUpdateRuleData(e){const{ruleId:t,newData:i}=e.detail;this.model=function(e,t,i){return im(e,am(e,t).groupId,e=>e.map(e=>"ruleId"in e&&e.ruleId===t?Object.assign(Object.assign({},e),i):e))}(this.model,t,i)}};(0,C.Cg)([l.observable],qm.prototype,"config",void 0),(0,C.Cg)([l.observable],qm.prototype,"styles",void 0),(0,C.Cg)([l.observable],qm.prototype,"model",void 0),qm=(0,C.Cg)([(0,l.customElement)({name:"expression-builder",template:Sm,styles:fm})],qm);let Km=class extends qm{};Km=(0,C.Cg)([(0,l.customElement)({name:"foundation-expression-builder",styles:fm,template:Sm})],Km);const Xm=["int","short","long"],Qm=["double","bigdecimal"],Jm=[...Xm,...Qm],Zm=["date","date-time"],eg=["string","enum"],tg=["boolean"],ig=e=>{var t,i,o;return null!==(o=null===(i=null===(t=e.operator)||void 0===t?void 0:t.valueType)||void 0===i?void 0:i.type)&&void 0!==o?o:e.field.type};function og(e){switch(ig(e)){case"int":case"long":case"double":case"bigdecimal":case"date":case"date-time":case"short":return"NUMBER";case"string":case"enum":return"STRING";case"boolean":return"BOOLEAN"}}function ng(e,t,i){return"value"in e?{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:{TYPE:i,VALUE:e.value}}:null}function ag(e,t,i){return{TYPE:"BINARY_EXPRESSION",LEFT:{TYPE:"FIELD",NAME:e.field.fieldId},OPERATION:t,RIGHT:i}}function sg(e,t,i=[]){return"value"in e?{TYPE:"METHOD_EXPRESSION",PARAMETERS:[{TYPE:"FIELD",NAME:e.field.fieldId},...i],METHOD:t}:null}function rg(e){const t=!(!("value"in e)||void 0===e.value||null===e.value);return Object.assign(Object.assign({},e),t?{value:(t=>{const i=ig(e);if(eg.includes(i))return t;if(Jm.includes(i))return t.toString();if(tg.includes(i))return t;if(Array.isArray(t))throw new Error("Not implemented TernararyOperator or VariadicOperator args in rule value transformer");if(Zm.includes(i))return new Date(t).getTime().toString();throw new Error("Unhandled transformRuleValue case")})(e.value)}:{})}function lg(e,t){return{TYPE:"PREDICATE_EXPRESSION",OPERATION:e.combinator.type,EXPRESSIONS:e.children.map(e=>"children"in e?lg(e,t):t(e)).filter(Boolean)}}function dg(e,t){const i=e.operator.nbInputs;if("many"===i||2===i)throw new Error("Not implemented TernararyOperator or VariadicOperator args in rebuildRuleValue");return Object.assign(Object.assign({},e),0===i?{}:{value:(t=>{const i=ig(e);if(eg.includes(i))return t;if(Xm.includes(i))return parseInt(t);if(Qm.includes(i))return parseFloat(t);if(tg.includes(i))return t;if(Zm.includes(i)){const e=new Date(parseInt(t));return"date"===i?cm(e):um(e)}throw new Error("Unhandled rebuildRuleValue case")})(t.VALUE)})}const cg={template:Sm,styles:fm};var ug;!function(e){e.methodCall={CONTAINS_IGNORE_CASE:"CONTAINS_IGNORE_CASE",CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE:"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",TRIM:"TRIM",LONG_TO_DATE:"LONG_TO_DATE",LONG_TO_DATE_TIME:"LONG_TO_DATE_TIME",DATE_TIME_IS_IN_RANGE:"DATE_TIME_IS_IN_RANGE"},e.logicalOperations={AND:"AND",OR:"OR"},e.operations=Object.assign(Object.assign({},e.logicalOperations),{GREATER_THAN:"GREATER_THAN",LESS_THAN:"LESS_THAN",GREATER_THAN_OR_EQUAL:"GREATER_THAN_OR_EQUAL",LESS_THAN_OR_EQUAL:"LESS_THAN_OR_EQUAL",EQUALS:"EQUALS",NOT_EQUALS:"NOT_EQUALS",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",BITWISE_AND:"BITWISE_AND",BITWISE_OR:"BITWISE_OR",ASSIGNMENT:"ASSIGNMENT",IS_CURRENT:"IS_CURRENT",IS_PREVIOUS:"IS_PREVIOUS"})}(ug||(ug={}));const hg=[{type:ug.logicalOperations.AND,maxRules:"many"},{type:ug.logicalOperations.OR,maxRules:"many"}],pg={EQUALS:ug.operations.EQUALS,NOT_EQUALS:ug.operations.NOT_EQUALS,IS_NULL:"IS_NULL",NOT_NULL:"NOT_NULL",IS_NULL_OR_BLANK:"IS_NULL_OR_BLANK",NOT_NULL_OR_BLANK:"NOT_NULL_OR_BLANK",CONTAINS:"CONTAINS",CONTAINS_WORDS_STARTING_WITH:"CONTAINS_WORDS_STARTING_WITH",CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:"CONTAINS_WORDS_STARTING_SPLIT_DELIMITER",GREATER_THAN:ug.operations.GREATER_THAN,GREATER_THAN_OR_EQUAL:ug.operations.GREATER_THAN_OR_EQUAL,LESS_THAN:ug.operations.LESS_THAN,LESS_THAN_OR_EQUAL:ug.operations.LESS_THAN_OR_EQUAL,IS_BEFORE:"IS_BEFORE",IS_AFTER:"IS_AFTER",ON_OR_BEFORE:"ON_OR_BEFORE",ON_OR_AFTER:"ON_OR_AFTER",IS_CURRENT:ug.operations.IS_CURRENT,IS_PREVIOUS:ug.operations.IS_PREVIOUS},mg=e=>({type:"enum",input:"select",values:e}),gg=mg({HOUR:{label:"Hour",tooltip:"Beginning of the hour immediately preceding the current one to the current hour."},DAY:{label:"Day",tooltip:"Midnight on the day before today to midnight of the current day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the day before today to midnight of the current day. If the current day is Monday then the previous day is Friday."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the previous week to midnight on the Monday of the current week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the previous month to midnight on the 1st of the current month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the previous year to midnight on the 1st Jan of the current year."}}),vg=mg({HOUR:{label:"Hour",tooltip:"Beginning of the current hour to beginning of the next hour."},DAY:{label:"Day",tooltip:"Midnight on the current day day to midnight of the next day."},WEEK_DAY:{label:"Week day",tooltip:"Midnight on the current day day to midnight of the next day. This filter will never match Sat or Sun, always returning false on the weekends."},WEEK:{label:"Week",tooltip:"Midnight on the Monday of the current week to midnight on the Monday of the next week."},MONTH:{label:"Month",tooltip:"Midnight on the 1st of the current month to midnight on the 1st of the next month."},YEAR:{label:"Year",tooltip:"Midnight on Jan 1st of the current year to midnight on the 1st Jan of the next year."}}),fg=[{type:pg.EQUALS,label:"Equals",nbInputs:1,applyTo:[...eg,...tg,...Jm,...Zm],tooltip:"Check the equality of the field compared to a set value"},{type:pg.NOT_EQUALS,label:"Not equals",nbInputs:1,applyTo:[...eg,...tg,...Jm,...Zm],tooltip:"Check that the field is different from a set value"},{type:pg.IS_NULL,label:"Is null",nbInputs:0,applyTo:["enum",...tg,...Jm,...Zm],tooltip:"Check if the field value is null"},{type:pg.NOT_NULL,label:"Not null",nbInputs:0,applyTo:["enum",...tg,...Jm,...Zm],tooltip:"Check if the field value is not null"},{type:pg.IS_NULL_OR_BLANK,label:"Is null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is null or an empty string"},{type:pg.NOT_NULL_OR_BLANK,label:"Not null or blank",nbInputs:0,applyTo:["string"],tooltip:"Check if the field value is not null and not an empty string"},{type:pg.CONTAINS,label:"Contains",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains the specified text (case insensitive)"},{type:pg.CONTAINS_WORDS_STARTING_WITH,label:"Contains words starting with",nbInputs:1,applyTo:["string"],tooltip:"Check if the field contains words that start with the specified text, split by whitespace (case insensitive)"},{type:pg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER,label:"Contains words starting with (split)",nbInputs:2,applyTo:["string"],tooltip:"Check if field contains words starting with text, split by a delimiter (case insensitive)"},{type:pg.GREATER_THAN,label:"Greater than",nbInputs:1,applyTo:[...Jm],tooltip:"Check if the field value is greater than a specified number"},{type:pg.GREATER_THAN_OR_EQUAL,label:"Greater than or equal to",nbInputs:1,applyTo:[...Jm],tooltip:"Check if the field value is greater than or equal to a specified number"},{type:pg.LESS_THAN,label:"Less than",nbInputs:1,applyTo:[...Jm],tooltip:"Check if the field value is less than a specified number"},{type:pg.LESS_THAN_OR_EQUAL,label:"Less than or equal to",nbInputs:1,applyTo:[...Jm],tooltip:"Check if the field value is less than or equal to a specified number"},{type:pg.IS_BEFORE,label:"Is before",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field is before a specified date/time"},{type:pg.IS_AFTER,label:"Is after",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field is after a specified date/time"},{type:pg.ON_OR_BEFORE,label:"On or before",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field is on or before a specified date/time"},{type:pg.ON_OR_AFTER,label:"On or after",nbInputs:1,applyTo:[...Zm],tooltip:"Check if the field is on or after a specified date/time"},{type:pg.IS_CURRENT,label:"Is current",nbInputs:1,applyTo:[...Zm],tooltip:"Check whether the current date/time matches the current hour/day/work day/week/month/year.",valueType:vg,optgroup:"Relative Period"},{type:pg.IS_PREVIOUS,label:"Is previous",nbInputs:1,applyTo:[...Zm],tooltip:"Check whether the current date/time matches the previous hour/day/work day/week/month/year",valueType:gg,optgroup:"Relative Period"}];function bg(e){switch(e){case"IS_BEFORE":return"LESS_THAN";case"IS_AFTER":return"GREATER_THAN";case"ON_OR_BEFORE":return"LESS_THAN_OR_EQUAL";case"ON_OR_AFTER":return"GREATER_THAN_OR_EQUAL";default:return e}}function yg(e,t){switch(t){case pg.IS_NULL_OR_BLANK:return sg(e,ug.methodCall.IS_NULL_OR_BLANK,[]);case pg.NOT_NULL_OR_BLANK:return sg(e,ug.methodCall.NOT_NULL_OR_BLANK,[]);case pg.CONTAINS:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS");return sg(e,ug.methodCall.CONTAINS_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case pg.CONTAINS_WORDS_STARTING_WITH:if(!("value"in e))throw new Error("Invalid shape for operator CONTAINS_WORDS_STARTING_WITH");return sg(e,ug.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,[{TYPE:"STRING",VALUE:e.value}]);case pg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:if(!("value"in e)||!Array.isArray(e.value)||2!==e.value.length)throw new Error("Invalid shape for CONTAINS_WORDS_STARTING_SPLIT_DELIMITER");return sg(e,ug.methodCall.CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE,e.value.map(e=>({TYPE:"STRING",VALUE:e})));case pg.IS_CURRENT:case pg.IS_PREVIOUS:if(!("value"in e))throw new Error("Invalid shape for operator IS_CURRENT | IS_PREVIOUS");return sg(e,ug.methodCall.DATE_TIME_IS_IN_RANGE,[{TYPE:"STRING",VALUE:e.value},{TYPE:"STRING",VALUE:t===pg.IS_CURRENT?"CURRENT":"PREVIOUS"}]);default:throw new Error("Unreachable default case")}}function wg(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=rg(e),n=og(o),a=bg(o.operator.type);switch(a){case pg.EQUALS:case pg.NOT_EQUALS:case pg.GREATER_THAN:case pg.GREATER_THAN_OR_EQUAL:case pg.LESS_THAN:case pg.LESS_THAN_OR_EQUAL:return ng(o,a,n);case pg.IS_NULL:return ag(o,ug.operations.EQUALS,{TYPE:"NULL"});case pg.NOT_NULL:return ag(o,ug.operations.NOT_EQUALS,{TYPE:"NULL"});case pg.IS_NULL_OR_BLANK:case pg.NOT_NULL_OR_BLANK:case pg.CONTAINS:case pg.CONTAINS_WORDS_STARTING_WITH:case pg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER:case pg.IS_CURRENT:case pg.IS_PREVIOUS:return yg(o,a);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Cg(e,t){if(!("date"===t.field.type||"date-time"===t.field.type))return e;switch(e){case"LESS_THAN":return"IS_BEFORE";case"GREATER_THAN":return"IS_AFTER";case"LESS_THAN_OR_EQUAL":return"ON_OR_BEFORE";case"GREATER_THAN_OR_EQUAL":return"ON_OR_AFTER";default:return e}}function xg(e,t){const i=(()=>{if("NULL"===t.RIGHT.TYPE){const e="EQUALS"===t.OPERATION?pg[pg.IS_NULL]:pg[pg.NOT_NULL];return fg.find(t=>t.type===e)}const i=Cg(t.OPERATION,e);return fg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}function $g(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return dg(xg({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Sg(e,t){const[i,o]=(()=>{switch(!0){case"IS_NULL_OR_BLANK"===t.METHOD:return[pg[pg.IS_NULL_OR_BLANK],void 0];case"NOT_NULL_OR_BLANK"===t.METHOD:return[pg[pg.NOT_NULL_OR_BLANK],void 0];case"CONTAINS_IGNORE_CASE"===t.METHOD:return[pg[pg.CONTAINS],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&2===t.PARAMETERS.length:return[pg[pg.CONTAINS_WORDS_STARTING_WITH],t.PARAMETERS[1].VALUE];case"CONTAINS_WORDS_STARTING_WITH_IGNORE_CASE"===t.METHOD&&3===t.PARAMETERS.length:return[pg[pg.CONTAINS_WORDS_STARTING_SPLIT_DELIMITER],t.PARAMETERS.slice(1).map(e=>e.VALUE)];case t.METHOD===ug.methodCall.DATE_TIME_IS_IN_RANGE&&3===t.PARAMETERS.length&&"STRING"===t.PARAMETERS[2].TYPE&&("CURRENT"===t.PARAMETERS[2].VALUE||"PREVIOUS"===t.PARAMETERS[2].VALUE):return[pg["CURRENT"===t.PARAMETERS[2].VALUE?pg.IS_CURRENT:pg.IS_PREVIOUS],t.PARAMETERS[1].VALUE];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:fg.find(e=>e.type===i),value:o}}function Eg(e,t){return{combinator:hg.find(e=>e.type===t.OPERATION),children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Eg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return $g(e,t);if("METHOD_EXPRESSION"===t.TYPE)return Sg(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Og=class extends qm{ruleConfigChanged(e,t){this.config=Object.assign({combinators:hg,operators:fg,fields:t.fields,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning},(null==t?void 0:t.model)?{model:Eg(t.fields,t.model)}:{})}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the ruleConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){const t=lg(e,wg);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Og.prototype,"ruleConfig",void 0),Og=(0,C.Cg)([(0,l.customElement)({name:"foundation-rule-expression-builder",styles:fm,template:Sm})],Og);const Tg={TRIM:"TRIM",PLUS:"PLUS",MINUS:"MINUS",MULTIPLY:"MULTIPLY",DIVIDE:"DIVIDE",CONVERT_TO_DATE:"CONVERT_TO_DATE",CONVERT_TO_DATE_TIME:"CONVERT_TO_DATE_TIME"},kg=[{type:Tg.PLUS,label:"Add (+)",applyTo:[...Jm],nbInputs:1,tooltip:"Returns the result of the field value mathematically added to the specified rule value. FIELD + VALUE"},{type:Tg.MINUS,label:"Subtract (-)",applyTo:[...Jm],nbInputs:1,tooltip:"Returns the result of the field value mathematically subtracted by the specified rule value. FIELD - VALUE"},{type:Tg.MULTIPLY,label:"Multiply (*)",applyTo:[...Jm],nbInputs:1,tooltip:"Returns the result of the field value mathematically multiplied by the specified rule value. FIELD * VALUE"},{type:Tg.DIVIDE,label:"Divide (/)",applyTo:[...Jm],nbInputs:1,tooltip:"Returns the result of the field value mathematically divided by the specified rule value. FIELD / VALUE"},{type:Tg.CONVERT_TO_DATE,label:"Convert to date",applyTo:["date"],nbInputs:0,tooltip:"Returns the date, which is stored as the epoch time, as a formatted date YYYY/dd/mm"},{type:Tg.CONVERT_TO_DATE_TIME,label:"Convert to date time",applyTo:["date-time"],nbInputs:0,tooltip:"Returns the date-time, which is stored as the epoch time, as a formatted date YYYY/dd/mm HH:mm:ss"}];function Ig(e){var t,i;if(!(null===(t=e.operator)||void 0===t?void 0:t.type)||!(null===(i=e.field)||void 0===i?void 0:i.fieldId))return null;const o=rg(e),n=og(o),a=o.operator.type;switch(a){case Tg.TRIM:case Tg.CONVERT_TO_DATE:case Tg.CONVERT_TO_DATE_TIME:return function(e,t){switch(t){case Tg.TRIM:return sg(e,ug.methodCall.TRIM,[]);case Tg.CONVERT_TO_DATE:return sg(e,ug.methodCall.LONG_TO_DATE,[]);case Tg.CONVERT_TO_DATE_TIME:return sg(e,ug.methodCall.LONG_TO_DATE_TIME,[])}}(o,a);case Tg.PLUS:case Tg.MINUS:case Tg.DIVIDE:case Tg.MULTIPLY:return ng(o,a,n);default:throw new Error(`Unmatched case for operator name: ${a}`)}}function Dg(e,t){if("FIELD"!==t.LEFT.TYPE)throw new Error("BinaryExpression LHS must be TYPE === FIELD");if(!["STRING","NUMBER","BOOLEAN","NULL"].includes(t.RIGHT.TYPE))throw new Error("BinaryExpression RHS must be TYPE === NUMBER | STRING | BOOLEAN | NULL");return dg(function(e,t){const i=(()=>{const i=function(e,t){return"date"===t.field.type||t.field.type,e}(t.OPERATION,e);return kg.find(e=>e.type===i)})();return Object.assign(Object.assign({},e),{operator:i})}({field:e.find(e=>e.fieldId===t.LEFT.NAME)},t),t.RIGHT)}function Rg(e,t){return{combinator:Kp,children:t.EXPRESSIONS.map(t=>{if(!("TYPE"in t))throw new Error("RuleExpression format not yet supported - no TYPE");if("PREDICATE_EXPRESSION"===t.TYPE)return Rg(e,t);if("BINARY_EXPRESSION"===t.TYPE)return Dg(e,t);if("METHOD_EXPRESSION"===t.TYPE)return function(e,t){const[i,o]=(()=>{switch(!0){case"TRIM"===t.METHOD:return[Tg[Tg.TRIM],void 0];case"LONG_TO_DATE"===t.METHOD:return[Tg[Tg.CONVERT_TO_DATE],void 0];case"LONG_TO_DATE_TIME"===t.METHOD:return[Tg[Tg.CONVERT_TO_DATE_TIME],void 0];default:throw new Error("Unhandled fromMethodExpression case")}})();return{field:e.find(e=>e.fieldId===t.PARAMETERS[0].NAME),operator:kg.find(e=>e.type===i),value:o}}(e,t);throw new Error("RuleExpression format not yet supported - unsupported TYPE")})}}let Ag=class extends qm{valueConfigChanged(e,t){const i={TYPE:"PREDICATE_EXPRESSION",OPERATION:"NULL",EXPRESSIONS:t.model?[t.model]:[]},o=Rg(t.fields,i);this.config={combinators:[Kp],operators:kg,fields:t.fields,model:o,maxNesting:t.maxNesting,partialRuleValidationWarning:t.partialRuleValidationWarning}}configChanged(e,t){if(null!==t){if(!t.operators||!t.combinators)throw new Error("Unable to detect operators or combinators. Did you set the config on the rule builder via the config property? Use the valueConfig property instead");super.configChanged(e,t)}}dispatchChangeEvent(e){if(!("children"in e))throw new Error("Invalid top level group hierarchy");if(e.children.length>1)throw new Error("Value expressions should not have multiple rules");if(e.children[0]&&"children"in e.children[0])throw new Error("Trying to convert group to rule");const t=0===e.children.length?void 0:Ig(e.children[0]);this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,cancelable:!0,composed:!0}))}};(0,C.Cg)([l.observable],Ag.prototype,"valueConfig",void 0),Ag=(0,C.Cg)([(0,l.customElement)({name:"foundation-value-expression-builder",styles:fm,template:Sm})],Ag);const Ng=l.html`
6080
6080
  <template ${(0,l.ref)("notificationListener")}>
6081
6081
  <slot></slot>
6082
6082
  </template>
6083
- `;var Fg;!function(e){e.NOTIFICATION_EVENT="notification-event"}(Fg||(Fg={}));const Mg={mode:"open",delegatesFocus:!0};class _g extends s.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(Fg.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),ge(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){this.resourceName&&(yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,ti.d)(e))}):Qe.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,a=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let s=[];this.toastButtons&&this.toastButtons.length>0&&(s=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:s,autoClose:void 0!==a?!!a:!!this.closeTimeout,closeTimeout:null!=a?a:this.closeTimeout,position:this.toastPosition}};Ld(r,this.tagName)}}(0,C.Cg)([l.observable],_g.prototype,"notificationListener",void 0),(0,C.Cg)([oi.dm],_g.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],_g.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],_g.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],_g.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],_g.prototype,"toastPosition",void 0),(0,C.Cg)([ni.yW],_g.prototype,"datasource",void 0);const Hg=_g.compose({baseName:"notification-listener",template:Lg,shadowOptions:Mg}),zg=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function Pg(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Ug,Bg=i(16171);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Ug||(Ug={}));class Gg{constructor(e){this.analytics=(0,Bg.Ay)(e)}trackEvent(e,t){Da.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const jg=s.DI.createInterface(e=>e.singleton(Gg));var Vg=i(98647),Yg=i(35044);const Wg=(0,Xe.createLogger)("foundation-router");var qg=i(36132),Kg=i(80751),Xg=i(3479);const Qg="$router",Jg=Object.freeze({getOrCreateFor:e=>{const t=e[Qg];return void 0!==t?t:e[Qg]=new Zg(e)},find:e=>Xg.Ix.find(e),from:e=>Xg.Ix.from(e)});class Zg extends Xg.LK{}const ev=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function tv(e){return ev.test(e)}function iv(e){return e.config instanceof Vg.Y?e:Jg.find(e)}function ov(e){return iv(e).parent}function nv(e){let t=iv(e);for(;t&&t.level>0;)t=t.parent;return t}function av(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function sv(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function rv(e){return e.replace(`/*${Kg.N}`,"")}const lv=Object.freeze({path:Object.freeze({get current(){return qg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=iv(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&tv(e)?location.href=e:(history.pushState({},document.title,e),t&&lv.path.trigger(e))},replace:(e,t=!0)=>{e&&tv(e)?location.href=e:(history.replaceState({},document.title,e),t&&lv.path.trigger(e))},trigger:e=>{qg.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=iv(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield lv.name.generateRoute(e,t,i);null!==n&&lv.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield lv.name.generateRoute(e,t,i);null!==n&&lv.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield lv.name.generateRoute(e,t,i);null!==o&&lv.path.trigger(o)})})}),dv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,cv=10;function uv(e,t=dv,i=cv){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var a,s,r,l;const d=null!==(a=t.placementIndex)&&void 0!==a?a:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(s=t.navId)&&void 0!==s?s:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class hv extends Kg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Wg.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Wg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Wg.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],hv.prototype,"definitions",void 0);class pv extends Vg.Y{constructor(){super(),this.logger=Wg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new hv(this),this.basename=Hn.OB,this.routes=new hv(this)}getNavItems(e=dv){return uv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Ug.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),lv.name.replace(e.router,n)}else this.user.trackPath(),lv.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),lv.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield lv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&lv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Yg.C.build(t);let n=i&&!e.startsWith(i)?av([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?rv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],pv.prototype,"container",void 0),(0,C.Cg)([jg],pv.prototype,"analytics",void 0),(0,C.Cg)([Cl.KJ],pv.prototype,"user",void 0),(0,C.Cg)([yi.N],pv.prototype,"_session",void 0);const mv="navigate-to",gv="generate-navigation-path";let vv=class extends(Jg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Wg,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[Qg]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(mv,this.onNavigateTo),this.addEventListener(gv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(mv,this.onNavigateTo),this.removeEventListener(gv,this.onGenerateNavigationPath)}};vv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],vv);const fv=e=>l.html`
6083
+ `;var Lg;!function(e){e.NOTIFICATION_EVENT="notification-event"}(Lg||(Lg={}));const Fg={mode:"open",delegatesFocus:!0};class Mg extends s.FoundationElement{constructor(){super(...arguments),this.closeTimeout=0,this.toastButtons=[]}connectedCallback(){const e=Object.create(null,{connectedCallback:{get:()=>super.connectedCallback}});return(0,C.sH)(this,void 0,void 0,function*(){e.connectedCallback.call(this),this.addEventListener(Lg.NOTIFICATION_EVENT,e=>{e.stopImmediatePropagation(),me(e.detail,this.tagName,this.notificationListener)}),this.connectionSub=this.connect.isConnected$.subscribe(e=>(0,C.sH)(this,void 0,void 0,function*(){e&&(yield this.handleReconnection())}))})}handleReconnection(){return(0,C.sH)(this,void 0,void 0,function*(){this.resourceName&&(yield this.initializeDatasource(),this.setupDataSubscription())})}initializeDatasource(){return(0,C.sH)(this,void 0,void 0,function*(){var e;(null===(e=this.datasource)||void 0===e?void 0:e.initialized)&&this.datasource.destroy();if(!(yield this.datasource.init({resourceName:this.resourceName},!0)))throw new Error(`Failed to initialize datasource for ${this.resourceName}`)})}setupDataSubscription(){this.datasource.stream?this.dataSub=this.datasource.stream.subscribe(e=>{e.ROW&&e.SEQUENCE_ID>1&&this.handleStreamUpdate((0,ei.d)(e))}):Xe.warn(`No stream available for ${this.resourceName}`)}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null===(e=this.dataSub)||void 0===e||e.unsubscribe(),delete this.dataSub,null===(t=this.connectionSub)||void 0===t||t.unsubscribe(),delete this.connectionSub,null===(i=this.datasource)||void 0===i||i.destroy(),delete this.datasource}handleStreamUpdate(e){const t=e.inserts;t.length>0&&t.forEach(e=>{this.showNotificationToast(e)})}showNotificationToast(e){const{HEADER:t,MESSAGE:i,NOTIFY_SEVERITY:o}=e,n=e.CREATED_AT?new Date(e.CREATED_AT):void 0,a=e.EXPIRY?e.EXPIRY-e.CREATED_AT:void 0;let s=[];this.toastButtons&&this.toastButtons.length>0&&(s=this.toastButtons.filter(({condition:t})=>!t||t({details:e})));const r={title:t,body:i,createdAt:n,toast:{details:e,type:null==o?void 0:o.toLowerCase(),buttons:s,autoClose:void 0!==a?!!a:!!this.closeTimeout,closeTimeout:null!=a?a:this.closeTimeout,position:this.toastPosition}};Nd(r,this.tagName)}}(0,C.Cg)([l.observable],Mg.prototype,"notificationListener",void 0),(0,C.Cg)([ii.dm],Mg.prototype,"connect",void 0),(0,C.Cg)([(0,l.attr)({attribute:"resource-name"})],Mg.prototype,"resourceName",void 0),(0,C.Cg)([(0,l.attr)({attribute:"close-timeout",converter:l.nullableNumberConverter})],Mg.prototype,"closeTimeout",void 0),(0,C.Cg)([l.observable],Mg.prototype,"toastButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"toast-position"})],Mg.prototype,"toastPosition",void 0),(0,C.Cg)([oi.yW],Mg.prototype,"datasource",void 0);const _g=Mg.compose({baseName:"notification-listener",template:Ng,shadowOptions:Fg}),Hg=(e,t)=>i=>{const o="function"==typeof t?t:(n=t,e=>Object.assign(Object.assign({},n),e));var n;return l.FASTElement.define(class extends e{},o(i))};function zg(e){if("string"==typeof e)return e;if("function"==typeof e&&!(e=l.FASTElementDefinition.forType(e)))throw new Error("Missing FASTElement definition.");return e.name}var Pg,Ug=i(16171);!function(e){e.controlClicked="controlClicked",e.routeChanged="routeChanged"}(Pg||(Pg={}));class Bg{constructor(e){this.analytics=(0,Ug.Ay)(e)}trackEvent(e,t){Ia.v.debug(`FoundationAnalytics.trackEvent ${e} : ${JSON.stringify(t)}`),this.analytics.track(e,t)}}const Gg=s.DI.createInterface(e=>e.singleton(Bg));var jg=i(98647),Vg=i(35044);const Yg=(0,Ke.createLogger)("foundation-router");var Wg=i(36132),qg=i(80751),Kg=i(3479);const Xg="$router",Qg=Object.freeze({getOrCreateFor:e=>{const t=e[Xg];return void 0!==t?t:e[Xg]=new Jg(e)},find:e=>Kg.Ix.find(e),from:e=>Kg.Ix.from(e)});class Jg extends Kg.LK{}const Zg=/^([a-z][a-z0-9+\-.]*:)?\/\//i;function ev(e){return Zg.test(e)}function tv(e){return e.config instanceof jg.Y?e:Qg.find(e)}function iv(e){return tv(e).parent}function ov(e){let t=tv(e);for(;t&&t.level>0;)t=t.parent;return t}function nv(e,t="/",i=!1){const o=e.join(t).replace(new RegExp(t+"{1,}","g"),t);return!i&&o.endsWith(t)?o.slice(0,-1):o}function av(e,t="/"){const i=e.split(t);return 2===i.length&&""===i[0]&&""!==i[1]?e:(i.length>1&&i.pop(),i.join(t))}function sv(e){return e.replace(`/*${qg.N}`,"")}const rv=Object.freeze({path:Object.freeze({get current(){return Wg.qh.path.current},generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=tv(e);for(;null!==o;){const e=yield o.config.generateRouteFromPath(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t=!0)=>{e&&ev(e)?location.href=e:(history.pushState({},document.title,e),t&&rv.path.trigger(e))},replace:(e,t=!0)=>{e&&ev(e)?location.href=e:(history.replaceState({},document.title,e),t&&rv.path.trigger(e))},trigger:e=>{Wg.qh.path.trigger(e)}}),name:Object.freeze({generateRoute:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){let o=tv(e);for(;null!==o;){const e=yield o.config.generateRouteFromName(t,i);if(null!==e)return e;o=o.parent}return null}),push:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield rv.name.generateRoute(e,t,i);null!==n&&rv.path.push(n,o)}),replace:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={},o=!0){const n=yield rv.name.generateRoute(e,t,i);null!==n&&rv.path.replace(n,o)}),trigger:(e,t,...i)=>(0,C.sH)(void 0,[e,t,...i],void 0,function*(e,t,i={}){const o=yield rv.name.generateRoute(e,t,i);null!==o&&rv.path.trigger(o)})})}),lv=e=>!e.navId||"header"===e.navId||"side-nav"===e.navId,dv=10;function cv(e,t=lv,i=dv){const o=[];return e.filter(e=>e.navItems&&e.navItems.some(t)).forEach((e,n)=>{e.navItems.filter(t).map((t,o)=>{var a,s,r,l;const d=null!==(a=t.placementIndex)&&void 0!==a?a:n*i+o;return Object.assign(Object.assign({},t),{navId:null!==(s=t.navId)&&void 0!==s?s:"header",placementIndex:d,routePath:null!==(r=t.routePath)&&void 0!==r?r:e.path,routeName:null!==(l=t.routeName)&&void 0!==l?l:e.name})}).forEach(e=>o.push(e))}),o.sort((e,t)=>e.placementIndex-t.placementIndex)}class uv extends qg.s{constructor(){super(...arguments),this.definitions=[]}map(...e){const t=this.owner,i=!t.parent,o=t.basename;i&&(""!==o&&"/"!==o)&&(Yg.debug("Route paths remap required due to detected sub-path deployment"),e=e.map(e=>{if(!e.path)return e;if(e.path.startsWith(o))return Yg.debug(`'${e.path}' path okay as is`),e;const t="/"!==e.path.charAt(0)?"/":"",i=`${o}${t}${e.path}`;return Yg.debug(`'${e.path}' path modified to '${i}'`),Object.assign(Object.assign({},e),{path:i})})),this.definitions=[...e,...this.definitions],super.map(...e)}}(0,C.Cg)([l.observable],uv.prototype,"definitions",void 0);class hv extends jg.Y{constructor(){super(),this.logger=Yg,this.loginPath="login",this.notFoundPath="not-found",this.notPermittedPath="not-permitted",this.routes=new uv(this),this.basename=_n.OB,this.routes=new uv(this)}getNavItems(e=lv){return cv(this.routes.definitions,e)}configureAnalytics(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){this.analytics.trackEvent(Pg.routeChanged,{path:e.route.endpoint.path})})})}configureRoutePermittedChecks(){this.contributors.push({navigate:e=>(0,C.sH)(this,void 0,void 0,function*(){var t;const{settings:i}=e.route;!1===(null===(t=null==i?void 0:i.isPermitted)||void 0===t?void 0:t.call(i))&&e.cancel(()=>{var t,o;if(this.user.isAuthenticated){const n=null!==(o=null===(t=i.notPermittedPath)||void 0===t?void 0:t.call(i))&&void 0!==o?o:this.notPermittedPath;this.logger.debug(`User not permitted to access route. Re-routing to ${n}.`),rv.name.replace(e.router,n)}else this.user.trackPath(),rv.name.replace(e.router,this.loginPath)})})})}configureFallbackRouteDefinition(){this.routes.fallback(()=>{let e={redirect:this.notFoundPath};return this.user.isAuthenticated||(this.user.trackPath(),this._session.captureReturnUrl(),e={redirect:this.loginPath}),this.logger.debug(`Route unresolved. Re-routing to ${e.redirect}.`),e})}navigationPhaseLoginRedirect(e){e.cancel(()=>{this.user.trackPath(),this._session.captureReturnUrl(),rv.name.replace(e.router,this.loginPath)})}generateRouteFromName(e,t){const i=Object.create(null,{generateRouteFromName:{get:()=>super.generateRouteFromName}});return(0,C.sH)(this,void 0,void 0,function*(){const o=yield i.generateRouteFromName.call(this,e,t);return o?this.generateNavigationPath(o):null})}navigateTo(e){return(0,C.sH)(this,void 0,void 0,function*(){if(e.name)return this.relativeTo||this.logger.error("unable to navigate by name as the relativeTo router is not set"),void(yield rv.name.push(this.relativeTo,e.name,e.params,e.trigger));e.path&&rv.path.push(this.generateNavigationPath(e.path,e.params),e.trigger)})}generateNavigationPath(e,t){const i=this.getNavigationPathBasename(),o=Vg.C.build(t);let n=i&&!e.startsWith(i)?nv([i,e]):e;return n=o?`${n}?${o}`:n,n}getNavigationPathBasename(){var e,t;const i=this.parent,o=null===(t=null===(e=null==i?void 0:i.relativeTo)||void 0===e?void 0:e.route)||void 0===t?void 0:t.endpoint.route.path;return o?sv(o):this.basename?this.basename:""}construct(e){return this.container.get(e)}}(0,C.Cg)([s.Container],hv.prototype,"container",void 0),(0,C.Cg)([Gg],hv.prototype,"analytics",void 0),(0,C.Cg)([wl.KJ],hv.prototype,"user",void 0),(0,C.Cg)([bi.N],hv.prototype,"_session",void 0);const pv="navigate-to",mv="generate-navigation-path";let gv=class extends(Qg.from(l.FASTElement)){constructor(){super(...arguments),this.logger=Yg,this.onNavigateTo=e=>{e.stopImmediatePropagation(),this.config.navigateTo(e.detail)},this.onGenerateNavigationPath=e=>{e.stopImmediatePropagation();const{path:t,params:i,callback:o}=e.detail;if(!o)return;o(this.config.generateNavigationPath(t,i))}}get router(){return this[Xg]}connectedCallback(){var e,t;super.connectedCallback(),this.config.isConfigured||(null!==(e=(t=this.config).relativeTo)&&void 0!==e||(t.relativeTo=this.router),l.DOM.queueUpdate(()=>(0,C.sH)(this,void 0,void 0,function*(){this.router.config?this.router.connect():this.router.config=this.config})),this.addEventListeners())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListeners()}addEventListeners(){this.addEventListener(pv,this.onNavigateTo),this.addEventListener(mv,this.onGenerateNavigationPath)}removeEventListeners(){this.removeEventListener(pv,this.onNavigateTo),this.removeEventListener(mv,this.onGenerateNavigationPath)}};gv=(0,C.Cg)([(0,l.customElement)({name:"foundation-router"})],gv);const vv=e=>l.html`
6084
6084
 
6085
6085
  <${e}-card class=${e=>(0,x.x)("stepper-tab",["stepper-tab-hidden",e.hideTabs])} part="stepper-tab" @tab-clicked="${(e,t)=>e.handleStepClick(t.event.detail)}" role="stepper-tab" data-test-id="stepper-tab">
6086
6086
  <div class=${e=>(0,x.x)("stepper-tab-menu",["stepper-tab-menu-hidden",e.hideTabs])} part="stepper-tab-menu">
@@ -6111,9 +6111,9 @@ class="margin"
6111
6111
  </div>
6112
6112
  `)}
6113
6113
  </${e}-card>
6114
- `,bv=l.html`
6115
- ${e=>fv(T(e))}
6116
- `,yv=l.css`
6114
+ `,fv=l.html`
6115
+ ${e=>vv(T(e))}
6116
+ `,bv=l.css`
6117
6117
  :host {
6118
6118
  display: flex;
6119
6119
  height: 100%;
@@ -6212,5 +6212,5 @@ class="margin"
6212
6212
  max-height: 70px;
6213
6213
  height: 70px;
6214
6214
  }
6215
- `;class wv extends s.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.orientation=s.TabsOrientation.vertical,this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),e.setAttribute("aria-controls",a),e.setAttribute("aria-controls",a),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)}),this.progressValue=Math.round(e/this.tabpanels.length*100)},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&this.tabpanels.length>0}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return Qe.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(Qe.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,os.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,os.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],wv.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],wv.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],wv.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],wv.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],wv.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],wv.prototype,"hideTabs",void 0),(0,C.Cg)([l.attr],wv.prototype,"orientation",void 0),(0,C.Cg)([l.attr],wv.prototype,"activeid",void 0),(0,C.Cg)([l.observable],wv.prototype,"tabs",void 0),(0,C.Cg)([l.observable],wv.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],wv.prototype,"validation",void 0),(0,C.Cg)([l.observable],wv.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],wv.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],wv.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],wv.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],wv.prototype,"islastStepValid",null);const Cv=void 0,xv={},$v=wv.compose(Object.assign({baseName:"stepper",template:bv,styles:yv,shadowOptions:Cv},xv)),Sv=()=>ql().register(Vp)},70997(e,t,i){function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){i.d(t,{Du:()=>l,IT:()=>s,WP:()=>n,f4:()=>r,zz:()=>a});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var a,s;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(s||(s={}));const r=(e,t=a.Normal,i=s.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
6216
- //# sourceMappingURL=715.d264ef5a3f800ff0332168f1baec7a1d.js.map
6215
+ `;class yv extends s.FoundationElement{constructor(){super(...arguments),this.allowBackwardJumps=!1,this.allowForwardJumps=!1,this.hideAllButtons=!1,this.hideTabs=!1,this.orientation=s.TabsOrientation.vertical,this.progressValue=0,this.activeTabIndex=0,this.pendingNextStep=!1,this.slotsInitialized=!1,this.setTabs=()=>{this.activeTabIndex=this.getActiveIndex(),this.tabs.forEach((e,t)=>{if("tab"===e.slot){const i=this.activeTabIndex===t,o=t+1===this.tabIds.length,n=this.tabIds[t],a=this.tabpanelIds[t];e.setAttribute("id",n),e.setAttribute("aria-selected",i?"true":"false"),e.setAttribute("aria-disabled",i?"false":"true"),e.setAttribute("selected",i?"true":"false"),e.setAttribute("orientation",this.orientation),e.setAttribute("aria-controls",a),e.setAttribute("aria-controls",a),e.setAttribute("tab-position",String(t+1)),e.setAttribute("isLast",String(o)),e.setAttribute("hideStepNumber",String(!0===this.hideStepNumber)),e.setAttribute("tabindex",i?"0":"-1"),e.setAttribute("showCursorPointer",String(t<=this.activeTabIndex&&this.allowBackwardJumps||t>this.activeTabIndex&&this.allowForwardJumps)),i&&(this.activetab=e,this.activeid=n)}}),0===this.activeTabIndex&&this.resetCompletedState()},this.getCompletedTabs=()=>{let e=0;this.tabs.forEach(t=>{t.isCompleted()&&(e+=1)}),this.progressValue=Math.round(e/this.tabpanels.length*100)},this.setTabPanels=()=>{this.tabpanels.forEach((e,t)=>{const i=this.tabIds[t],o=this.tabpanelIds[t];e.setAttribute("id",o),e.setAttribute("aria-labelledby",i),this.activeTabIndex!==t?e.setAttribute("hidden",""):e.removeAttribute("hidden")})}}orientationChanged(){this.$fastController.isConnected&&(this.setTabs(),this.setTabPanels())}activeidChanged(e,t){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.setTabs(),this.setTabPanels(),this.getCompletedTabs())}tabsChanged(){this.$fastController.isConnected&&this.tabs.length<=this.tabpanels.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}tabpanelsChanged(){this.$fastController.isConnected&&this.tabpanels.length<=this.tabs.length&&(this.setTabsAndTabPanels(),this.checkAndExecutePendingNextStep())}connectedCallback(){super.connectedCallback(),this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.activeTabIndex=this.getActiveIndex()}setTabsAndTabPanels(){this.tabIds=this.getTabIds(),this.tabpanelIds=this.getTabPanelIds(),this.setTabs(),this.setTabPanels(),this.getCompletedTabs(),this.slotsInitialized=this.tabs.length>0&&this.tabpanels.length>0}checkAndExecutePendingNextStep(){this.pendingNextStep&&this.slotsInitialized&&(this.pendingNextStep=!1,this.nextStep())}getActiveIndex(){return void 0!==this.activeid?-1===this.tabIds.indexOf(this.activeid)?0:this.tabIds.indexOf(this.activeid):0}goToStep(e,t=!1){const i=e-1;if(e<1||e>this.tabs.length)return Xe.warn(`[Stepper] Invalid step number: ${e}. Must be between 1 and ${this.tabs.length}`),!1;if(i===this.activeTabIndex)return!1;if(t){if(i<this.activeTabIndex)return this.handleBackwardJump(i);if(i>this.activeTabIndex)return this.handleForwardJump(i)}if(i<this.activeTabIndex&&this.allowBackwardJumps){return this.handleBackwardJump(i)}if(i>this.activeTabIndex&&this.allowForwardJumps){return this.handleForwardJump(i)}return i===this.activeTabIndex+1?(this.nextStep(),!0):(Xe.warn(`[Stepper] Cannot jump to step ${e}. Jumps are not allowed or step is not adjacent.`),!1)}goToFirstStep(){return this.goToStep(1,!0)}goToLastStep(){return this.goToStep(this.tabs.length,!0)}handleStepClick(e){e<this.activeTabIndex&&this.allowBackwardJumps?this.handleBackwardJump(e):e>this.activeTabIndex&&this.allowForwardJumps&&this.handleForwardJump(e)}handleBackwardJump(e){for(let t=e+1;t<=this.activeTabIndex;t+=1)this.tabs[t].completed=!1;return this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}handleForwardJump(e){for(let t=this.activeTabIndex;t<e;t+=1)if(this.validation&&this.validation[t]){if(!this.validation[t].isValid())return this.tabs[t].completed=!1,this.tabs[t].error=!0,this.getCompletedTabs(),this.$emit("validation-failure",{stepIndex:t,stepId:this.tabIds[t],message:`Validation failed for step ${t+1}`}),!1;this.tabs[t].error=!1}for(let t=this.activeTabIndex;t<e;t+=1)this.tabs[t].completed=!0,this.tabs[t].error=!1;return this.tabs[e].completed=!1,this.tabs[e].error=!1,this.activeTabIndex=e,this.activetab=this.tabs[e],this.activeid=this.tabIds[e],this.getCompletedTabs(),this.$emit("step-click",{activetab:this.activetab,activeid:this.activeid}),!0}get disabledPreviousStep(){return 0===this.activeTabIndex}get isLastStep(){return this.activeTabIndex+1===this.tabs.length}get islastStepValid(){var e;const t=this.tabs.length-1;return this.activeTabIndex===t&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs(),!1):(this.tabs[t].completed=!1,this.getCompletedTabs(),!0)}_submit(){this.$emit("submit")}nextStep(){var e;if(!this.slotsInitialized)return void(this.pendingNextStep=!0);if(this.validation&&this.validation[this.activeTabIndex]){if(!this.validation[this.activeTabIndex].isValid())return this.tabs[this.activeTabIndex].completed=!1,this.tabs[this.activeTabIndex].error=!0,void this.getCompletedTabs();this.tabs[this.activeTabIndex].error=!1}this.activeTabIndex+2<=this.tabIds.length&&(this.tabs[this.activeTabIndex].completed=!0,this.activeTabIndex=this.activeTabIndex+1,this.activeid=this.tabIds[this.activeTabIndex],this.$emit("next-step"),this.$emit("validation-success"));const t=this.tabs.length-1,i=this.activeTabIndex===t;this.hideSubmitButton&&i&&(this.validation&&(null===(e=this.validation[t])||void 0===e?void 0:e.isValid())||!this.validation||!this.validation[t])?(this.tabs[t].completed=!0,this.getCompletedTabs()):(this.tabs[t].completed=!1,this.getCompletedTabs())}previousStep(){0!==this.activeTabIndex&&(this.tabs[this.activeTabIndex].completed=!1,this.activeTabIndex=this.activeTabIndex-1,this.activeid=this.tabIds[this.activeTabIndex])}getTabIds(){return this.tabs.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`tab-${(0,is.NF)()}`})}getTabPanelIds(){return this.tabpanels.map(e=>{var t;return null!==(t=e.getAttribute("id"))&&void 0!==t?t:`panel-${(0,is.NF)()}`})}resetCompletedState(){this.tabs.forEach(e=>e.completed=!1)}}(0,C.Cg)([(0,l.attr)({attribute:"hide-submit-button",mode:"boolean"})],yv.prototype,"hideSubmitButton",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-step-number",mode:"boolean"})],yv.prototype,"hideStepNumber",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-backward-jumps",mode:"boolean"})],yv.prototype,"allowBackwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"allow-forward-jumps",mode:"boolean"})],yv.prototype,"allowForwardJumps",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-all-buttons",mode:"boolean"})],yv.prototype,"hideAllButtons",void 0),(0,C.Cg)([(0,l.attr)({attribute:"hide-tabs",mode:"boolean"})],yv.prototype,"hideTabs",void 0),(0,C.Cg)([l.attr],yv.prototype,"orientation",void 0),(0,C.Cg)([l.attr],yv.prototype,"activeid",void 0),(0,C.Cg)([l.observable],yv.prototype,"tabs",void 0),(0,C.Cg)([l.observable],yv.prototype,"tabpanels",void 0),(0,C.Cg)([l.observable],yv.prototype,"validation",void 0),(0,C.Cg)([l.observable],yv.prototype,"progressValue",void 0),(0,C.Cg)([l.observable],yv.prototype,"activeTabIndex",void 0),(0,C.Cg)([l.volatile],yv.prototype,"disabledPreviousStep",null),(0,C.Cg)([l.volatile],yv.prototype,"isLastStep",null),(0,C.Cg)([l.volatile],yv.prototype,"islastStepValid",null);const wv=void 0,Cv={},xv=yv.compose(Object.assign({baseName:"stepper",template:fv,styles:bv,shadowOptions:wv},Cv)),$v=()=>Wl().register(jp)},70997(e,t,i){function o(e,t,i){const o=e=>"function"==typeof e?e:()=>e,n=o(t),a=o(i);return(t,i)=>e(t,i)?n(t,i):a(t,i)}i.d(t,{q:()=>o})},80273(e,t,i){i.d(t,{Du:()=>l,IT:()=>s,WP:()=>n,f4:()=>r,zz:()=>a});var o=i(52945);const n=(e,t)=>{(0,o.O5)(e,t)};var a,s;!function(e){e.Italic="italic",e.Normal="normal"}(a||(a={})),function(e){e[e.Thin=100]="Thin",e[e.Light=300]="Light",e[e.Regular=400]="Regular",e[e.Medium=500]="Medium",e[e.Bold=700]="Bold",e[e.Black=900]="Black"}(s||(s={}));const r=(e,t=a.Normal,i=s.Regular)=>`\n font-family: ${e};\n font-style: ${t};\n font-weight: ${i};\n`,l={minusOne:-1,minusTwo:-2,plusOne:1,plusTwo:2,plusThree:3,plusFour:4,plusFive:5,plusSix:6}}}]);
6216
+ //# sourceMappingURL=715.8b6022e43599b29ea73a0ae278d09409.js.map