wcs-core 2.9.0 → 2.12.0

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.
Files changed (98) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{popper-5777994b.js → popper-8cf375ec.js} +130 -71
  3. package/dist/cjs/wcs-accordion-content.cjs.entry.js +19 -0
  4. package/dist/cjs/wcs-accordion-header.cjs.entry.js +16 -0
  5. package/dist/cjs/wcs-accordion-panel.cjs.entry.js +31 -0
  6. package/dist/cjs/wcs-accordion.cjs.entry.js +36 -0
  7. package/dist/cjs/wcs-button.cjs.entry.js +1 -1
  8. package/dist/cjs/wcs-com-nav-category.cjs.entry.js +1 -1
  9. package/dist/cjs/wcs-com-nav-submenu.cjs.entry.js +2 -2
  10. package/dist/cjs/wcs-com-nav.cjs.entry.js +24 -2
  11. package/dist/cjs/wcs-dropdown.cjs.entry.js +4 -2
  12. package/dist/cjs/wcs-error_2.cjs.entry.js +6 -9
  13. package/dist/cjs/wcs-galactic-menu.cjs.entry.js +1 -1
  14. package/dist/cjs/wcs-horizontal-stepper.cjs.entry.js +13 -10
  15. package/dist/cjs/wcs-mat-icon.cjs.entry.js +1 -1
  16. package/dist/cjs/wcs-modal.cjs.entry.js +6 -2
  17. package/dist/cjs/wcs-select_2.cjs.entry.js +2790 -2577
  18. package/dist/cjs/wcs-tooltip.cjs.entry.js +11 -4
  19. package/dist/cjs/wcs.cjs.js +1 -1
  20. package/dist/collection/collection-manifest.json +4 -0
  21. package/dist/collection/components/accordion/accordion.js +38 -0
  22. package/dist/collection/components/accordion-content/accordion-content.css +4 -0
  23. package/dist/collection/components/accordion-content/accordion-content.js +15 -0
  24. package/dist/collection/components/accordion-header/accordion-header.js +9 -0
  25. package/dist/collection/components/accordion-panel/accordion-panel.css +35 -0
  26. package/dist/collection/components/accordion-panel/accordion-panel.js +89 -0
  27. package/dist/collection/components/button/button.css +12 -4
  28. package/dist/collection/components/com-nav/com-nav.css +68 -10
  29. package/dist/collection/components/com-nav/com-nav.js +34 -5
  30. package/dist/collection/components/com-nav-category/com-nav-category.css +70 -45
  31. package/dist/collection/components/com-nav-submenu/com-nav-submenu.css +123 -72
  32. package/dist/collection/components/com-nav-submenu/com-nav-submenu.js +1 -1
  33. package/dist/collection/components/dropdown/dropdown.js +3 -1
  34. package/dist/collection/components/form-field/form-field.js +6 -9
  35. package/dist/collection/components/horizontal-stepper/horizontal-stepper.js +14 -11
  36. package/dist/collection/components/input/input.js +1 -1
  37. package/dist/collection/components/mat-icon/mat-icon.css +3 -1
  38. package/dist/collection/components/modal/modal.css +16 -29
  39. package/dist/collection/components/modal/modal.js +25 -4
  40. package/dist/collection/components/select/select.js +2 -0
  41. package/dist/collection/components/tooltip/tooltip.js +28 -2
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/{popper-5f42e560.js → popper-548df79b.js} +130 -71
  44. package/dist/esm/wcs-accordion-content.entry.js +15 -0
  45. package/dist/esm/wcs-accordion-header.entry.js +12 -0
  46. package/dist/esm/wcs-accordion-panel.entry.js +27 -0
  47. package/dist/esm/wcs-accordion.entry.js +32 -0
  48. package/dist/esm/wcs-button.entry.js +1 -1
  49. package/dist/esm/wcs-com-nav-category.entry.js +1 -1
  50. package/dist/esm/wcs-com-nav-submenu.entry.js +2 -2
  51. package/dist/esm/wcs-com-nav.entry.js +25 -3
  52. package/dist/esm/wcs-dropdown.entry.js +4 -2
  53. package/dist/esm/wcs-error_2.entry.js +6 -9
  54. package/dist/esm/wcs-galactic-menu.entry.js +1 -1
  55. package/dist/esm/wcs-horizontal-stepper.entry.js +13 -10
  56. package/dist/esm/wcs-mat-icon.entry.js +1 -1
  57. package/dist/esm/wcs-modal.entry.js +6 -2
  58. package/dist/esm/wcs-select_2.entry.js +2790 -2577
  59. package/dist/esm/wcs-tooltip.entry.js +11 -4
  60. package/dist/esm/wcs.js +1 -1
  61. package/dist/types/components/accordion/accordion.d.ts +12 -0
  62. package/dist/types/components/accordion-content/accordion-content.d.ts +3 -0
  63. package/dist/types/components/accordion-header/accordion-header.d.ts +3 -0
  64. package/dist/types/components/accordion-panel/accordion-panel.d.ts +8 -0
  65. package/dist/types/components/com-nav/com-nav.d.ts +7 -0
  66. package/dist/types/components/input/input-interface.d.ts +1 -1
  67. package/dist/types/components/modal/modal.d.ts +4 -0
  68. package/dist/types/components/tooltip/tooltip.d.ts +12 -0
  69. package/dist/types/components.d.ts +72 -0
  70. package/dist/wcs/p-055c20de.entry.js +1 -0
  71. package/dist/wcs/p-0bb5f03a.entry.js +1 -0
  72. package/dist/wcs/p-19e6600c.entry.js +15 -0
  73. package/dist/wcs/p-2507b398.entry.js +1 -0
  74. package/dist/wcs/p-4f15e5f6.entry.js +1 -0
  75. package/dist/wcs/{p-ecbe5165.entry.js → p-600d4d99.entry.js} +2 -2
  76. package/dist/wcs/{p-22813c8e.entry.js → p-66e74651.entry.js} +1 -1
  77. package/dist/wcs/p-706d195a.entry.js +1 -0
  78. package/dist/wcs/{p-4e9e226d.entry.js → p-b69840d6.entry.js} +1 -1
  79. package/dist/wcs/p-bcf381a2.entry.js +1 -0
  80. package/dist/wcs/p-c295cfca.entry.js +1 -0
  81. package/dist/wcs/p-cf77e1d9.entry.js +1 -0
  82. package/dist/wcs/p-d45c7c63.entry.js +1 -0
  83. package/dist/wcs/p-df5baf36.entry.js +1 -0
  84. package/dist/wcs/p-e4fdcd1f.js +1 -0
  85. package/dist/wcs/{p-ff6d0dfd.entry.js → p-f00ef24c.entry.js} +1 -1
  86. package/dist/wcs/p-f43213f5.entry.js +1 -0
  87. package/dist/wcs/wcs.esm.js +1 -1
  88. package/package.json +9 -5
  89. package/CHANGELOG.md +0 -269
  90. package/dist/wcs/p-08a7e84d.entry.js +0 -1
  91. package/dist/wcs/p-1f5aed36.entry.js +0 -1
  92. package/dist/wcs/p-7c26f650.entry.js +0 -1
  93. package/dist/wcs/p-8864a491.entry.js +0 -1
  94. package/dist/wcs/p-94a31f64.entry.js +0 -1
  95. package/dist/wcs/p-b5ffbea8.entry.js +0 -1
  96. package/dist/wcs/p-c7d6d3e1.entry.js +0 -15
  97. package/dist/wcs/p-d3c9a644.js +0 -1
  98. package/dist/wcs/p-db68379f.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as r,g as e}from"./p-f46e6c3c.js";let i=class{constructor(s){t(this,s)}render(){return s(r,{slot:"error"},s("slot",null))}};i.style=":host{margin-top:0.25rem;color:var(--wcs-red)}";let o=class{constructor(s){t(this,s),this.isError=!1,this.hasPrefix=!1,this.hasSuffix=!1}componentWillLoad(){this.hasSuffix=null!==this.el.querySelector("wcs-button"),this.hasPrefix=null!==this.el.querySelector("wcs-select")}componentDidLoad(){this.initSpiedElement(),this.addRequiredMarkerToLabel(),this.updateErrorStateOnInput(this.isError)}isErrorChange(t){this.updateErrorStateOnInput(t)}updateErrorStateOnInput(t){this.spiedElementIsOfType("wcs-input","wcs-textarea")&&this.spiedElement.setAttribute("state",t?"error":"initial")}spiedElementIsOfType(...t){var s;for(const r of t)if((null===(s=this.spiedElement)||void 0===s?void 0:s.tagName)===r.toUpperCase())return!0;return!1}addRequiredMarkerToLabel(){var t;const s=this.el.querySelector("wcs-label");this.observer=new MutationObserver((t=>{var r;t.filter((t=>"required"===t.attributeName))[0]&&this.updateLabelRequiredFlag(null===(r=this.spiedElement)||void 0===r?void 0:r.hasAttribute("required"),s)})),this.spiedElement&&this.observer.observe(this.spiedElement,{attributes:!0});const r=null===(t=this.spiedElement)||void 0===t?void 0:t.hasAttribute("required");this.updateLabelRequiredFlag(r,s)}initSpiedElement(){var t;const s=["wcs-input","wcs-select","wcs-textarea","wcs-radio-group","wcs-switch","wcs-checkbox"];if(this.spiedElement=null===(t=this.el.shadowRoot.querySelector("slot:not([name])"))||void 0===t?void 0:t.assignedElements()[0],"SLOT"===this.spiedElement.tagName&&(this.spiedElement=this.spiedElement.assignedElements().filter((t=>-1!==s.map((t=>t.toUpperCase())).indexOf(t.nodeName)))[0]),!this.spiedElement)throw new Error("You must provide a slotted element in form field");-1===s.map((t=>t.toUpperCase())).indexOf(this.spiedElement.tagName)&&console.warn("form-field component support "+s.toString()+". Some features may not work with the provided component (component "+this.spiedElement.tagName+" not natively supported).")}updateLabelRequiredFlag(t,s){t&&s?s.setAttribute("required","true"):!t&&s&&s.removeAttribute("required")}disconnectedCallback(){this.observer.disconnect()}render(){let t="";const e=this.isError;return this.hasSuffix&&(t+=" has-suffix"),this.hasPrefix&&(t+=" has-prefix"),s(r,{class:t},s("slot",{name:"label"}),s("div",{class:"input-container"},s("slot",{name:"prefix"}),s("slot",{onSlotchange:()=>this.onFormInputSlotChange()}),s("slot",{name:"suffix"})),e?s("slot",{name:"error"}):"",s("slot",{name:"messages"}))}onFormInputSlotChange(){this.initSpiedElement(),this.addRequiredMarkerToLabel(),this.updateErrorStateOnInput(this.isError)}get el(){return e(this)}static get watchers(){return{isError:["isErrorChange"]}}};o.style=":host{--wcs-form-field-border-radius-left:var(--wcs-border-radius);--wcs-form-field-border-radius-right:var(--wcs-border-radius);display:flex;flex-direction:column}.input-container{display:flex}::slotted(wcs-radio-group){margin-left:var(--wcs-base-margin)}::slotted(wcs-radio-group[mode=option]){margin-left:0}::slotted(wcs-select:not([slot=prefix])){width:100%}::slotted(label){font-weight:500;margin-bottom:8px}:host(.has-prefix){--wcs-input-border-radius-left:0}:host(.has-suffix){--wcs-input-border-radius-right:0}::slotted([slot=prefix]){--wcs-select-border-radius:var(--wcs-border-radius) 0 0 var(--wcs-border-radius);--wcs-select-background-color:var(--wcs-gray-light);--wcs-select-value-color:var(--wcs-white);--wcs-select-placeholder-color:var(--wcs-white);--wcs-select-border-color:var(--wcs-gray-light)}::slotted([slot=suffix]){--wcs-button-border-radius:0 var(--wcs-border-radius) var(--wcs-border-radius) 0}";export{i as wcs_error,o as wcs_form_field}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as o,H as i,g as n}from"./p-f46e6c3c.js";let s=class{constructor(o){t(this,o),this.wcsCategoryOpened=e(this,"wcsCategoryOpened",7),this.wcsCategoryItemClicked=e(this,"wcsCategoryItemClicked",7),this.categoryOpen=!1}onWindowClickEvent(t){this.categoryOpen&&(this.categoryOpen=!1)}onSubmenuOpened(t){t.detail.categoryElement!==this.el&&(this.categoryOpen=!1)}async close(){this.categoryOpen=!1}async open(){this.categoryOpen=!0}onClick(t){t.stopPropagation(),this.wcsCategoryOpened.emit({categoryElement:this.el})}handleItemClick(t){"A"===t.target.tagName&&(this.close(),this.wcsCategoryItemClicked.emit(t))}render(){return o(i,{onClick:t=>this.onClick(t)},o("div",{class:"label-container","data-open":this.categoryOpen,onClick:()=>this.categoryOpen=!this.categoryOpen},o("span",{class:"label"},this.label)),o("div",{class:"item-container","data-open":this.categoryOpen,onClick:t=>this.handleItemClick(t)},o("slot",null)))}get el(){return n(this)}};s.style=':host{display:block}:host .item-container:not([data-open]){display:none}:host .label:after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host .label-container{cursor:pointer;user-select:none;display:flex;align-items:center}:host .label-container[data-open]:after{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8 - 0.5625rem);z-index:2;display:block;width:1.125rem;height:1.125rem;content:"";background-color:var(--wcs-primary);transform:rotate(45deg)}:host .item-container[data-open]{position:absolute;left:calc(50% + var(--wcs-com-content-max-width) / 8);top:0;right:0;padding:50px 0 50px 50px;background-blend-mode:multiply;background-color:rgba(0, 0, 0, 0.15);box-sizing:border-box;height:100%;display:flex;flex-direction:column;align-items:start}:host .item-container[data-open] ::slotted(a:not(:first-child)){margin-top:24px}:host .item-container[data-open] ::slotted(a):after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host .item-container[data-open] ::slotted(a){cursor:pointer;text-decoration:none;font-size:16px;color:var(--wcs-white)}';export{s as wcs_com_nav_category}
