/**
 * @license
 *
 * Copyright IBM Corp. 2019, 2020
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
/**
 * @license
 * 
 * This bundle contains the following third-party dependencies:
 * 
 * lit-element:
 * 
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 * 
 * lit-html:
 * 
 * @license
 * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 * 
 * flatpickr:
 * 
 flatpickr v4.6.1, @license MIT
 * 
 * Also refer to the following links for the license of other third-party dependencies:
 * 
 * https://www.npmjs.com/package/@carbon/icons
 * https://www.npmjs.com/package/lodash-es
 */

import{_ as e}from"./objectSpread2-23ac502c.js";import{c as t,_ as r,L as n,h as o,s as i}from"./settings-33bc82ad.js";import{i as s,f as c}from"./collection-helpers-10ca40d0.js";import{p as a,c as l}from"./decorators-489b6336.js";import{c as d}from"./class-map-144f86a7.js";import{i as h}from"./if-non-null-a6fb6756.js";import{F as b}from"./focus-e60fabbb.js";const f={Left:-1,ArrowLeft:-1,Right:1,ArrowRight:1};let m;!function(e){e.REGULAR="",e.SMALL="sm",e.EXTRA_LARGE="xl"}(m||(m={}));var g=t(['a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{padding:0;border:0;margin:0;font:inherit;font-size:100%;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}input[type=text]::-ms-clear{display:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}body{line-height:1}sup{vertical-align:super}sub{vertical-align:sub}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:""}table{border-collapse:collapse;border-spacing:0}*{box-sizing:border-box}button{margin:0}html{font-size:100%}body{font-weight:400;font-family:IBM Plex Sans,Helvetica Neue,Arial,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}code{font-family:IBM Plex Mono,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace}strong{font-weight:600}@media screen and (-ms-high-contrast:active){svg{fill:ButtonText}}h1{font-size:var(--cds-productive-heading-06-font-size,2.625rem);font-weight:var(--cds-productive-heading-06-font-weight,300);line-height:var(--cds-productive-heading-06-line-height,1.199);letter-spacing:var(--cds-productive-heading-06-letter-spacing,0)}h2{font-size:var(--cds-productive-heading-05-font-size,2rem);font-weight:var(--cds-productive-heading-05-font-weight,400);line-height:var(--cds-productive-heading-05-line-height,1.25);letter-spacing:var(--cds-productive-heading-05-letter-spacing,0)}h3{font-size:var(--cds-productive-heading-04-font-size,1.75rem);font-weight:var(--cds-productive-heading-04-font-weight,400);line-height:var(--cds-productive-heading-04-line-height,1.28572);letter-spacing:var(--cds-productive-heading-04-letter-spacing,0)}h4{font-size:var(--cds-productive-heading-03-font-size,1.25rem);font-weight:var(--cds-productive-heading-03-font-weight,400);line-height:var(--cds-productive-heading-03-line-height,1.4);letter-spacing:var(--cds-productive-heading-03-letter-spacing,0)}h5{font-size:var(--cds-productive-heading-02-font-size,1rem);font-weight:var(--cds-productive-heading-02-font-weight,600);line-height:var(--cds-productive-heading-02-line-height,1.375);letter-spacing:var(--cds-productive-heading-02-letter-spacing,0)}h6{font-size:var(--cds-productive-heading-01-font-size,.875rem);font-weight:var(--cds-productive-heading-01-font-weight,600);line-height:var(--cds-productive-heading-01-line-height,1.28572);letter-spacing:var(--cds-productive-heading-01-letter-spacing,.16px)}p{font-size:var(--cds-body-long-02-font-size,1rem);font-weight:var(--cds-body-long-02-font-weight,400);line-height:var(--cds-body-long-02-line-height,1.5);letter-spacing:var(--cds-body-long-02-letter-spacing,0)}a{color:#0f62fe}em{font-style:italic}@-webkit-keyframes skeleton{0%{opacity:.3;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}20%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:left;transform-origin:left}28%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:right;transform-origin:right}51%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right;transform-origin:right}58%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right;transform-origin:right}82%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:right;transform-origin:right}83%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:left;transform-origin:left}96%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}to{opacity:.3;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}}@keyframes skeleton{0%{opacity:.3;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}20%{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:left;transform-origin:left}28%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:right;transform-origin:right}51%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right;transform-origin:right}58%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:right;transform-origin:right}82%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:right;transform-origin:right}83%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:left;transform-origin:left}96%{-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}to{opacity:.3;-webkit-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:left;transform-origin:left}}.bx--content-switcher,:host(bx-content-switcher){display:flex;width:100%;height:2.5rem;justify-content:space-evenly}.bx--content-switcher--sm,:host(bx-content-switcher[size=sm]){height:2rem}.bx--content-switcher--lg,.bx--content-switcher--xl,:host(bx-content-switcher[size=xl]){height:3rem}.bx--content-switcher-btn{box-sizing:border-box;font-family:inherit;font-size:100%;vertical-align:baseline;font-size:var(--cds-body-short-01-font-size,.875rem);font-weight:var(--cds-body-short-01-font-weight,400);line-height:var(--cds-body-short-01-line-height,1.28572);letter-spacing:var(--cds-body-short-01-letter-spacing,.16px);outline:2px solid transparent;outline-offset:-2px;position:relative;display:inline-flex;overflow:hidden;width:100%;align-items:center;padding:.5rem 1rem;border:none;border-top:.0625rem solid var(--cds-border-inverse,#161616);border-bottom:.0625rem solid var(--cds-border-inverse,#161616);margin:0;background-color:transparent;color:var(--cds-text-secondary,#525252);text-align:left;text-decoration:none;transition:all 70ms cubic-bezier(.2,0,.38,.9);white-space:nowrap}.bx--content-switcher-btn *,.bx--content-switcher-btn :after,.bx--content-switcher-btn :before{box-sizing:inherit}.bx--content-switcher-btn:focus{z-index:3;border-color:var(--cds-focus,#0f62fe);box-shadow:inset 0 0 0 2px var(--cds-focus,#0f62fe),inset 0 0 0 3px var(--cds-focus-inset,#fff)}.bx--content-switcher-btn:hover{color:var(--cds-text-primary,#161616);cursor:pointer}.bx--content-switcher-btn:active,.bx--content-switcher-btn:hover{z-index:3;background-color:var(--cds-layer-hover,#e5e5e5);color:var(--cds-text-primary,#161616)}.bx--content-switcher-btn:disabled{border-color:var(--cds-border-disabled,#f4f4f4);background-color:transparent;color:var(--cds-text-disabled,#c6c6c6)}.bx--content-switcher-btn:disabled:hover{cursor:not-allowed}.bx--content-switcher-btn:disabled:first-child,.bx--content-switcher-btn:disabled:last-child{border-color:var(--cds-border-disabled,#f4f4f4)}.bx--content-switcher-btn:first-child{border-left:.0625rem solid var(--cds-border-inverse,#161616);border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.bx--content-switcher-btn:last-child{border-right:.0625rem solid var(--cds-border-inverse,#161616);border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.bx--content-switcher--selected,.bx--content-switcher--selected:first-child,.bx--content-switcher--selected:last-child{border:0}.bx--content-switcher-btn:before{position:absolute;z-index:2;left:0;display:block;width:.0625rem;height:1rem;background-color:var(--cds-border-subtle,#e0e0e0);content:""}.bx--content-switcher-btn:first-of-type:before{display:none}.bx--content-switcher--selected+.bx--content-switcher-btn:before,.bx--content-switcher--selected:before,.bx--content-switcher-btn:focus+.bx--content-switcher-btn:before,.bx--content-switcher-btn:focus:before,.bx--content-switcher-btn:hover+.bx--content-switcher-btn:before,.bx--content-switcher-btn:hover:before{background-color:transparent}.bx--content-switcher-btn:disabled:before,.bx--content-switcher-btn:disabled:hover+.bx--content-switcher-btn:disabled:before{background-color:var(--cds-border-disabled,#f4f4f4)}.bx--content-switcher-btn.bx--content-switcher--selected:disabled+.bx--content-switcher-btn:before,.bx--content-switcher-btn.bx--content-switcher--selected:disabled:hover+.bx--content-switcher-btn:before{background-color:transparent}.bx--content-switcher__icon{fill:var(--cds-icon-secondary,#525252);transition:fill 70ms cubic-bezier(.2,0,.38,.9)}.bx--content-switcher__icon+span{margin-left:.5rem}.bx--content-switcher__label{overflow:hidden;max-width:100%;text-overflow:ellipsis;white-space:nowrap}.bx--content-switcher-btn:focus .bx--content-switcher__icon,.bx--content-switcher-btn:hover .bx--content-switcher__icon{fill:var(--cds-icon-primary,#161616)}.bx--content-switcher-btn.bx--content-switcher--selected{z-index:3;background-color:var(--cds-layer-selected-inverse,#161616);color:var(--cds-text-inverse,#fff)}.bx--content-switcher-btn.bx--content-switcher--selected:disabled{background-color:var(--cds-layer-selected-disabled,#8d8d8d);color:var(--cds-text-disabled,#c6c6c6)}.bx--content-switcher-btn.bx--content-switcher--selected .bx--content-switcher__icon{fill:var(--cds-icon-inverse,#fff)}@media (forced-colors:active),(prefers-contrast),screen and (-ms-high-contrast:active){.bx--content-switcher-btn:focus{color:Highlight;outline:1px solid Highlight}}:host(bx-content-switcher-item){width:100%;outline:none}:host(bx-content-switcher-item) .bx--content-switcher-btn{height:100%}:host(bx-content-switcher-item) .bx--content-switcher-btn:first-child,:host(bx-content-switcher-item) .bx--content-switcher-btn:last-child{border-radius:0;border-left:none;border-right:none}:host(bx-content-switcher-item) .bx--content-switcher-btn:before{content:"";display:block;height:1rem;width:.0625rem;background-color:var(--cds-ui-03,#e0e0e0);position:absolute;z-index:2;left:0}:host(bx-content-switcher-item) .bx--content-switcher-btn.bx--content-switcher--selected:before,:host(bx-content-switcher-item) .bx--content-switcher-btn:focus:before,:host(bx-content-switcher-item) .bx--content-switcher-btn:hover:before{background-color:transparent}:host(bx-content-switcher-item) .bx--content-switcher-btn:disabled{border-top-color:var(--cds-ui-05,#161616);border-bottom-color:var(--cds-ui-05,#161616)}:host(bx-content-switcher-item[hide-divider]) .bx--content-switcher-btn:before{background-color:transparent}:host(bx-content-switcher-item:first-of-type) .bx--content-switcher-btn{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem;border-left:.0625rem solid var(--cds-ui-05,#161616)}:host(bx-content-switcher-item:first-of-type) .bx--content-switcher-btn:before{content:none}:host(bx-content-switcher-item:first-of-type) .bx--content-switcher-btn.bx--content-switcher--selected{border-left:none}:host(bx-content-switcher-item:last-of-type) .bx--content-switcher-btn{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem;border-right:.0625rem solid var(--cds-ui-05,#161616)}:host(bx-content-switcher-item:last-of-type) .bx--content-switcher-btn.bx--content-switcher--selected{border-right:none}']);let u;const{prefix:v}=i;let w,p=r([l(`${v}-content-switcher`)],function(t,r){return{F:class extends r{constructor(...e){super(...e),t(this)}},d:[{kind:"method",key:"_handleHover",value:function({target:e,type:t}){const{selectorItem:r}=this.constructor,n=this.querySelectorAll(r),o="mouseover"!==t?-1:s(n,e.closest(r)),i=o<0?o:o+1;c(this.querySelectorAll(r),(e,t)=>{e.hideDivider=t===i})}},{kind:"method",key:"_getNextItem",value:function(e,t){const r=this.querySelectorAll(this.constructor.selectorItemEnabled),n=s(r,e),o=((e,t)=>e<0?t-1:e>=t?0:e)(n+t,r.length);return o===n?null:r[o]}},{kind:"method",key:"_handleClick",value:function({target:e}){this._handleUserInitiatedSelectItem(e)}},{kind:"method",key:"_handleKeydown",value:function({key:e}){e in f&&this._navigate(f[e])}},{kind:"method",key:"_handleUserInitiatedSelectItem",value:function(t){if(!t.disabled&&t.value!==this.value){const r={bubbles:!0,composed:!0,detail:{item:t}},n=this.constructor,o=new CustomEvent(n.eventBeforeSelect,e(e({},r),{},{cancelable:!0}));if(this.dispatchEvent(o)){this._selectionDidChange(t);const e=new CustomEvent(n.eventSelect,r);this.dispatchEvent(e)}}}},{kind:"method",key:"_navigate",value:function(e){const{selectorItemSelected:t}=this.constructor,r=this._getNextItem(this.querySelector(t),e);r&&(this._handleUserInitiatedSelectItem(r),this.requestUpdate())}},{kind:"method",key:"_selectionDidChange",value:function(e){this.value=e.value,c(this.querySelectorAll(this.constructor.selectorItemSelected),e=>{e.selected=!1}),e.selected=!0,Promise.resolve().then(()=>{e.focus()})}},{kind:"field",decorators:[a({reflect:!0})],key:"value",value:()=>""},{kind:"field",decorators:[a({reflect:!0})],key:"size",value:()=>m.REGULAR},{kind:"method",key:"shouldUpdate",value:function(e){if(e.has("value")){const{selectorItem:e}=this.constructor;c(this.querySelectorAll(e),e=>{e.selected=e.value===this.value})}return!0}},{kind:"get",static:!0,key:"selectorItem",value:function(){return`${v}-content-switcher-item`}},{kind:"get",static:!0,key:"selectorItemEnabled",value:function(){return`${v}-content-switcher-item:not([disabled])`}},{kind:"get",static:!0,key:"selectorItemSelected",value:function(){return`${v}-content-switcher-item[selected]`}},{kind:"get",static:!0,key:"eventBeforeSelect",value:function(){return`${v}-content-switcher-beingselected`}},{kind:"get",static:!0,key:"eventSelect",value:function(){return`${v}-content-switcher-selected`}},{kind:"method",key:"render",value:function(){const{_handleHover:e,_handleKeydown:t}=this;return o(u||(u=(e=>e)` <slot @click="${0}" @keydown="${0}" @mouseover="${0}" @mouseout="${0}"></slot> `),this._handleClick,t,e,e)}},{kind:"field",static:!0,key:"styles",value:()=>g}]}},n);const{prefix:x}=i;let k=r([l(`${x}-content-switcher-item`)],function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[a({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[a({type:Boolean,reflect:!0,attribute:"hide-divider"})],key:"hideDivider",value:()=>!1},{kind:"field",decorators:[a({type:Boolean,reflect:!0})],key:"selected",value:()=>!1},{kind:"field",decorators:[a()],key:"target",value:void 0},{kind:"field",decorators:[a()],key:"value",value:()=>""},{kind:"method",key:"createRenderRoot",value:function(){var e;return this.attachShadow({mode:"open",delegatesFocus:Number((null!==(e=/Safari\/(\d+)/.exec(navigator.userAgent))&&void 0!==e?e:["",0])[1])<=537})}},{kind:"method",key:"shouldUpdate",value:function(e){if(e.has("selected")||e.has("target")){const{selected:e,target:t}=this;if(t){const r=this.getRootNode(),n=r.getElementById&&r.getElementById(t);n&&n.toggleAttribute("hidden",!e)}}return!0}},{kind:"method",key:"render",value:function(){const{disabled:e,selected:t,target:r}=this,n=d({[`${x}--content-switcher-btn`]:!0,[`${x}--content-switcher--selected`]:t});return o(w||(w=(e=>e)` <button type="button" role="tab" class="${0}" ?disabled="${0}" tabindex="${0}" aria-controls="${0}" aria-selected="${0}"> <span class="${0}--content-switcher__label"><slot></slot></span> </button> `),n,e,t?"0":"-1",h(r),Boolean(t),x)}},{kind:"field",static:!0,key:"styles",value:()=>g}]}},b(n));export{p as B,f as N,k as a};
