@watermarkinsights/ripple 3.37.0 → 3.38.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 (157) hide show
  1. package/dist/cjs/{chartFunctions-4d828b26.js → chartFunctions-5441fbec.js} +1 -1
  2. package/dist/cjs/{functions-0c27162e.js → functions-500629f8.js} +1 -1
  3. package/dist/cjs/{global-a2ca8069.js → global-b0628445.js} +1 -1
  4. package/dist/cjs/{intl-022a42a1.js → intl-821d2be2.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
  7. package/dist/cjs/priv-datepicker.cjs.entry.js +1 -1
  8. package/dist/cjs/ripple.cjs.js +2 -2
  9. package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
  10. package/dist/cjs/wm-button.cjs.entry.js +1 -1
  11. package/dist/cjs/wm-chart.cjs.entry.js +3 -3
  12. package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
  13. package/dist/cjs/wm-file.cjs.entry.js +1 -1
  14. package/dist/cjs/wm-input.cjs.entry.js +2 -2
  15. package/dist/cjs/wm-line-chart.cjs.entry.js +3 -3
  16. package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
  17. package/dist/cjs/wm-modal.cjs.entry.js +2 -2
  18. package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
  19. package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
  20. package/dist/cjs/wm-network-uploader.cjs.entry.js +2 -2
  21. package/dist/cjs/wm-option_2.cjs.entry.js +2 -2
  22. package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
  23. package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
  24. package/dist/cjs/wm-search.cjs.entry.js +2 -2
  25. package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
  26. package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
  27. package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
  28. package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
  29. package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
  30. package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
  31. package/dist/collection/collection-manifest.json +1 -1
  32. package/dist/collection/components/wm-modal/wm-modal.css +1 -0
  33. package/dist/collection/components/wm-tag-input/wm-tag-input.js +1 -1
  34. package/dist/esm/{chartFunctions-f4f3252e.js → chartFunctions-73e3dec2.js} +1 -1
  35. package/dist/esm/{functions-d52b728c.js → functions-25f9ef6d.js} +1 -1
  36. package/dist/esm/{global-06801d00.js → global-9d3664e6.js} +1 -1
  37. package/dist/esm/{intl-9809c77c.js → intl-c3678c68.js} +1 -1
  38. package/dist/esm/loader.js +2 -2
  39. package/dist/esm/priv-chart-popover.entry.js +1 -1
  40. package/dist/esm/priv-datepicker.entry.js +1 -1
  41. package/dist/esm/ripple.js +2 -2
  42. package/dist/esm/wm-action-menu_2.entry.js +1 -1
  43. package/dist/esm/wm-button.entry.js +1 -1
  44. package/dist/esm/wm-chart.entry.js +3 -3
  45. package/dist/esm/wm-datepicker.entry.js +1 -1
  46. package/dist/esm/wm-file.entry.js +1 -1
  47. package/dist/esm/wm-input.entry.js +2 -2
  48. package/dist/esm/wm-line-chart.entry.js +3 -3
  49. package/dist/esm/wm-modal-header.entry.js +2 -2
  50. package/dist/esm/wm-modal.entry.js +2 -2
  51. package/dist/esm/wm-navigation_3.entry.js +2 -2
  52. package/dist/esm/wm-navigator.entry.js +1 -1
  53. package/dist/esm/wm-network-uploader.entry.js +2 -2
  54. package/dist/esm/wm-option_2.entry.js +2 -2
  55. package/dist/esm/wm-pagination.entry.js +1 -1
  56. package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
  57. package/dist/esm/wm-search.entry.js +2 -2
  58. package/dist/esm/wm-snackbar.entry.js +2 -2
  59. package/dist/esm/wm-tab-item_3.entry.js +1 -1
  60. package/dist/esm/wm-tag-input.entry.js +2 -2
  61. package/dist/esm/wm-timepicker.entry.js +1 -1
  62. package/dist/esm/wm-toggletip.entry.js +1 -1
  63. package/dist/esm/wm-uploader.entry.js +2 -2
  64. package/dist/esm-es5/{chartFunctions-f4f3252e.js → chartFunctions-73e3dec2.js} +1 -1
  65. package/dist/esm-es5/{functions-d52b728c.js → functions-25f9ef6d.js} +1 -1
  66. package/dist/esm-es5/{global-06801d00.js → global-9d3664e6.js} +1 -1
  67. package/dist/esm-es5/{intl-9809c77c.js → intl-c3678c68.js} +1 -1
  68. package/dist/esm-es5/loader.js +1 -1
  69. package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
  70. package/dist/esm-es5/priv-datepicker.entry.js +1 -1
  71. package/dist/esm-es5/ripple.js +1 -1
  72. package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
  73. package/dist/esm-es5/wm-button.entry.js +1 -1
  74. package/dist/esm-es5/wm-chart.entry.js +1 -1
  75. package/dist/esm-es5/wm-datepicker.entry.js +1 -1
  76. package/dist/esm-es5/wm-file.entry.js +1 -1
  77. package/dist/esm-es5/wm-input.entry.js +1 -1
  78. package/dist/esm-es5/wm-line-chart.entry.js +1 -1
  79. package/dist/esm-es5/wm-modal-header.entry.js +1 -1
  80. package/dist/esm-es5/wm-modal.entry.js +1 -1
  81. package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
  82. package/dist/esm-es5/wm-navigator.entry.js +1 -1
  83. package/dist/esm-es5/wm-network-uploader.entry.js +1 -1
  84. package/dist/esm-es5/wm-option_2.entry.js +1 -1
  85. package/dist/esm-es5/wm-pagination.entry.js +1 -1
  86. package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
  87. package/dist/esm-es5/wm-search.entry.js +1 -1
  88. package/dist/esm-es5/wm-snackbar.entry.js +1 -1
  89. package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
  90. package/dist/esm-es5/wm-tag-input.entry.js +1 -1
  91. package/dist/esm-es5/wm-timepicker.entry.js +1 -1
  92. package/dist/esm-es5/wm-toggletip.entry.js +1 -1
  93. package/dist/esm-es5/wm-uploader.entry.js +1 -1
  94. package/dist/ripple/{p-dd01929e.system.entry.js → p-0259d353.system.entry.js} +1 -1
  95. package/dist/ripple/{p-c1857a16.entry.js → p-0afff679.entry.js} +1 -1
  96. package/dist/ripple/{p-5d592297.system.entry.js → p-0b0f8667.system.entry.js} +1 -1
  97. package/dist/ripple/{p-84e55d9e.entry.js → p-0ed2b6df.entry.js} +1 -1
  98. package/dist/ripple/{p-b982a342.entry.js → p-0ef2737d.entry.js} +1 -1
  99. package/dist/ripple/{p-adf76148.entry.js → p-11b91d75.entry.js} +1 -1
  100. package/dist/ripple/{p-ba31d982.system.js → p-161d5e7c.system.js} +1 -1
  101. package/dist/ripple/{p-24d9f6fe.entry.js → p-1841a3a5.entry.js} +1 -1
  102. package/dist/ripple/{p-8f273c5b.system.entry.js → p-1d62ea4d.system.entry.js} +1 -1
  103. package/dist/ripple/{p-f9539737.system.entry.js → p-2570ec1f.system.entry.js} +1 -1
  104. package/dist/ripple/{p-50623da2.entry.js → p-26985b84.entry.js} +1 -1
  105. package/dist/ripple/{p-20df08be.system.entry.js → p-2d2d30a5.system.entry.js} +1 -1
  106. package/dist/ripple/{p-e882a31f.system.entry.js → p-323e5fff.system.entry.js} +1 -1
  107. package/dist/ripple/{p-5e55eb56.system.js → p-32d973fa.system.js} +1 -1
  108. package/dist/ripple/{p-fbb44f76.system.entry.js → p-426ba254.system.entry.js} +1 -1
  109. package/dist/ripple/{p-cab12cec.system.entry.js → p-45376571.system.entry.js} +1 -1
  110. package/dist/ripple/{p-725c757a.entry.js → p-4a3f88f8.entry.js} +1 -1
  111. package/dist/ripple/{p-c3915cfe.system.entry.js → p-5257b743.system.entry.js} +1 -1
  112. package/dist/ripple/{p-06871476.entry.js → p-56298c7d.entry.js} +1 -1
  113. package/dist/ripple/{p-fea4bc00.entry.js → p-5fbec5ff.entry.js} +1 -1
  114. package/dist/ripple/{p-11763c02.entry.js → p-631a011f.entry.js} +1 -1
  115. package/dist/ripple/{p-364753eb.js → p-653943d0.js} +1 -1
  116. package/dist/ripple/{p-7f722888.entry.js → p-6a2b7449.entry.js} +1 -1
  117. package/dist/ripple/{p-5c1b2132.system.entry.js → p-6ca3c1c0.system.entry.js} +1 -1
  118. package/dist/ripple/{p-9e29176c.entry.js → p-6cef908c.entry.js} +1 -1
  119. package/dist/ripple/{p-3b50511c.system.entry.js → p-6dd460d3.system.entry.js} +1 -1
  120. package/dist/ripple/{p-2ebac749.entry.js → p-73bd2015.entry.js} +1 -1
  121. package/dist/ripple/{p-27efb4d0.system.js → p-7471439a.system.js} +1 -1
  122. package/dist/ripple/{p-d72b00a0.entry.js → p-86bd1f20.entry.js} +1 -1
  123. package/dist/ripple/{p-25c1bd67.system.entry.js → p-8debafc6.system.entry.js} +1 -1
  124. package/dist/ripple/{p-cd7cc5c6.js → p-8e001d5e.js} +1 -1
  125. package/dist/ripple/p-96625959.system.entry.js +1 -0
  126. package/dist/ripple/{p-185c3645.entry.js → p-98488132.entry.js} +1 -1
  127. package/dist/ripple/{p-74a92541.system.entry.js → p-98b6e5da.system.entry.js} +1 -1
  128. package/dist/ripple/{p-fd354e00.system.js → p-9e5a95f9.system.js} +1 -1
  129. package/dist/ripple/{p-39e17683.system.js → p-a0ab477c.system.js} +1 -1
  130. package/dist/ripple/{p-2acf8af1.system.entry.js → p-a6f28b0b.system.entry.js} +1 -1
  131. package/dist/ripple/{p-26031cd0.system.entry.js → p-ae20ba70.system.entry.js} +1 -1
  132. package/dist/ripple/{p-9cb8f41b.entry.js → p-b8580615.entry.js} +1 -1
  133. package/dist/ripple/{p-d8de670a.system.entry.js → p-b91e3f86.system.entry.js} +1 -1
  134. package/dist/ripple/{p-80ca72ff.system.entry.js → p-ba6a3364.system.entry.js} +1 -1
  135. package/dist/ripple/{p-e0f270e2.system.entry.js → p-bbffc0d1.system.entry.js} +1 -1
  136. package/dist/ripple/{p-fcdd9e03.system.entry.js → p-bedd750c.system.entry.js} +1 -1
  137. package/dist/ripple/{p-89bf36c8.system.entry.js → p-ca265cea.system.entry.js} +1 -1
  138. package/dist/ripple/{p-da01c531.entry.js → p-cbe31120.entry.js} +1 -1
  139. package/dist/ripple/{p-42aeb9bb.js → p-d3accb39.js} +1 -1
  140. package/dist/ripple/{p-3ec4ae19.entry.js → p-d3f4e391.entry.js} +1 -1
  141. package/dist/ripple/{p-ae97bf6c.system.entry.js → p-e6038b0f.system.entry.js} +1 -1
  142. package/dist/ripple/{p-697ba13b.entry.js → p-e9a21714.entry.js} +1 -1
  143. package/dist/ripple/{p-ed3e41ed.entry.js → p-e9e2e4c4.entry.js} +1 -1
  144. package/dist/ripple/{p-aae11e37.system.entry.js → p-f0b5cc80.system.entry.js} +1 -1
  145. package/dist/ripple/{p-ff888d78.js → p-f0d87250.js} +1 -1
  146. package/dist/ripple/{p-fd91cd58.entry.js → p-f1fae497.entry.js} +1 -1
  147. package/dist/ripple/{p-53f5e969.system.entry.js → p-f8512877.system.entry.js} +1 -1
  148. package/dist/ripple/{p-4b59b16a.entry.js → p-f8654cb1.entry.js} +1 -1
  149. package/dist/ripple/{p-198f596b.entry.js → p-f8b58321.entry.js} +1 -1
  150. package/dist/ripple/{p-535e7286.entry.js → p-fa641a36.entry.js} +1 -1
  151. package/dist/ripple/ripple.esm.js +1 -1
  152. package/dist/ripple/ripple.js +1 -1
  153. package/package.json +1 -1
  154. package/dist/ripple/p-50be6128.system.entry.js +0 -1
  155. package/dist/types/components/wm-tag-input/wm-tag-input-row/wm-tag-input-row.d.ts +0 -11
  156. package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +0 -138
  157. package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +0 -85
@@ -1 +1 @@
1
- System.register(["./p-30bf24f8.system.js","./p-5e55eb56.system.js","./p-27efb4d0.system.js"],(function(e){"use strict";var t,o,i,r,s,n,l,a,c,p,d,h,u,f;return{setters:[function(e){t=e.r;o=e.c;i=e.h;r=e.H;s=e.g;n=e.f},function(e){l=e.i;a=e.d;c=e.t;p=e.g;d=e.a;h=e.o;u=e.y},function(e){f=e.g}],execute:function(){var m=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){font-style:italic;color:var(--wmcolor-select-option-text-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.duplicate.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo{-ms-flex:none;flex:none}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var b=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=o(this,"wmOptionSelected",7);this.wmKeyUpPressed=o(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=o(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=o(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=o(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=o(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=o(this,"wmEnterKeyPressed",7);this.wmLetterPressed=o(this,"wmLetterPressed",7);this.wmOptionBlurred=o(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(e.prototype,"hostClasses",{get:function(){var e=[];if(this.subinfo){e.push("hassubinfo")}if(this.parentSelectEl.multiple){e.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){e.push("filtered-out")}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parentSelectEl",{get:function(){var e;return((e=this.el.parentElement)===null||e===void 0?void 0:e.nodeName)!=="WM-SELECT"?this.el.getRootNode().host:this.el.parentElement},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case" ":e.preventDefault();this.el.click();break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;default:if(e.key.length===1){this.wmLetterPressed.emit(e.key)}}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit(this.el)}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.setAttribute("aria-selected","false")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.handleSearch=function(e){this.searchTerm=e.detail.searchTerm.toLowerCase();if(this.searchTerm){var t=new RegExp("".concat(this.searchTerm),"gi");var o=this.el.textContent.replace(t,(function(e){return"<strong>".concat(e,"</strong>")}));this.textEl.innerHTML=o}else{this.textEl.innerHTML=this.el.textContent}};e.prototype.componentWillLoad=function(){var e=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentSelectEl.addEventListener("wmSelectSearchChanged",(function(t){return e.handleSearch(t)}))};e.prototype.render=function(){var e=this;return i(r,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},i("div",{class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},i("span",{"aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),i("span",{class:"sr-only"},this.el.textContent)),i("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}},enumerable:false,configurable:true});return e}());b.style=m;var w=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}.wrapper .button-wrapper .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;top:100%;left:0}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var g=e("wm_select",function(){function e(e){var i=this;t(this,e);this.wmSelectDidLoad=o(this,"wmSelectDidLoad",7);this.wmSelectBlurred=o(this,"wmSelectBlurred",7);this.wmSelectChanged=o(this,"wmSelectChanged",7);this.wmComponentBlurred=o(this,"wmComponentBlurred",7);this.wmSelectSearchChanged=o(this,"wmSelectSearchChanged",7);this.selectAllMessage=l.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=l.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=l.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=l.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=a((function(){i.keysSoFar=""}),500);this.debouncedSearch=a((function(){i.wmSelectSearchChanged.emit({searchTerm:i.searchTerm});if(i.filteredOptions.length){i.announce(i.resultsFoundMessage)}else{i.announce(i.noResultsFoundMessage)}}),150);this.disabled=false;this.invalid=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=l.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isTabbing=false;this.isExpanded=false;this.announcement=""}Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"duplicateOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.duplicateOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(e){return!e.classList.contains("hidden")&&!e.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return c(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"searchTerm",{get:function(){return this.searchFieldEl?this.searchFieldEl.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filteredOptions",{get:function(){var e=this;return this.childOptions.filter((function(t){var o;return(o=t.textContent)===null||o===void 0?void 0:o.toLowerCase().includes(e.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return l.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"noResultsFoundMessage",{get:function(){return l.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){var t=e.detail;this.focusOption(t);if(!this.multiple){if(!t.selected){this.selectOption(t);var o={changedOption:t,selectedOptions:[t]};this.wmSelectChanged.emit(o);var i=new CustomEvent("change",{detail:o});this.el.dispatchEvent(i)}this.close()}else{this.selectOption(t);var r=t.classList.contains("duplicate");var s=r?this.findCorrespondingOption(t):t;var n=this.childOptions.filter((function(e){return e.selected}));var o={changedOption:s,selectedOptions:n};this.wmSelectChanged.emit(o);var i=new CustomEvent("change",{detail:o});this.el.dispatchEvent(i)}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.detail)};e.prototype.handleChildDown=function(e){this.moveDown(e.detail)};e.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};e.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){if(!this.isElOrChild(e.detail.relatedTarget)){var t=new CustomEvent("blur");t.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(t)}};e.prototype.handleClick=function(e){if(!this.isElOrChild(e.target)){this.close()}};e.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};e.prototype.selectAllOptions=function(){this.allOptionEls.forEach((function(e){return e.selected=true}));this.setSelectAllButton();this.setButtonText();var e={changedOption:null,selectedOptions:this.childOptions};this.wmSelectChanged.emit(e)};e.prototype.deselectAllOptions=function(){this.allOptionEls.forEach((function(e){return e.selected=false}));this.setSelectAllButton();this.setButtonText();var e={changedOption:null,selectedOptions:[]};this.wmSelectChanged.emit(e)};e.prototype.handleButtonBlur=function(e){if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleSearchFieldBlur=function(e){this.searchFieldWrapperEl.classList.remove("focus");if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.uid=this.el.id?this.el.id:p();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}if(this.selectedOptions.length>0){this.selectedOptions.forEach((function(t){e.displayedOptions.push(t)}))}else if(!this.multiple){this.selectOption(this.allOptionEls[0])}d(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.listboxEl.style.maxHeight=this.maxHeight}if(this.multiple){this.updateOptionVisibility()}this.setButtonText()};e.prototype.componentWillUpdate=function(){if(this.multiple){var e=this.visibleOptionEls.filter((function(e){return e.classList.contains("duplicate")}));e.forEach((function(t,o){if(o===e.length-1){t.classList.add("last")}else{t.classList.remove("last")}}))}};e.prototype.moveUp=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var o=t[t.indexOf(e)-1]||t[t.length-1];if(o){this.focusOption(o)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var o=t[t.indexOf(e)+1]||t[0];if(o){this.focusOption(o)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var o=this.el.clientHeight;var i=this.buttonEl.clientHeight;this.openUp=h(this.el,this.dropdownEl.clientHeight,o,i);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){switch(e){case"next":if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else{t.moveDown(t.visibleOptionEls.filter((function(e){return e.selected})).slice(-1)[0])}break;case"previous":if(t.search){t.focusOption(t.visibleOptionEls[t.visibleOptionEls.length-1])}else{t.moveUp(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}break;default:if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else if(t.selectedOptions.length>0){t.focusOption(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}else{t.focusOption(t.visibleOptionEls[0])}break}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.allOptionEls.map((function(e){return e.focused=false}));window.setTimeout((function(){t.dropdownEl.classList.add("hidden");if(t.multiple){t.updateOptionVisibility()}if(t.search){t.searchFieldEl.value="";t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm})}if(e){t.buttonEl.focus()}}),150)}};e.prototype.updateOptionVisibility=function(){var e=this;this.childOptions.forEach((function(t,o){var i=e.duplicateOptions[o];if(t.selected){t.classList.add("hidden");i.classList.remove("hidden")}else{t.classList.remove("hidden");i.classList.add("hidden")}}))};e.prototype.focusOption=function(e){this.allOptionEls.forEach((function(t){return t.focused=t===e}));e.scrollIntoView({block:"nearest"});window.setTimeout((function(){return e.scrollIntoView({block:"nearest"})}),60);e.focus()};e.prototype.selectOption=function(e){if(e.classList.contains("duplicate")){var t=this.findCorrespondingOption(e);t.selected=!t.selected;n(this.el)}else if(this.multiple){e.selected=!e.selected}else{this.childOptions.forEach((function(t){return t.selected=t===e}))}if(this.selectAllEl){this.setSelectAllButton()}this.setButtonText()};e.prototype.findAndFocusOption=function(e){var t=this;var o=e.detail.toLowerCase();if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,o){if(e.focused){t.searchIndex=o}}))}this.keysSoFar+=o;var i=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!i){i=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(i){this.focusOption(i)}this.debouncedClearKeysSoFar()};e.prototype.findMatchInRange=function(e,t,o){var i=this;var r=null;var s=e.slice(t,o);s.forEach((function(e){var t=e.textContent;if(!r&&t&&t.toLowerCase().startsWith(i.keysSoFar)){r=e}}));return r};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("duplicate");return t?this.childOptions[this.duplicateOptions.indexOf(e)]:this.duplicateOptions[this.childOptions.indexOf(e)]};e.prototype.isElOrChild=function(e){var t;return e===this.el||this.el.contains(e)||((t=this.el.shadowRoot)===null||t===void 0?void 0:t.contains(e))};e.prototype.exposeErrors=function(){var e=p();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.handleDisabledChange=function(){d(this.el,this.isDisabled)};e.prototype.renderErrorContainer=function(){var e=this;return i("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.handleKeyDown=function(e){var t=e.target;switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"Escape":e.preventDefault();this.close();break;case"Enter":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick()}break}};e.prototype.setButtonText=function(){var e=this;this.displayedOptions=this.childOptions.filter((function(e){return e.selected})).map((function(t){return!t.classList.contains("hidden")?t:e.findCorrespondingOption(t)}));if(this.multiple){var t=38;var o=window.getComputedStyle(this.buttonEl);var i=parseInt(o.getPropertyValue("padding-left").slice(0,-2));var r=parseInt(o.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-r-t;var n=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var l=n.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(l>s&&this.displayedOptions.length>1){this.overflowCount++;l-=n[n.length-1];n.pop();this.displayedOptions.pop()}}};e.prototype.setSelectAllButton=function(){if(this.allSelected){this.selectAllEl.textContent=this.deselectAllMessage;this.announce(this.allOptionsSelectedMessage)}else{this.selectAllEl.textContent=this.selectAllMessage;if(this.selectedOptions.length===0){this.announce(this.allOptionsDeselectedMessage)}}};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return i("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return i("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo){return i("span",{class:"subinfo"},this.selectedOptions[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return i("span",null,i("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return i("div",{class:"search"},i("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},i("div",{class:"icon"}),i("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list-".concat(this.uid),"aria-expanded":this.isExpanded?"true":"false",onKeyDown:function(t){return e.handleKeyDown(t)},onFocus:function(){return e.searchFieldWrapperEl.classList.add("focus")},onBlur:function(t){return e.handleSearchFieldBlur(t)},onInput:function(){return e.debouncedSearch()},placeholder:this.searchPlaceholder})))};e.prototype.renderSearchFailedMessage=function(){return i("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;if(this.selectAll&&this.multiple&&this.searchTerm==""){return i("button",{ref:function(t){return e.selectAllEl=t},class:"select-all",onClick:function(){return e.handleSelectAllClick()},onKeyDown:function(t){return e.handleKeyDown(t)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)}};e.prototype.renderDuplicateOptions=function(){return Array.from(this.el.children).map((function(e){return i("wm-option",{class:"duplicate",selected:e.selected},e.textContent)}))};e.prototype.render=function(){var e;var t=this;var o=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.isDisabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return i(r,{onBlur:function(e){return t.handleComponentBlur(e)}},i("div",{class:"wrapper ".concat(u()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},i("div",{class:"label-wrapper"},i("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?i("span",{class:"required"},i("span",{class:"sr-only"},f.requiredField),i("span",{"aria-hidden":"true"},"*")):"")),i("div",{class:"button-wrapper"},i("button",Object.assign({},o,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),i("span",{class:this.selectedOptions.length>0&&this.selectedOptions.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},i("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),i("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),i("div",{id:"list-".concat(this.uid),class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.renderSelectAllButton(),this.multiple&&this.renderDuplicateOptions(),i("slot",null))),this.renderErrorContainer(),i("div",{id:"announcement","aria-live":"polite",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}());g.style=w}}}));
1
+ System.register(["./p-30bf24f8.system.js","./p-32d973fa.system.js","./p-7471439a.system.js"],(function(e){"use strict";var t,o,i,r,s,n,l,a,c,p,d,h,u,f;return{setters:[function(e){t=e.r;o=e.c;i=e.h;r=e.H;s=e.g;n=e.f},function(e){l=e.i;a=e.d;c=e.t;p=e.g;d=e.a;h=e.o;u=e.y},function(e){f=e.g}],execute:function(){var m=':host(:not(:last-child)){border-bottom:2px solid;border-color:var(--wmcolor-select-option-border)}:host{display:block;cursor:pointer;position:relative;padding:1.25rem;background:var(--wmcolor-select-option-background);font-family:inherit;list-style:none;color:var(--wmcolor-select-option-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host:focus,:host.focus{outline:none;background:var(--wmcolor-select-option-background-focus)}:host.icon{color:var(--wmcolor-interactive)}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.checkbox:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f131";display:inline-block;margin-right:0.25rem;color:var(--wmcolor-interactive)}:host([aria-selected=true]){background:var(--wmcolor-select-option-background);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){font-style:italic;color:var(--wmcolor-select-option-text-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.duplicate.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex}:host(.hassubinfo) .option-wrapper{-ms-flex:1;flex:1}:host(.hassubinfo) .subinfo{-ms-flex:none;flex:none}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:inline-block}::slotted{font-family:inherit}::slotted(i){font-size:0.875rem}::slotted(i):before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;margin-right:0.625rem;pointer-events:none}:host(:focus){outline:none;background:var(--wmcolor-select-option-background-hover)}:host(:hover){background:var(--wmcolor-select-option-background-hover);outline:none}';var b=e("wm_option",function(){function e(e){t(this,e);this.wmOptionSelected=o(this,"wmOptionSelected",7);this.wmKeyUpPressed=o(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=o(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=o(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=o(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=o(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=o(this,"wmEnterKeyPressed",7);this.wmLetterPressed=o(this,"wmLetterPressed",7);this.wmOptionBlurred=o(this,"wmOptionBlurred",7);this.value=undefined;this.subinfo=undefined;this.disabled=false;this.selected=false;this.focused=false;this.searchTerm=""}Object.defineProperty(e.prototype,"hostClasses",{get:function(){var e=[];if(this.subinfo){e.push("hassubinfo")}if(this.parentSelectEl.multiple){e.push("multi-option")}if(!this.el.textContent.toLowerCase().includes(this.searchTerm)){e.push("filtered-out")}return e.join(" ")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"parentSelectEl",{get:function(){var e;return((e=this.el.parentElement)===null||e===void 0?void 0:e.nodeName)!=="WM-SELECT"?this.el.getRootNode().host:this.el.parentElement},enumerable:false,configurable:true});e.prototype.handleKeydown=function(e){switch(e.key){case"ArrowUp":e.preventDefault();this.wmKeyUpPressed.emit(this.el);break;case"ArrowDown":e.preventDefault();this.wmKeyDownPressed.emit(this.el);break;case"Enter":e.preventDefault();if(!this.disabled){this.el.click();this.wmEnterKeyPressed.emit(this.el)}break;case" ":e.preventDefault();this.el.click();break;case"Escape":e.preventDefault();e.stopPropagation();this.wmEscKeyPressed.emit();break;case"Home":e.preventDefault();this.wmHomeKeyPressed.emit();break;case"End":e.preventDefault();this.wmEndKeyPressed.emit();break;default:if(e.key.length===1){this.wmLetterPressed.emit(e.key)}}};e.prototype.handleSelection=function(){if(!this.disabled){this.wmOptionSelected.emit(this.el)}};e.prototype.handleBlur=function(e){this.wmOptionBlurred.emit({relatedTarget:e.relatedTarget})};e.prototype.syncAriaSelected=function(){this.selected?this.el.setAttribute("aria-selected","true"):this.el.setAttribute("aria-selected","false")};e.prototype.syncAriaDisabled=function(){this.disabled?this.el.setAttribute("aria-disabled","true"):this.el.removeAttribute("aria-disabled")};e.prototype.updateDisabledOnClick=function(){if(this.disabled&&this.el.onclick){this.onClickFunc=this.el.onclick;this.el.onclick=null}else if(!this.disabled&&this.onClickFunc){this.el.onclick=this.onClickFunc}};e.prototype.handleSearch=function(e){this.searchTerm=e.detail.searchTerm.toLowerCase();if(this.searchTerm){var t=new RegExp("".concat(this.searchTerm),"gi");var o=this.el.textContent.replace(t,(function(e){return"<strong>".concat(e,"</strong>")}));this.textEl.innerHTML=o}else{this.textEl.innerHTML=this.el.textContent}};e.prototype.componentWillLoad=function(){var e=this;this.syncAriaSelected();this.syncAriaDisabled();this.updateDisabledOnClick();this.parentSelectEl.addEventListener("wmSelectSearchChanged",(function(t){return e.handleSearch(t)}))};e.prototype.render=function(){var e=this;return i(r,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},i("div",{class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},i("span",{"aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),i("span",{class:"sr-only"},this.el.textContent)),i("div",{class:"subinfo"},this.subinfo))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{selected:["syncAriaSelected"],disabled:["syncAriaDisabled","updateDisabledOnClick"]}},enumerable:false,configurable:true});return e}());b.style=m;var w=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background:var(--wmcolor-option-background);--wmcolor-select-option-border:var(--wmcolor-option-border);--wmcolor-select-option-text-disabled:var(--wmcolor-option-text-disabled);--wmcolor-select-option-text:var(--wmcolor-option-text);--wmcolor-select-search-border:var(--wmcolor-input-border);--wmcolor-select-search-icon:var(--wmcolor-icon-accent);--wmcolor-select-searchresults-text:var(--wmcolor-text);--wmcolor-select-selectall-background:var(--wmcolor-select-option-background);--wmcolor-select-selectall-border:var(--wmcolor-select-option-border);--wmcolor-select-selectall-text:var(--wmcolor-interactive);--wmcolor-select-text:var(--wmcolor-interactive);position:relative;display:block;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem}.wrapper .label{display:block;line-height:normal;font-weight:600;white-space:nowrap;margin-bottom:0.25rem}.wrapper .label .required{color:var(--wmcolor-text-required)}.wrapper.label-left{-ms-flex-direction:row;flex-direction:row}.wrapper.label-left .label-wrapper{line-height:2.5rem}.wrapper.label-left .label-wrapper .label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:2.5rem;white-space:normal;margin-bottom:0;margin-right:0.75rem}.wrapper.label-none label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}.wrapper.invalid .label{color:var(--wmcolor-text-error)}.wrapper.invalid .label:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f026";margin-left:0.3125rem}[dir=RTL] .wrapper.invalid .label:after{margin-left:0;margin-right:0.3125rem}.wrapper.rtl.label-left .label{margin-right:0;margin-left:0.75rem}.wrapper .button-wrapper{position:relative;-ms-flex:1;flex:1;font-size:1.125rem;color:var(--wmcolor-select-text);min-width:8.75rem}.wrapper .button-wrapper .displayedoption{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;background:var(--wmcolor-select-background);width:100%;border:solid 1px;border-color:var(--wmcolor-select-border);padding:0 1.875rem 0 0.9375rem;cursor:pointer;height:2.5rem;line-height:normal;font-family:inherit;color:var(--wmcolor-select-text);font-weight:400;font-size:0.875rem;text-transform:none;text-align:left}@media only screen and (max-width: 768px){.wrapper .button-wrapper .displayedoption{height:2.75rem}}.wrapper .button-wrapper .displayedoption:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";position:absolute;right:0.5625rem;pointer-events:none;font-size:1.12rem}.wrapper .button-wrapper .displayedoption:hover:not(:disabled):not(.-disabled):not(.-raised){background:var(--wmcolor-select-background);text-decoration:none}.wrapper .button-wrapper .displayedoption:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}.wrapper .button-wrapper .displayedoption:focus{outline:none}.wrapper .button-wrapper .displayedoption::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption.user-is-tabbing:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}.wrapper .button-wrapper .displayedoption.user-is-tabbing:focus::-moz-focus-inner{border:0}.wrapper .button-wrapper .displayedoption .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-ms-flex:1;flex:1}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo{display:-ms-flexbox;display:flex}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .button-text{-ms-flex:1;flex:1;text-overflow:ellipsis;overflow:hidden;min-width:0}.wrapper .button-wrapper .displayedoption .overflowcontrol.hassubinfo .subinfo{-ms-flex:none;flex:none;font-style:italic}.wrapper .button-wrapper .displayedoption .overflow-counter{font-weight:bold;margin-left:0.5rem}.wrapper .button-wrapper>.displayedoption[disabled]{color:#6b6b6b;border-color:#8a8a8a;background:#f0f0f0;cursor:default}.wrapper .button-wrapper>.dropdown{-webkit-overflow-scrolling:touch;-webkit-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 4px 15px 0 rgba(0, 0, 0, 0.2);-ms-transition:transform 0.25s ease;-webkit-transition:transform 0.25s ease;-moz-transition:transform 0.25s ease;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-ms-transform:scale(1, 0);-webkit-transform:scale(1, 0);-moz-transform:scale(1, 0);transform:scale(1, 0);-ms-transform-origin:center top;-webkit-transform-origin:center top;-moz-transform-origin:center top;transform-origin:center top;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;position:absolute;top:0;right:0;background:var(--wmcolor-select-option-background);z-index:100;width:100%;font-size:0.875rem}.wrapper .button-wrapper>.dropdown.upwards{top:unset;bottom:calc(100% - 2.5rem);-ms-transform-origin:center bottom;-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;transform-origin:center bottom}.wrapper .button-wrapper>.dropdown.hidden{visibility:hidden}.wrapper .button-wrapper>.dropdown.open{-ms-transform:scale(1, 1);-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);transform:scale(1, 1)}.wrapper.invalid .button-wrapper .displayedoption{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-error);box-shadow:0 0 0 1px var(--wmcolor-input-border-error);border-color:var(--wmcolor-input-border-error)}.wrapper .error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem;margin-bottom:0.25rem;top:100%;left:0}.options-wrapper{max-height:12.5rem;overflow:auto}.select-all{width:100%;cursor:pointer;padding:1.25rem;border:none;margin:0;border-bottom:2px solid;border-color:var(--wmcolor-select-selectall-border);background:var(--wmcolor-select-selectall-background);font-family:inherit;font-size:inherit;text-align:left;text-align:start;font-weight:500;color:var(--wmcolor-select-selectall-text);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select-all:hover,.select-all:focus{outline:none;background:#f4f4f4}.search{-webkit-box-sizing:border-box;box-sizing:border-box;border-bottom:2px solid;border-color:var(--wmcolor-select-option-border);padding:1.25rem}.search .searchfield-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:2.75rem;width:100%;padding:0 0.75rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;border-color:var(--wmcolor-select-search-border)}.search .searchfield-wrapper:focus,.search .searchfield-wrapper.focus{-webkit-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);-moz-box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);box-shadow:0 0 0 1px var(--wmcolor-input-border-focus);outline:none;border-color:var(--wmcolor-input-border-focus)}.search .searchfield{width:100%;border:none;outline:none;font-family:inherit;font-size:0.875rem;margin-left:0.25rem}.search .icon:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f349";color:var(--wmcolor-select-search-icon);font-size:1.12rem}.search-results-message{padding:1.25rem;color:var(--wmcolor-select-searchresults-text);font-size:0.875rem;font-style:italic}.rtl>.dropdown{-ms-transform-origin:left top;-webkit-transform-origin:left top;-moz-transform-origin:left top;transform-origin:left top;left:0;right:auto}.rtl>.dropdown .option{padding-left:3rem;padding-right:1.25rem}.rtl>.displayedoption{padding:0 0.9375rem 0 1.875rem;text-align:right}.rtl>.displayedoption:before{right:auto;left:0.5625rem}';var g=e("wm_select",function(){function e(e){var i=this;t(this,e);this.wmSelectDidLoad=o(this,"wmSelectDidLoad",7);this.wmSelectBlurred=o(this,"wmSelectBlurred",7);this.wmSelectChanged=o(this,"wmSelectChanged",7);this.wmComponentBlurred=o(this,"wmComponentBlurred",7);this.wmSelectSearchChanged=o(this,"wmSelectSearchChanged",7);this.selectAllMessage=l.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=l.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=l.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=l.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=a((function(){i.keysSoFar=""}),500);this.debouncedSearch=a((function(){i.wmSelectSearchChanged.emit({searchTerm:i.searchTerm});if(i.filteredOptions.length){i.announce(i.resultsFoundMessage)}else{i.announce(i.noResultsFoundMessage)}}),150);this.disabled=false;this.invalid=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage="";this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=l.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=l.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=l.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});this.isTabbing=false;this.isExpanded=false;this.announcement=""}Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"duplicateOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.duplicateOptions.concat(this.childOptions)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"visibleOptionEls",{get:function(){return this.allOptionEls.filter((function(e){return!e.classList.contains("hidden")&&!e.classList.contains("filtered-out")}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDisabled",{get:function(){return c(this.disabled)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"searchTerm",{get:function(){return this.searchFieldEl?this.searchFieldEl.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"filteredOptions",{get:function(){var e=this;return this.childOptions.filter((function(t){var o;return(o=t.textContent)===null||o===void 0?void 0:o.toLowerCase().includes(e.searchTerm.toLowerCase())}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectedOptions",{get:function(){return Array.from(this.el.querySelectorAll("wm-option")).filter((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allSelected",{get:function(){return this.childOptions.every((function(e){return e.selected}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return l.formatMessage({id:"select.searchResultsFound",defaultMessage:"{numResults, plural, one {1 option found} other {# options found}}",description:"The message read by the screen reader, indicating how many results a search returned"},{numResults:this.filteredOptions.length})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"noResultsFoundMessage",{get:function(){return l.formatMessage({id:"select.noSearchResults",defaultMessage:"No results found. Please try your search again.",description:"The message displayed when no options pass the search filter"})},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleOptionSelection=function(e){var t=e.detail;this.focusOption(t);if(!this.multiple){if(!t.selected){this.selectOption(t);var o={changedOption:t,selectedOptions:[t]};this.wmSelectChanged.emit(o);var i=new CustomEvent("change",{detail:o});this.el.dispatchEvent(i)}this.close()}else{this.selectOption(t);var r=t.classList.contains("duplicate");var s=r?this.findCorrespondingOption(t):t;var n=this.childOptions.filter((function(e){return e.selected}));var o={changedOption:s,selectedOptions:n};this.wmSelectChanged.emit(o);var i=new CustomEvent("change",{detail:o});this.el.dispatchEvent(i)}};e.prototype.handleChildEnter=function(){this.close()};e.prototype.handleChildUp=function(e){this.moveUp(e.detail)};e.prototype.handleChildDown=function(e){this.moveDown(e.detail)};e.prototype.moveToFirstOption=function(){this.focusOption(this.visibleOptionEls[0])};e.prototype.moveToLastOption=function(){this.focusOption(this.visibleOptionEls[this.visibleOptionEls.length-1])};e.prototype.closePopupOnEscape=function(){this.close()};e.prototype.handleOptionBlur=function(e){if(!this.isElOrChild(e.detail.relatedTarget)){var t=new CustomEvent("blur");t.relatedTarget=e.detail.relatedTarget;this.el.dispatchEvent(t)}};e.prototype.handleClick=function(e){if(!this.isElOrChild(e.target)){this.close()}};e.prototype.handleSelectAllClick=function(){this.allSelected?this.deselectAllOptions():this.selectAllOptions()};e.prototype.selectAllOptions=function(){this.allOptionEls.forEach((function(e){return e.selected=true}));this.setSelectAllButton();this.setButtonText();var e={changedOption:null,selectedOptions:this.childOptions};this.wmSelectChanged.emit(e)};e.prototype.deselectAllOptions=function(){this.allOptionEls.forEach((function(e){return e.selected=false}));this.setSelectAllButton();this.setButtonText();var e={changedOption:null,selectedOptions:[]};this.wmSelectChanged.emit(e)};e.prototype.handleButtonBlur=function(e){if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleSearchFieldBlur=function(e){this.searchFieldWrapperEl.classList.remove("focus");if(this.isElOrChild(e.relatedTarget)){e.stopPropagation()}};e.prototype.handleKey=function(e){switch(e.key){case"ArrowDown":if(this.isExpanded===false){e.preventDefault();this.open("next")}break;case"ArrowUp":if(this.isExpanded===false){e.preventDefault();this.open("previous")}break}};e.prototype.componentWillLoad=function(){var e=this;if(!this.label){console.error("For accessibility purposes, this component requires a label (even if `label-position` is set to `none`).")}this.uid=this.el.id?this.el.id:p();if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}if(this.selectedOptions.length>0){this.selectedOptions.forEach((function(t){e.displayedOptions.push(t)}))}else if(!this.multiple){this.selectOption(this.allOptionEls[0])}d(this.el,this.isDisabled)};e.prototype.componentDidLoad=function(){this.wmSelectDidLoad.emit();this.dropdownEl.classList.add("hidden");n(this.el);if(this.maxHeight){this.listboxEl.style.maxHeight=this.maxHeight}if(this.multiple){this.updateOptionVisibility()}this.setButtonText()};e.prototype.componentWillUpdate=function(){if(this.multiple){var e=this.visibleOptionEls.filter((function(e){return e.classList.contains("duplicate")}));e.forEach((function(t,o){if(o===e.length-1){t.classList.add("last")}else{t.classList.remove("last")}}))}};e.prototype.moveUp=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var o=t[t.indexOf(e)-1]||t[t.length-1];if(o){this.focusOption(o)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var o=t[t.indexOf(e)+1]||t[0];if(o){this.focusOption(o)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var o=this.el.clientHeight;var i=this.buttonEl.clientHeight;this.openUp=h(this.el,this.dropdownEl.clientHeight,o,i);this.isExpanded=true;this.dropdownEl.classList.remove("hidden");window.requestAnimationFrame((function(){switch(e){case"next":if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else{t.moveDown(t.visibleOptionEls.filter((function(e){return e.selected})).slice(-1)[0])}break;case"previous":if(t.search){t.focusOption(t.visibleOptionEls[t.visibleOptionEls.length-1])}else{t.moveUp(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}break;default:if(t.search){t.searchFieldEl.focus();t.listboxEl.scrollTop=0}else if(t.selectedOptions.length>0){t.focusOption(t.visibleOptionEls.filter((function(e){return e.selected}))[0])}else{t.focusOption(t.visibleOptionEls[0])}break}}))}};e.prototype.close=function(e){var t=this;if(e===void 0){e=true}if(this.isExpanded){this.isExpanded=false;this.allOptionEls.map((function(e){return e.focused=false}));window.setTimeout((function(){t.dropdownEl.classList.add("hidden");if(t.multiple){t.updateOptionVisibility()}if(t.search){t.searchFieldEl.value="";t.wmSelectSearchChanged.emit({searchTerm:t.searchTerm})}if(e){t.buttonEl.focus()}}),150)}};e.prototype.updateOptionVisibility=function(){var e=this;this.childOptions.forEach((function(t,o){var i=e.duplicateOptions[o];if(t.selected){t.classList.add("hidden");i.classList.remove("hidden")}else{t.classList.remove("hidden");i.classList.add("hidden")}}))};e.prototype.focusOption=function(e){this.allOptionEls.forEach((function(t){return t.focused=t===e}));e.scrollIntoView({block:"nearest"});window.setTimeout((function(){return e.scrollIntoView({block:"nearest"})}),60);e.focus()};e.prototype.selectOption=function(e){if(e.classList.contains("duplicate")){var t=this.findCorrespondingOption(e);t.selected=!t.selected;n(this.el)}else if(this.multiple){e.selected=!e.selected}else{this.childOptions.forEach((function(t){return t.selected=t===e}))}if(this.selectAllEl){this.setSelectAllButton()}this.setButtonText()};e.prototype.findAndFocusOption=function(e){var t=this;var o=e.detail.toLowerCase();if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,o){if(e.focused){t.searchIndex=o}}))}this.keysSoFar+=o;var i=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!i){i=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(i){this.focusOption(i)}this.debouncedClearKeysSoFar()};e.prototype.findMatchInRange=function(e,t,o){var i=this;var r=null;var s=e.slice(t,o);s.forEach((function(e){var t=e.textContent;if(!r&&t&&t.toLowerCase().startsWith(i.keysSoFar)){r=e}}));return r};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("duplicate");return t?this.childOptions[this.duplicateOptions.indexOf(e)]:this.duplicateOptions[this.childOptions.indexOf(e)]};e.prototype.isElOrChild=function(e){var t;return e===this.el||this.el.contains(e)||((t=this.el.shadowRoot)===null||t===void 0?void 0:t.contains(e))};e.prototype.exposeErrors=function(){var e=p();this.errorContainer.id="wm-errors-".concat(e);this.buttonEl.setAttribute("aria-describedby","wm-errors-".concat(e))};e.prototype.handleDisabledChange=function(){d(this.el,this.isDisabled)};e.prototype.renderErrorContainer=function(){var e=this;return i("div",{id:"wm-errors",class:this.errorMessage?"error-message":"",ref:function(t){return e.errorContainer=t},"aria-live":"assertive","aria-atomic":"true"},this.errorMessage)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.emit();this.wmComponentBlurred.emit()}};e.prototype.handleKeyDown=function(e){var t=e.target;switch(e.key){case"ArrowDown":e.preventDefault();this.moveDown(e.target);break;case"ArrowUp":e.preventDefault();this.moveUp(e.target);break;case"Escape":e.preventDefault();this.close();break;case"Enter":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick();this.close()}break;case" ":if(t===this.selectAllEl){e.preventDefault();this.handleSelectAllClick()}break}};e.prototype.setButtonText=function(){var e=this;this.displayedOptions=this.childOptions.filter((function(e){return e.selected})).map((function(t){return!t.classList.contains("hidden")?t:e.findCorrespondingOption(t)}));if(this.multiple){var t=38;var o=window.getComputedStyle(this.buttonEl);var i=parseInt(o.getPropertyValue("padding-left").slice(0,-2));var r=parseInt(o.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-i-r-t;var n=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-wrapper").clientWidth}));var l=n.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(l>s&&this.displayedOptions.length>1){this.overflowCount++;l-=n[n.length-1];n.pop();this.displayedOptions.pop()}}};e.prototype.setSelectAllButton=function(){if(this.allSelected){this.selectAllEl.textContent=this.deselectAllMessage;this.announce(this.allOptionsSelectedMessage)}else{this.selectAllEl.textContent=this.selectAllMessage;if(this.selectedOptions.length===0){this.announce(this.allOptionsDeselectedMessage)}}};e.prototype.announce=function(e){if(this.liveRegionEl.textContent===e){e+=" "}this.announcement=e};e.prototype.renderButtonText=function(){if(this.multiple&&this.displayedOptions.length<1){return i("span",null,this.placeholder)}else if(this.multiple&&this.allSelected&&this.overflowCount>0){return this.allSelectedMessage}else{return this.displayedOptions.map((function(e,t){return i("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderSubinfo=function(){if(!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo){return i("span",{class:"subinfo"},this.selectedOptions[0].subinfo)}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return i("span",null,i("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return i("div",{class:"search"},i("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},i("div",{class:"icon"}),i("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list-".concat(this.uid),"aria-expanded":this.isExpanded?"true":"false",onKeyDown:function(t){return e.handleKeyDown(t)},onFocus:function(){return e.searchFieldWrapperEl.classList.add("focus")},onBlur:function(t){return e.handleSearchFieldBlur(t)},onInput:function(){return e.debouncedSearch()},placeholder:this.searchPlaceholder})))};e.prototype.renderSearchFailedMessage=function(){return i("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;if(this.selectAll&&this.multiple&&this.searchTerm==""){return i("button",{ref:function(t){return e.selectAllEl=t},class:"select-all",onClick:function(){return e.handleSelectAllClick()},onKeyDown:function(t){return e.handleKeyDown(t)},tabindex:"-1"},this.allSelected?this.deselectAllMessage:this.selectAllMessage)}};e.prototype.renderDuplicateOptions=function(){return Array.from(this.el.children).map((function(e){return i("wm-option",{class:"duplicate",selected:e.selected},e.textContent)}))};e.prototype.render=function(){var e;var t=this;var o=(e={id:"selectbtn-".concat(this.uid)},e["disabled"]=this.isDisabled,e["aria-controls"]="list-".concat(this.uid),e["aria-labelledby"]="label-".concat(this.uid," selectbtn-").concat(this.uid),e["aria-describedby"]="wm-errors",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return i(r,{onBlur:function(e){return t.handleComponentBlur(e)}},i("div",{class:"wrapper ".concat(u()," label-").concat(this.labelPosition," ").concat(this.invalid||this.errorMessage?"invalid":"")},i("div",{class:"label-wrapper"},i("label",{class:"label",id:"label-".concat(this.uid),htmlFor:"selectbtn-".concat(this.uid)},this.label,this.requiredField?i("span",{class:"required"},i("span",{class:"sr-only"},f.requiredField),i("span",{"aria-hidden":"true"},"*")):"")),i("div",{class:"button-wrapper"},i("button",Object.assign({},o,{class:"displayedoption ".concat(this.isTabbing?"user-is-tabbing":""),ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),i("span",{class:this.selectedOptions.length>0&&this.selectedOptions.filter((function(e){return e.subinfo})).length>0?"overflowcontrol hassubinfo":"overflowcontrol"},i("span",{class:"button-text"},this.renderButtonText()),this.renderSubinfo()),this.renderOverflowCount()),i("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),i("div",{id:"list-".concat(this.uid),class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label-".concat(this.uid),ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.renderSelectAllButton(),this.multiple&&this.renderDuplicateOptions(),i("slot",null))),this.renderErrorContainer(),i("div",{id:"announcement","aria-live":"polite",class:"sr-only",ref:function(e){return t.liveRegionEl=e}},this.announcement))))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{errorMessage:["exposeErrors"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}());g.style=w}}}));
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as o}from"./p-b5bedd63.js";import{g as s}from"./p-cd7cc5c6.js";import"./p-ff888d78.js";const a=class{constructor(t){e(this,t),this.heading="",this.subheading=""}componentWillLoad(){const e=this.el.closest("wm-modal");this.uid=e.uid}emitParentCloseEvent(){this.el.closest("wm-modal").emitCloseEvent()}render(){return t(i,null,t("div",{class:"wm-wrapper"},t("div",null,t("h2",{class:"title",id:`wm-modal-heading-text-${this.uid}`},this.heading,t("span",{class:"subtitle"},this.subheading))),t("wm-button",{"button-type":"navigational",icon:"f156",tooltip:s.close,"tooltip-position":"left",id:`wm-modal-close-${this.uid}`,onClick:()=>this.emitParentCloseEvent()})))}get el(){return o(this)}};a.style="wm-modal-header{display:block;-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px}wm-modal-header .wm-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}wm-modal-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-header .wm-wrapper .title:focus{outline:none}";export{a as wm_modal_header}
1
+ import{r as e,h as t,H as i,g as o}from"./p-b5bedd63.js";import{g as s}from"./p-8e001d5e.js";import"./p-f0d87250.js";const a=class{constructor(t){e(this,t),this.heading="",this.subheading=""}componentWillLoad(){const e=this.el.closest("wm-modal");this.uid=e.uid}emitParentCloseEvent(){this.el.closest("wm-modal").emitCloseEvent()}render(){return t(i,null,t("div",{class:"wm-wrapper"},t("div",null,t("h2",{class:"title",id:`wm-modal-heading-text-${this.uid}`},this.heading,t("span",{class:"subtitle"},this.subheading))),t("wm-button",{"button-type":"navigational",icon:"f156",tooltip:s.close,"tooltip-position":"left",id:`wm-modal-close-${this.uid}`,onClick:()=>this.emitParentCloseEvent()})))}get el(){return o(this)}};a.style="wm-modal-header{display:block;-webkit-border-radius:5px 5px 0 0px;-moz-border-radius:5px 5px 0 0px;-ms-border-radius:5px 5px 0 0px;border-radius:5px 5px 0 0px}wm-modal-header .wm-wrapper{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}wm-modal-header .wm-wrapper .title{margin:0;font-weight:600;font-size:1.125rem;color:var(--wmcolor-modal-heading);line-height:normal}wm-modal-header .wm-wrapper .title .subtitle{display:block;font-size:0.875rem;font-weight:normal}wm-modal-header .wm-wrapper .title:focus{outline:none}";export{a as wm_modal_header}
@@ -1 +1 @@
1
- System.register(["./p-30bf24f8.system.js","./p-5e55eb56.system.js"],(function(e){"use strict";var t,o,r,i,n,l,a,s,c,d,p;return{setters:[function(e){t=e.r;o=e.c;r=e.f;i=e.h;n=e.H;l=e.g},function(e){a=e.d;s=e.i;c=e.l;d=e.s;p=e.h}],execute:function(){var f=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;height:3.5rem;padding:0 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem;gap:1rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{white-space:nowrap}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var u=e("wm_file",function(){function e(e){var i=this;t(this,e);this.wmIntFilePreviewed=o(this,"wmIntFilePreviewed",7);this.wmIntFileDownloaded=o(this,"wmIntFileDownloaded",7);this.wmIntFileDeleted=o(this,"wmIntFileDeleted",7);this.wmFileClearErrorClicked=o(this,"wmFileClearErrorClicked",7);this.isWithinLegacyUploader=false;this.debouncedResize=a((function(){i.isCondensed=i.el.clientWidth<500;r(i.el)}),50);this.file=undefined;this.showInfo="time";this.errorMessage=undefined;this.isCondensed=false}Object.defineProperty(e.prototype,"fileData",{get:function(){var e=this.file?JSON.parse(this.file):null;if(e&&e.progress&&typeof e.progress==="string"&&e.progress.match(/^[0-9]+$/)){e.progress=parseInt(e.progress.toString())}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.fileData&&this.fileData.hasOwnProperty("progress")&&this.fileData.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return s.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return s.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return s.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return s.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return s.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return s.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return s.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return s.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return s.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;var t=this.el.getRootNode().host;if(t&&t.nodeName==="WM-UPLOADER"){if(t.type||t.uploaderType){this.isWithinLegacyUploader=true}}var o=new ResizeObserver((function(){return e.debouncedResize()}));o.observe(this.el)};e.prototype.componentDidRender=function(){var e=this.el.shadowRoot.querySelector(".filename");var t=this.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=this.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:this.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;e.textContent=c(e,e.dataset.filename,r-t,7)};e.prototype.previewFile=function(e){this.wmIntFilePreviewed.emit(e.id)};e.prototype.downloadFile=function(e){this.wmIntFileDownloaded.emit(e.id)};e.prototype.deleteFile=function(e){this.wmIntFileDeleted.emit(e.id)};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){d("bottom",e.target,t)}};e.prototype.renderFileName=function(e,t){var o=this;return i("div",{class:"left-group"},i("div",{class:"name-wrapper"},i("span",{class:"sr-only"},e),i("span",{"aria-hidden":"true",class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return p()}}),t&&i("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(e,t){var o="";if(t==="time"&&e.lastUpdated){o=e.lastUpdated}else if(t==="size"&&e.size){o=e.size}return i("div",{class:"file-info"},o)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var l=i("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=i("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return i("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileActionButtons=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var l=i("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=i("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return i("div",{class:"file-controls"},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return i("div",{class:"file-wrapper"},i("div",{class:"file --progress"},i("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isUploading)))};e.prototype.renderFileControls=function(e){var t=e.fileActions&&e.fileActions.split(" ").length===1;var o=this.isCondensed&&!t;return o?this.renderActionMenu(e):this.renderFileActionButtons(e)};e.prototype.renderFile=function(e){var t=this;var o=e.type?"".concat(e.name,".").concat(e.type):e.name;var r=!this.isWithinLegacyUploader&&e.progress===100;return i("div",{class:"file-wrapper ".concat(r?"checked":"")},i("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(o,this.isUploading),!this.errorMessage&&i("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.showInfo!=="none"&&this.renderFileInfo(e,this.showInfo),e.fileActions!==""&&this.renderFileControls(e)),this.errorMessage&&i("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(e.name),onClick:function(){return t.wmFileClearErrorClicked.emit({name:e.name})}},this.clearButtonText)),this.errorMessage&&i("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return i(n,{role:"listitem"},this.isUploading?this.renderFileInProgress(this.fileData):this.renderFile(this.fileData))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());u.style=f}}}));
1
+ System.register(["./p-30bf24f8.system.js","./p-32d973fa.system.js"],(function(e){"use strict";var t,o,r,i,n,l,a,s,c,d,p;return{setters:[function(e){t=e.r;o=e.c;r=e.f;i=e.h;n=e.H;l=e.g},function(e){a=e.d;s=e.i;c=e.l;d=e.s;p=e.h}],execute:function(){var f=':host{--wmcolor-file-background-error:var(--wmcolor-background-error);--wmcolor-file-background:var(--wmcolor-background-readonly);--wmcolor-file-border-error:var(--wmcolor-border-error);--wmcolor-file-border:var(--wmcolor-border);--wmcolor-file-checkmark-icon:var(--wmcolor-positive);--wmcolor-file-progress:var(--wmcolor-progress);display:block;width:100%}.file-wrapper{font-size:0.875rem;position:relative;list-style:none}.file-wrapper .file{min-width:300px;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;height:3.5rem;padding:0 1.25rem;position:relative;background:var(--wmcolor-file-background);border:1px solid var(--wmcolor-file-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}.file-wrapper .file .filename{display:inline-block;white-space:nowrap}.file-wrapper .file .left-group{overflow:hidden}.file-wrapper .file .right-group{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:5rem;gap:1rem}.file-wrapper .file .right-group.condensed{padding-left:2.5rem}.file-wrapper .file .right-group .file-controls{display:-ms-flexbox;display:flex;gap:1rem}.file-wrapper .file .right-group .file-info{white-space:nowrap}.file-wrapper .file.--error{border:1px solid var(--wmcolor-file-border-error);background-color:var(--wmcolor-file-background-error);height:3.75rem}.file-wrapper.checked .file:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f133";position:absolute;right:-44px;color:var(--wmcolor-file-checkmark-icon);font-size:28px;line-height:1}.name-wrapper{overflow:hidden}.progress{position:absolute;left:0;top:0;right:0;height:8px}.error-message{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem;margin-top:0.25rem}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';var u=e("wm_file",function(){function e(e){var i=this;t(this,e);this.wmIntFilePreviewed=o(this,"wmIntFilePreviewed",7);this.wmIntFileDownloaded=o(this,"wmIntFileDownloaded",7);this.wmIntFileDeleted=o(this,"wmIntFileDeleted",7);this.wmFileClearErrorClicked=o(this,"wmFileClearErrorClicked",7);this.isWithinLegacyUploader=false;this.debouncedResize=a((function(){i.isCondensed=i.el.clientWidth<500;r(i.el)}),50);this.file=undefined;this.showInfo="time";this.errorMessage=undefined;this.isCondensed=false}Object.defineProperty(e.prototype,"fileData",{get:function(){var e=this.file?JSON.parse(this.file):null;if(e&&e.progress&&typeof e.progress==="string"&&e.progress.match(/^[0-9]+$/)){e.progress=parseInt(e.progress.toString())}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUploading",{get:function(){return this.fileData&&this.fileData.hasOwnProperty("progress")&&this.fileData.progress<100},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewButtonTooltip",{get:function(){return s.formatMessage({id:"file.previewButtonTooltip",defaultMessage:"Preview",description:"Tooltip of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadButtonTooltip",{get:function(){return s.formatMessage({id:"file.downloadButtonTooltip",defaultMessage:"Download",description:"Tooltip of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteButtonTooltip",{get:function(){return s.formatMessage({id:"file.deleteButtonTooltip",defaultMessage:"Delete",description:"Tooltip of a button that triggers a file to be deleted"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"previewActionMessage",{get:function(){return s.formatMessage({id:"file.previewAction",defaultMessage:"Preview File",description:"Label of a button that triggers a file to be previewed"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"downloadActionMessage",{get:function(){return s.formatMessage({id:"file.downloadAction",defaultMessage:"Download File",description:"Label of a button that triggers a file to be downloaded"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"deleteActionMessage",{get:function(){return s.formatMessage({id:"file.deleteAction",defaultMessage:"Delete File",description:"Label of a button that triggers a file to be delete"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"actionMenuLabel",{get:function(){return s.formatMessage({id:"file.actionMenuLabel",defaultMessage:"Actions",description:"Label of a button that opens a menu of file actions"})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"clearButtonText",{get:function(){return s.formatMessage({id:"file.clearErrorText",defaultMessage:"Clear",description:"Text for a button used to clear an error"})},enumerable:false,configurable:true});e.prototype.generateClearButtonLabel=function(e){return s.formatMessage({id:"file.clearErrorLabel",defaultMessage:"Clear {fileName} error",description:"Label for a button used to clear an error, including filename"},{fileName:e})};e.prototype.componentWillLoad=function(){var e=this;var t=this.el.getRootNode().host;if(t&&t.nodeName==="WM-UPLOADER"){if(t.type||t.uploaderType){this.isWithinLegacyUploader=true}}var o=new ResizeObserver((function(){return e.debouncedResize()}));o.observe(this.el)};e.prototype.componentDidRender=function(){var e=this.el.shadowRoot.querySelector(".filename");var t=this.el.shadowRoot.querySelector(".left-group").getBoundingClientRect().left;var o=this.el.shadowRoot.querySelector(".right-group");var r=o?o.getBoundingClientRect().left:this.el.shadowRoot.querySelector(".file-wrapper").getBoundingClientRect().right-20;e.textContent=c(e,e.dataset.filename,r-t,7)};e.prototype.previewFile=function(e){this.wmIntFilePreviewed.emit(e.id)};e.prototype.downloadFile=function(e){this.wmIntFileDownloaded.emit(e.id)};e.prototype.deleteFile=function(e){this.wmIntFileDeleted.emit(e.id)};e.prototype.handleFilenameMouseEnter=function(e,t){if(e.target.textContent.includes("...")){d("bottom",e.target,t)}};e.prototype.renderFileName=function(e,t){var o=this;return i("div",{class:"left-group"},i("div",{class:"name-wrapper"},i("span",{class:"sr-only"},e),i("span",{"aria-hidden":"true",class:"filename","data-filename":e,onMouseEnter:function(t){return o.handleFilenameMouseEnter(t,e)},onMouseLeave:function(){return p()}}),t&&i("span",{class:"sr-only"},"uploading")))};e.prototype.renderFileInfo=function(e,t){var o="";if(t==="time"&&e.lastUpdated){o=e.lastUpdated}else if(t==="size"&&e.size){o=e.size}return i("div",{class:"file-info"},o)};e.prototype.renderActionMenu=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-menuitem",{icon:"f208",onClick:function(){return t.previewFile(e)}},this.previewActionMessage);var l=i("wm-menuitem",{icon:"f1da",onClick:function(){return t.downloadFile(e)}},this.downloadActionMessage);var a=i("wm-menuitem",{icon:"f1c0",onClick:function(){return t.deleteFile(e)}},this.deleteActionMessage);return i("wm-action-menu",{"action-menu-type":"icon",tooltip:this.actionMenuLabel,"tooltip-position":"bottom","label-for-identical-buttons":"".concat(e.name," ").concat(this.actionMenuLabel)},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileActionButtons=function(e){var t=this;var o="download delete";var r=e.fileActions||o;var n=i("wm-button",{class:"preview-button","button-type":"icononly",tooltip:this.previewButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"preview ".concat(e.name),icon:"f208",onClick:function(){return t.previewFile(e)}});var l=i("wm-button",{class:"download-button","button-type":"icononly",tooltip:this.downloadButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"download ".concat(e.name),icon:"f1da",onClick:function(){return t.downloadFile(e)}});var a=i("wm-button",{class:"delete-button","button-type":"icononly",tooltip:this.deleteButtonTooltip,"tooltip-position":"bottom","label-for-identical-buttons":"delete ".concat(e.name),icon:"f1c0",onClick:function(){return t.deleteFile(e)}});return i("div",{class:"file-controls"},r.includes("preview")&&n,r.includes("download")&&l,r.includes("delete")&&a)};e.prototype.renderFileInProgress=function(e){var t=e.type?"".concat(e.name,".").concat(e.type):e.name;return i("div",{class:"file-wrapper"},i("div",{class:"file --progress"},i("div",{class:"progress",style:{background:"linear-gradient(to right, var(--wmcolor-file-progress) ".concat(e.progress,"%, transparent ").concat(e.progress,"%)")}}),this.renderFileName(t,this.isUploading)))};e.prototype.renderFileControls=function(e){var t=e.fileActions&&e.fileActions.split(" ").length===1;var o=this.isCondensed&&!t;return o?this.renderActionMenu(e):this.renderFileActionButtons(e)};e.prototype.renderFile=function(e){var t=this;var o=e.type?"".concat(e.name,".").concat(e.type):e.name;var r=!this.isWithinLegacyUploader&&e.progress===100;return i("div",{class:"file-wrapper ".concat(r?"checked":"")},i("div",{class:"file ".concat(this.errorMessage?"--error":"")},this.renderFileName(o,this.isUploading),!this.errorMessage&&i("div",{class:"right-group ".concat(this.isCondensed?"condensed":"")},this.showInfo!=="none"&&this.renderFileInfo(e,this.showInfo),e.fileActions!==""&&this.renderFileControls(e)),this.errorMessage&&i("wm-button",{"permanently-delete":true,"button-type":"textonly","label-for-identical-buttons":this.generateClearButtonLabel(e.name),onClick:function(){return t.wmFileClearErrorClicked.emit({name:e.name})}},this.clearButtonText)),this.errorMessage&&i("div",{class:"error-message"},this.errorMessage))};e.prototype.render=function(){return i(n,{role:"listitem"},this.isUploading?this.renderFileInProgress(this.fileData):this.renderFile(this.fileData))};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());u.style=f}}}));
@@ -1 +1 @@
1
- import{r as a,c as n,h as s,g as r}from"./p-b5bedd63.js";import{g as t,s as i,h as o}from"./p-ff888d78.js";import{g as e}from"./p-cd7cc5c6.js";const c=class{constructor(s){a(this,s),this.wmSnackbarSnackFinished=n(this,"wmSnackbarSnackFinished",7),this.userFinishedSnack=n(this,"userFinishedSnack",7),this.wmSnackbarActionTriggered=n(this,"wmSnackbarActionTriggered",7),this.userTriggeredAction=n(this,"userTriggeredAction",7),this.parsedNotifications=[],this.uid=this.el.id?this.el.id:t(),this.focusOnDismiss=null,this.timers=[],this.notifications="[]",this.isTabbing=!1,this.announcement=""}updateSnacks(a){const n=this.parsedNotifications.length;if(this.parsedNotifications=[...JSON.parse(a)],n<this.parsedNotifications.length){const a=this.parsedNotifications[0],n=window.setTimeout((()=>this.snackExpired()),2e4);this.timers=[n,...this.timers],this.announce(`${a.message} ${this.isTabbing?"":a.link}`),this.isTabbing&&a.link&&(this.focusOnDismiss=document.activeElement?document.activeElement:null,this.stopTimer(a),window.requestAnimationFrame((()=>{this.el.shadowRoot.querySelector(`#action-${a.id}`).focus()})))}}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}checkForTabbing(a){"Tab"===a.key&&this.toggleTabbingOn()}handleMouse(){this.toggleTabbingOff()}snackDismissed(a){this.endSnack(a),a.link&&this.isTabbing&&this.focusOnDismiss&&(this.focusOnDismiss.focus(),this.focusOnDismiss=null)}snackExpired(){this.endSnack(this.parsedNotifications[this.parsedNotifications.length-1])}endSnack(a){this.stopTimer(a),this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow}),this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})}snackLinkClicked(a){this.stopTimer(a),this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow}),this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})}stopTimer(a){this.parsedNotifications.forEach(((n,s)=>{n.id===a.id&&(clearTimeout(this.timers[s]),this.timers=this.timers.filter(((a,n)=>{if(n!==s)return a})))}))}announce(a){this.liveRegionEl.textContent===a&&(a+=" "),this.announcement=a}renderSnackbars(){return this.parsedNotifications.map((a=>s("div",{class:"wm-snack-wrapper"},s("div",{id:`snack-${this.uid}`,class:"wm-snackbar active neutral"},s("div",{class:"sr-only",tabindex:a.link?0:-1,onFocus:()=>a.link&&this.snackDismissed(a)}),s("div",{class:"wm-snackbarmsg"},s("div",{class:"msgtext"},s("span",null,a.message),a.link&&s("a",{id:`action-${a.id}`,class:"link "+(a.newWindow?"new-window":""),"aria-label":`Click to ${a.link}...${a.newWindow?" "+e.newWindow:""}`,tabindex:0,onClick:()=>{this.snackLinkClicked(a)},onKeyDown:n=>"Enter"===n.key&&this.snackLinkClicked(a)},s("span",{"aria-hidden":"true"},a.link))),s("button",{id:`close-button-${a.id}`,"aria-label":"Close this notification",class:"closesnack",tabindex:a.link?0:-1,onClick:()=>this.snackDismissed(a),onMouseEnter:a=>i("bottom",a.target,e.close),onMouseLeave:()=>o(),onFocus:a=>this.isTabbing&&i("bottom",a.target,e.close),onBlur:()=>o()})),s("div",{class:"sr-only",tabindex:a.link?0:-1,onFocus:()=>a.link&&this.snackDismissed(a)})))))}render(){return s("div",{class:{"wm-snackbars":!0,empty:0===this.parsedNotifications.length,"user-is-tabbing":this.isTabbing}},s("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:`wm-live-region-${this.uid}`,ref:a=>this.liveRegionEl=a},this.announcement),this.renderSnackbars())}get el(){return r(this)}static get watchers(){return{notifications:["updateSnacks"]}}};c.style=':host{--wmcolor-snackbar-background:var(--wmcolor-background-dark);--wmcolor-snackbar-close-background-hover:var(--wmcolor-button-background-navigational-hover-ondark);--wmcolor-snackbar-close-background:var(--wmcolor-button-background-navigational-ondark);--wmcolor-snackbar-close-icon-hover:var(--wmcolor-button-icon-navigational-hover-ondark);--wmcolor-snackbar-close-icon:var(--wmcolor-button-icon-navigational-ondark);--wmcolor-snackbar-link-background:var(--wmcolor-background-transparent);--wmcolor-snackbar-link:var(--wmcolor-interactive-ondark);--wmcolor-snackbar-text:var(--wmcolor-text-ondark)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:var(--wmcolor-snackbar-text);padding:0.9375rem 1.875rem;background:var(--wmcolor-snackbar-background);opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:var(--wmcolor-snackbar-link-background);padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:var(--wmcolor-snackbar-link);margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline;content:"\\f137";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:var(--wmcolor-snackbar-close-background);color:var(--wmcolor-snackbar-close-icon);cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156";font-size:1.12rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:var(--wmcolor-snackbar-close-background-hover);color:var(--wmcolor-snackbar-close-icon-hover)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);outline:none}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-snackbar-link)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-snackbar-link) 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';export{c as wm_snackbar}
1
+ import{r as a,c as n,h as s,g as r}from"./p-b5bedd63.js";import{g as t,s as i,h as o}from"./p-f0d87250.js";import{g as e}from"./p-8e001d5e.js";const c=class{constructor(s){a(this,s),this.wmSnackbarSnackFinished=n(this,"wmSnackbarSnackFinished",7),this.userFinishedSnack=n(this,"userFinishedSnack",7),this.wmSnackbarActionTriggered=n(this,"wmSnackbarActionTriggered",7),this.userTriggeredAction=n(this,"userTriggeredAction",7),this.parsedNotifications=[],this.uid=this.el.id?this.el.id:t(),this.focusOnDismiss=null,this.timers=[],this.notifications="[]",this.isTabbing=!1,this.announcement=""}updateSnacks(a){const n=this.parsedNotifications.length;if(this.parsedNotifications=[...JSON.parse(a)],n<this.parsedNotifications.length){const a=this.parsedNotifications[0],n=window.setTimeout((()=>this.snackExpired()),2e4);this.timers=[n,...this.timers],this.announce(`${a.message} ${this.isTabbing?"":a.link}`),this.isTabbing&&a.link&&(this.focusOnDismiss=document.activeElement?document.activeElement:null,this.stopTimer(a),window.requestAnimationFrame((()=>{this.el.shadowRoot.querySelector(`#action-${a.id}`).focus()})))}}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}checkForTabbing(a){"Tab"===a.key&&this.toggleTabbingOn()}handleMouse(){this.toggleTabbingOff()}snackDismissed(a){this.endSnack(a),a.link&&this.isTabbing&&this.focusOnDismiss&&(this.focusOnDismiss.focus(),this.focusOnDismiss=null)}snackExpired(){this.endSnack(this.parsedNotifications[this.parsedNotifications.length-1])}endSnack(a){this.stopTimer(a),this.wmSnackbarSnackFinished.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow}),this.userFinishedSnack.emit({id:a.id,message:a.message,link:a.link})}snackLinkClicked(a){this.stopTimer(a),this.wmSnackbarActionTriggered.emit({id:a.id,message:a.message,link:a.link,newWindow:a.newWindow}),this.userTriggeredAction.emit({id:a.id,message:a.message,link:a.link})}stopTimer(a){this.parsedNotifications.forEach(((n,s)=>{n.id===a.id&&(clearTimeout(this.timers[s]),this.timers=this.timers.filter(((a,n)=>{if(n!==s)return a})))}))}announce(a){this.liveRegionEl.textContent===a&&(a+=" "),this.announcement=a}renderSnackbars(){return this.parsedNotifications.map((a=>s("div",{class:"wm-snack-wrapper"},s("div",{id:`snack-${this.uid}`,class:"wm-snackbar active neutral"},s("div",{class:"sr-only",tabindex:a.link?0:-1,onFocus:()=>a.link&&this.snackDismissed(a)}),s("div",{class:"wm-snackbarmsg"},s("div",{class:"msgtext"},s("span",null,a.message),a.link&&s("a",{id:`action-${a.id}`,class:"link "+(a.newWindow?"new-window":""),"aria-label":`Click to ${a.link}...${a.newWindow?" "+e.newWindow:""}`,tabindex:0,onClick:()=>{this.snackLinkClicked(a)},onKeyDown:n=>"Enter"===n.key&&this.snackLinkClicked(a)},s("span",{"aria-hidden":"true"},a.link))),s("button",{id:`close-button-${a.id}`,"aria-label":"Close this notification",class:"closesnack",tabindex:a.link?0:-1,onClick:()=>this.snackDismissed(a),onMouseEnter:a=>i("bottom",a.target,e.close),onMouseLeave:()=>o(),onFocus:a=>this.isTabbing&&i("bottom",a.target,e.close),onBlur:()=>o()})),s("div",{class:"sr-only",tabindex:a.link?0:-1,onFocus:()=>a.link&&this.snackDismissed(a)})))))}render(){return s("div",{class:{"wm-snackbars":!0,empty:0===this.parsedNotifications.length,"user-is-tabbing":this.isTabbing}},s("div",{class:"sr-only","aria-live":"polite","aria-atomic":"false",id:`wm-live-region-${this.uid}`,ref:a=>this.liveRegionEl=a},this.announcement),this.renderSnackbars())}get el(){return r(this)}static get watchers(){return{notifications:["updateSnacks"]}}};c.style=':host{--wmcolor-snackbar-background:var(--wmcolor-background-dark);--wmcolor-snackbar-close-background-hover:var(--wmcolor-button-background-navigational-hover-ondark);--wmcolor-snackbar-close-background:var(--wmcolor-button-background-navigational-ondark);--wmcolor-snackbar-close-icon-hover:var(--wmcolor-button-icon-navigational-hover-ondark);--wmcolor-snackbar-close-icon:var(--wmcolor-button-icon-navigational-ondark);--wmcolor-snackbar-link-background:var(--wmcolor-background-transparent);--wmcolor-snackbar-link:var(--wmcolor-interactive-ondark);--wmcolor-snackbar-text:var(--wmcolor-text-ondark)}:host *{-webkit-box-sizing:border-box;box-sizing:border-box;margin:unset}:host .wm-snackbars{position:fixed;bottom:0;left:1.25rem;right:1.25rem;padding:0.25rem 0.625rem 1.875rem;z-index:2001;max-width:35.5rem;max-height:17.5rem;-webkit-overflow-scrolling:touch;overflow:auto}:host .wm-snackbars.empty{-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);padding-top:0;padding-bottom:0}:host .wm-snackbars .wm-snack-wrapper{width:100%;height:100%}:host .wm-snackbars .wm-snack-wrapper:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar{-webkit-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 3px rgba(0, 0, 0, 0.12), 0 4px 15px 0 rgba(0, 0, 0, 0.2);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-ms-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-webkit-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);-moz-transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);transition:all 0.25s 0ms cubic-bezier(0.4, 0, 1, 1);font-size:0.875rem;color:var(--wmcolor-snackbar-text);padding:0.9375rem 1.875rem;background:var(--wmcolor-snackbar-background);opacity:0;left:0;position:relative;font-family:inherit}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link{letter-spacing:0;text-transform:none;font-size:0.875rem;border:none;background:var(--wmcolor-snackbar-link-background);padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1;color:var(--wmcolor-snackbar-link);margin:0 3.125rem 0 0.625rem;text-decoration:none;font-weight:600;cursor:pointer}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link.new-window::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline;content:"\\f137";margin-left:0.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:hover{text-decoration:underline}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link:focus{outline:none;border:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .link::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar:not(:last-child){margin-bottom:1.25rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar.active:not(button){opacity:1}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:100%;position:relative;padding:0}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .msgtext{width:100%}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;background-color:var(--wmcolor-snackbar-close-background);color:var(--wmcolor-snackbar-close-icon);cursor:pointer;border:none;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}@media screen and (min-width: 48rem){:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack{min-width:1.875rem;min-height:1.875rem}}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f156";font-size:1.12rem}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:hover{background-color:var(--wmcolor-snackbar-close-background-hover);color:var(--wmcolor-snackbar-close-icon-hover)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus{outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack::-moz-focus-inner{border:0;outline:none}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-snackbars .wm-snack-wrapper .wm-snackbar .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}:host .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important;top:0;left:0}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus-ondark);outline:none}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{clip:auto;width:auto;height:auto;opacity:1;-webkit-transition:opacity 500ms 500ms;transition:opacity 500ms 500ms;padding:0.375rem;top:2.75rem;left:2.75rem;white-space:nowrap;-webkit-transform:translateX(-50%);transform:translateX(-50%)}@media screen and (min-width: 48rem){.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .closesnack:focus:not(:active)>.tooltip{top:2.0625rem;left:auto}}.user-is-tabbing .wm-snack-wrapper .wm-snackbar .wm-snackbarmsg .link:focus:not(:active){outline:none;background:-webkit-gradient(linear, left top, right top, color-stop(66%, var(--wmcolor-snackbar-link)), color-stop(0, transparent)) repeat-x;background:linear-gradient(90deg, var(--wmcolor-snackbar-link) 66%, transparent 0) repeat-x;background-size:0.375rem 0.1875rem;background-position:0 1em;border-radius:0;line-height:normal}';export{c as wm_snackbar}
@@ -1 +1 @@
1
- import{r as e,f as t,h as r,H as o,g as a,c as p}from"./p-b5bedd63.js";import{g as n,i as s,d as i,u as l}from"./p-ff888d78.js";import{a as h,h as c,g as m,c as d,d as w,e as b,f as g,i as x,k as u,l as f}from"./p-364753eb.js";const v=class{constructor(t){e(this,t),this.uid=n(),this.slicesDetails=[],this.barLabelsWidth=this.el.parentElement.barLabelsWidth,this.label=void 0,this.subinfo=void 0,this.completionMessage=void 0,this.showLegend=!0,this.isTabbing=!1,this.mode=void 0,this.userIsNavigating=!1}get popoverEl(){return this.el.shadowRoot.querySelector("priv-chart-popover")}get sliceEls(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))}get chartDetails(){return this.mode?h[this.mode]:void 0}get ariaLabelText(){let e=`${this.label}`;return this.subinfo&&(e+=` ${this.subinfo}`),e}get chartRoleDescription(){return s.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){c.call(this,e)}componentWillLoad(){this.label||console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information."),2!==this.el.children.length&&console.warn("wm-progress-indicator component must have 2 wm-progress-slice children."),this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(e=>this.mode=e.detail))}async handleSliceUpdate(){await m.call(this,this.mode),t(this.el)}handleModeUpdate(){this.mode&&m.call(this,this.mode)}renderBarOrDoughnut(){return this.total>0&&"bar"===this.mode?d.call(this,this.mode):w.call(this,this.mode)}render(){return r(o,{onBlur:()=>u.call(this)},r("div",{ref:e=>this.componentWrapperEl=e,class:`component-wrapper ${this.mode} ${this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""}`,role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},r("label",{id:`label-${this.uid}`,class:"label "+(this.barLabelsWidth&&"bar"===this.mode?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:`graphic-${this.uid}`},r("span",{class:"label-text"},this.label),this.subinfo?r("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),"doughnut"===this.mode?g.call(this,this.mode):"",r("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),"doughnut"===this.mode?x.call(this):""),b())}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{mode:["handleModeUpdate"]}}};v.style=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,:host .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,:host .component-wrapper.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";const k=class{constructor(r){e(this,r),this.wmProgressMonitorModeChange=p(this,"wmProgressMonitorModeChange",7),this.doughnutWidth=300,this.modeInitialized=!1,this.debouncedUpdate=i((()=>t(this.el)),50),this.breakpoint=void 0,this.groupLegend=void 0,this.barLabelsWidth=void 0}get parsedBreakpoint(){const e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);return e>=20?e:e*this.doughnutWidth}get mode(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"}componentWillLoad(){new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el)}componentDidLoad(){this.wmProgressMonitorModeChange.emit(this.mode),this.modeInitialized=!0}componentWillUpdate(){this.prevMode!==this.mode&&this.wmProgressMonitorModeChange.emit(this.mode),this.prevMode=this.mode}parseToNum(e){const t=e.toString().replace("px","");return parseInt(t)}renderLegend(){const e=l(this.groupLegend),t=h.bar.colors;return r("div",{class:"legend-wrapper"},r("div",{class:"legend"},e.map(((e,r)=>f({key:e,color:t[r]})))))}render(){return r(o,{class:"doughnut"===this.mode?"row":"column"},this.modeInitialized&&this.groupLegend&&"bar"===this.mode&&this.renderLegend(),this.modeInitialized&&r("slot",null))}static get delegatesFocus(){return!0}get el(){return a(this)}};k.style=":host .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .legend-wrapper .legend.bar1,:host .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host{display:-ms-flexbox;display:flex}:host .legend-wrapper{-ms-flex-align:start;align-items:flex-start;padding:0 1.25rem}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";const y=class{constructor(t){e(this,t),this.wmProgressSliceUpdated=p(this,"wmProgressSliceUpdated",7),this.legend=void 0,this.amount=void 0,this.popoverTitle=void 0,this.popoverText=void 0,this.popoverButtonText=void 0}componentDidUpdate(){this.wmProgressSliceUpdated.emit()}};export{v as wm_progress_indicator,k as wm_progress_monitor,y as wm_progress_slice}
1
+ import{r as e,f as t,h as r,H as o,g as a,c as p}from"./p-b5bedd63.js";import{g as n,i as s,d as i,u as l}from"./p-f0d87250.js";import{a as h,h as c,g as m,c as d,d as w,e as b,f as g,i as x,k as u,l as f}from"./p-653943d0.js";const v=class{constructor(t){e(this,t),this.uid=n(),this.slicesDetails=[],this.barLabelsWidth=this.el.parentElement.barLabelsWidth,this.label=void 0,this.subinfo=void 0,this.completionMessage=void 0,this.showLegend=!0,this.isTabbing=!1,this.mode=void 0,this.userIsNavigating=!1}get popoverEl(){return this.el.shadowRoot.querySelector("priv-chart-popover")}get sliceEls(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))}get chartDetails(){return this.mode?h[this.mode]:void 0}get ariaLabelText(){let e=`${this.label}`;return this.subinfo&&(e+=` ${this.subinfo}`),e}get chartRoleDescription(){return s.formatMessage({id:"chart.roleDescription",defaultMessage:"Interactive chart",description:"For screen readers only, a description clarifying the role of the chart widget"})}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleKeydown(e){c.call(this,e)}componentWillLoad(){this.label||console.error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information."),2!==this.el.children.length&&console.warn("wm-progress-indicator component must have 2 wm-progress-slice children."),this.el.parentElement.addEventListener("wmProgressMonitorModeChange",(e=>this.mode=e.detail))}async handleSliceUpdate(){await m.call(this,this.mode),t(this.el)}handleModeUpdate(){this.mode&&m.call(this,this.mode)}renderBarOrDoughnut(){return this.total>0&&"bar"===this.mode?d.call(this,this.mode):w.call(this,this.mode)}render(){return r(o,{onBlur:()=>u.call(this)},r("div",{ref:e=>this.componentWrapperEl=e,class:`component-wrapper ${this.mode} ${this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""}`,role:"application","aria-label":this.ariaLabelText,tabindex:"0","aria-roledescription":this.chartRoleDescription,"aria-describedby":"chart-instructions"},r("label",{id:`label-${this.uid}`,class:"label "+(this.barLabelsWidth&&"bar"===this.mode?"custom-width":""),style:{"--custom-label-width":this.barLabelsWidth},htmlFor:`graphic-${this.uid}`},r("span",{class:"label-text"},this.label),this.subinfo?r("span",{class:"subinfo"},this.subinfo):""),this.mode&&this.renderBarOrDoughnut(),"doughnut"===this.mode?g.call(this,this.mode):"",r("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":""}),"doughnut"===this.mode?x.call(this):""),b())}static get delegatesFocus(){return!0}get el(){return a(this)}static get watchers(){return{mode:["handleModeUpdate"]}}};v.style=":host{--wmcolor-chart-label-text-negative:var(--wmcolor-text-negative);--wmcolor-chart-label-text-positive:var(--wmcolor-text-positive);--wmcolor-chart-label-text:var(--wmcolor-text);--wmcolor-chart-subinfo-text:var(--wmcolor-text);--wmcolor-chart-value-text:var(--wmcolor-text);display:block}:host .component-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;font-size:0.875rem;position:relative;outline:none;}:host .component-wrapper .label{display:block;margin:0;padding-bottom:0.25rem;font-weight:600;position:relative}:host .component-wrapper .label .subinfo{display:block;font-weight:normal;font-style:italic;bottom:0.25rem;width:100%;color:var(--wmcolor-chart-subinfo-text)}:host .component-wrapper .label.custom-width{width:var(--custom-label-width)}:host .component-wrapper .label.--none{display:none}:host .component-wrapper .doughnut-svg,:host .component-wrapper .inner-stacked-bar-wrapper{overflow:visible}:host .component-wrapper .bar-wrapper{-ms-flex-positive:1;flex-grow:1;width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper{width:100%}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment:not(.zero):not(:last-of-type){margin-right:2px}:host .component-wrapper .doughnut-wrapper{-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;border-radius:4px}:host .component-wrapper .doughnut-wrapper .doughnut-segment{cursor:pointer}:host .component-wrapper .value-wrapper{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .component-wrapper .value-wrapper:not(:last-of-type){margin-right:2px}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper path:active,:host .component-wrapper path:hover,:host .component-wrapper path:focus,:host .component-wrapper .stacked-bar-segment:active,:host .component-wrapper .stacked-bar-segment:hover,:host .component-wrapper .stacked-bar-segment:focus{outline:none}:host .component-wrapper .stacked-bar-segment:active.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment,:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper path:active.doughnut-segment,:host .component-wrapper path:hover.doughnut-segment,:host .component-wrapper path:focus.doughnut-segment,:host .component-wrapper .stacked-bar-segment:active.doughnut-segment,:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment,:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment{-webkit-filter:url(#wmHoverDropShadow);filter:url(#wmHoverDropShadow)}:host .component-wrapper path::-moz-focus-inner,:host .component-wrapper .stacked-bar-segment::-moz-focus-inner{border:0;outline:none}:host .component-wrapper.doughnut{width:300px}:host .component-wrapper.doughnut1 label,:host .component-wrapper.doughnut1 .label-text,:host .component-wrapper.doughnut2 label,:host .component-wrapper.doughnut2 .label-text,:host .component-wrapper.doughnut2b label,:host .component-wrapper.doughnut2b .label-text,:host .component-wrapper.doughnut3 label,:host .component-wrapper.doughnut3 .label-text{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper.doughnut0,:host .component-wrapper.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut0 label,:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut0 label .subinfo,:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut0 .completion-message,:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar1,:host .component-wrapper.bar{padding:1.25rem;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar1 label .subinfo,:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar1 .chart-wrapper,:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}:host .component-wrapper.bar1 .chart-wrapper .single-perc,:host .component-wrapper.bar .chart-wrapper .single-perc{width:4rem;-ms-flex:none;flex:none;display:-ms-flexbox;display:flex;height:30px;-ms-flex-align:center;align-items:center}:host .component-wrapper.bar1 .chart-wrapper .inner-stacked-bar-wrapper,:host .component-wrapper.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}:host .component-wrapper.bar1 .chart-wrapper .completion-message,:host .component-wrapper.bar .chart-wrapper .completion-message{width:100%;text-align:right;margin-top:0.25rem}@media screen and (min-width: 768px){:host .component-wrapper.bar1,:host .component-wrapper.bar{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.bar1 label,:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;min-height:30px;width:12rem;text-align:left;padding-right:1.25rem;padding-bottom:0;-ms-flex:none;flex:none}:host .component-wrapper.bar1 .bar-wrapper,:host .component-wrapper.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}:host .component-wrapper.bar1 .bar-wrapper .single-perc,:host .component-wrapper.bar .bar-wrapper .single-perc{text-align:center;padding-left:0.5rem;-ms-flex-pack:center;justify-content:center}}:host .component-wrapper.bar2,:host .component-wrapper.bar2b,:host .component-wrapper.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}:host .component-wrapper.bar2 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar2b .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar4 .inner-stacked-bar-wrapper.show-values,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper.show-values{height:60px;margin-top:0}:host .component-wrapper.bar3 .chart-wrapper{position:relative;height:100px}:host .component-wrapper.bar3 .chart-wrapper .inner-stacked-bar-wrapper{position:absolute;top:35px;left:0;right:0;bottom:0;height:30px}:host .component-wrapper.bar3 .chart-wrapper .axis{position:absolute;top:0;left:0;height:90px;width:100%;overflow:visible;-webkit-transform:translateY(90px);transform:translateY(90px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .chart-wrapper .axis text{-webkit-transform:translate(4px, 24px);transform:translate(4px, 24px);text-anchor:middle}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar6,:host .component-wrapper.bar7{--chartPadding:48px;-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar6 .chart-wrapper,:host .component-wrapper.bar7 .chart-wrapper{width:100%}:host .component-wrapper.bar6 .chart,:host .component-wrapper.bar7 .chart{position:relative;padding-right:var(--chartPadding)}:host .component-wrapper.bar6 .gridlines,:host .component-wrapper.bar7 .gridlines{position:absolute;left:var(--labelWidth);right:var(--chartPadding);top:0;bottom:0;background-image:linear-gradient(90deg, var(--wmcolor-chart-gridline) 1px, transparent 1px);background-position:-1px;border-left:1px solid var(--wmcolor-chart-gridline);border-bottom:1px solid var(--wmcolor-chart-gridline);background-size:var(--backgroundSize)}:host .component-wrapper.bar6 .rows,:host .component-wrapper.bar7 .rows{display:grid;grid-template-columns:var(--labelWidth) auto;grid-auto-rows:minmax(30px, 1fr);-ms-flex-align:center;align-items:center;position:relative;z-index:1}:host .component-wrapper.bar6 .rows .label,:host .component-wrapper.bar7 .rows .label{font-weight:400;padding:0 0.75rem 0 0;text-align:right;margin:0.75rem 0}:host .component-wrapper.bar6 .rows .label.hidden,:host .component-wrapper.bar7 .rows .label.hidden{visibility:hidden;white-space:nowrap}:host .component-wrapper.bar6 .bar,:host .component-wrapper.bar7 .bar{height:30px;position:relative}:host .component-wrapper.bar6 .bar .value,:host .component-wrapper.bar7 .bar .value{position:absolute;top:50%;right:-0.5rem;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host .component-wrapper.bar6 .x-axis,:host .component-wrapper.bar7 .x-axis{margin-left:var(--labelWidth);margin-right:var(--chartPadding);display:-ms-flexbox;display:flex;postion:relative}:host .component-wrapper.bar6 .tick,:host .component-wrapper.bar7 .tick{-ms-flex:1;flex:1;text-align:right}:host .component-wrapper.bar6 .tick span,:host .component-wrapper.bar7 .tick span{-webkit-transform:translateX(50%);transform:translateX(50%);display:inline-block}:host .component-wrapper.bar6 .zero,:host .component-wrapper.bar7 .zero{position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%)}:host .component-wrapper.bar6 .bar:active,:host .component-wrapper.bar6 .bar:hover,:host .component-wrapper.bar6 .bar:focus,:host .component-wrapper.bar7 .bar:active,:host .component-wrapper.bar7 .bar:hover,:host .component-wrapper.bar7 .bar:focus{outline:none}:host .component-wrapper.bar6 .bar:active.bar,:host .component-wrapper.bar6 .bar:hover.bar,:host .component-wrapper.bar6 .bar:focus.bar,:host .component-wrapper.bar7 .bar:active.bar,:host .component-wrapper.bar7 .bar:hover.bar,:host .component-wrapper.bar7 .bar:focus.bar{-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.left-label{-ms-flex-direction:row;flex-direction:row}:host .component-wrapper.left-label .label{width:12rem;padding-right:1.25rem;-ms-flex:none;flex:none;-ms-flex-item-align:end;align-self:flex-end;min-height:30px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .component-wrapper .hidden-values-warning{font-size:0.75rem;font-style:italic;max-width:100%}:host #chart-instructions{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}:host .component-wrapper .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .component-wrapper .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .component-wrapper .legend-wrapper .legend.bar1,:host .component-wrapper .legend-wrapper .legend.bar6{display:none}:host .component-wrapper .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .component-wrapper .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .component-wrapper .legend-wrapper .legend .legend-item{position:relative}:host .component-wrapper .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .component-wrapper .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .component-wrapper .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host(:focus){outline:none}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}:host(:focus) .component-wrapper.user-is-tabbing .stacked-bar-segments-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .simple-bar-wrapper::-moz-focus-inner,:host(:focus) .component-wrapper.user-is-tabbing .doughnut-wrapper::-moz-focus-inner{border:0}";const k=class{constructor(r){e(this,r),this.wmProgressMonitorModeChange=p(this,"wmProgressMonitorModeChange",7),this.doughnutWidth=300,this.modeInitialized=!1,this.debouncedUpdate=i((()=>t(this.el)),50),this.breakpoint=void 0,this.groupLegend=void 0,this.barLabelsWidth=void 0}get parsedBreakpoint(){const e=this.parseToNum(this.breakpoint?this.breakpoint:this.el.children.length);return e>=20?e:e*this.doughnutWidth}get mode(){return this.el.clientWidth>this.parsedBreakpoint?"doughnut":"bar"}componentWillLoad(){new ResizeObserver((()=>this.debouncedUpdate())).observe(this.el)}componentDidLoad(){this.wmProgressMonitorModeChange.emit(this.mode),this.modeInitialized=!0}componentWillUpdate(){this.prevMode!==this.mode&&this.wmProgressMonitorModeChange.emit(this.mode),this.prevMode=this.mode}parseToNum(e){const t=e.toString().replace("px","");return parseInt(t)}renderLegend(){const e=l(this.groupLegend),t=h.bar.colors;return r("div",{class:"legend-wrapper"},r("div",{class:"legend"},e.map(((e,r)=>f({key:e,color:t[r]})))))}render(){return r(o,{class:"doughnut"===this.mode?"row":"column"},this.modeInitialized&&this.groupLegend&&"bar"===this.mode&&this.renderLegend(),this.modeInitialized&&r("slot",null))}static get delegatesFocus(){return!0}get el(){return a(this)}};k.style=":host .legend-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center}:host .legend-wrapper .legend{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;text-align:center;padding-top:0.25rem;padding-bottom:0.75rem;-webkit-box-sizing:border-box;box-sizing:border-box}:host .legend-wrapper .legend.bar1,:host .legend-wrapper .legend.bar6{display:none}:host .legend-wrapper .legend.--top{margin-top:-0.75rem}:host .legend-wrapper .legend.--top .legend-item{padding-top:0.75rem}:host .legend-wrapper .legend.--top .legend-color{top:0.75rem}:host .legend-wrapper .legend.--bottom{margin-bottom:-0.75rem}:host .legend-wrapper .legend.--bottom .legend-item{padding-bottom:0.75rem}:host .legend-wrapper .legend.--bottom .legend-color{top:-0.75rem}:host .legend-wrapper .legend .legend-item{position:relative}:host .legend-wrapper .legend .legend-item:not(:last-of-type){padding-right:1.25rem}:host .legend-wrapper .legend .legend-text{font-size:0.875rem;padding-left:1rem;line-height:1}:host .legend-wrapper .legend .legend-color{position:absolute;left:0;bottom:0;margin:auto;width:0.6875rem;height:0.6875rem}:host .legend-wrapper .legend.bar3{padding-bottom:1.25rem}:host{display:-ms-flexbox;display:flex}:host .legend-wrapper{-ms-flex-align:start;align-items:flex-start;padding:0 1.25rem}:host(.row){-ms-flex-direction:row;flex-direction:row}:host(.column){-ms-flex-direction:column;flex-direction:column}";const y=class{constructor(t){e(this,t),this.wmProgressSliceUpdated=p(this,"wmProgressSliceUpdated",7),this.legend=void 0,this.amount=void 0,this.popoverTitle=void 0,this.popoverText=void 0,this.popoverButtonText=void 0}componentDidUpdate(){this.wmProgressSliceUpdated.emit()}};export{v as wm_progress_indicator,k as wm_progress_monitor,y as wm_progress_slice}
@@ -1 +1 @@
1
- import{r as t,c as e,h as i,f as s,g as o}from"./p-b5bedd63.js";import{i as r,o as a,E as n}from"./p-ff888d78.js";const d=class{constructor(s){t(this,s),this.cellTriggered=e(this,"cellTriggered",7),this.toggleButtonClicked=e(this,"toggleButtonClicked",7),this.popupClosed=e(this,"popupClosed",7),this.popupBlurred=e(this,"popupBlurred",7),this.popupClicked=!0,this.buttonClicked=!0,this.prevClicked=!0,this.nextClicked=!0,this.openUp=!1,this.calendar_months=[r.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),r.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),r.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),r.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),r.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),r.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),r.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),r.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),r.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),r.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),r.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),r.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})],this.weekdays=[r.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),r.formatMessage({id:"date.monday",defaultMessage:"Monday"}),r.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),r.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),r.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),r.formatMessage({id:"date.friday",defaultMessage:"Friday"}),r.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})],this.renderCalendarDate=(t,e)=>{let s=this.removeZeroes(String(t[1])),o=this.removeZeroes(String(t[2])),a=s===this.monthInFocus?"current-month":"";const n=t[0]+t[1]+t[2],d=this.isDateToday(t);return i("div",{role:"gridcell",id:`cell-${n}-${this.parentId}`,class:`date-cell ${a}`,"aria-selected":!1,"aria-label":`${d?`${r.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"})}, `:""}${this.weekdays[e]}, ${this.calendar_months[s-1]} ${o}, ${t[0]}`,onClick:t=>{this.handleTriggeredDate(t.target)},onKeyDown:t=>this.trapFocusEnd(t),"data-month":t[1],"data-year":t[0],onBlur:t=>t.stopPropagation()},o)},this.disabled=!1,this.isExpanded=!1,this.view="day",this.date=new Date,this.selectedYear=this.date.getUTCFullYear(),this.selectedMonth=this.date.getUTCMonth()+1,this.selectedDay=this.date.getUTCDate(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.monthNumInFocus=this.selectedMonth,this.parentId="",this.isTabbing=!1}handleKey(t){switch(this.prevClicked=!1,this.nextClicked=!1,t.key){case"Enter":t.preventDefault(),!t.target.id.includes("popup-title")&&t.target.click();break;case"Escape":t.preventDefault(),this.isExpanded&&(t.stopPropagation(),this.closePopup(!0));break;case"PageUp":t.preventDefault(),this.backOneMonth();break;case"PageDown":t.preventDefault(),this.forwardOneMonth();break;case"Home":t.preventDefault(),this.unfocusCell(),this.dayInFocus=1,s(this.el);break;case"End":t.preventDefault(),this.unfocusCell(),this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus),s(this.el);break;case"ArrowLeft":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),1===this.dayInFocus){const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year,this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else this.dayInFocus-=1;else this.unfocusMonth(),0===this.monthNumInFocus?this.monthNumInFocus=11:this.monthNumInFocus-=1;break;case"ArrowRight":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){const t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year,this.dayInFocus=1}else this.dayInFocus+=1;else this.unfocusMonth(),11===this.monthNumInFocus?this.monthNumInFocus=0:this.monthNumInFocus+=1;break;case"ArrowUp":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),this.dayInFocus<8){const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-e}else this.dayInFocus-=7;else this.unfocusMonth(),this.monthNumInFocus<3?this.monthNumInFocus+=9:this.monthNumInFocus-=3;break;case"ArrowDown":if(t.preventDefault(),this.isExpanded)if("day"===this.view){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();const t=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>t){const e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month,this.yearInFocus=e.year,this.dayInFocus=this.dayInFocus-t}else this.dayInFocus+=7}else{const t=(document.activeElement.shadowRoot||document).activeElement;if("BUTTON"===t.tagName||t.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth(),this.monthNumInFocus>8?this.monthNumInFocus-=9:this.monthNumInFocus+=3}else this.openPopup()}}toggleTabbingOn(t){["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"].includes(t.key)&&(this.isTabbing=!0)}toggleTabbingOff(){this.isTabbing=!1}blurHandler(t){this.popupClicked||this.buttonClicked||!this.isExpanded||(this.closePopup(),this.popupBlurred.emit({relatedTarget:t.target})),this.popupClicked=!1,this.buttonClicked=!1}handleBlurOnWindow(t){this.isExpanded&&(this.closePopup(),this.popupBlurred.emit({relatedTarget:t.target}))}componentDidUpdate(){this.handleSelectedDate(),this.isExpanded&&(this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():"day"===this.view?this.focusCell():this.focusMonth())}componentDidLoad(){this.handleSelectedDate(),this.setDateValuesForView()}zeroPad(t,e){return String.prototype.padStart||(String.prototype.padStart=function(t,e){return(t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this)}),`${t.toString()}`.padStart(e,"0")}removeZeroes(t){return+t<10?+t.slice(1):+t}isDateToday(t){const e=new Date;return[e.getFullYear().toString(),(e.getMonth()+1).toString(),e.getDate().toString()].reduce(((e,i,s)=>e&&this.removeZeroes(t[s]).toString()===i),!0)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.buttonClicked=!0}closePopup(t=!1){this.isExpanded=!1,this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),"day"===this.view&&this.unfocusCell(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.changeView("day"),t&&this.buttonEl.focus()}openPopup(){this.panelPosition(),this.setDateValuesForView(),this.prevClicked=!1,this.nextClicked=!1,this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.focusCell()}getMonthDays(t,e){return 2===t?e%4==0?29:28:[4,6,9,11].includes(t)?30:31}getMonthFirstDay(t,e){return+new Date(e,t-1,1,12,0,0).getDay()+1}getPreviousMonth(t,e){return{month:t>1?t-1:12,year:t>1?e:e-1}}getNextMonth(t,e){return{month:t<12?t+1:1,year:t<12?e:e+1}}getCalendarDates(t,e){const i=this.getMonthDays(t,e),s=this.getMonthFirstDay(t,e)-1;let o=42-(s+i);o=o>6?o-7:o;const{month:r,year:a}=this.getPreviousMonth(t,e),{month:n,year:d}=this.getNextMonth(t,e),h=this.getMonthDays(r,a);return[...[...new Array(s).fill("1")].map(((t,e)=>{const i=e+1+(h-s);return[a.toString(),this.zeroPad(r,2),this.zeroPad(i,2)]})),...[...new Array(i).fill("1")].map(((i,s)=>{const o=s+1;return[e.toString(),this.zeroPad(t,2),this.zeroPad(o,2)]})),...[...new Array(o).fill("1")].map(((t,e)=>{const i=e+1;return[d.toString(),this.zeroPad(n,2),this.zeroPad(i,2)]}))]}forwardOneMonth(){this.unfocusCell();const t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)&&(this.dayInFocus=e),this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus-1]}, ${this.yearInFocus}`)}backOneMonth(){this.unfocusCell();const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)&&(this.dayInFocus=e),this.updateLiveRegion(`Viewing ${this.calendar_months[this.monthInFocus-1]}, ${this.yearInFocus}`)}handleTriggeredDate(t){this.cellTriggered.emit(t),this.closePopup(!0)}handleSelectedDate(){this.selectedDate&&this.selectedDate.removeAttribute("aria-selected"),this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay),this.selectedDate&&this.selectedDate.setAttribute("aria-selected","true")}getCellById(t,e,i){const s=t+this.zeroPad(e,2)+this.zeroPad(i,2);return this.el.querySelector(`#cell-${s}-${this.parentId}`)}unfocusCell(){this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus).tabIndex=-1}focusCell(){const t=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>t?t:this.dayInFocus;const e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e&&(e.tabIndex=0,e.focus())}unfocusMonth(){this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`).tabIndex=-1}focusMonth(){const t=this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`);t.tabIndex=0,t.focus()}trapFocusLeft(t){t.shiftKey&&"Tab"===t.key&&(t.preventDefault(),this.focusCellInView())}trapFocusEnd(t){t.shiftKey||"Tab"!==t.key||(t.preventDefault(),this.prevButton.focus())}trapFocusRight(t){t.shiftKey||"Tab"!==t.key||(t.preventDefault(),this.focusCellInView())}focusCellInView(){"day"===this.view?this.focusCell():this.focusMonth()}toggleBusyAttribute(t){this.el.querySelector("#wm-container").setAttribute("aria-busy",t)}setDateValuesForView(){this.selectedYear=this.date.getUTCFullYear(),this.selectedMonth=this.date.getUTCMonth()+1,this.selectedDay=this.date.getUTCDate(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.monthNumInFocus=this.selectedMonth-1}updateLiveRegion(t){this.el.querySelector("#live-region").innerHTML=t}panelPosition(){let t=document.getElementById(this.parentId);const e=t.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=a(t,this.popupEl.clientHeight,e),n(t,336)?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):(this.popupEl.style.right="0",this.popupEl.style.left="auto")}changeView(t){this.view=t,this.monthNumInFocus=this.monthInFocus-1}renderMonths(t,e){return i("div",{id:`month-${e}-${this.parentId}`,class:"month "+(this.selectedMonth-1===e?"selected":""),role:"gridcell",tabindex:e+1===this.monthInFocus?0:-1,onKeyDown:t=>this.trapFocusEnd(t),onBlur:t=>t.stopPropagation(),onClick:()=>{this.monthInFocus=e+1,this.changeView("day")}},t)}render(){const t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return i("div",{class:"container",id:"wm-container"},i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":`date-input-${this.parentId}`,ref:t=>this.buttonEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:`toggle-${this.parentId}`},i("span",{class:"calendar",title:r.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),i("div",{class:`popup ${this.view}-view ${this.openUp?"expand-upwards":""} ${this.isTabbing?"user-is-tabbing":""}`,id:`popup-${this.parentId}`,ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,role:"application","aria-describedby":"application"},"day"===this.view?i("div",{class:"day-view"},i("div",{class:"calendar-header"},i("button",{onClick:()=>{this.prevClicked=!0,this.popupClicked=!0,this.backOneMonth()},onKeyDown:t=>this.trapFocusLeft(t),ref:t=>this.prevButton=t,class:"arw-btn","aria-label":r.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},i("span",{class:"mdi"},"")),i("div",{id:`popup-title-month-${this.parentId}`,class:"title-box",tabindex:0,role:"button",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.changeView("month"))},onClick:this.changeView.bind(this,"month"),"aria-label":`${r.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"})}: ${this.calendar_months[this.monthInFocus-1]}\n ${this.yearInFocus}.`,"aria-describedby":"month-title"},i("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),i("button",{onClick:()=>{this.nextClicked=!0,this.popupClicked=!0,this.forwardOneMonth()},onKeyDown:t=>this.trapFocusRight(t),"aria-label":r.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:t=>this.nextButton=t,class:"arw-btn"},i("span",{class:"mdi"},""))),i("div",{"aria-labelledby":`popup-title-month-${this.parentId}`,role:"grid",class:"date-grid"},i("div",{role:"rowgroup",class:"date-header"},i("div",{role:"row",class:"header-row"},i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),i("div",{role:"rowgroup"},i("div",{role:"row",class:"date-row"},t.slice(0,7).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(7,14).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(14,21).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(21,28).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(28,35).map(((t,e)=>this.renderCalendarDate(t,e)))),t.length>35?i("div",{role:"row"},t.slice(35).map(((t,e)=>this.renderCalendarDate(t,e)))):""))):i("div",{class:"month-view"},i("div",{class:"calendar-header"},i("button",{onClick:()=>{this.prevClicked=!0,this.popupClicked=!0,this.yearInFocus-=1,this.updateLiveRegion(`${this.yearInFocus} selected.`)},onKeyDown:t=>this.trapFocusLeft(t),"aria-label":r.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:t=>this.prevButton=t,class:"arw-btn"},i("span",{class:"mdi"},"")),i("div",{id:`popup-title-year-${this.parentId}`,tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.changeView("day"))},"aria-labelledby":"year-title"},i("span",{class:"title"},this.yearInFocus)),i("button",{onClick:()=>{this.nextClicked=!0,this.popupClicked=!0,this.yearInFocus+=1,this.updateLiveRegion(`${this.yearInFocus} selected.`)},"aria-label":r.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:t=>this.trapFocusRight(t),ref:t=>this.nextButton=t,class:"arw-btn"},i("span",{class:"mdi"},""))),i("div",{"aria-labelledby":`popup-title-year-${this.parentId}`,role:"grid",class:"months"},i("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map(((t,e)=>this.renderMonths(t,e)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map(((t,e)=>this.renderMonths(t,e+3)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map(((t,e)=>this.renderMonths(t,e+6)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map(((t,e)=>this.renderMonths(t,e+9))))))),this.isExpanded&&i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},r.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},r.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),i("div",{id:"application",class:"sr-only"},r.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))}get el(){return o(this)}};d.style='.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-datepicker-toggle-background);border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.toggle span::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f0ed";font-size:1.5rem;color:var(--wmcolor-datepicker-toggle-icon);padding:0;line-height:2.5rem}.toggle:hover{-webkit-box-shadow:none;box-shadow:none;background:var(--wmcolor-datepicker-toggle-background-hover)}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-datepicker-toggle-background-disabled)}.toggle:disabled .calendar::after{color:var(--wmcolor-datepicker-toggle-icon-disabled)}[dir=RTL] .toggle{right:auto;left:0}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:var(--wmcolor-datepicker-background)}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:var(--wmcolor-datepicker-selector-background);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:var(--wmcolor-datepicker-selector-border);color:var(--wmcolor-datepicker-selector-text)}.popup .calendar-header .title-box:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";padding-left:0.75rem;font-size:1.12rem}.popup .calendar-header .title-box.year:after{content:"\\f143"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:var(--wmcolor-datepicker-navigation-text);background:var(--wmcolor-datepicker-navigation-background);padding:0;-webkit-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn:hover{background-color:var(--wmcolor-datepicker-navigation-background-hover)}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:var(--wmcolor-datepicker-day-text-outside)}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:var(--wmcolor-datepicker-weekdays-background)}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:var(--wmcolor-datepicker-weekdays-text);border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:var(--wmcolor-datepicker-day-background-hover)}.popup .day-view .date-grid .date-cell.current-month{color:var(--wmcolor-datepicker-day-text)}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .day-view .date-grid .date-cell:active{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .month-view .months{border-top:2px solid;border-top-color:var(--wmcolor-datepicker-month-border);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:var(--wmcolor-datepicker-month-text)}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{border-right-color:transparent;background-color:var(--wmcolor-datepicker-month-background-hover)}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:var(--wmcolor-datepicker-month-background-selected);color:var(--wmcolor-datepicker-month-text-selected)}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{d as priv_datepicker}
1
+ import{r as t,c as e,h as i,f as s,g as o}from"./p-b5bedd63.js";import{i as r,o as a,E as n}from"./p-f0d87250.js";const d=class{constructor(s){t(this,s),this.cellTriggered=e(this,"cellTriggered",7),this.toggleButtonClicked=e(this,"toggleButtonClicked",7),this.popupClosed=e(this,"popupClosed",7),this.popupBlurred=e(this,"popupBlurred",7),this.popupClicked=!0,this.buttonClicked=!0,this.prevClicked=!0,this.nextClicked=!0,this.openUp=!1,this.calendar_months=[r.formatMessage({id:"date.january",defaultMessage:"January",description:"Month of the year"}),r.formatMessage({id:"date.february",defaultMessage:"February",description:"Month of the year"}),r.formatMessage({id:"date.march",defaultMessage:"March",description:"Month of the year"}),r.formatMessage({id:"date.april",defaultMessage:"April",description:"Month of the year"}),r.formatMessage({id:"date.may",defaultMessage:"May",description:"Month of the year"}),r.formatMessage({id:"date.june",defaultMessage:"June",description:"Month of the year"}),r.formatMessage({id:"date.july",defaultMessage:"July",description:"Month of the year"}),r.formatMessage({id:"date.august",defaultMessage:"August",description:"Month of the year"}),r.formatMessage({id:"date.september",defaultMessage:"September",description:"Month of the year"}),r.formatMessage({id:"date.october",defaultMessage:"October",description:"Month of the year"}),r.formatMessage({id:"date.november",defaultMessage:"November",description:"Month of the year"}),r.formatMessage({id:"date.december",defaultMessage:"December",description:"Month of the year"})],this.weekdays=[r.formatMessage({id:"date.sunday",defaultMessage:"Sunday"}),r.formatMessage({id:"date.monday",defaultMessage:"Monday"}),r.formatMessage({id:"date.tuesday",defaultMessage:"Tuesday"}),r.formatMessage({id:"date.wednesday",defaultMessage:"Wednesday"}),r.formatMessage({id:"date.thursday",defaultMessage:"Thursday"}),r.formatMessage({id:"date.friday",defaultMessage:"Friday"}),r.formatMessage({id:"date.saturday",defaultMessage:"Saturday"})],this.renderCalendarDate=(t,e)=>{let s=this.removeZeroes(String(t[1])),o=this.removeZeroes(String(t[2])),a=s===this.monthInFocus?"current-month":"";const n=t[0]+t[1]+t[2],d=this.isDateToday(t);return i("div",{role:"gridcell",id:`cell-${n}-${this.parentId}`,class:`date-cell ${a}`,"aria-selected":!1,"aria-label":`${d?`${r.formatMessage({id:"date.today",defaultMessage:"today",description:"calendar button"})}, `:""}${this.weekdays[e]}, ${this.calendar_months[s-1]} ${o}, ${t[0]}`,onClick:t=>{this.handleTriggeredDate(t.target)},onKeyDown:t=>this.trapFocusEnd(t),"data-month":t[1],"data-year":t[0],onBlur:t=>t.stopPropagation()},o)},this.disabled=!1,this.isExpanded=!1,this.view="day",this.date=new Date,this.selectedYear=this.date.getUTCFullYear(),this.selectedMonth=this.date.getUTCMonth()+1,this.selectedDay=this.date.getUTCDate(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.monthNumInFocus=this.selectedMonth,this.parentId="",this.isTabbing=!1}handleKey(t){switch(this.prevClicked=!1,this.nextClicked=!1,t.key){case"Enter":t.preventDefault(),!t.target.id.includes("popup-title")&&t.target.click();break;case"Escape":t.preventDefault(),this.isExpanded&&(t.stopPropagation(),this.closePopup(!0));break;case"PageUp":t.preventDefault(),this.backOneMonth();break;case"PageDown":t.preventDefault(),this.forwardOneMonth();break;case"Home":t.preventDefault(),this.unfocusCell(),this.dayInFocus=1,s(this.el);break;case"End":t.preventDefault(),this.unfocusCell(),this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus),s(this.el);break;case"ArrowLeft":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),1===this.dayInFocus){const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year,this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)}else this.dayInFocus-=1;else this.unfocusMonth(),0===this.monthNumInFocus?this.monthNumInFocus=11:this.monthNumInFocus-=1;break;case"ArrowRight":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),this.dayInFocus===this.getMonthDays(this.monthInFocus,this.yearInFocus)){const t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year,this.dayInFocus=1}else this.dayInFocus+=1;else this.unfocusMonth(),11===this.monthNumInFocus?this.monthNumInFocus=0:this.monthNumInFocus+=1;break;case"ArrowUp":if(t.preventDefault(),"day"===this.view)if(this.unfocusCell(),this.dayInFocus<8){const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=7-this.dayInFocus;this.dayInFocus=this.getMonthDays(this.monthInFocus,this.yearInFocus)-e}else this.dayInFocus-=7;else this.unfocusMonth(),this.monthNumInFocus<3?this.monthNumInFocus+=9:this.monthNumInFocus-=3;break;case"ArrowDown":if(t.preventDefault(),this.isExpanded)if("day"===this.view){if(!(document.activeElement.shadowRoot||document).activeElement.classList.contains("date-cell")){this.focusCell();break}this.unfocusCell();const t=this.getMonthDays(this.monthInFocus,this.yearInFocus)-7;if(this.dayInFocus>t){const e=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=e.month,this.yearInFocus=e.year,this.dayInFocus=this.dayInFocus-t}else this.dayInFocus+=7}else{const t=(document.activeElement.shadowRoot||document).activeElement;if("BUTTON"===t.tagName||t.id.includes("popup-title-year")){this.focusMonth();break}this.unfocusMonth(),this.monthNumInFocus>8?this.monthNumInFocus-=9:this.monthNumInFocus+=3}else this.openPopup()}}toggleTabbingOn(t){["Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Enter"].includes(t.key)&&(this.isTabbing=!0)}toggleTabbingOff(){this.isTabbing=!1}blurHandler(t){this.popupClicked||this.buttonClicked||!this.isExpanded||(this.closePopup(),this.popupBlurred.emit({relatedTarget:t.target})),this.popupClicked=!1,this.buttonClicked=!1}handleBlurOnWindow(t){this.isExpanded&&(this.closePopup(),this.popupBlurred.emit({relatedTarget:t.target}))}componentDidUpdate(){this.handleSelectedDate(),this.isExpanded&&(this.prevClicked?this.prevButton.focus():this.nextClicked?this.nextButton.focus():"day"===this.view?this.focusCell():this.focusMonth())}componentDidLoad(){this.handleSelectedDate(),this.setDateValuesForView()}zeroPad(t,e){return String.prototype.padStart||(String.prototype.padStart=function(t,e){return(t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this)}),`${t.toString()}`.padStart(e,"0")}removeZeroes(t){return+t<10?+t.slice(1):+t}isDateToday(t){const e=new Date;return[e.getFullYear().toString(),(e.getMonth()+1).toString(),e.getDate().toString()].reduce(((e,i,s)=>e&&this.removeZeroes(t[s]).toString()===i),!0)}togglePopup(){this.isExpanded?this.closePopup():this.openPopup(),this.buttonClicked=!0}closePopup(t=!1){this.isExpanded=!1,this.popupEl.classList.remove("open"),window.setTimeout((()=>{this.popupEl.style.visibility="hidden"}),250),"day"===this.view&&this.unfocusCell(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.changeView("day"),t&&this.buttonEl.focus()}openPopup(){this.panelPosition(),this.setDateValuesForView(),this.prevClicked=!1,this.nextClicked=!1,this.popupEl.style.visibility="visible",window.requestAnimationFrame((()=>{this.popupEl.classList.add("open")})),this.isExpanded=!0,this.focusCell()}getMonthDays(t,e){return 2===t?e%4==0?29:28:[4,6,9,11].includes(t)?30:31}getMonthFirstDay(t,e){return+new Date(e,t-1,1,12,0,0).getDay()+1}getPreviousMonth(t,e){return{month:t>1?t-1:12,year:t>1?e:e-1}}getNextMonth(t,e){return{month:t<12?t+1:1,year:t<12?e:e+1}}getCalendarDates(t,e){const i=this.getMonthDays(t,e),s=this.getMonthFirstDay(t,e)-1;let o=42-(s+i);o=o>6?o-7:o;const{month:r,year:a}=this.getPreviousMonth(t,e),{month:n,year:d}=this.getNextMonth(t,e),h=this.getMonthDays(r,a);return[...[...new Array(s).fill("1")].map(((t,e)=>{const i=e+1+(h-s);return[a.toString(),this.zeroPad(r,2),this.zeroPad(i,2)]})),...[...new Array(i).fill("1")].map(((i,s)=>{const o=s+1;return[e.toString(),this.zeroPad(t,2),this.zeroPad(o,2)]})),...[...new Array(o).fill("1")].map(((t,e)=>{const i=e+1;return[d.toString(),this.zeroPad(n,2),this.zeroPad(i,2)]}))]}forwardOneMonth(){this.unfocusCell();const t=this.getNextMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)&&(this.dayInFocus=e),this.updateLiveRegion(`Displaying ${this.calendar_months[this.monthInFocus-1]}, ${this.yearInFocus}`)}backOneMonth(){this.unfocusCell();const t=this.getPreviousMonth(this.monthInFocus,this.yearInFocus);this.monthInFocus=t.month,this.yearInFocus=t.year;const e=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus>this.getMonthDays(this.monthInFocus,this.yearInFocus)&&(this.dayInFocus=e),this.updateLiveRegion(`Viewing ${this.calendar_months[this.monthInFocus-1]}, ${this.yearInFocus}`)}handleTriggeredDate(t){this.cellTriggered.emit(t),this.closePopup(!0)}handleSelectedDate(){this.selectedDate&&this.selectedDate.removeAttribute("aria-selected"),this.selectedDate=this.getCellById(this.selectedYear,this.selectedMonth,this.selectedDay),this.selectedDate&&this.selectedDate.setAttribute("aria-selected","true")}getCellById(t,e,i){const s=t+this.zeroPad(e,2)+this.zeroPad(i,2);return this.el.querySelector(`#cell-${s}-${this.parentId}`)}unfocusCell(){this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus).tabIndex=-1}focusCell(){const t=this.getMonthDays(this.monthInFocus,this.yearInFocus);this.dayInFocus=this.dayInFocus>t?t:this.dayInFocus;const e=this.getCellById(this.yearInFocus,this.monthInFocus,this.dayInFocus);e&&(e.tabIndex=0,e.focus())}unfocusMonth(){this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`).tabIndex=-1}focusMonth(){const t=this.el.querySelector(`#month-${this.monthNumInFocus}-${this.parentId}`);t.tabIndex=0,t.focus()}trapFocusLeft(t){t.shiftKey&&"Tab"===t.key&&(t.preventDefault(),this.focusCellInView())}trapFocusEnd(t){t.shiftKey||"Tab"!==t.key||(t.preventDefault(),this.prevButton.focus())}trapFocusRight(t){t.shiftKey||"Tab"!==t.key||(t.preventDefault(),this.focusCellInView())}focusCellInView(){"day"===this.view?this.focusCell():this.focusMonth()}toggleBusyAttribute(t){this.el.querySelector("#wm-container").setAttribute("aria-busy",t)}setDateValuesForView(){this.selectedYear=this.date.getUTCFullYear(),this.selectedMonth=this.date.getUTCMonth()+1,this.selectedDay=this.date.getUTCDate(),this.monthInFocus=this.selectedMonth,this.yearInFocus=this.selectedYear,this.dayInFocus=this.selectedDay,this.monthNumInFocus=this.selectedMonth-1}updateLiveRegion(t){this.el.querySelector("#live-region").innerHTML=t}panelPosition(){let t=document.getElementById(this.parentId);const e=t.shadowRoot.querySelector(".label-wrapper").clientHeight;this.openUp=a(t,this.popupEl.clientHeight,e),n(t,336)?(this.popupEl.style.left="0",this.popupEl.style.right="auto"):(this.popupEl.style.right="0",this.popupEl.style.left="auto")}changeView(t){this.view=t,this.monthNumInFocus=this.monthInFocus-1}renderMonths(t,e){return i("div",{id:`month-${e}-${this.parentId}`,class:"month "+(this.selectedMonth-1===e?"selected":""),role:"gridcell",tabindex:e+1===this.monthInFocus?0:-1,onKeyDown:t=>this.trapFocusEnd(t),onBlur:t=>t.stopPropagation(),onClick:()=>{this.monthInFocus=e+1,this.changeView("day")}},t)}render(){const t=this.getCalendarDates(this.monthInFocus,this.yearInFocus);return i("div",{class:"container",id:"wm-container"},i("button",{disabled:this.disabled,onClick:this.togglePopup.bind(this),"aria-describedby":`date-input-${this.parentId}`,ref:t=>this.buttonEl=t,"aria-expanded":`${this.isExpanded}`,class:"toggle",id:`toggle-${this.parentId}`},i("span",{class:"calendar",title:r.formatMessage({id:"date.calendarView",defaultMessage:"Calendar View",description:"Calendar button"})})),i("div",{class:`popup ${this.view}-view ${this.openUp?"expand-upwards":""} ${this.isTabbing?"user-is-tabbing":""}`,id:`popup-${this.parentId}`,ref:t=>this.popupEl=t,onClick:()=>this.popupClicked=!0,role:"application","aria-describedby":"application"},"day"===this.view?i("div",{class:"day-view"},i("div",{class:"calendar-header"},i("button",{onClick:()=>{this.prevClicked=!0,this.popupClicked=!0,this.backOneMonth()},onKeyDown:t=>this.trapFocusLeft(t),ref:t=>this.prevButton=t,class:"arw-btn","aria-label":r.formatMessage({id:"date.selectPreviousMonth",defaultMessage:"Select previous month",description:"Calendar button"})},i("span",{class:"mdi"},"")),i("div",{id:`popup-title-month-${this.parentId}`,class:"title-box",tabindex:0,role:"button",onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.changeView("month"))},onClick:this.changeView.bind(this,"month"),"aria-label":`${r.formatMessage({id:"date.currentMonth",defaultMessage:"current month",description:"Calendar button"})}: ${this.calendar_months[this.monthInFocus-1]}\n ${this.yearInFocus}.`,"aria-describedby":"month-title"},i("span",{class:"title","aria-hidden":"true"},this.calendar_months[this.monthInFocus-1]," ",this.yearInFocus)),i("button",{onClick:()=>{this.nextClicked=!0,this.popupClicked=!0,this.forwardOneMonth()},onKeyDown:t=>this.trapFocusRight(t),"aria-label":r.formatMessage({id:"date.selectNextMonth",defaultMessage:"Select next month",description:"Calendar button"}),ref:t=>this.nextButton=t,class:"arw-btn"},i("span",{class:"mdi"},""))),i("div",{"aria-labelledby":`popup-title-month-${this.parentId}`,role:"grid",class:"date-grid"},i("div",{role:"rowgroup",class:"date-header"},i("div",{role:"row",class:"header-row"},i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.su",defaultMessage:"Su",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.mo",defaultMessage:"Mo",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.tu",defaultMessage:"Tu",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.we",defaultMessage:"We",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.th",defaultMessage:"Th",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.fr",defaultMessage:"Fr",description:"Abbreviated day of the week"}))),i("div",{role:"columnheader",class:"header-cell"},i("span",null,r.formatMessage({id:"date.sa",defaultMessage:"Sa",description:"Abbreviated day of the week"}))))),i("div",{role:"rowgroup"},i("div",{role:"row",class:"date-row"},t.slice(0,7).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(7,14).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(14,21).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(21,28).map(((t,e)=>this.renderCalendarDate(t,e)))),i("div",{role:"row"},t.slice(28,35).map(((t,e)=>this.renderCalendarDate(t,e)))),t.length>35?i("div",{role:"row"},t.slice(35).map(((t,e)=>this.renderCalendarDate(t,e)))):""))):i("div",{class:"month-view"},i("div",{class:"calendar-header"},i("button",{onClick:()=>{this.prevClicked=!0,this.popupClicked=!0,this.yearInFocus-=1,this.updateLiveRegion(`${this.yearInFocus} selected.`)},onKeyDown:t=>this.trapFocusLeft(t),"aria-label":r.formatMessage({id:"date.selectPreviousYear",defaultMessage:"Select previous year",description:"Calendar button"}),ref:t=>this.prevButton=t,class:"arw-btn"},i("span",{class:"mdi"},"")),i("div",{id:`popup-title-year-${this.parentId}`,tabindex:0,class:"title-box year",role:"button",onClick:this.changeView.bind(this,"day"),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.changeView("day"))},"aria-labelledby":"year-title"},i("span",{class:"title"},this.yearInFocus)),i("button",{onClick:()=>{this.nextClicked=!0,this.popupClicked=!0,this.yearInFocus+=1,this.updateLiveRegion(`${this.yearInFocus} selected.`)},"aria-label":r.formatMessage({id:"date.selectNextYear",defaultMessage:"Select next year",description:"Calendar button"}),onKeyDown:t=>this.trapFocusRight(t),ref:t=>this.nextButton=t,class:"arw-btn"},i("span",{class:"mdi"},""))),i("div",{"aria-labelledby":`popup-title-year-${this.parentId}`,role:"grid",class:"months"},i("div",{role:"row",class:"month-row"},this.calendar_months.slice(0,3).map(((t,e)=>this.renderMonths(t,e)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(3,6).map(((t,e)=>this.renderMonths(t,e+3)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(6,9).map(((t,e)=>this.renderMonths(t,e+6)))),i("div",{role:"row",class:"month-row"},this.calendar_months.slice(9).map(((t,e)=>this.renderMonths(t,e+9))))))),this.isExpanded&&i("div",{id:"live-region","aria-live":"polite","aria-relevant":"text",class:"sr-only"}),i("div",{id:"month-title",class:"sr-only"},r.formatMessage({id:"date.selectMonth",defaultMessage:"Activate to select a month.",description:"Calendar button"})),i("div",{id:"year-title",class:"sr-only"},r.formatMessage({id:"date.selectYear",defaultMessage:"Activate to select a year.",description:"Calendar button"})),i("div",{id:"application",class:"sr-only"},r.formatMessage({id:"date.instructions",defaultMessage:"Use arrows to select a date in the table. Tab left or right to buttons for selecting previous month, next month, or the month selection table."})))}get el(){return o(this)}};d.style='.toggle{all:unset;cursor:pointer;padding:0 0.375rem;height:2.375rem;background-color:var(--wmcolor-datepicker-toggle-background);border:none;-moz-border-top-right-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-bottom-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.toggle span::after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f0ed";font-size:1.5rem;color:var(--wmcolor-datepicker-toggle-icon);padding:0;line-height:2.5rem}.toggle:hover{-webkit-box-shadow:none;box-shadow:none;background:var(--wmcolor-datepicker-toggle-background-hover)}.toggle:disabled{pointer-events:none;-webkit-box-shadow:none;box-shadow:none;background-color:var(--wmcolor-datepicker-toggle-background-disabled)}.toggle:disabled .calendar::after{color:var(--wmcolor-datepicker-toggle-icon-disabled)}[dir=RTL] .toggle{right:auto;left:0}.toggle:focus{outline:none}.toggle::-moz-focus-inner{border:0}.user-is-tabbing .toggle:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus)}.user-is-tabbing .toggle:focus::-moz-focus-inner{border:0}.popup{visibility:hidden;font-family:inherit;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;-webkit-box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);box-shadow:0px 4px 15px 0px rgba(0, 0, 0, 0.2);width:21rem;z-index:10;position:absolute;left:0;top:40px;min-height:21.0625rem;-webkit-transition:-webkit-transform 0.25s ease;transition:-webkit-transform 0.25s ease;transition:transform 0.25s ease;transition:transform 0.25s ease, -webkit-transform 0.25s ease;-webkit-transform-origin:center top;transform-origin:center top;-webkit-transform:scale(1, 0);transform:scale(1, 0);background-color:var(--wmcolor-datepicker-background)}.popup.open{-webkit-transform:scale(1, 1);transform:scale(1, 1)}.popup.expand-upwards{top:auto;bottom:2.375rem;-webkit-transform-origin:center bottom;transform-origin:center bottom}.popup .calendar-header{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;position:relative;padding:0.9375rem 0.25rem}.popup .calendar-header .title-box{height:2.625rem;-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;border:1px solid;font-weight:500;font-size:0.875rem;background:var(--wmcolor-datepicker-selector-background);cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;padding:0 0.375rem 0 0.75rem;border-color:var(--wmcolor-datepicker-selector-border);color:var(--wmcolor-datepicker-selector-text)}.popup .calendar-header .title-box:after{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"\\f140";padding-left:0.75rem;font-size:1.12rem}.popup .calendar-header .title-box.year:after{content:"\\f143"}.popup .calendar-header .title-box::-moz-focus-inner{border:0}.popup .calendar-header .title-box:focus{outline:none}.popup .calendar-header .arw-btn{cursor:pointer;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;width:2.75rem;height:2.75rem;border:none;color:var(--wmcolor-datepicker-navigation-text);background:var(--wmcolor-datepicker-navigation-background);padding:0;-webkit-box-shadow:none;box-shadow:none;line-height:2.75rem}.popup .calendar-header .arw-btn .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:1.5rem;font-weight:normal;line-height:2.75rem}.popup .calendar-header .arw-btn:hover{background-color:var(--wmcolor-datepicker-navigation-background-hover)}.popup .calendar-header .arw-btn:focus{outline:none}.popup .calendar-header .arw-btn:active{-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}.popup .day-view{min-width:100%}.popup .day-view .date-grid{width:100%;text-align:center;border-collapse:collapse;margin-bottom:0.4375rem;color:var(--wmcolor-datepicker-day-text-outside)}.popup .day-view .date-grid .date-row:first-child .date-cell{margin-top:0.125rem}.popup .day-view .date-grid .date-header{background-color:var(--wmcolor-datepicker-weekdays-background)}.popup .day-view .date-grid .header-cell{height:2.0625rem;line-height:2.0625rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);padding:0;display:inline-block;font-size:0.8125rem;font-weight:bold;color:var(--wmcolor-datepicker-weekdays-text);border:none}.popup .day-view .date-grid .date-cell{cursor:pointer;display:inline-block;padding:0;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;height:2.75rem;width:2.75rem;margin:0 calc((14.28% - 44px) / 2);font-size:0.875rem;font-weight:500;line-height:2.75rem}.popup .day-view .date-grid .date-cell:focus{outline:none}.popup .day-view .date-grid .date-cell:hover{background-color:var(--wmcolor-datepicker-day-background-hover)}.popup .day-view .date-grid .date-cell.current-month{color:var(--wmcolor-datepicker-day-text)}.popup .day-view .date-grid .date-cell.current-month[aria-selected=true]{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .day-view .date-grid .date-cell:active{background-color:var(--wmcolor-datepicker-day-background-selected);color:var(--wmcolor-datepicker-day-text-selected)}.popup .month-view .months{border-top:2px solid;border-top-color:var(--wmcolor-datepicker-month-border);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.popup .month-view .month-row{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;width:100%;border-bottom:2px solid;border-bottom-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month{cursor:pointer;text-align:center;width:100%;height:4rem;line-height:4rem;font-weight:500;color:var(--wmcolor-datepicker-month-text)}.popup .month-view .month:not(:last-child){border-right:2px solid;border-right-color:var(--wmcolor-datepicker-month-border)}.popup .month-view .month:focus{outline:none}.popup .month-view .month:hover{border-right-color:transparent;background-color:var(--wmcolor-datepicker-month-background-hover)}.popup .month-view .month:active,.popup .month-view .month.selected{background-color:var(--wmcolor-datepicker-month-background-selected);color:var(--wmcolor-datepicker-month-text-selected)}.popup.user-is-tabbing button:focus,.popup.user-is-tabbing .title-box:focus,.popup.user-is-tabbing .date-cell:focus,.popup.user-is-tabbing .month:focus{-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px var(--wmcolor-interactive-focus);border:none;z-index:11}.popup.user-is-tabbing button:focus::-moz-focus-inner,.popup.user-is-tabbing .title-box:focus::-moz-focus-inner,.popup.user-is-tabbing .date-cell:focus::-moz-focus-inner,.popup.user-is-tabbing .month:focus::-moz-focus-inner{border:0}.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{d as priv_datepicker}