@@ -1 +0,0 @@
1
- import{r as o,c as s,h as a,H as t}from"./p-f46e6c3c.js";let i=class{constructor(a){o(this,a),this.wcsDialogClosed=s(this,"wcsDialogClosed",7),this.withoutBackdrop=!1,this.show=!1,this.showCloseButton=!1,this.size="m"}render(){return a(t,null,a("div",{class:"wcs-modal-backdrop"}),a("div",{class:"wcs-modal-container","data-size":this.size},a("div",{class:"wcs-modal-header"},a("h5",null,a("slot",{name:"header"})),this.showCloseButton&&a("wcs-button",{shape:"round",mode:"clear",class:"wcs-dark",onClick:o=>this.onCloseButtonClick(o)},a("i",{class:"material-icons"},"close"))),a("div",{class:"wcs-modal-content"},a("slot",null)),a("div",{class:"wcs-modal-actions"},a("slot",{name:"actions"}))))}onKeyDown(o){this.showCloseButton&&"Escape"===o.key&&this.close()}onCloseButtonClick(o){this.close()}close(){this.show=!1,this.wcsDialogClosed.emit()}};i.style="wcs-modal{--saas-fix-modal:rgba(var(--wcs-black), 0.5);z-index:999;position:fixed;top:0;bottom:0;left:0;right:0;display:none}wcs-modal[show]{display:block;width:100%;height:100%;opacity:1;display:block}wcs-modal[without-backdrop] .wcs-modal-backdrop{display:none}wcs-modal[without-backdrop] .wcs-modal-container{border:solid 1px var(--wcs-text-light)}.wcs-modal-backdrop{display:block;position:fixed;top:0;left:0;bottom:0;right:0;opacity:0.4;background-color:var(--wcs-black)}.wcs-modal-container{position:fixed;top:50%;left:50%;box-sizing:border-box;max-width:100%;transform:translate(-50%, -50%);pointer-events:auto;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0, 0, 0, 0.2);border-radius:0.4375rem;outline:0;z-index:20000;display:block;padding:1.375rem 1.875rem 1.875rem 1.875rem}.wcs-modal-container[data-size=s]{width:288px}.wcs-modal-container[data-size=m]{width:480px}.wcs-modal-container[data-size=l]{width:864px}.wcs-modal-container[data-size=xl]{width:1200px}.wcs-modal-header{margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}.wcs-modal-header h5{font-size:24px;font-weight:400;margin:0}.wcs-modal-content{font-weight:400;font-size:16px}.wcs-modal-actions{margin-top:20px;float:right}";export{i as wcs_modal}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as n,H as o,g as i}from"./p-f46e6c3c.js";let s=class{constructor(n){t(this,n),this.wcsSubmenuOpened=e(this,"wcsSubmenuOpened",7),this.menuOpen=!1}onWindowClickEvent(t){this.menuOpen&&(this.menuOpen=!1)}onSubmenuOpened(t){t.detail.menuElement!==this.el&&(this.menuOpen=!1)}async close(){this.menuOpen=!1}async open(){this.menuOpen=!0}onClick(t){t.stopPropagation(),this.wcsSubmenuOpened.emit({menuElement:this.el})}handleMenuItemsClick(t){"A"===t.target.tagName&&this.close()}wcsCategoryItemClickedHandler(t){this.close()}render(){return n(o,{onClick:t=>this.onClick(t)},n("div",{onClick:()=>this.menuOpen=!this.menuOpen,class:"menu-button"},n("span",{class:"label"},this.label),n("span",{class:"arrow-container"},n("span",{class:"arrow-icon","data-open":this.menuOpen},""))),n("div",{class:"drawer","data-open":this.menuOpen},n("div",{class:"drawer-container"},n("div",{class:"drawer-content"},n("div",null,n("h3",null,this.panelTitle),n("p",null,this.panelDescription)),n("div",{class:"menu-items",onClick:t=>this.handleMenuItemsClick(t)},n("slot",null))))))}get el(){return i(this)}};s.style=':host{display:block;height:100%}:host .menu-button{display:flex;align-items:center;height:100%;cursor:pointer;user-select:none}:host .label{font-size:16px;cursor:pointer;font-weight:500;color:var(--wcs-gray);text-decoration:none}:host .arrow-icon{display:inline-block;font-family:icons;font-size:0.6rem;line-height:1;box-sizing:border-box}:host .arrow-icon:not([data-open]){transform:rotate(90deg)}:host .arrow-icon[data-open]{transform:rotate(-90deg)}:host .arrow-container{margin-left:var(--wcs-base-margin)}:host .drawer{display:none;position:absolute;top:75px;z-index:8888;left:0;width:100%;box-sizing:border-box;padding:50px;background-color:var(--wcs-primary);color:var(--wcs-white)}:host .drawer-content{display:flex;justify-content:space-between;max-width:62.5%;flex:1}:host .drawer-content div:first-child{flex:0.8}:host .drawer-content div{max-width:260px}:host .menu-items{padding:0 80px 0 50px;display:flex;flex-direction:column;align-items:flex-end}:host .menu-items ::slotted(*:not(:first-child)){margin-top:24px}:host .menu-items ::slotted(a):after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}:host .menu-items ::slotted(a){user-select:none;cursor:pointer;text-decoration:none;font-size:16px;color:var(--wcs-white)}:host .drawer-container{display:flex;max-width:var(--wcs-com-content-max-width);margin:0 auto}:host .drawer-container h3{margin:0 0 24px 0;font-size:1.5rem;line-height:1.25;font-weight:400}:host .drawer-container p{margin-top:0;margin-bottom:1rem;font-weight:500;font-size:1rem;line-height:1.375}:host .drawer[data-open]{display:block}';export{s as wcs_com_nav_submenu}
@@ -1 +0,0 @@
1
- import{h as t,r as s,c as e,H as i,g as a}from"./p-f46e6c3c.js";const r=({step:s,checkOnComplete:e,complete:i,passed:a,active:r,first:o,disable:l,onClick:c})=>t("div",{class:"graphic-step","data-first":o},o?null:t("wcs-progress-bar",{value:a?100:0}),t("wcs-button",{style:{backgroundColor:"white"},shape:"round",onClick:()=>c(s),mode:!r&&!i||s.disable?"stroked":"plain",disabled:l},n(s.button,e,i,r))),n=(s,e,i,a)=>{if(e&&i&&!a)return t("wcs-mat-icon",{size:"m",icon:"done",family:"outlined"});switch(s.kind){case"Icon":return t("wcs-mat-icon",{size:"m",icon:s.iconName,family:s.family?s.family:"outlined"});case"Text":return s.text}};let o=class{constructor(t){s(this,t),this.wcsHorizontalStepClick=e(this,"wcsHorizontalStepClick",7),this.currentStep=0,this.mode="nonLinear",this.buttonMode="stroked"}componentWillLoad(){if(this.internalCurrentStep=this.currentStep,this.steps.length<1)throw new Error("You must add at least one step")}onCurrentStepChange(t,s){const e=Math.abs(s-t);if(this.el.style.setProperty("--wcs-progress-bar-animation-duration",375/e+"ms"),t!==s)for(let i=0;i<e;i++)setTimeout((()=>{this.internalCurrentStep-=s-t>0?1:-1,i===e-1&&this.el.style.removeProperty("--wcs-progress-bar-animation-duration")}),i*(375/e))}async previous(){this.navigateToIndex(this.internalCurrentStep-1,"backward")}async next(){this.navigateToIndex(this.internalCurrentStep+1,"forward")}navigateToIndex(t,s){var e,i;t>=0&&t<=this.steps.length-1&&((null===(e=this.steps[t])||void 0===e?void 0:e.complete)||(null===(i=this.steps[t])||void 0===i?void 0:i.disable)?this.navigateToIndex(t+("forward"===s?1:-1),s):this.currentStep=t)}render(){return t(i,null,t("div",{class:"steps"},this.steps.map(((s,e)=>t(r,{step:s,passed:e<=this.internalCurrentStep,checkOnComplete:this.checkOnComplete,complete:this.isComplete(s,e),active:e===this.internalCurrentStep,first:0===e,disable:this.isDisable(s,e),onClick:t=>this.wcsHorizontalStepClick.emit({step:t,index:e})})))),this.renderLabels())}isComplete(t,s){return s<=this.internalCurrentStep||t.complete}renderLabels(){return this.steps.map((t=>t.text)).every((t=>!t))?null:t("div",{class:"label-container"},this.steps.map(((s,e)=>t("div",{"data-first":0===e,"data-current":e===this.internalCurrentStep&&!s.disable,"data-disable":this.isDisable(s,e),"data-last":e===this.steps.length-1},t("span",null,s.text)))))}isDisable(t,s){return t.disable||"linear"===this.mode&&!this.isNextPossibleStep(s)&&this.internalCurrentStep<s}isNextPossibleStep(t){var s;return 0===t||((null===(s=this.steps[t-1])||void 0===s?void 0:s.disable)||this.previousStepIsCompleteAndNotActive(t)?this.isNextPossibleStep(t-1):this.internalCurrentStep===t-1)}previousStepIsCompleteAndNotActive(t){var s;return(null===(s=this.steps[t-1])||void 0===s?void 0:s.complete)&&t-1!==this.internalCurrentStep}get el(){return a(this)}static get watchers(){return{currentStep:["onCurrentStepChange"]}}};o.style=":host{display:block}:host .steps{display:flex;flex-direction:row;flex:1}:host .graphic-step{display:flex;flex-direction:row;flex:1;align-items:center}:host .graphic-step[data-first]{flex:0}:host wcs-progress-bar{--wcs-internal-progress-bar-border-radius:0;flex:1;margin:0 -1px}:host .label-container{justify-content:space-between;display:flex;flex-direction:row;margin-top:var(--wcs-base-margin)}:host .label-container>*{width:100%;text-align:center;flex:1;color:var(--wcs-text-medium);font-weight:500}:host .label-container>*[data-disable]{color:var(--wcs-text-light)}:host .label-container>*[data-current]{color:var(--wcs-primary)}:host .label-container>div[data-first]{margin-left:20px;text-align:left;flex:0.5}:host .label-container>div[data-first]>span{margin-left:-20px}:host .label-container>div[data-last]{margin-right:20px;text-align:right;flex:0.5}:host .label-container>div[data-last]>span{margin-right:-20px}";export{o as wcs_horizontal_stepper}
@@ -1 +0,0 @@
1
- import{r as t,h as o,H as s,g as i}from"./p-f46e6c3c.js";import{S as r}from"./p-7219c04b.js";import{c as e}from"./p-cf4d7a83.js";import{c as p}from"./p-d3c9a644.js";let a=class{constructor(o){t(this,o),this.noArrow=!1,this.mode="stroked",this.shape="normal",this.disabled=!1,this.placement="bottom-end",this.expanded=!1}placementChange(){this.popper.setOptions(Object.assign(Object.assign({},this.popper.state.options),{placement:this.placement})).then((()=>this.popper.update()))}componentDidLoad(){const t=this.el.shadowRoot.querySelector("wcs-button"),o=t.shadowRoot.querySelector("button");this.buttonTextColor=window.getComputedStyle(o).color;const s=this.el.shadowRoot.querySelector(".popover");this.popper=p(t,s,{placement:this.placement,modifiers:[{name:"offset",options:{offset:[0,8]}}]}),this.el.shadowRoot.querySelector(".arrow").style.fill=this.buttonTextColor,this.fixForFirefoxBelow63()}fixForFirefoxBelow63(){const t=this.el.querySelectorAll("wcs-dropdown-item"),o=this.el.querySelector(".container");t.length>0&&o&&t.forEach((t=>{this.el.removeChild(t),o.appendChild(t)}))}onButtonClick(t){this.expanded=!this.expanded}onWindowClickEvent(t){const o=e(t,this.el);this.expanded&&!o&&(this.expanded=!1)}dropdownItemClick(t){this.expanded=!1}componentDidRender(){this.popper&&this.popper.update(),this.noArrow||(this.el.shadowRoot.querySelector(".arrow").style.fill=this.buttonTextColor)}render(){return o(s,null,o("wcs-button",{mode:this.mode,shape:this.shape,disabled:this.disabled,onClick:t=>this.onButtonClick(t)},o("div",{class:"wcs-button-content-wrapper"},o("slot",{name:"placeholder"}),this.noArrow?null:o(r,{up:this.expanded}))),o("div",{class:(this.expanded?"show ":"")+"popover"},o("div",{id:"arrow","data-popper-arrow":!0}),o("div",{class:"container"},o("slot",{name:"item"}))))}get el(){return i(this)}static get watchers(){return{placement:["placementChange"]}}};a.style=':host{display:flex}wcs-button{--wcs-button-padding:8px 10px 8px 16px !important}:host([no-arrow]) wcs-button{--wcs-button-padding:8px 16px 8px 16px !important}:host([shape=small]) wcs-button{--wcs-button-padding:2px 10px 2px 16px !important}:host([shape=small][no-arrow]) wcs-button{--wcs-button-padding:2px 16px 2px 16px !important}.wcs-button-content-wrapper{display:flex}.popover{display:none;border:1px solid #d7d7d7;border-radius:var(--wcs-border-radius);background-color:var(--wcs-white);z-index:9999}.show{display:block}.container{border-radius:inherit;overflow:hidden;padding:calc(var(--wcs-padding) / 2) 0;background-color:var(--wcs-white)}#arrow,#arrow::before{position:absolute;width:8px;height:8px;background:inherit;border:solid 1px #d7d7d7}#arrow{visibility:hidden;z-index:-1}#arrow::before{visibility:visible;content:"";transform:rotate(45deg)}.popover[data-popper-placement^=top]>#arrow{bottom:-5px}.popover[data-popper-placement^=bottom]>#arrow{top:-6px}.popover[data-popper-placement^=left]>#arrow{right:-4px}.popover[data-popper-placement^=right]>#arrow{left:-6px}';export{a as wcs_dropdown}
@@ -1,15 +0,0 @@
1
- import{h as t,r,c as i,H as e,g as n}from"./p-f46e6c3c.js";import{l as o}from"./p-adef7aaf.js";import{S as s}from"./p-7219c04b.js";import{b as c}from"./p-cf4d7a83.js";import{M as a}from"./p-16dfbae8.js";
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var u=function(){return(u=Object.assign||function(t){for(var r,i=1,e=arguments.length;i<e;i++)for(var n in r=arguments[i])Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n]);return t}).apply(this,arguments)};function l(t,r){var i={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(i[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(e=Object.getOwnPropertySymbols(t);n<e.length;n++)r.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(i[e[n]]=t[e[n]])}return i}function f(t){var r="function"==typeof Symbol&&Symbol.iterator,i=r&&t[r],e=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,r){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var e,n,o=i.call(t),s=[];try{for(;(void 0===r||r-- >0)&&!(e=o.next()).done;)s.push(e.value)}catch(t){n={error:t}}finally{try{e&&!e.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s}function p(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(d(arguments[r]));return t}var h={};function v(t){return Object.keys(t)}function m(t,r,i){void 0===i&&(i=".");var e=w(t,i),n=w(r,i);return I(n)?!!I(e)&&n===e:I(e)?e in n:v(e).every((function(t){return t in n&&m(e[t],n[t])}))}function y(t){try{return I(t)||"number"==typeof t?""+t:t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function g(t,r){try{return T(t)?t:t.toString().split(r)}catch(r){throw new Error("'"+t+"' is not a valid state path.")}}function w(t,r){return"object"==typeof(i=t)&&"value"in i&&"context"in i&&"event"in i&&"_event"in i?t.value:T(t)?b(t):"string"!=typeof t?t:b(g(t,r));var i}function b(t){if(1===t.length)return t[0];for(var r={},i=r,e=0;e<t.length-1;e++)e===t.length-2?i[t[e]]=t[e+1]:(i[t[e]]={},i=i[t[e]]);return r}function x(t,r){for(var i={},e=v(t),n=0;n<e.length;n++){var o=e[n];i[o]=r(t[o],o,t,n)}return i}function S(t,r,i){var e,n,o={};try{for(var s=f(v(t)),c=s.next();!c.done;c=s.next()){var a=c.value,u=t[a];i(u)&&(o[a]=r(u,a,t))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o}var k=function(t){return function(r){var i,e,n=r;try{for(var o=f(t),s=o.next();!s.done;s=o.next())n=n[s.value]}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return n}};function O(t){return t?I(t)?[[t]]:z(v(t).map((function(r){var i=t[r];return"string"==typeof i||i&&Object.keys(i).length?O(t[r]).map((function(t){return[r].concat(t)})):[[r]]}))):[[]]}function z(t){var r;return(r=[]).concat.apply(r,p(t))}function C(t){return T(t)?t:[t]}function E(t){return void 0===t?[]:C(t)}function j(t,r,i){var e,n;if(L(t))return t(r,i.data);var o={};try{for(var s=f(Object.keys(t)),c=s.next();!c.done;c=s.next()){var a=c.value,u=t[a];o[a]=L(u)?u(r,i.data):u}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return o}function _(t){return t instanceof Promise||!(null===t||!L(t)&&"object"!=typeof t||!L(t.then))}function N(t,r){var i,e,n=d([[],[]],2),o=n[0],s=n[1];try{for(var c=f(t),a=c.next();!a.done;a=c.next()){var u=a.value;r(u)?o.push(u):s.push(u)}}catch(t){i={error:t}}finally{try{a&&!a.done&&(e=c.return)&&e.call(c)}finally{if(i)throw i.error}}return[o,s]}function M(t,r){return x(t.states,(function(t,i){if(t){var e=(I(r)?void 0:r[i])||(t?t.current:void 0);if(e)return{current:e,states:M(t,e)}}}))}function T(t){return Array.isArray(t)}function L(t){return"function"==typeof t}function I(t){return"string"==typeof t}function D(t,r){if(t)return I(t)?{type:"xstate.guard",name:t,predicate:r?r[t]:void 0}:L(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function V(t){try{return"subscribe"in t&&L(t.subscribe)}catch(t){return!1}}var A,P,J=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function U(t){try{return"__xstatenode"in t}catch(t){return!1}}function B(t,r){return I(t)||"number"==typeof t?u({type:t},r):t}function K(t,r){if(!I(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var i=B(t);return u({name:i.type,data:i,$$type:"scxml",type:"external"},r)}function W(t,r){return C(r).map((function(r){return void 0===r||"string"==typeof r||U(r)?{target:r,event:t}:u(u({},r),{event:t})}))}function $(t,r,i,e,n){var o=t.options.guards,s={state:n,cond:r,_event:e};if("xstate.guard"===r.type)return r.predicate(i,e.data,s);var c=o[r.type];if(!c)throw new Error("Guard '"+r.type+"' is not implemented on machine '"+t.id+"'.");return c(i,e.data,s)}function F(t){return"string"==typeof t?{type:t}:t}!function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"}(A||(A={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(P||(P={}));var R=A.Start,H=A.Stop,Y=A.Raise,q=A.Send,G=A.Cancel,Q=A.NullEvent,X=A.Assign,Z=A.Log,tt=A.Invoke,rt=A.ErrorPlatform,it=A.ErrorCustom,et=A.Update,nt=A.Choose,ot=A.Pure,st=K({type:A.Init});function ct(t,r){return r&&r[t]||void 0}function at(t,r){var i;if(I(t)||"number"==typeof t){var e=ct(t,r);i=L(e)?{type:t,exec:e}:e||{type:t,exec:void 0}}else if(L(t))i={type:t.name||t.toString(),exec:t};else if(L(e=ct(t.type,r)))i=u(u({},t),{exec:e});else if(e){var n=e.type||t.type;i=u(u(u({},e),t),{type:n})}else i=t;return Object.defineProperty(i,"toString",{value:function(){return i.type},enumerable:!1,configurable:!0}),i}var ut=function(t,r){return t?(T(t)?t:[t]).map((function(t){return at(t,r)})):[]};function lt(t){var r=at(t);return u(u({id:I(t)?t:r.id},r),{type:r.type})}function ft(t){return I(t)?{type:Y,event:t}:dt(t,{to:P.Internal})}function dt(t,r){return{to:r?r.to:void 0,type:q,event:L(t)?t:B(t),delay:r?r.delay:void 0,id:r&&void 0!==r.id?r.id:L(t)?t.name:y(t)}}function pt(t,r){var i=A.DoneState+"."+t;return{type:i,data:r,toString:function(){return i}}}function ht(t,r){var i=A.DoneInvoke+"."+t;return{type:i,data:r,toString:function(){return i}}}function vt(t,r){var i=A.ErrorPlatform+"."+t;return{type:i,data:r,toString:function(){return i}}}function mt(t,r,i,e,n){var o=d(N(n,(function(t){return t.type===X})),2),s=o[0],c=o[1],a=s.length?function(t,r,i,e){return t?i.reduce((function(t,i){var n,o,s=i.assignment,c={state:e,action:i,_event:r},a={};if(L(s))a=s(t,r.data,c);else try{for(var u=f(v(s)),l=u.next();!l.done;l=u.next()){var d=l.value,p=s[d];a[d]=L(p)?p(t,r.data,c):p}}catch(t){n={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return Object.assign({},t,a)}),t):t}(i,e,s,r):i;return[z(c.map((function(i){var n;switch(i.type){case Y:return{type:Y,_event:K(i.event)};case q:return function(t,r,i,e){var n,o={_event:i},s=K(L(t.event)?t.event(r,i.data,o):t.event);if(I(t.delay)){var c=e&&e[t.delay];n=L(c)?c(r,i.data,o):c}else n=L(t.delay)?t.delay(r,i.data,o):t.delay;var a=L(t.to)?t.to(r,i.data,o):t.to;return u(u({},t),{to:a,_event:s,event:s.data,delay:n})}(i,a,e,t.options.delays);case Z:return function(t,r,i){return u(u({},t),{value:I(t.expr)?t.expr:t.expr(r,i.data,{_event:i})})}(i,a,e);case nt:if(!(s=null===(n=i.conds.find((function(i){var n=D(i.cond,t.options.guards);return!n||$(t,n,a,e,r)})))||void 0===n?void 0:n.actions))return[];var o=mt(t,r,a,e,ut(E(s),t.options.actions));return a=o[1],o[0];case ot:var s;return(s=i.get(a,e.data))?(o=mt(t,r,a,e,ut(E(s),t.options.actions)),a=o[1],o[0]):[];case H:return function(t,r,i){var e=L(t.activity)?t.activity(r,i.data):t.activity;return{type:A.Stop,activity:"string"==typeof e?{id:e}:e}}(i,a,e);default:return at(i,t.options.actions)}}))),a]}var yt=function(t){return"atomic"===t.type||"final"===t.type};function gt(t){return v(t.states).map((function(r){return t.states[r]}))}function wt(t){var r=[t];return yt(t)?r:r.concat(z(gt(t).map(wt)))}function bt(t,r){var i,e,n,o,s,c,a,u,l=St(new Set(t)),d=new Set(r);try{for(var p=f(d),h=p.next();!h.done;h=p.next())for(var v=(O=h.value).parent;v&&!d.has(v);)d.add(v),v=v.parent}catch(t){i={error:t}}finally{try{h&&!h.done&&(e=p.return)&&e.call(p)}finally{if(i)throw i.error}}var m=St(d);try{for(var y=f(d),g=y.next();!g.done;g=y.next())if("compound"!==(O=g.value).type||m.get(O)&&m.get(O).length){if("parallel"===O.type)try{for(var w=(s=void 0,f(gt(O))),b=w.next();!b.done;b=w.next()){var x=b.value;"history"!==x.type&&(d.has(x)||(d.add(x),l.get(x)?l.get(x).forEach((function(t){return d.add(t)})):x.initialStateNodes.forEach((function(t){return d.add(t)}))))}}catch(t){s={error:t}}finally{try{b&&!b.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}}else l.get(O)?l.get(O).forEach((function(t){return d.add(t)})):O.initialStateNodes.forEach((function(t){return d.add(t)}))}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(n)throw n.error}}try{for(var S=f(d),k=S.next();!k.done;k=S.next()){var O;for(v=(O=k.value).parent;v&&!d.has(v);)d.add(v),v=v.parent}}catch(t){a={error:t}}finally{try{k&&!k.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}return d}function xt(t,r){var i=r.get(t);if(!i)return{};if("compound"===t.type){var e=i[0];if(!e)return{};if(yt(e))return e.key}var n={};return i.forEach((function(t){n[t.key]=xt(t,r)})),n}function St(t){var r,i,e=new Map;try{for(var n=f(t),o=n.next();!o.done;o=n.next()){var s=o.value;e.has(s)||e.set(s,[]),s.parent&&(e.has(s.parent)||e.set(s.parent,[]),e.get(s.parent).push(s))}}catch(t){r={error:t}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}return e}function kt(t,r){return xt(t,St(bt([t],r)))}function Ot(t,r){return Array.isArray(t)?t.some((function(t){return t===r})):t instanceof Set&&t.has(r)}function zt(t,r){return"compound"===r.type?gt(r).some((function(r){return"final"===r.type&&Ot(t,r)})):"parallel"===r.type&&gt(r).every((function(r){return zt(t,r)}))}function Ct(t,r){if(t===r)return!0;if(void 0===t||void 0===r)return!1;if(I(t)||I(r))return t===r;var i=v(t),e=v(r);return i.length===e.length&&i.every((function(i){return Ct(t[i],r[i])}))}var Et=function(){function t(t){var r=this;this.actions=[],this.activities=h,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||h,this.meta=t.meta||{},this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,Object.defineProperty(this,"nextEvents",{get:function(){return z(p(new Set(r.configuration.map((function(t){return t.ownEvents})))))}})}return t.from=function(r,i){return r instanceof t?r.context!==i?new t({value:r.value,context:i,_event:r._event,_sessionid:null,historyValue:r.historyValue,history:r.history,actions:[],activities:r.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):r:new t({value:r,context:i,_event:st,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(r){return new t(r)},t.inert=function(r,i){return r instanceof t?r.actions.length?new t({value:r.value,context:i,_event:st,_sessionid:null,historyValue:r.historyValue,history:r.history,activities:r.activities,configuration:r.configuration,transitions:[],children:{}}):r:t.from(r,i)},t.prototype.toStrings=function(t,r){var i=this;if(void 0===t&&(t=this.value),void 0===r&&(r="."),I(t))return[t];var e=v(t);return e.concat.apply(e,p(e.map((function(e){return i.toStrings(t[e],r).map((function(t){return e+r+t}))}))))},t.prototype.toJSON=function(){return l(this,["configuration","transitions"])},t.prototype.matches=function(t){return m(t,this.value)},t}(),jt=function(t,r){return r(t)};function _t(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function Nt(t){return u(u({type:tt},t),{toJSON:function(){var r,i=l(t,["onDone","onError"]);return u(u({},i),{type:tt,src:(r=t.src,"string"==typeof r?{type:r,toString:function(){return r}}:r)})}})}var Mt={},Tt=function(t){return"#"===t[0]},Lt=function(){function t(r,i,e){var n=this;this.config=r,this.context=e,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},i),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||p([this.machine.key],this.path).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&v(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?x(this.config.states,(function(r,i){var e,o=new t(r,{_parent:n,_key:i});return Object.assign(n.idMap,u(((e={})[o.id]=o,e),o.idMap)),o})):Mt;var o=0;!function t(r){var i,e;r.order=o++;try{for(var n=f(gt(r)),s=n.next();!s.done;s=n.next())t(s.value)}catch(t){i={error:t}}finally{try{s&&!s.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=E(this.config.entry||this.config.onEntry).map((function(t){return at(t)})),this.onExit=E(this.config.exit||this.config.onExit).map((function(t){return at(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=E(this.config.invoke).map((function(t,r){var i,e;if(U(t))return n.machine.options.services=u(((i={})[t.id]=t,i),n.machine.options.services),Nt({src:t.id,id:t.id});if(I(t.src))return Nt(u(u({},t),{id:t.id||t.src,src:t.src}));if(U(t.src)||L(t.src)){var o=n.id+":invocation["+r+"]";return n.machine.options.services=u(((e={})[o]=t.src,e),n.machine.options.services),Nt(u(u({id:o},t),{src:o}))}var s=t.src;return Nt(u(u({id:s.type},t),{src:s}))})),this.activities=E(this.config.activities).concat(this.invoke).map((function(t){return lt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||wt(this).forEach((function(t){return t.on}))},t.prototype.withConfig=function(r,i){void 0===i&&(i=this.context);var e=this.options,n=e.activities,o=e.guards,s=e.services,c=e.delays;return new t(this.config,{actions:u(u({},e.actions),r.actions),activities:u(u({},n),r.activities),guards:u(u({},o),r.guards),services:u(u({},s),r.services),delays:u(u({},c),r.delays)},i)},t.prototype.withContext=function(r){return new t(this.config,this.options,r)},Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:x(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){return this.__cache.on?this.__cache.on:this.__cache.on=this.transitions.reduce((function(t,r){return t[r.eventType]=t[r.eventType]||[],t[r.eventType].push(r),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=""===t,i=this.transitions.filter((function(i){var e=i.eventType===t;return r?e:e||"*"===i.eventType}));return this.__cache.candidates[t]=i,i},t.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var i=function(r,i){var e,n,o=(e=L(r)?t.id+":delay["+i+"]":r,A.After+"("+e+")"+((n=t.id)?"#"+n:""));return t.onEntry.push(dt(o,{delay:r})),t.onExit.push({type:G,sendId:o}),o};return(T(r)?r.map((function(t,r){var e=i(t.delay,r);return u(u({},t),{event:e})})):z(v(r).map((function(t,e){var n=r[t],o=I(n)?{target:n}:n,s=isNaN(+t)?t:+t,c=i(s,e);return E(o).map((function(t){return u(u({},t),{event:c,delay:s})}))})))).map((function(r){var i=r.delay;return u(u({},t.formatTransition(r)),{delay:i})}))},t.prototype.getStateNodes=function(t){var r,i=this;if(!t)return[];var e=t instanceof Et?t.value:w(t,this.delimiter);if(I(e)){var n=this.getStateNode(e).initial;return void 0!==n?this.getStateNodes(((r={})[e]=n,r)):[this.states[e]]}var o=v(e);return o.map((function(t){return i.getStateNode(t)})).concat(o.reduce((function(t,r){var n=i.getStateNode(r).getStateNodes(e[r]);return t.concat(n)}),[]))},t.prototype.handles=function(t){var r=y(t);return this.events.includes(r)},t.prototype.resolveState=function(t){var r=Array.from(bt([],this.getStateNodes(t.value)));return new Et(u(u({},t),{value:this.resolve(t.value),configuration:r,done:zt(r,this)}))},t.prototype.transitionLeafNode=function(t,r,i){var e=this.getStateNode(t).next(r,i);return e&&e.transitions.length?e:this.next(r,i)},t.prototype.transitionCompoundNode=function(t,r,i){var e=v(t),n=this.getStateNode(e[0])._transition(t[e[0]],r,i);return n&&n.transitions.length?n:this.next(r,i)},t.prototype.transitionParallelNode=function(t,r,i){var e,n,o={};try{for(var s=f(v(t)),c=s.next();!c.done;c=s.next()){var a=c.value,u=t[a];if(u){var l=this.getStateNode(a)._transition(u,r,i);l&&(o[a]=l)}}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}var d=v(o).map((function(t){return o[t]})),p=z(d.map((function(t){return t.transitions})));if(!d.some((function(t){return t.transitions.length>0})))return this.next(r,i);var h=z(d.map((function(t){return t.entrySet}))),m=z(v(o).map((function(t){return o[t].configuration})));return{transitions:p,entrySet:h,exitSet:z(d.map((function(t){return t.exitSet}))),configuration:m,source:r,actions:z(v(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,r,i){return I(t)?this.transitionLeafNode(t,r,i):1===v(t).length?this.transitionCompoundNode(t,r,i):this.transitionParallelNode(t,r,i)},t.prototype.next=function(t,r){var i,e,n,o=this,s=r.name,c=[],a=[];try{for(var u=f(this.getCandidates(s)),l=u.next();!l.done;l=u.next()){var d=l.value,h=d.cond,v=d.in,y=t.context,g=!v||(I(v)&&Tt(v)?t.matches(w(this.getStateNodeById(v).path,this.delimiter)):m(w(v,this.delimiter),k(this.path.slice(0,-2))(t.value))),b=!1;try{b=!h||$(this.machine,h,y,r,t)}catch(t){throw new Error("Unable to evaluate guard '"+(h.name||h.type)+"' in transition for event '"+s+"' in state node '"+this.id+"':\n"+t.message)}if(b&&g){void 0!==d.target&&(a=d.target),c.push.apply(c,p(d.actions)),n=d;break}}}catch(t){i={error:t}}finally{try{l&&!l.done&&(e=u.return)&&e.call(u)}finally{if(i)throw i.error}}if(n){if(!a.length)return{transitions:[n],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:c};var x=z(a.map((function(r){return o.getRelativeStateNodes(r,t.historyValue)}))),S=!!n.internal;return{transitions:[n],entrySet:S?[]:z(x.map((function(t){return o.nodesFromChild(t)}))),exitSet:S?[]:[this],configuration:x,source:t,actions:c}}},t.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var r=[],i=t;i&&i!==this;)r.push(i),i=i.parent;return r.push(this),r},t.prototype.escapes=function(t){if(this===t)return!1;for(var r=this.parent;r;){if(r===t)return!1;r=r.parent}return!0},t.prototype.getActions=function(t,r,i,e){var n,o,s,c,a=bt([],e?this.getStateNodes(e.value):[this]),u=t.configuration.length?bt(a,t.configuration):a;try{for(var l=f(u),h=l.next();!h.done;h=l.next())Ot(a,y=h.value)||t.entrySet.push(y)}catch(t){n={error:t}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}try{for(var v=f(a),m=v.next();!m.done;m=v.next()){var y;Ot(u,y=m.value)&&!Ot(t.exitSet,y.parent)||t.exitSet.push(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(c=v.return)&&c.call(v)}finally{if(s)throw s.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var g=z(t.entrySet.map((function(e){var n=[];if("final"!==e.type)return n;var o=e.parent;if(!o.parent)return n;n.push(pt(e.id,e.doneData),pt(o.id,e.doneData?j(e.doneData,r,i):void 0));var s=o.parent;return"parallel"===s.type&&gt(s).every((function(r){return zt(t.configuration,r)}))&&n.push(pt(s.id)),n})));t.exitSet.sort((function(t,r){return r.order-t.order})),t.entrySet.sort((function(t,r){return t.order-r.order}));var w=new Set(t.entrySet),b=new Set(t.exitSet),x=d([z(Array.from(w).map((function(t){return p(t.activities.map((function(t){return function(t){var r=lt(t);return{type:A.Start,activity:r,exec:void 0}}(t)})),t.onEntry)}))).concat(g.map(ft)),z(Array.from(b).map((function(t){return p(t.onExit,t.activities.map((function(t){return function(t){var r=L(t)?t:lt(t);return{type:A.Stop,activity:r,exec:void 0}}(t)})))})))],2),S=x[0];return ut(x[1].concat(t.actions).concat(S),this.machine.options.actions)},t.prototype.transition=function(t,r,i){void 0===t&&(t=this.initialState);var e,n=K(r);if(t instanceof Et)e=void 0===i?t:this.resolveState(Et.from(t,i));else{var o=I(t)?this.resolve(b(this.getResolvedPath(t))):this.resolve(t);e=this.resolveState(Et.from(o,i||this.machine.context))}if(this.strict&&!this.events.includes(n.name)&&!/^(done|error)\./.test(n.name))throw new Error("Machine '"+this.id+"' does not accept event '"+n.name+"'");var s=this._transition(e.value,e,n)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:e,actions:[]},c=bt([],this.getStateNodes(e.value)),a=s.configuration.length?bt(c,s.configuration):c;return s.configuration=p(a),this.resolveTransition(s,e,n)},t.prototype.resolveRaisedTransition=function(t,r,i){var e,n=t.actions;return(t=this.transition(t,r))._event=i,t.event=i.data,(e=t.actions).unshift.apply(e,p(n)),t},t.prototype.resolveTransition=function(t,r,i,e){var n,o,s=this;void 0===i&&(i=st),void 0===e&&(e=this.machine.context);var c=t.configuration,a=!r||t.transitions.length>0?kt(this.machine,c):void 0,l=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,p=r?r.context:e,h=this.getActions(t,p,i,r),v=r?u({},r.activities):{};try{for(var m=f(h),y=m.next();!y.done;y=m.next()){var g=y.value;g.type===R?v[g.activity.id||g.activity.type]=g:g.type===H&&(v[g.activity.id||g.activity.type]=!1)}}catch(t){n={error:t}}finally{try{y&&!y.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var w,b,x=d(mt(this,r,p,i,h),2),S=x[0],k=x[1],O=d(N(S,(function(t){return t.type===Y||t.type===q&&t.to===P.Internal})),2),z=O[0],C=O[1],E=S.filter((function(t){var r;return t.type===R&&(null===(r=t.activity)||void 0===r?void 0:r.type)===tt})).reduce((function(t,r){return t[r.activity.id]=function(t,r,i,e){var n,o=F(t.src),s=null===(n=null==r?void 0:r.options.services)||void 0===n?void 0:n[o.type],c=t.data?j(t.data,i,e):void 0,a=s?function(t,r,i){var e=_t(r);return e.deferred=!0,U(t)&&(e.state=jt(void 0,(function(){return(i?t.withContext(i):t).initialState}))),e}(s,t.id,c):_t(t.id);return a.meta=t,a}(r.activity,s.machine,k,i),t}),r?u({},r.children):{}),_=a?t.configuration:r?r.configuration:[],T=_.reduce((function(t,r){return void 0!==r.meta&&(t[r.id]=r.meta),t}),{}),L=zt(_,this),I=new Et({value:a||r.value,context:k,_event:i,_sessionid:r?r._sessionid:null,historyValue:a?l?(w=l,b=a,{current:b,states:M(w,b)}):void 0:r?r.historyValue:void 0,history:!a||t.source?r:void 0,actions:a?C:[],activities:a?v:r?r.activities:{},meta:a?T:r?r.meta:void 0,events:[],configuration:_,transitions:t.transitions,children:E,done:L}),D=p!==k;I.changed=i.name===et||D;var V=I.history;if(V&&delete V.history,!a)return I;var A=I;if(!L)for((this._transient||c.some((function(t){return t._transient})))&&(A=this.resolveRaisedTransition(A,{type:Q},i));z.length;){var J=z.shift();A=this.resolveRaisedTransition(A,J._event,i)}var B=A.changed||(V?!!A.actions.length||D||typeof V.value!=typeof A.value||!Ct(A.value,V.value):void 0);return A.changed=B,A.history=V,A},t.prototype.getStateNode=function(t){if(Tt(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '"+t+"' from '"+this.id+"'; no child states exist.");var r=this.states[t];if(!r)throw new Error("Child state '"+t+"' does not exist on '"+this.id+"'");return r},t.prototype.getStateNodeById=function(t){var r=Tt(t)?t.slice("#".length):t;if(r===this.id)return this;var i=this.machine.idMap[r];if(!i)throw new Error("Child state node '#"+r+"' does not exist on machine '"+this.id+"'");return i},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&Tt(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var r=g(t,this.delimiter).slice(),i=this;r.length;){var e=r.shift();if(!e.length)break;i=i.getStateNode(e)}return i},t.prototype.resolve=function(t){var r,i=this;if(!t)return this.initialStateValue||Mt;switch(this.type){case"parallel":return x(this.initialStateValue,(function(r,e){return r?i.getStateNode(e).resolve(t[e]||r):Mt}));case"compound":if(I(t)){var e=this.getStateNode(t);return"parallel"===e.type||"compound"===e.type?((r={})[t]=e.initialStateValue,r):t}return v(t).length?x(t,(function(t,r){return t?i.getStateNode(r).resolve(t):Mt})):this.initialStateValue||{};default:return t||Mt}},t.prototype.getResolvedPath=function(t){if(Tt(t)){var r=this.machine.idMap[t.slice("#".length)];if(!r)throw new Error("Unable to find state node '"+t+"'");return r.path}return g(t,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t,r;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)r=S(this.states,(function(t){return t.initialStateValue||Mt}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '"+this.initial+"' not found on '"+this.key+"'");r=yt(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(t,r){var i=this.getStateNodes(t);return this.resolveTransition({configuration:i,entrySet:i,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,r)},Object.defineProperty(t.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '"+this.id+"'.");return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var t;if("history"===this.type){var r=this.config;t=I(r.target)&&Tt(r.target)?b(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target}return t},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(t,r,i){return void 0===i&&(i=!0),i?"history"===t.type?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;return yt(this)?[this]:"compound"!==this.type||this.initial?z(O(this.initialStateValue).map((function(r){return t.getFromRelativePath(r)}))):[this]},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=d(t),i=r[0],e=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '"+i+"' from node with no states");var n=this.getStateNode(i);if("history"===n.type)return n.resolveHistory();if(!this.states[i])throw new Error("Child state '"+i+"' does not exist on '"+this.id+"'");return this.states[i].getFromRelativePath(e)},t.prototype.historyValue=function(t){if(v(this.states).length)return{current:t||this.initialStateValue,states:S(this.states,(function(r,i){if(!t)return r.historyValue();var e=I(t)?void 0:t[i];return r.historyValue(e||r.initialStateValue)}),(function(t){return!t.history}))}},t.prototype.resolveHistory=function(t){var r=this;if("history"!==this.type)return[this];var i=this.parent;if(!t){var e=this.target;return e?z(O(e).map((function(t){return i.getFromRelativePath(t)}))):i.initialStateNodes}var n,o=(n=i.path,"states",function(t){var r,i,e=t;try{for(var o=f(n),s=o.next();!s.done;s=o.next())e=e.states[s.value]}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return e})(t).current;return I(o)?[i.getStateNode(o)]:z(O(o).map((function(t){return"deep"===r.history?i.getFromRelativePath(t):[i.states[t[0]]]})))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this,r=z(v(this.states).map((function(r){return t.states[r].stateIds})));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var t,r,i,e;if(this.__cache.events)return this.__cache.events;var n=this.states,o=new Set(this.ownEvents);if(n)try{for(var s=f(v(n)),c=s.next();!c.done;c=s.next()){var a=n[c.value];if(a.states)try{for(var u=(i=void 0,f(a.events)),l=u.next();!l.done;l=u.next())o.add(""+l.value)}catch(t){i={error:t}}finally{try{l&&!l.done&&(e=u.return)&&e.call(u)}finally{if(i)throw i.error}}}}catch(r){t={error:r}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(t){var r=this;if(void 0!==t)return t.map((function(t){if(!I(t))return t;var i=t[0]===r.delimiter;if(i&&!r.parent)return r.getStateNodeByPath(t.slice(1));var e=i?r.key+t:t;if(!r.parent)return r.getStateNodeByPath(e);try{return r.parent.getStateNodeByPath(e)}catch(t){throw new Error("Invalid transition definition for state node '"+r.id+"':\n"+t.message)}}))},t.prototype.formatTransition=function(t){var r=this,i=function(t){if(void 0!==t&&""!==t)return E(t)}(t.target),e="internal"in t?t.internal:!i||i.some((function(t){return I(t)&&t[0]===r.delimiter})),n=this.machine.options.guards,o=this.resolveTarget(i),s=u(u({},t),{actions:ut(E(t.actions)),cond:D(t.cond,n),target:o,source:this,internal:e,eventType:t.event,toJSON:function(){return u(u({},s),{target:s.target?s.target.map((function(t){return"#"+t.id})):void 0,source:"#"+r.id})}});return s},t.prototype.formatTransitions=function(){var t,r,i,e=this;if(this.config.on)if(Array.isArray(this.config.on))i=this.config.on;else{var n=this.config.on,o=n["*"],s=void 0===o?[]:o,c=l(n,["*"]);i=z(v(c).map((function(t){return W(t,c[t])})).concat(W("*",s)))}else i=[];var a=this.config.always?W("",this.config.always):[],u=this.config.onDone?W(String(pt(this.id)),this.config.onDone):[],d=z(this.invoke.map((function(t){var r=[];return t.onDone&&r.push.apply(r,p(W(String(ht(t.id)),t.onDone))),t.onError&&r.push.apply(r,p(W(String(vt(t.id)),t.onError))),r}))),h=this.after,m=z(p(u,d,i,a).map((function(t){return E(t).map((function(t){return e.formatTransition(t)}))})));try{for(var y=f(h),g=y.next();!g.done;g=y.next())m.push(g.value)}catch(r){t={error:r}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}return m},t}(),It={deferEvents:!1},Dt=function(){function t(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=u(u({},It),t)}return t.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},t.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},t.prototype.clear=function(){this.queue=[]},t.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},t.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},t}(),Vt=new Map,At=0;function Pt(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var Jt,Ut={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(Jt||(Jt={}));var Bt=function(){function t(r,i){var e=this;void 0===i&&(i=t.defaultOptions),this.machine=r,this.scheduler=new Dt,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Jt.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,r){if(T(t))return e.batch(t),e.state;var i=K(B(t,r));if(e.status===Jt.Stopped)return e.state;if(e.status!==Jt.Running&&!e.options.deferEvents)throw new Error('Event "'+i.name+'" was sent to uninitialized service "'+e.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(i.data));return e.scheduler.schedule((function(){e.forward(i);var t=e.nextState(i);e.update(t,i)})),e._state},this.sendTo=function(t,r){var i,n=e.parent&&(r===P.Parent||e.parent.id===r),o=n?e.parent:I(r)?e.children.get(r)||function(t){return Vt.get(t)}(r):(i=r)&&"function"==typeof i.send?r:void 0;if(o)o.send("machine"in o?u(u({},t),{name:t.name===it?""+vt(e.id):t.name,origin:e.sessionId}):t.data);else if(!n)throw new Error("Unable to send event to child '"+r+"' from service '"+e.id+"'.")};var n=u(u({},t.defaultOptions),i),o=n.clock,s=n.logger,c=n.parent,a=n.id;this.id=void 0!==a?a:r.id,this.logger=s,this.clock=o,this.parent=c,this.options=n,this.scheduler=new Dt({deferEvents:this.options.deferEvents}),this.sessionId="x:"+At++}return Object.defineProperty(t.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:jt(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),t.prototype.execute=function(t,r){var i,e;try{for(var n=f(t.actions),o=n.next();!o.done;o=n.next())this.exec(o.value,t,r)}catch(t){i={error:t}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}},t.prototype.update=function(t,r){var i,e,n,o,s,c,a,u,l=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){l.state.children[t.id]=t})),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var d=f(this.eventListeners),p=d.next();!p.done;p=d.next())(0,p.value)(t.event)}catch(t){i={error:t}}finally{try{p&&!p.done&&(e=d.return)&&e.call(d)}finally{if(i)throw i.error}}try{for(var h=f(this.listeners),v=h.next();!v.done;v=h.next())(0,v.value)(t,t.event)}catch(t){n={error:t}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var m=f(this.contextListeners),y=m.next();!y.done;y=m.next())(0,y.value)(this.state.context,this.state.history?this.state.history.context:void 0)}catch(t){s={error:t}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}var g=zt(t.configuration||[],this.machine);if(this.state.configuration&&g){var w=t.configuration.find((function(t){return"final"===t.type&&t.parent===l.machine})),b=w&&w.doneData?j(w.doneData,t.context,r):void 0;try{for(var x=f(this.doneListeners),S=x.next();!S.done;S=x.next())(0,S.value)(ht(this.id,b))}catch(t){a={error:t}}finally{try{S&&!S.done&&(u=x.return)&&u.call(x)}finally{if(a)throw a.error}}this.stop()}},t.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Jt.Running&&t(this.state,this.state.event),this},t.prototype.subscribe=function(t,r,i){var e,n=this;if(!t)return{unsubscribe:function(){}};var o=i;return"function"==typeof t?e=t:(e=t.next.bind(t),o=t.complete.bind(t)),this.listeners.add(e),this.status===Jt.Running&&e(this.state),o&&this.onDone(o),{unsubscribe:function(){e&&n.listeners.delete(e),o&&n.doneListeners.delete(o)}}},t.prototype.onEvent=function(t){return this.eventListeners.add(t),this},t.prototype.onSend=function(t){return this.sendListeners.add(t),this},t.prototype.onChange=function(t){return this.contextListeners.add(t),this},t.prototype.onStop=function(t){return this.stopListeners.add(t),this},t.prototype.onDone=function(t){return this.doneListeners.add(t),this},t.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},t.prototype.start=function(t){var r=this;if(this.status===Jt.Running)return this;Vt.set(this.sessionId,this),this.initialized=!0,this.status=Jt.Running;var i=void 0===t?this.initialState:jt(this,(function(){return!I(i=t)&&"value"in i&&"history"in i?r.machine.resolveState(t):r.machine.resolveState(Et.from(t,r.machine.context));var i}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){r.update(i,st)})),this},t.prototype.stop=function(){var t,r,i,e,n,o,s,c,a,u,l=this;try{for(var d=f(this.listeners),p=d.next();!p.done;p=d.next())this.listeners.delete(x=p.value)}catch(r){t={error:r}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var h=f(this.stopListeners),m=h.next();!m.done;m=h.next())(x=m.value)(),this.stopListeners.delete(x)}catch(t){i={error:t}}finally{try{m&&!m.done&&(e=h.return)&&e.call(h)}finally{if(i)throw i.error}}try{for(var y=f(this.contextListeners),g=y.next();!g.done;g=y.next())this.contextListeners.delete(x=g.value)}catch(t){n={error:t}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(n)throw n.error}}try{for(var w=f(this.doneListeners),b=w.next();!b.done;b=w.next()){var x;this.doneListeners.delete(x=b.value)}}catch(t){s={error:t}}finally{try{b&&!b.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.state.configuration.forEach((function(t){var r,i;try{for(var e=f(t.definition.exit),n=e.next();!n.done;n=e.next())l.exec(n.value,l.state)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}})),this.children.forEach((function(t){L(t.stop)&&t.stop()}));try{for(var S=f(v(this.delayedEventsMap)),k=S.next();!k.done;k=S.next())this.clock.clearTimeout(this.delayedEventsMap[k.value])}catch(t){a={error:t}}finally{try{k&&!k.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}return this.scheduler.clear(),this.initialized=!1,this.status=Jt.Stopped,Vt.delete(this.sessionId),this},t.prototype.batch=function(t){var r=this;if(this.status===Jt.NotStarted&&this.options.deferEvents);else if(this.status!==Jt.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,e,n=r.state,o=!1,s=[],c=function(t){var i=K(t);r.forward(i),n=jt(r,(function(){return r.machine.transition(n,i)})),s.push.apply(s,p(n.actions.map((function(t){return i=n,e=(r=t).exec,u(u({},r),{exec:void 0!==e?function(){return e(i.context,i.event,{action:r,state:i,_event:i._event})}:void 0});var r,i,e})))),o=o||!!n.changed};try{for(var a=f(t),l=a.next();!l.done;l=a.next())c(l.value)}catch(t){i={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(i)throw i.error}}n.changed=o,n.actions=s,r.update(n,K(t[t.length-1]))}))},t.prototype.sender=function(t){return this.send.bind(this,t)},t.prototype.nextState=function(t){var r=this,i=K(t);if(0===i.name.indexOf(rt)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(rt)})))throw i.data.data;return jt(this,(function(){return r.machine.transition(r.state,i)}))},t.prototype.forward=function(t){var r,i;try{for(var e=f(this.forwardTo),n=e.next();!n.done;n=e.next()){var o=n.value,s=this.children.get(o);if(!s)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");s.send(t)}}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}},t.prototype.defer=function(t){var r=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?r.sendTo(t._event,t.to):r.send(t._event)}),t.delay)},t.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},t.prototype.exec=function(t,r,i){void 0===i&&(i=this.machine.options.actions);var e=r.context,n=r._event,o=t.exec||ct(t.type,i),s=L(o)?o:o?o.exec:t.exec;if(s)try{return s(e,n.data,{action:t,state:this.state,_event:n})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case q:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case G:this.cancel(t.sendId);break;case R:var a=t.activity;if(!this.state.activities[a.id||a.type])break;if(a.type===A.Invoke){var u=F(a.src),l=this.machine.options.services?this.machine.options.services[u.type]:void 0,f=a.id,d=a.data,p="autoForward"in a?a.autoForward:!!a.forward;if(!l)return;var h=d?j(d,e,n):void 0,v=L(l)?l(e,n.data,{data:h,src:u}):l;_(v)?this.spawnPromise(Promise.resolve(v),f):L(v)?this.spawnCallback(v,f):V(v)?this.spawnObservable(v,f):U(v)&&this.spawnMachine(h?v.withContext(h):v,{id:f,autoForward:p})}else this.spawnActivity(a);break;case H:this.stopChild(t.activity.id);break;case Z:var m=t.label,y=t.value;m?this.logger(m,y):this.logger(y)}},t.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},t.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),L(r.stop)&&r.stop())},t.prototype.spawn=function(t,r,i){if(_(t))return this.spawnPromise(Promise.resolve(t),r);if(L(t))return this.spawnCallback(t,r);if(function(t){try{return"function"==typeof t.send}catch(t){return!1}}(e=t)&&"id"in e)return this.spawnActor(t);if(V(t))return this.spawnObservable(t,r);if(U(t))return this.spawnMachine(t,u(u({},i),{id:r}));throw new Error('Unable to spawn entity "'+r+'" of type "'+typeof t+'".');var e},t.prototype.spawnMachine=function(r,i){var e=this;void 0===i&&(i={});var n=new t(r,u(u({},this.options),{parent:this,id:i.id||r.id})),o=u(u({},Ut),i);o.sync&&n.onTransition((function(t){e.send(et,{state:t,id:n.id})}));var s=n;return this.children.set(n.id,s),o.autoForward&&this.forwardTo.add(n.id),n.onDone((function(t){e.removeChild(n.id),e.send(K(t,{origin:n.id}))})).start(),s},t.prototype.spawnPromise=function(t,r){var i=this,e=!1;t.then((function(t){e||(i.removeChild(r),i.send(K(ht(r,t),{origin:r})))}),(function(t){if(!e){i.removeChild(r);var n=vt(r,t);try{i.send(K(n,{origin:r}))}catch(t){i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var n={id:r,send:function(){},subscribe:function(r,i,e){var n=function(t,r,i){if("object"==typeof t)return t;var e=function(){};return{next:t,error:r||e,complete:i||e}}(r,i,e),o=!1;return t.then((function(t){o||(n.next(t),o||n.complete())}),(function(t){o||n.error(t)})),{unsubscribe:function(){return o=!0}}},stop:function(){e=!0},toJSON:function(){return{id:r}}};return this.children.set(r,n),n},t.prototype.spawnCallback=function(t,r){var i,e=this,n=!1,o=new Set,s=new Set;try{i=t((function(t){s.forEach((function(r){return r(t)})),n||e.send(K(t,{origin:r}))}),(function(t){o.add(t)}))}catch(t){this.send(vt(r,t))}if(_(i))return this.spawnPromise(i,r);var c={id:r,send:function(t){return o.forEach((function(r){return r(t)}))},subscribe:function(t){return s.add(t),{unsubscribe:function(){s.delete(t)}}},stop:function(){n=!0,L(i)&&i()},toJSON:function(){return{id:r}}};return this.children.set(r,c),c},t.prototype.spawnObservable=function(t,r){var i=this,e=t.subscribe((function(t){i.send(K(t,{origin:r}))}),(function(t){i.removeChild(r),i.send(K(vt(r,t),{origin:r}))}),(function(){i.removeChild(r),i.send(K(ht(r),{origin:r}))})),n={id:r,send:function(){},subscribe:function(r,i,e){return t.subscribe(r,i,e)},stop:function(){return e.unsubscribe()},toJSON:function(){return{id:r}}};return this.children.set(r,n),n},t.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},t.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(r){var i=r(this.state.context,t);this.spawnEffect(t.id,i)}},t.prototype.spawnEffect=function(t,r){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,toJSON:function(){return{id:t}}})},t.prototype.attachDev=function(){var t=Pt();if(this.options.devTools&&t&&t.__REDUX_DEVTOOLS_EXTENSION__){var r="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(u(u({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},r),{features:u({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}},t.prototype.toJSON=function(){return{id:this.id}},t.prototype[J]=function(){return this},t.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),t.interpret=Kt,t}();function Kt(t,r){return new Bt(t,r)}const Wt=({disabled:r,option:i,onRemove:e})=>{const n={};return i.chipColor&&(n.color=i.chipColor),i.chipBackgroundColor&&(n["background-color"]=i.chipBackgroundColor),t("label",{class:"wcs-select-chip",style:n,onClick:t=>t.stopImmediatePropagation()},t("div",null,i.displayText),r?null:t("div",{onClick:()=>e(i)},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"12",viewBox:"0 0 20 12",class:"chip"},t("path",{d:"M2,0 6,4 10,0 12,2 8,6 12,10 10,12 6,8 2,12 0,10 4,6 0,2 2,0",fill:i.chipColor,transform:"translate(8 0)"}))))},$t={key:"select",initial:"closed",states:{closed:{entry:["close"],on:{CLICK:"opened",OPEN:"opened",OPTION_CLICKED:{actions:["selectOption"]}}},opened:{entry:["open"],on:{CLICK:"closed",CLOSE:"closed",OPTION_CLICKED:{actions:["selectOption"]}}}}};let Ft=class{constructor(t){r(this,t),this.wcsChange=i(this,"wcsChange",7),this.wcsFocus=i(this,"wcsFocus",7),this.wcsBlur=i(this,"wcsBlur",7),this.expanded=!1,this.hasLoaded=!1,this.disabled=!1,this.multiple=!1,this.chips=!1,this.compareWith=(t,r)=>o.isEqual(t,r),this.overlayDirection="bottom"}async open(){this.stateService.send("OPEN")}async close(){this.stateService.send("CLOSE")}onValueChangeHandler(t){this.updateSelectedValue(t),this.emitChange(this.value)}updateSelectedValue(t){t||this.reset(),this.multiple?(Array.isArray(t)||(t=[t]),this.values=[],this.options.forEach((r=>{const i=!!t&&-1!==t.findIndex((t=>this.compareWith(r.value,t)));i&&this.values.push({value:r.value,displayText:r.innerText,chipColor:r.chipColor,chipBackgroundColor:r.chipBackgroundColor}),r.selected=i})),this.displayText=0!==this.values.length?this.values.map((t=>t.displayText)).join(", "):void 0):this.options.forEach((r=>{const i=this.compareWith(r.value,t);i&&(this.displayText=r.innerText),r.selected=i}))}reset(){this.values=[],this.displayText=void 0,this.options.forEach((t=>{t.selected=!1}))}componentDidLoad(){this.optionsEl=this.el.shadowRoot.querySelector(".wcs-select-options"),this.controlEl=this.el.shadowRoot.querySelector(".wcs-select-control");const t=function(t,r,i){void 0===i&&(i=t.context);var e="function"==typeof i?i():i;return new Lt(t,r,e)}($t,this.initMachineOptions());this.stateService=Kt(t),this.multiple&&(this.values=[]),this.addRippleEffect(),this.stateService.start(),null===this.optionsEl.querySelector("slot")&&(this.replaceOptions_firefoxBefore63(),this.listenDomUpdate_firefoxBefore63()),void 0!==this.value&&this.updateSelectedValue(this.value),this.hasLoaded=!0}emitChange(t){this.wcsChange.emit({value:t})}replaceOptions_firefoxBefore63(){Array.from(this.el.querySelectorAll("wcs-select-option")).forEach((t=>{t.parentNode===this.el&&(this.el.removeChild(t),this.optionsEl.appendChild(t))}))}listenDomUpdate_firefoxBefore63(){new MutationObserver((t=>{for(const r of t)"childList"===r.type&&this.replaceOptions_firefoxBefore63()})).observe(this.el,{childList:!0})}componentWillUpdate(){this.multiple&&this.options.forEach((t=>t.multiple=!0))}get options(){var t;const r=null===(t=this.el)||void 0===t?void 0:t.querySelectorAll("wcs-select-option");return r&&0!==r.length?r:[]}initMachineOptions(){return{actions:{open:()=>{this.disabled||(this.updateOverlayDirection(),this.expanded=!0,this.focused=!0)},close:()=>{this.focused=!0,this.expanded=!1},selectOption:(t,r)=>{"OPTION_CLICKED"===r.type&&this.handleClickEvent(r.value)}},guards:{enabled:()=>!this.disabled}}}updateOverlayDirection(){const t=+getComputedStyle(this.el).getPropertyValue("--wcs-select-overlay-max-height").replace(/\D/g,""),r=+getComputedStyle(this.el).getPropertyValue("--wcs-select-option-height").replace(/\D/g,""),i=this.el.getBoundingClientRect(),e=Math.floor(t/r),n=window.innerHeight-(i.y+i.height+(this.options.length>e?t+1:this.options.length*r+1));this.overlayDirection=n<0?"top":"bottom"}updateOverlayMargin(){this.controlEl&&this.optionsEl&&(this.optionsEl.style.marginTop="top"===this.overlayDirection?"-"+this.controlEl.getBoundingClientRect().height+"px":"0")}handleClickEvent(t){this.multiple?this.handleClickOnMultiple(t):this.handleNormalClick(t)}handleClickOnMultiple(t){const r=this.values.findIndex((r=>r.value===t.value));if(-1===r){const{value:r,displayText:i,chipColor:e,chipBackgroundColor:n}=t;this.values.push({value:r,displayText:i,chipColor:e,chipBackgroundColor:n}),t.source.selected=!0}else t.source.selected=!1,this.values.splice(r,1);this.updateValueWithValues()}updateValueWithValues(){this.value=this.values.map((t=>t.value)),this.displayText=0!==this.values.length?this.values.map((t=>t.displayText)).join(", "):void 0}handleNormalClick(t){this.options.forEach((t=>{t.selected&&(t.selected=!1)})),t.source.selected=!0,this.value=t.value,this.displayText=t.displayText,this.stateService.send("CLOSE")}disconnectedCallback(){this.stateService.stop()}addRippleEffect(){new a(this.controlEl).unbounded=!1}get hasValue(){return void 0!==this.displayText}onMouseDown(t){const r=c(t.target)&&(t.offsetX>t.target.clientWidth||t.offsetY>t.target.clientHeight),i=t.composedPath().filter((t=>"svg"===t.nodeName&&t.classList.contains("chip"))).length>0;r||i||this.stateService.send("CLICK")}onWindowClickEvent(t){const r=-1!==t.composedPath().map((t=>t.nodeName)).indexOf("WCS-SELECT");this.expanded&&!r&&this.stateService.send("CLOSE")}selectedOptionChanged(t){this.sendOptionClickedToStateMachine(t.detail)}sendOptionClickedToStateMachine(t){this.stateService.send({type:"OPTION_CLICKED",value:t})}onSlotchange(){this.updateSelectedValue(this.value)}removeChip(t){this.options.forEach((r=>{r.value===t.value&&this.sendOptionClickedToStateMachine(Object.assign(Object.assign({},t),{source:r}))}))}render(){return this.hasLoaded&&this.updateStyles(),this.updateOverlayMargin(),t(e,Object.assign({class:this.expanded?"expanded ":"",overlayDirection:this.overlayDirection},this.focusedAttributes()),t("div",{class:"wcs-select-control"},this.hasValue?this.chips?this.values.map((r=>t(Wt,{disabled:this.disabled,option:r,onRemove:this.removeChip.bind(this)}))):t("label",{class:"wcs-select-value"},this.displayText):t("label",{class:"wcs-select-placeholder"},this.placeholder),t(s,{up:this.expanded})),t("div",{class:"wcs-select-options"},t("slot",{name:"wcs-select-option",onSlotchange:this.onSlotchange.bind(this)})))}updateStyles(){this.optionsEl.setAttribute("style",`width: ${Math.ceil(this.el.offsetWidth-2)}px;`)}focusedAttributes(){return this.disabled?{}:{tabIndex:0}}get el(){return n(this)}static get watchers(){return{value:["onValueChangeHandler"]}}};Ft.style='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}:host{--wcs-select-ligther-percentage:40;--wcs-select-border-radius:var(--wcs-border-radius);--wcs-select-background-color:var(--wcs-light);--wcs-select-placeholder-color:var(--wcs-text-medium);--wcs-select-value-color:var(--wcs-primary);--wcs-select-border-color:transparent;--wcs-select-overlay-max-height:360px;--wcs-select-option-height:42px;display:block;position:relative;outline:none;user-select:none}:host svg{flex-shrink:0}:host .arrow{fill:var(--wcs-select-value-color)}:host .chip{fill:var(--wcs-contrast);opacity:calc((100 - var(--wcs-select-ligther-percentage)) / 100)}:host .chip:hover{opacity:100}:host([class~=expanded][overlaydirection=top]) .wcs-select-control{border:var(--wcs-select-border-color) solid 1px;border-top-left-radius:0;border-top-right-radius:0}:host([class~=expanded][overlaydirection=bottom]) .wcs-select-control{border:var(--wcs-select-border-color) solid 1px;border-bottom-left-radius:0;border-bottom-right-radius:0}:host(.expanded){--wcs-select-border-color:var(--wcs-text-light)}:host(.expanded) .wcs-select-options{display:block}:host(:not(.expanded):focus) .wcs-select-control{border:var(--wcs-primary) solid 1px}:host([disabled]) .wcs-select-control,:host([disabled]) label{cursor:default;pointer-events:none}:host([disabled]) label{color:var(--wcs-text-disabled)}:host([disabled]) .arrow{fill:var(--wcs-text-medium)}label{padding:calc(var(--wcs-padding) / 2) var(--wcs-padding);font-weight:500;cursor:pointer;color:var(--wcs-select-color);transition:color 125ms ease-in;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([chips]) .wcs-select-control{flex-wrap:wrap}.wcs-select-control{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;align-items:center;padding-right:var(--wcs-text-padding);background-color:var(--wcs-select-background-color);border-radius:var(--wcs-select-border-radius);border:var(--wcs-select-border-color) solid 1px;font-size:1rem;line-height:1.5;cursor:pointer}.wcs-select-control::before,.wcs-select-control::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.wcs-select-control::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.wcs-select-control::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.wcs-select-control.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.wcs-select-control.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.wcs-select-control.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.wcs-select-control.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.wcs-select-control::before,.wcs-select-control::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.wcs-select-control.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.wcs-select-control::before,.wcs-select-control::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}.wcs-select-control:hover::before,.wcs-select-control.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}.wcs-select-control.mdc-ripple-upgraded--background-focused::before,.wcs-select-control:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.wcs-select-control:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.wcs-select-control:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-control.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}.wcs-select-placeholder{color:var(--wcs-select-placeholder-color);font-style:italic;font-weight:400}.wcs-select-value{color:var(--wcs-select-value-color);font-weight:var(--wcs-font-weight-form-value)}.wcs-select-chip{color:var(--wcs-contrast);background-color:var(--wcs-base);border-radius:0.75rem;display:flex;align-items:center;margin:calc(var(--wcs-base-margin) / 2);padding:calc((var(--wcs-padding) - 8px) / 2) var(--wcs-padding);overflow:initial}:host([overlaydirection=top]) .wcs-select-options{-webkit-transform:translateY(-100%);transform:translateY(-100%);border-left:var(--wcs-select-border-color) solid 1px;border-right:var(--wcs-select-border-color) solid 1px;border-top:var(--wcs-select-border-color) solid 1px;border-top-right-radius:var(--wcs-border-radius);border-top-left-radius:var(--wcs-border-radius)}:host([overlaydirection=bottom]) .wcs-select-options{border-left:var(--wcs-select-border-color) solid 1px;border-right:var(--wcs-select-border-color) solid 1px;border-bottom:var(--wcs-select-border-color) solid 1px;border-bottom-right-radius:var(--wcs-border-radius);border-bottom-left-radius:var(--wcs-border-radius)}.wcs-select-options{display:none;position:absolute;z-index:1;margin:0;max-height:var(--wcs-select-overlay-max-height);overflow-y:auto;background-color:var(--wcs-white);color:var(--wcs-text-medium)}';let Rt=class{constructor(t){r(this,t),this.wcsSelectOptionClick=i(this,"wcsSelectOptionClick",7),this.disabled=!1,this.selected=!1,this.multiple=!1}componentWillLoad(){void 0===this.value&&(this.value=this.el.innerText||"")}componentDidLoad(){this.mdcRipple=new a(this.el)}onMouseDown(t){this.disabled||(t.stopPropagation(),this.wcsSelectOptionClick.emit({source:this.el,value:this.value,displayText:this.el.innerText}))}render(){return t(e,{slot:"wcs-select-option"},this.multiple&&t("wcs-checkbox",{checked:this.selected}),t("slot",null))}get el(){return n(this)}};Rt.style='@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}wcs-select-option{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);will-change:transform, opacity;overflow:hidden;display:flex;padding:0 var(--wcs-padding);height:var(--wcs-select-option-height);line-height:42px;cursor:pointer;user-select:none;font-weight:500;font-size:1rem;color:var(--wcs-black)}wcs-select-option::before,wcs-select-option::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}wcs-select-option::before{transition:opacity 15ms linear, background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}wcs-select-option::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}wcs-select-option.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}wcs-select-option.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}wcs-select-option.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards, mdc-ripple-fg-opacity-in 75ms forwards}wcs-select-option.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}wcs-select-option::before,wcs-select-option::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}wcs-select-option.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}wcs-select-option::before,wcs-select-option::after{background-color:#999;background-color:var(--mdc-ripple-color, #999)}wcs-select-option:hover::before,wcs-select-option.mdc-ripple-surface--hover::before{opacity:0.1;opacity:var(--mdc-ripple-hover-opacity, 0.1)}wcs-select-option.mdc-ripple-upgraded--background-focused::before,wcs-select-option:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}wcs-select-option:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}wcs-select-option:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.3;opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.3)}wcs-select-option:hover{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option[disabled]{cursor:default;pointer-events:none;color:var(--wcs-text-disabled)}wcs-select-option[selected]{color:var(--wcs-primary);background-color:var(--wcs-light)}wcs-select-option[multiple] wcs-checkbox{pointer-events:none;margin-right:10px}wcs-select-option[multiple]:hover wcs-checkbox{--wcs-checkbox-border-color:var(--wcs-primary)}';export{Ft as wcs_select,Rt as wcs_select_option}
@@ -1 +0,0 @@
1
- var t="top",n="bottom",e="right",r="left",o=[t,n,e,r],i=o.reduce((function(t,n){return t.concat([n+"-start",n+"-end"])}),[]),a=[].concat(o,["auto"]).reduce((function(t,n){return t.concat([n,n+"-start",n+"-end"])}),[]),u=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function f(t){return t?(t.nodeName||"").toLowerCase():null}function c(t){if(null==t)return window;if("[object Window]"!==t.toString()){var n=t.ownerDocument;return n&&n.defaultView||window}return t}function p(t){return t instanceof c(t).Element||t instanceof Element}function d(t){return t instanceof c(t).HTMLElement||t instanceof HTMLElement}function s(t){return"undefined"!=typeof ShadowRoot&&(t instanceof c(t).ShadowRoot||t instanceof ShadowRoot)}const l={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var n=t.state;Object.keys(n.elements).forEach((function(t){var e=n.styles[t]||{},r=n.attributes[t]||{},o=n.elements[t];d(o)&&f(o)&&(Object.assign(o.style,e),Object.keys(r).forEach((function(t){var n=r[t];!1===n?o.removeAttribute(t):o.setAttribute(t,!0===n?"":n)})))}))},effect:function(t){var n=t.state,e={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(n.elements.popper.style,e.popper),n.styles=e,n.elements.arrow&&Object.assign(n.elements.arrow.style,e.arrow),function(){Object.keys(n.elements).forEach((function(t){var r=n.elements[t],o=n.attributes[t]||{},i=Object.keys(n.styles.hasOwnProperty(t)?n.styles[t]:e[t]).reduce((function(t,n){return t[n]="",t}),{});d(r)&&f(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]};function v(t){return t.split("-")[0]}var b=Math.round;function h(t,n){void 0===n&&(n=!1);var e=t.getBoundingClientRect(),r=1,o=1;return d(t)&&n&&(r=e.width/t.offsetWidth||1,o=e.height/t.offsetHeight||1),{width:b(e.width/r),height:b(e.height/o),top:b(e.top/o),right:b(e.right/r),bottom:b(e.bottom/o),left:b(e.left/r),x:b(e.left/r),y:b(e.top/o)}}function m(t){var n=h(t),e=t.offsetWidth,r=t.offsetHeight;return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-r)<=1&&(r=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:r}}function y(t,n){var e=n.getRootNode&&n.getRootNode();if(t.contains(n))return!0;if(e&&s(e)){var r=n;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function w(t){return c(t).getComputedStyle(t)}function O(t){return["table","td","th"].indexOf(f(t))>=0}function g(t){return((p(t)?t.ownerDocument:t.document)||window.document).documentElement}function x(t){return"html"===f(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||g(t)}function j(t){return d(t)&&"fixed"!==w(t).position?t.offsetParent:null}function M(t){for(var n=c(t),e=j(t);e&&O(e)&&"static"===w(e).position;)e=j(e);return e&&("html"===f(e)||"body"===f(e)&&"static"===w(e).position)?n:e||function(t){var n=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&d(t)&&"fixed"===w(t).position)return null;for(var e=x(t);d(e)&&["html","body"].indexOf(f(e))<0;){var r=w(e);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||n&&"filter"===r.willChange||n&&r.filter&&"none"!==r.filter)return e;e=e.parentNode}return null}(t)||n}function k(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var E=Math.max,q=Math.min,B=Math.round;function P(t,n,e){return E(t,q(n,e))}function R(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function S(t,n){return n.reduce((function(n,e){return n[e]=t,n}),{})}var W={top:"auto",right:"auto",bottom:"auto",left:"auto"};function L(o){var i,a=o.popper,u=o.popperRect,f=o.placement,p=o.offsets,d=o.position,s=o.gpuAcceleration,l=o.adaptive,v=o.roundOffsets,b=!0===v?function(t){var n=t.y,e=window.devicePixelRatio||1;return{x:B(B(t.x*e)/e)||0,y:B(B(n*e)/e)||0}}(p):"function"==typeof v?v(p):p,h=b.x,m=void 0===h?0:h,y=b.y,O=void 0===y?0:y,x=p.hasOwnProperty("x"),j=p.hasOwnProperty("y"),k=r,E=t,q=window;if(l){var P=M(a),R="clientHeight",S="clientWidth";P===c(a)&&"static"!==w(P=g(a)).position&&(R="scrollHeight",S="scrollWidth"),P=P,f===t&&(E=n,O-=P[R]-u.height,O*=s?1:-1),f===r&&(k=e,m-=P[S]-u.width,m*=s?1:-1)}var L,T=Object.assign({position:d},l&&W);return Object.assign({},T,s?((L={})[E]=j?"0":"",L[k]=x?"0":"",L.transform=(q.devicePixelRatio||1)<2?"translate("+m+"px, "+O+"px)":"translate3d("+m+"px, "+O+"px, 0)",L):((i={})[E]=j?O+"px":"",i[k]=x?m+"px":"",i.transform="",i))}var T={passive:!0},H={left:"right",right:"left",bottom:"top",top:"bottom"};function I(t){return t.replace(/left|right|bottom|top/g,(function(t){return H[t]}))}var A={start:"end",end:"start"};function z(t){return t.replace(/start|end/g,(function(t){return A[t]}))}function C(t){var n=c(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function D(t){return h(g(t)).left+C(t).scrollLeft}function U(t){var n=w(t);return/auto|scroll|overlay|hidden/.test(n.overflow+n.overflowY+n.overflowX)}function V(t){return["html","body","#document"].indexOf(f(t))>=0?t.ownerDocument.body:d(t)&&U(t)?t:V(x(t))}function _(t,n){var e;void 0===n&&(n=[]);var r=V(t),o=r===(null==(e=t.ownerDocument)?void 0:e.body),i=c(r),a=o?[i].concat(i.visualViewport||[],U(r)?r:[]):r,u=n.concat(a);return o?u:u.concat(_(x(a)))}function F(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function G(t,n){return"viewport"===n?F(function(t){var n=c(t),e=g(t),r=n.visualViewport,o=e.clientWidth,i=e.clientHeight,a=0,u=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,u=r.offsetTop)),{width:o,height:i,x:a+D(t),y:u}}(t)):d(n)?function(t){var n=h(t);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(n):F(function(t){var n,e=g(t),r=C(t),o=null==(n=t.ownerDocument)?void 0:n.body,i=E(e.scrollWidth,e.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=E(e.scrollHeight,e.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),u=-r.scrollLeft+D(t),f=-r.scrollTop;return"rtl"===w(o||e).direction&&(u+=E(e.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:u,y:f}}(g(t)))}function J(t){return t.split("-")[1]}function K(o){var i,a=o.reference,u=o.element,f=o.placement,c=f?v(f):null,p=f?J(f):null,d=a.x+a.width/2-u.width/2,s=a.y+a.height/2-u.height/2;switch(c){case t:i={x:d,y:a.y-u.height};break;case n:i={x:d,y:a.y+a.height};break;case e:i={x:a.x+a.width,y:s};break;case r:i={x:a.x-u.width,y:s};break;default:i={x:a.x,y:a.y}}var l=c?k(c):null;if(null!=l){var b="y"===l?"height":"width";switch(p){case"start":i[l]=i[l]-(a[b]/2-u[b]/2);break;case"end":i[l]=i[l]+(a[b]/2-u[b]/2)}}return i}function N(r,i){void 0===i&&(i={});var a=i.placement,u=void 0===a?r.placement:a,c=i.boundary,s=void 0===c?"clippingParents":c,l=i.rootBoundary,v=void 0===l?"viewport":l,b=i.elementContext,m=void 0===b?"popper":b,O=i.altBoundary,j=void 0!==O&&O,k=i.padding,B=void 0===k?0:k,P=R("number"!=typeof B?B:S(B,o)),W=r.elements.reference,L=r.rects.popper,T=r.elements[j?"popper"===m?"reference":"popper":m],H=function(t,n,e){var r="clippingParents"===n?function(t){var n=_(x(t)),e=["absolute","fixed"].indexOf(w(t).position)>=0&&d(t)?M(t):t;return p(e)?n.filter((function(t){return p(t)&&y(t,e)&&"body"!==f(t)})):[]}(t):[].concat(n),o=[].concat(r,[e]),i=o.reduce((function(n,e){var r=G(t,e);return n.top=E(r.top,n.top),n.right=q(r.right,n.right),n.bottom=q(r.bottom,n.bottom),n.left=E(r.left,n.left),n}),G(t,o[0]));return i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}(p(T)?T:T.contextElement||g(r.elements.popper),s,v),I=h(W),A=K({reference:I,element:L,strategy:"absolute",placement:u}),z=F(Object.assign({},L,A)),C="popper"===m?z:I,D={top:H.top-C.top+P.top,bottom:C.bottom-H.bottom+P.bottom,left:H.left-C.left+P.left,right:C.right-H.right+P.right},U=r.modifiersData.offset;if("popper"===m&&U){var V=U[u];Object.keys(D).forEach((function(r){var o=[e,n].indexOf(r)>=0?1:-1,i=[t,n].indexOf(r)>=0?"y":"x";D[r]+=V[i]*o}))}return D}function Q(t,n){void 0===n&&(n={});var e=n.boundary,r=n.rootBoundary,u=n.padding,f=n.flipVariations,c=n.allowedAutoPlacements,p=void 0===c?a:c,d=J(n.placement),s=d?f?i:i.filter((function(t){return J(t)===d})):o,l=s.filter((function(t){return p.indexOf(t)>=0}));0===l.length&&(l=s);var b=l.reduce((function(n,o){return n[o]=N(t,{placement:o,boundary:e,rootBoundary:r,padding:u})[v(o)],n}),{});return Object.keys(b).sort((function(t,n){return b[t]-b[n]}))}function X(t,n,e){return void 0===e&&(e={x:0,y:0}),{top:t.top-n.height-e.y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function Y(o){return[t,e,n,r].some((function(t){return o[t]>=0}))}function Z(t,n,e){void 0===e&&(e=!1);var r,o,i=d(n),a=d(n)&&function(t){var n=t.getBoundingClientRect();return 1!==(n.width/t.offsetWidth||1)||1!==(n.height/t.offsetHeight||1)}(n),u=g(n),p=h(t,a),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==f(n)||U(u))&&(s=(r=n)!==c(r)&&d(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:C(r)),d(n)?((l=h(n,!0)).x+=n.clientLeft,l.y+=n.clientTop):u&&(l.x=D(u))),{x:p.left+s.scrollLeft-l.x,y:p.top+s.scrollTop-l.y,width:p.width,height:p.height}}function $(t){var n=new Map,e=new Set,r=[];function o(t){e.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!e.has(t)){var r=n.get(t);r&&o(r)}})),r.push(t)}return t.forEach((function(t){n.set(t.name,t)})),t.forEach((function(t){e.has(t.name)||o(t)})),r}var tt={placement:"bottom",modifiers:[],strategy:"absolute"};function nt(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function et(t){void 0===t&&(t={});var n=t.defaultModifiers,e=void 0===n?[]:n,r=t.defaultOptions,o=void 0===r?tt:r;return function(t,n,r){void 0===r&&(r=o);var i,a,f={placement:"bottom",orderedModifiers:[],options:Object.assign({},tt,o),modifiersData:{},elements:{reference:t,popper:n},attributes:{},styles:{}},c=[],d=!1,s={state:f,setOptions:function(r){l(),f.options=Object.assign({},o,f.options,r),f.scrollParents={reference:p(t)?_(t):t.contextElement?_(t.contextElement):[],popper:_(n)};var i,a,d=function(t){var n=$(t);return u.reduce((function(t,e){return t.concat(n.filter((function(t){return t.phase===e})))}),[])}((i=[].concat(e,f.options.modifiers),a=i.reduce((function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t}),{}),Object.keys(a).map((function(t){return a[t]}))));return f.orderedModifiers=d.filter((function(t){return t.enabled})),f.orderedModifiers.forEach((function(t){var n=t.options,e=t.effect;if("function"==typeof e){var r=e({state:f,name:t.name,instance:s,options:void 0===n?{}:n});c.push(r||function(){})}})),s.update()},forceUpdate:function(){if(!d){var t=f.elements,n=t.reference,e=t.popper;if(nt(n,e)){f.rects={reference:Z(n,M(e),"fixed"===f.options.strategy),popper:m(e)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach((function(t){return f.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<f.orderedModifiers.length;r++)if(!0!==f.reset){var o=f.orderedModifiers[r],i=o.fn,a=o.options;"function"==typeof i&&(f=i({state:f,options:void 0===a?{}:a,name:o.name,instance:s})||f)}else f.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(t){s.forceUpdate(),t(f)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(i())}))}))),a}),destroy:function(){l(),d=!0}};if(!nt(t,n))return s;function l(){c.forEach((function(t){return t()})),c=[]}return s.setOptions(r).then((function(t){!d&&r.onFirstUpdate&&r.onFirstUpdate(t)})),s}}var rt=et({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,r=t.options,o=r.scroll,i=void 0===o||o,a=r.resize,u=void 0===a||a,f=c(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&p.forEach((function(t){t.addEventListener("scroll",e.update,T)})),u&&f.addEventListener("resize",e.update,T),function(){i&&p.forEach((function(t){t.removeEventListener("scroll",e.update,T)})),u&&f.removeEventListener("resize",e.update,T)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;n.modifiersData[t.name]=K({reference:n.rects.reference,element:n.rects.popper,strategy:"absolute",placement:n.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=t.options,r=e.gpuAcceleration,o=void 0===r||r,i=e.adaptive,a=void 0===i||i,u=e.roundOffsets,f=void 0===u||u,c={placement:v(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:o};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,L(Object.assign({},c,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:a,roundOffsets:f})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,L(Object.assign({},c,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},l,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(n){var o=n.state,i=n.name,u=n.options.offset,f=void 0===u?[0,0]:u,c=a.reduce((function(n,i){return n[i]=function(n,o,i){var a=v(n),u=[r,t].indexOf(a)>=0?-1:1,f="function"==typeof i?i(Object.assign({},o,{placement:n})):i,c=f[0],p=f[1];return c=c||0,p=(p||0)*u,[r,e].indexOf(a)>=0?{x:p,y:c}:{x:c,y:p}}(i,o.rects,f),n}),{}),p=c[o.placement],d=p.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=p.x,o.modifiersData.popperOffsets.y+=d),o.modifiersData[i]=c}},{name:"flip",enabled:!0,phase:"main",fn:function(o){var i=o.state,a=o.options,u=o.name;if(!i.modifiersData[u]._skip){for(var f=a.mainAxis,c=void 0===f||f,p=a.altAxis,d=void 0===p||p,s=a.fallbackPlacements,l=a.padding,b=a.boundary,h=a.rootBoundary,m=a.altBoundary,y=a.flipVariations,w=void 0===y||y,O=a.allowedAutoPlacements,g=i.options.placement,x=v(g),j=s||(x!==g&&w?function(t){if("auto"===v(t))return[];var n=I(t);return[z(t),n,z(n)]}(g):[I(g)]),M=[g].concat(j).reduce((function(t,n){return t.concat("auto"===v(n)?Q(i,{placement:n,boundary:b,rootBoundary:h,padding:l,flipVariations:w,allowedAutoPlacements:O}):n)}),[]),k=i.rects.reference,E=i.rects.popper,q=new Map,B=!0,P=M[0],R=0;R<M.length;R++){var S=M[R],W=v(S),L="start"===J(S),T=[t,n].indexOf(W)>=0,H=T?"width":"height",A=N(i,{placement:S,boundary:b,rootBoundary:h,altBoundary:m,padding:l}),C=T?L?e:r:L?n:t;k[H]>E[H]&&(C=I(C));var D=I(C),U=[];if(c&&U.push(A[W]<=0),d&&U.push(A[C]<=0,A[D]<=0),U.every((function(t){return t}))){P=S,B=!1;break}q.set(S,U)}if(B)for(var V=function(t){var n=M.find((function(n){var e=q.get(n);if(e)return e.slice(0,t).every((function(t){return t}))}));if(n)return P=n,"break"},_=w?3:1;_>0&&"break"!==V(_);_--);i.placement!==P&&(i.modifiersData[u]._skip=!0,i.placement=P,i.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(o){var i=o.state,a=o.options,u=o.name,f=a.mainAxis,c=void 0===f||f,p=a.altAxis,d=void 0!==p&&p,s=a.tether,l=void 0===s||s,b=a.tetherOffset,h=void 0===b?0:b,y=N(i,{boundary:a.boundary,rootBoundary:a.rootBoundary,padding:a.padding,altBoundary:a.altBoundary}),w=v(i.placement),O=J(i.placement),g=!O,x=k(w),j="x"===x?"y":"x",B=i.modifiersData.popperOffsets,R=i.rects.reference,S=i.rects.popper,W="function"==typeof h?h(Object.assign({},i.rects,{placement:i.placement})):h,L={x:0,y:0};if(B){if(c||d){var T="y"===x?t:r,H="y"===x?n:e,I="y"===x?"height":"width",A=B[x],z=B[x]+y[T],C=B[x]-y[H],D=l?-S[I]/2:0,U="start"===O?R[I]:S[I],V="start"===O?-S[I]:-R[I],_=i.elements.arrow,F=l&&_?m(_):{width:0,height:0},G=i.modifiersData["arrow#persistent"]?i.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=G[T],Q=G[H],X=P(0,R[I],F[I]),Y=g?R[I]/2-D-X-K-W:U-X-K-W,Z=g?-R[I]/2+D+X+Q+W:V+X+Q+W,$=i.elements.arrow&&M(i.elements.arrow),tt=i.modifiersData.offset?i.modifiersData.offset[i.placement][x]:0,nt=B[x]+Y-tt-($?"y"===x?$.clientTop||0:$.clientLeft||0:0),et=B[x]+Z-tt;if(c){var rt=P(l?q(z,nt):z,A,l?E(C,et):C);B[x]=rt,L[x]=rt-A}if(d){var ot=B[j],it=ot+y["x"===x?t:r],at=ot-y["x"===x?n:e],ut=P(l?q(it,nt):it,ot,l?E(at,et):at);B[j]=ut,L[j]=ut-ot}}i.modifiersData[u]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(i){var a,u=i.state,f=i.name,c=i.options,p=u.elements.arrow,d=u.modifiersData.popperOffsets,s=v(u.placement),l=k(s),b=[r,e].indexOf(s)>=0?"height":"width";if(p&&d){var h=function(t,n){return R("number"!=typeof(t="function"==typeof t?t(Object.assign({},n.rects,{placement:n.placement})):t)?t:S(t,o))}(c.padding,u),y=m(p),w="y"===l?t:r,O="y"===l?n:e,g=u.rects.reference[b]+u.rects.reference[l]-d[l]-u.rects.popper[b],x=d[l]-u.rects.reference[l],j=M(p),E=j?"y"===l?j.clientHeight||0:j.clientWidth||0:0,q=E/2-y[b]/2+(g/2-x/2),B=P(h[w],q,E-y[b]-h[O]);u.modifiersData[f]=((a={})[l]=B,a.centerOffset=B-q,a)}},effect:function(t){var n=t.state,e=t.options.element,r=void 0===e?"[data-popper-arrow]":e;null!=r&&("string"!=typeof r||(r=n.elements.popper.querySelector(r)))&&y(n.elements.popper,r)&&(n.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,e=t.name,r=n.rects.reference,o=n.rects.popper,i=n.modifiersData.preventOverflow,a=N(n,{elementContext:"reference"}),u=N(n,{altBoundary:!0}),f=X(a,r),c=X(u,o,i),p=Y(f),d=Y(c);n.modifiersData[e]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:d},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}}]});export{l as a,rt as c}
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as i}from"./p-f46e6c3c.js";let n=class{constructor(e){t(this,e)}render(){return e(i,null,e("div",{class:"container"},e("div",{class:"container-left"},e("div",{class:"app-name"},this.appName,e("slot",{name:"app-name"})),e("div",{class:"menu-bar"},e("slot",null))),e("div",null,e("slot",{name:"actions"}))))}};n.style=':host{display:block;position:relative;height:75px;border-bottom:solid 1px var(--wcs-text-light)}:host .container{margin:0 auto;height:100%;display:flex;align-items:center;flex-direction:row;justify-content:space-between;max-width:var(--wcs-com-content-max-width)}:host .container-left{display:flex;height:100%;align-items:center;flex-direction:row}:host .app-name{font-weight:300;font-size:1.5rem;line-height:1.25;color:var(--wcs-gray)}:host .menu-bar{display:flex;align-items:center;height:100%;margin-left:50px}:host .menu-bar ::slotted(*:not(:first-child)){margin-left:40px}:host ::slotted(a){display:flex;align-items:center;height:100%;font-size:16px;cursor:pointer;font-weight:500;color:var(--wcs-gray);text-decoration:none}:host ::slotted(a):after{font-family:icons;padding-left:var(--wcs-base-margin);font-size:0.6rem;content:"\\f107";line-height:1;box-sizing:border-box}';export{n as wcs_com_nav}