@watermarkinsights/ripple 5.6.0-8 → 5.6.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.
- package/dist/cjs/{chartFunctions-995023b1.js → chartFunctions-6fd43417.js} +1 -1
- package/dist/cjs/{functions-e24249e6.js → functions-04149f6d.js} +0 -6
- package/dist/cjs/{global-9662b435.js → global-4a315ae6.js} +1 -1
- package/dist/cjs/index-e86c28b6.js +0 -12
- package/dist/cjs/{intl-5aeba788.js → intl-b1e99809.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/priv-calendar.cjs.entry.js +1 -1
- package/dist/cjs/priv-chart-popover.cjs.entry.js +1 -1
- package/dist/cjs/ripple.cjs.js +2 -2
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +1 -1
- package/dist/cjs/wm-button.cjs.entry.js +1 -1
- package/dist/cjs/wm-chart.cjs.entry.js +3 -3
- package/dist/cjs/wm-date-range.cjs.entry.js +1 -1
- package/dist/cjs/wm-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-file.cjs.entry.js +1 -1
- package/dist/cjs/wm-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-line-chart.cjs.entry.js +10 -25
- package/dist/cjs/wm-modal-header.cjs.entry.js +2 -2
- package/dist/cjs/wm-modal.cjs.entry.js +1 -1
- package/dist/cjs/wm-navigation_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-navigator.cjs.entry.js +1 -1
- package/dist/cjs/wm-option_2.cjs.entry.js +338 -33
- package/dist/cjs/wm-pagination.cjs.entry.js +1 -1
- package/dist/cjs/wm-progress-indicator_3.cjs.entry.js +2 -2
- package/dist/cjs/wm-search.cjs.entry.js +2 -2
- package/dist/cjs/wm-snackbar.cjs.entry.js +2 -2
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +1 -1
- package/dist/cjs/wm-tag-input.cjs.entry.js +2 -2
- package/dist/cjs/wm-tag-option.cjs.entry.js +1 -1
- package/dist/cjs/wm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/wm-timepicker.cjs.entry.js +1 -1
- package/dist/cjs/wm-toggletip.cjs.entry.js +1 -1
- package/dist/cjs/wm-uploader.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -5
- package/dist/collection/components/charts/wm-line-chart/wm-line-chart.js +7 -22
- package/dist/collection/components/wm-option/wm-option.js +9 -35
- package/dist/collection/components/wm-option/wm-option.spec.js +1 -1
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.css +74 -0
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.js +383 -16
- package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.spec.js +62 -62
- package/dist/collection/global/functions.js +0 -5
- package/dist/esm/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
- package/dist/esm/{functions-b791a892.js → functions-cf37f81f.js} +1 -6
- package/dist/esm/{global-f1582c2f.js → global-016b76a8.js} +1 -1
- package/dist/esm/index-558b5a82.js +0 -12
- package/dist/esm/{intl-f2f7ce8b.js → intl-c72b75dc.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/priv-calendar.entry.js +1 -1
- package/dist/esm/priv-chart-popover.entry.js +1 -1
- package/dist/esm/ripple.js +2 -2
- package/dist/esm/wm-action-menu_2.entry.js +1 -1
- package/dist/esm/wm-button.entry.js +1 -1
- package/dist/esm/wm-chart.entry.js +3 -3
- package/dist/esm/wm-date-range.entry.js +1 -1
- package/dist/esm/wm-datepicker.entry.js +1 -1
- package/dist/esm/wm-file.entry.js +1 -1
- package/dist/esm/wm-input.entry.js +2 -2
- package/dist/esm/wm-line-chart.entry.js +10 -25
- package/dist/esm/wm-modal-header.entry.js +2 -2
- package/dist/esm/wm-modal.entry.js +1 -1
- package/dist/esm/wm-navigation_3.entry.js +2 -2
- package/dist/esm/wm-navigator.entry.js +1 -1
- package/dist/esm/wm-option_2.entry.js +338 -33
- package/dist/esm/wm-pagination.entry.js +1 -1
- package/dist/esm/wm-progress-indicator_3.entry.js +2 -2
- package/dist/esm/wm-search.entry.js +2 -2
- package/dist/esm/wm-snackbar.entry.js +2 -2
- package/dist/esm/wm-tab-item_3.entry.js +1 -1
- package/dist/esm/wm-tag-input.entry.js +2 -2
- package/dist/esm/wm-tag-option.entry.js +1 -1
- package/dist/esm/wm-textarea.entry.js +2 -2
- package/dist/esm/wm-timepicker.entry.js +1 -1
- package/dist/esm/wm-toggletip.entry.js +1 -1
- package/dist/esm/wm-uploader.entry.js +2 -2
- package/dist/esm-es5/{chartFunctions-dfcb1edf.js → chartFunctions-f5eb7f59.js} +1 -1
- package/dist/esm-es5/{functions-b791a892.js → functions-cf37f81f.js} +1 -1
- package/dist/esm-es5/global-016b76a8.js +1 -0
- package/dist/esm-es5/index-558b5a82.js +1 -1
- package/dist/esm-es5/{intl-f2f7ce8b.js → intl-c72b75dc.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/priv-calendar.entry.js +1 -1
- package/dist/esm-es5/priv-chart-popover.entry.js +1 -1
- package/dist/esm-es5/ripple.js +1 -1
- package/dist/esm-es5/wm-action-menu_2.entry.js +1 -1
- package/dist/esm-es5/wm-button.entry.js +1 -1
- package/dist/esm-es5/wm-chart.entry.js +1 -1
- package/dist/esm-es5/wm-date-range.entry.js +1 -1
- package/dist/esm-es5/wm-datepicker.entry.js +1 -1
- package/dist/esm-es5/wm-file.entry.js +1 -1
- package/dist/esm-es5/wm-input.entry.js +1 -1
- package/dist/esm-es5/wm-line-chart.entry.js +1 -1
- package/dist/esm-es5/wm-modal-header.entry.js +1 -1
- package/dist/esm-es5/wm-modal.entry.js +1 -1
- package/dist/esm-es5/wm-navigation_3.entry.js +1 -1
- package/dist/esm-es5/wm-navigator.entry.js +1 -1
- package/dist/esm-es5/wm-option_2.entry.js +1 -1
- package/dist/esm-es5/wm-pagination.entry.js +1 -1
- package/dist/esm-es5/wm-progress-indicator_3.entry.js +1 -1
- package/dist/esm-es5/wm-search.entry.js +1 -1
- package/dist/esm-es5/wm-snackbar.entry.js +1 -1
- package/dist/esm-es5/wm-tab-item_3.entry.js +1 -1
- package/dist/esm-es5/wm-tag-input.entry.js +1 -1
- package/dist/esm-es5/wm-tag-option.entry.js +1 -1
- package/dist/esm-es5/wm-textarea.entry.js +1 -1
- package/dist/esm-es5/wm-timepicker.entry.js +1 -1
- package/dist/esm-es5/wm-toggletip.entry.js +1 -1
- package/dist/esm-es5/wm-uploader.entry.js +1 -1
- package/dist/ripple/{p-c1e3c2fb.entry.js → p-04f9a60a.entry.js} +1 -1
- package/dist/ripple/{p-41550baa.entry.js → p-0b570b66.entry.js} +1 -1
- package/dist/ripple/{p-5300b15d.entry.js → p-0d05b4a9.entry.js} +1 -1
- package/dist/ripple/p-11aaef56.system.entry.js +1 -0
- package/dist/ripple/{p-b01f9998.system.entry.js → p-120dbdc8.system.entry.js} +1 -1
- package/dist/ripple/{p-f24572f5.entry.js → p-1aef4b40.entry.js} +1 -1
- package/dist/ripple/{p-13f51c06.entry.js → p-20a800a7.entry.js} +1 -1
- package/dist/ripple/{p-236af552.entry.js → p-24103be5.entry.js} +1 -1
- package/dist/ripple/{p-1389302e.system.entry.js → p-2ccf8450.system.entry.js} +1 -1
- package/dist/ripple/{p-6cc07645.system.entry.js → p-2d0bcc88.system.entry.js} +1 -1
- package/dist/ripple/{p-0b1c6965.system.entry.js → p-2d0e4020.system.entry.js} +1 -1
- package/dist/ripple/{p-215793a4.entry.js → p-31094930.entry.js} +1 -1
- package/dist/ripple/{p-1e625a5e.entry.js → p-3ea0e27c.entry.js} +1 -1
- package/dist/ripple/{p-db9657eb.system.entry.js → p-446e0b2c.system.entry.js} +1 -1
- package/dist/ripple/{p-72165bd2.entry.js → p-451433a6.entry.js} +1 -1
- package/dist/ripple/p-481a9e2f.system.js +1 -0
- package/dist/ripple/{p-45f9ad09.entry.js → p-508362c5.entry.js} +1 -1
- package/dist/ripple/{p-3deaf4d9.system.entry.js → p-53519eed.system.entry.js} +1 -1
- package/dist/ripple/p-55668879.system.js +1 -0
- package/dist/ripple/p-5967bd2a.system.entry.js +1 -0
- package/dist/ripple/{p-5a9e3108.system.entry.js → p-5db92638.system.entry.js} +1 -1
- package/dist/ripple/{p-3e415c49.system.entry.js → p-5f793375.system.entry.js} +1 -1
- package/dist/ripple/p-6636a40b.system.entry.js +1 -0
- package/dist/ripple/{p-f90e4094.entry.js → p-6f4c4231.entry.js} +1 -1
- package/dist/ripple/{p-828adbf1.system.js → p-74032162.system.js} +1 -1
- package/dist/ripple/{p-5284791c.entry.js → p-762429a8.entry.js} +1 -1
- package/dist/ripple/{p-16f65bf4.js → p-76825602.js} +1 -1
- package/dist/ripple/{p-c47fab48.entry.js → p-76d53189.entry.js} +1 -1
- package/dist/ripple/{p-fa4f1030.system.entry.js → p-7f483c55.system.entry.js} +1 -1
- package/dist/ripple/{p-a3c01e10.system.entry.js → p-7fdcce90.system.entry.js} +1 -1
- package/dist/ripple/{p-cad0c5f9.system.entry.js → p-8008f0f2.system.entry.js} +1 -1
- package/dist/ripple/{p-3d50db36.entry.js → p-86d81e42.entry.js} +1 -1
- package/dist/ripple/{p-f2101a0d.entry.js → p-8a11ee6f.entry.js} +1 -1
- package/dist/ripple/{p-c2e00d4a.system.entry.js → p-8b272d80.system.entry.js} +1 -1
- package/dist/ripple/{p-885c3527.entry.js → p-9603168d.entry.js} +1 -1
- package/dist/ripple/{p-f40e1468.system.entry.js → p-97f276aa.system.entry.js} +1 -1
- package/dist/ripple/{p-749597da.system.entry.js → p-984287f7.system.entry.js} +1 -1
- package/dist/ripple/{p-ff1ed90f.entry.js → p-9b75d56c.entry.js} +1 -1
- package/dist/ripple/{p-a0ecb6d7.system.entry.js → p-9df3574d.system.entry.js} +1 -1
- package/dist/ripple/p-a40b0af9.system.js +1 -0
- package/dist/ripple/p-a895f1ef.entry.js +1 -0
- package/dist/ripple/{p-e081fdc2.system.entry.js → p-ae4460f2.system.entry.js} +1 -1
- package/dist/ripple/{p-b9dbf1f4.entry.js → p-bd142645.entry.js} +1 -1
- package/dist/ripple/{p-aea13873.entry.js → p-c61366fd.entry.js} +1 -1
- package/dist/ripple/{p-ca971eac.system.entry.js → p-c9200deb.system.entry.js} +1 -1
- package/dist/ripple/{p-6d129ef8.system.entry.js → p-cd51ee87.system.entry.js} +1 -1
- package/dist/ripple/{p-465d44f0.system.entry.js → p-ce8c6180.system.entry.js} +1 -1
- package/dist/ripple/{p-84ba5b74.entry.js → p-d0387d35.entry.js} +1 -1
- package/dist/ripple/{p-ed1f6b8d.system.entry.js → p-d8994408.system.entry.js} +1 -1
- package/dist/ripple/{p-eddbcb21.js → p-db190563.js} +1 -1
- package/dist/ripple/{p-83be63f6.entry.js → p-db8917e4.entry.js} +1 -1
- package/dist/ripple/{p-505eca1c.system.entry.js → p-dc7a6037.system.entry.js} +1 -1
- package/dist/ripple/p-dfd1b720.entry.js +1 -0
- package/dist/ripple/{p-df157138.entry.js → p-e3899e1f.entry.js} +1 -1
- package/dist/ripple/{p-30b905eb.system.entry.js → p-ed1971ff.system.entry.js} +1 -1
- package/dist/ripple/{p-2e79fa49.entry.js → p-f177d841.entry.js} +1 -1
- package/dist/ripple/{p-149a22bf.entry.js → p-f4b64ded.entry.js} +1 -1
- package/dist/ripple/p-f9494a9d.js +1 -0
- package/dist/ripple/{p-21d372ed.js → p-fb229776.js} +1 -1
- package/dist/ripple/{p-81c2df85.system.js → p-fb751343.system.js} +1 -1
- package/dist/ripple/{p-c853e185.system.entry.js → p-ffa15c47.system.entry.js} +1 -1
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/ripple/ripple.js +1 -1
- package/dist/types/components/charts/wm-line-chart/wm-line-chart.d.ts +1 -1
- package/dist/types/components/wm-option/wm-option.d.ts +39 -0
- package/dist/types/components/wm-select/wm-select.d.ts +96 -0
- package/dist/types/components.d.ts +2 -148
- package/dist/types/global/functions.d.ts +0 -1
- package/package.json +2 -2
- package/dist/cjs/priv-option-list.cjs.entry.js +0 -384
- package/dist/cjs/wm-nested-select.cjs.entry.js +0 -295
- package/dist/cjs/wm-optgroup.cjs.entry.js +0 -56
- package/dist/collection/components/selects/priv-option-list/priv-option-list.css +0 -104
- package/dist/collection/components/selects/priv-option-list/priv-option-list.js +0 -714
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.css +0 -378
- package/dist/collection/components/selects/wm-nested-select/wm-nested-select.js +0 -581
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.css +0 -77
- package/dist/collection/components/selects/wm-optgroup/wm-optgroup.js +0 -197
- package/dist/collection/dev/nested-select.js +0 -62
- package/dist/esm/priv-option-list.entry.js +0 -380
- package/dist/esm/wm-nested-select.entry.js +0 -291
- package/dist/esm/wm-optgroup.entry.js +0 -52
- package/dist/esm-es5/global-f1582c2f.js +0 -1
- package/dist/esm-es5/priv-option-list.entry.js +0 -1
- package/dist/esm-es5/wm-nested-select.entry.js +0 -1
- package/dist/esm-es5/wm-optgroup.entry.js +0 -1
- package/dist/ripple/p-104c0e9b.system.entry.js +0 -1
- package/dist/ripple/p-17c8aac1.system.entry.js +0 -1
- package/dist/ripple/p-24ba754f.entry.js +0 -1
- package/dist/ripple/p-2fb58947.entry.js +0 -1
- package/dist/ripple/p-4564a101.system.entry.js +0 -1
- package/dist/ripple/p-4ca5ed96.entry.js +0 -1
- package/dist/ripple/p-50388b6f.system.entry.js +0 -1
- package/dist/ripple/p-5b9babd9.system.entry.js +0 -1
- package/dist/ripple/p-8835adfb.entry.js +0 -1
- package/dist/ripple/p-ae82b3d2.system.js +0 -1
- package/dist/ripple/p-ba422994.entry.js +0 -1
- package/dist/ripple/p-bfeb6ef8.system.js +0 -1
- package/dist/ripple/p-cf2121f3.system.entry.js +0 -1
- package/dist/ripple/p-cf55659f.js +0 -1
- package/dist/ripple/p-f6fd623f.system.js +0 -1
- package/dist/types/components/selects/wm-select/wm-select.d.ts +0 -53
- /package/dist/collection/components/{selects/wm-select → wm-select}/wm-select.e2e.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-ae82b3d2.system.js","./p-828adbf1.system.js","./p-81c2df85.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,d,b,w,u,f,g,x,v;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g},function(e){p=e.g;i=e.d},function(e){s=e.a;l=e.h;c=e.g;h=e.r;m=e.b;d=e.c;b=e.d;w=e.e;u=e.f;f=e.i;g=e.j;x=e.k},function(e){v=e.c}],execute:function(){var k=":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:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}: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;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values.none{margin:0}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}: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 .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}: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:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-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 .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}: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.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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}: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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}: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.bar{-ms-flex-direction:row;flex-direction:row}: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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}: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.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}: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:116px}: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;width:100%;overflow:visible;-webkit-transform:translate(0px, 96px);transform:translate(0px, 96px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar3 .bar3-axis-label{position:absolute;bottom:-4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}: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:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}: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 .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}: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.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.faded{opacity:0.3}: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;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var y=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c.call(this,this.currentChartType)];case 1:e.sent();r(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.focusedSliceId=undefined}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){return this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return s[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(o){switch(o.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,c.call(this,this.currentChartType)];case 1:o.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){r(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var n=x(e.amount,this.total,false);var a=this.el.offsetWidth;var p=n/100*a>=t;var i=p||e.amount==0?"".concat(n,"%"):"".concat(t,"px");return o("div",{class:"value-wrapper ".concat(p?"":"fixed-width"),style:{width:i}},o("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return o("svg",{class:"axis"},o("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),o("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),o("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),o("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return m.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return d.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return b.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return g.call(e)}},o("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":v.interactiveChart,"aria-describedby":"chart-instructions"},o("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},o("span",{class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.isBar&&u.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&u.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&f()),w())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=k}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,a){function p(e){try{s(o.next(e))}catch(e){a(e)}}function i(e){try{s(o["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):n(e.value).then(p,i)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,p;return p={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(p[Symbol.iterator]=function(){return this}),p;function i(e){return function(t){return s([e,t])}}function s(i){if(o)throw new TypeError("Generator is already executing.");while(p&&(p=0,i[0]&&(r=0)),r)try{if(o=1,n&&(a=i[0]&2?n["return"]:i[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,i[1])).done)return a;if(n=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;n=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){r.label=i[1];break}if(i[0]===6&&r.label<a[1]){r.label=a[1];a=i;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(i);break}if(a[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];n=0}finally{o=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};System.register(["./p-ab8d78cc.system.js","./p-55668879.system.js","./p-74032162.system.js","./p-fb751343.system.js"],(function(e){"use strict";var t,r,o,n,a,p,i,s,l,c,h,m,d,b,w,u,f,g,x,v;return{setters:[function(e){t=e.r;r=e.f;o=e.h;n=e.H;a=e.g},function(e){p=e.g;i=e.d},function(e){s=e.a;l=e.h;c=e.g;h=e.r;m=e.b;d=e.c;b=e.d;w=e.e;u=e.f;f=e.i;g=e.j;x=e.k},function(e){v=e.c}],execute:function(){var k=":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:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}: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;gap:2px;margin-bottom:8px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .values.none{margin:0}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper{display:-ms-flexbox;display:flex;gap:2px}:host .component-wrapper .bar-wrapper .inner-stacked-bar-wrapper .stacked-bar-segments-wrapper .stacked-bar-segment{height:30px;cursor:pointer}:host .component-wrapper .segment{print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .segment.fixed-width{-ms-flex-negative:0;flex-shrink:0}: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 .fixed-width{-ms-flex-negative:0;flex-shrink:0}:host .component-wrapper .value-wrapper .value.hidden{visibility:hidden}:host .component-wrapper .faded{opacity:0.3}: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:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.stacked-bar-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.stacked-bar-segment:not(:focus-visible){-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:not(:focus-visible),:host .component-wrapper path:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper path:focus.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:active.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:hover.doughnut-segment:not(:focus-visible),:host .component-wrapper .stacked-bar-segment:focus.doughnut-segment:not(:focus-visible){-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 .stacked-bar-segment:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}:host .component-wrapper #kfbg1{stroke:white;stroke-width:10px}:host .component-wrapper #kfstroke{stroke:var(--wmcolor-interactive-focus);stroke-width:6px}:host .component-wrapper #kfbg2{stroke:white;stroke-width:2px}: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.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.doughnut{-ms-flex-align:center;align-items:center}:host .component-wrapper.doughnut label{text-align:center;width:100%;padding-bottom:1.5rem}:host .component-wrapper.doughnut label .subinfo{position:absolute}:host .component-wrapper.doughnut .completion-message{padding-top:0.625rem}:host .component-wrapper.bar{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host .component-wrapper.bar label .subinfo{position:initial}:host .component-wrapper.bar .chart-wrapper{display:-ms-flexbox;display:flex}: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.bar .chart-wrapper .inner-stacked-bar-wrapper{-ms-flex:1;flex:1}: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.bar{-ms-flex-direction:row;flex-direction:row}: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.bar .bar-wrapper{-ms-flex-direction:row-reverse;flex-direction:row-reverse}: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.bar3,:host .component-wrapper.bar4,:host .component-wrapper.bar5{-ms-flex-align:start;align-items:flex-start}:host .component-wrapper.bar4 .inner-stacked-bar-wrapper,:host .component-wrapper.bar5 .inner-stacked-bar-wrapper{height:30px;margin-bottom:0}: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:116px}: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;width:100%;overflow:visible;-webkit-transform:translate(0px, 96px);transform:translate(0px, 96px)}:host .component-wrapper.bar3 .chart-wrapper .axis line{stroke:var(--wmcolor-chart-gridline);stroke-width:1px}:host .component-wrapper.bar3 .hidden-values-warning{margin-top:1.25rem}:host .component-wrapper.bar3 .bar3-axis-label{position:absolute;bottom:-4px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}: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:not(:focus-visible),:host .component-wrapper.bar6 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar6 .bar:focus.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:active.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:hover.bar:not(:focus-visible),:host .component-wrapper.bar7 .bar:focus.bar:not(:focus-visible){-webkit-box-shadow:0px 0px 6px #333;-moz-box-shadow:0px 0px 6px #333;box-shadow:0px 0px 6px #333}:host .component-wrapper.bar6 .bar:focus-visible,:host .component-wrapper.bar7 .bar:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px;-webkit-box-shadow:0 0 0 7px white;box-shadow:0 0 0 7px white;z-index:1}: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 .component-wrapper .hidden-values-warning.hidden{display:none}@media print{:host .component-wrapper .hidden-values-warning{display:none}}: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.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.faded{opacity:0.3}: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;print-color-adjust:exact;-webkit-print-color-adjust:exact}:host .component-wrapper .legend-wrapper .legend .print-value{display:none}:host .component-wrapper .legend-wrapper .legend .print-value.force-visible{display:unset}@media print{:host .component-wrapper .legend-wrapper .legend .print-value{display:unset}}:host .component-wrapper .legend-wrapper .legend.bar3{padding-bottom:1.25rem}";var y=e("wm_chart",function(){function e(e){var o=this;t(this,e);this.uid=p();this.slicesDetails=[];this.debouncedSliceUpdate=i((function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,c.call(this,this.currentChartType)];case 1:e.sent();r(this.el);return[2]}}))}))}),100);this.chartType="doughnut1";this.label=undefined;this.labelWidth="150px";this.subinfo=undefined;this.valueFormat="none";this.showGrid=true;this.showLegend=true;this.showBarLegend=false;this.notStartedColor=false;this.printMode=false;this.printModeFormat="amount";this.labelPosition="top";this.isTabbing=false;this.userIsNavigating=false;this.focusedSliceId=undefined}Object.defineProperty(e.prototype,"popoverEl",{get:function(){return this.el.shadowRoot.querySelector("priv-chart-popover")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"sliceEls",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll(".segment"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"currentChartType",{get:function(){return this.chartType},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"chartDetails",{get:function(){return s[this.currentChartType]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"ariaLabelText",{get:function(){var e="".concat(this.label);if(this.subinfo){e+=" ".concat(this.subinfo)}return e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDoughnut",{get:function(){return this.chartDetails.category==="doughnut"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isStackedBar",{get:function(){return this.chartDetails.category==="stackedBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSimpleBar",{get:function(){return this.chartDetails.category==="simpleBar"},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBar",{get:function(){return this.isStackedBar||this.isSimpleBar},enumerable:false,configurable:true});e.prototype.toggleTabbingOn=function(){this.isTabbing=true};e.prototype.toggleTabbingOff=function(){this.isTabbing=false};e.prototype.handleKeydown=function(e){l.call(this,e)};e.prototype.showHiddenValuesMessage=function(e){var t=this;var r=this.el.shadowRoot.querySelector(".hidden-values-warning");if(r){e?r.classList.remove("hidden"):r.classList.add("hidden")}else{requestAnimationFrame((function(){return t.showHiddenValuesMessage(e)}))}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;var t=this;return __generator(this,(function(o){switch(o.label){case 0:if(!this.label){throw new Error("For accessibility purposes, you must provide a label for the chart. See https://components.watermarkinsights.com/chart for more information.")}return[4,c.call(this,this.currentChartType)];case 1:o.sent();if(!this.isDoughnut){e=new ResizeObserver((function(){r(t.el)}));e.observe(this.el)}return[2]}}))}))};e.prototype.handleSliceUpdate=function(){this.debouncedSliceUpdate()};e.prototype.handlePopoverOpenChanged=function(e){var t=e.detail;if(!t){var r=Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex]"));h(r)}};e.prototype.renderBarText=function(e,t){var r;if(this.valueFormat==="percentage"){r=e.perc===0&&e.amount>0?"<1%":"".concat(e.perc,"%")}else if(this.valueFormat==="amount"){r=e.amount}var n=x(e.amount,this.total,false);var a=this.el.offsetWidth;var p=n/100*a>=t;var i=p||e.amount==0?"".concat(n,"%"):"".concat(t,"px");return o("div",{class:"value-wrapper ".concat(p?"":"fixed-width"),style:{width:i}},o("span",{class:"value","data-value":e.amount,"data-segmentindex":e.index},e.amount>0&&r))};e.prototype.drawAxis=function(){if(this.currentChartType==="bar3"){return o("svg",{class:"axis"},o("line",{x1:"0",x2:"100%",y1:"0",y2:"0"}),o("line",{x1:"0",x2:"0",y1:"0",y2:"-85px"}),o("line",{class:"tick",x1:"0.5",x2:"0.5",y1:"0",y2:"6"}),o("line",{class:"tick",x1:"100%",x2:"100%",y1:"0",y2:"6"}))}};e.prototype.renderChart=function(){if(this.isSimpleBar){return m.call(this,this.currentChartType)}else if(this.isStackedBar&&this.total>0){return d.call(this,this.currentChartType)}else if(this.isDoughnut&&this.total>0){return b.call(this,this.currentChartType)}};e.prototype.render=function(){var e=this;return o(n,{onBlur:function(){return g.call(e)}},o("div",{ref:function(t){return e.componentWrapperEl=t},class:"component-wrapper ".concat(this.currentChartType," ").concat(this.isTabbing&&!this.userIsNavigating?"user-is-tabbing":""," ").concat(this.labelPosition==="left"&&this.currentChartType==="bar4"?"left-label":""),role:"application","aria-label":this.ariaLabelText,tabindex:0,"aria-roledescription":v.interactiveChart,"aria-describedby":"chart-instructions"},o("label",{id:"label-".concat(this.uid),class:"label --".concat(this.labelPosition),htmlFor:"graphic-".concat(this.uid)},o("span",{class:"label-text"},this.label),this.subinfo?o("span",{class:"subinfo"},this.subinfo):""),this.isBar&&u.call(this,this.currentChartType),this.renderChart(),this.isDoughnut&&u.call(this,this.currentChartType),o("priv-chart-popover",{class:this.isTabbing?"user-is-tabbing":"",onIntChartPopoverOpenChanged:function(t){return e.handlePopoverOpenChanged(t)}}),this.isBar&&!this.printMode&&f()),w())};Object.defineProperty(e,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());y.style=k}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-ab8d78cc.system.js","./p-81c2df85.system.js","./p-ae82b3d2.system.js"],(function(o){"use strict";var t,r,e,n,i,a,l;return{setters:[function(o){t=o.r;r=o.c;e=o.f;n=o.h;i=o.H;a=o.g},function(o){l=o.u},function(){}],execute:function(){var s=':host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,:host .wm-button:focus-visible{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled){outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-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-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere;border-radius:2px}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly: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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational: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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{display:block;position:relative;max-width:1140px}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus-visible+.wm-button{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.wm-button.disabled{pointer-events:initial !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}#label{margin-bottom:0.5rem}.info-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.info-wrapper .info{font-size:0.875rem;margin-left:1rem}.accepted-types{font-size:0.875rem}.notif-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-bottom:0.75rem}.requirements{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem;margin-left:1rem}.notif,#error{font-size:0.875rem;font-style:italic}.notif#error,#error#error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem}.notif#error:not(:empty),#error#error:not(:empty){margin-top:0.25rem}.list-container{overflow-y:unset}.list-container.checkmark-spacer{margin-right:2.75rem}.list-container .file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem;padding:0;width:100%;margin: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}::slotted(wm-file:nth-of-type(1)){margin-top:2.5rem}';var d=o("wm_uploader",function(){function o(o){t(this,o);this.wmUploaderFilesSelected=r(this,"wmUploaderFilesSelected",7);this.batchCount=0;this.prevUploadCount=0;this.fileIdToDelete="";this.label=undefined;this.buttonText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=undefined;this.maxFiles=undefined;this.errorMessage=undefined;this.requiredField=undefined;this.showInfo="time";this.isTabbing=false;this.notif="";this.isCondensed=false}Object.defineProperty(o.prototype,"isDisabled",{get:function(){return this.fileLimitReached||this.inProgressFileEls.length>0},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"fileEls",{get:function(){return Array.from(this.el.querySelectorAll("wm-file"))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"inProgressFileEls",{get:function(){return this.fileEls.filter((function(o){return o.progress!==undefined&&o.progress<100}))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"uploadedFileEls",{get:function(){return this.fileEls.filter((function(o){return!o.errorMessage}))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"fileLimitReached",{get:function(){return this.maxFiles&&this.uploadedFileEls.length>=this.maxFiles},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"validTypes",{get:function(){return"."+this.fileTypes.split(" ").join(", .")},enumerable:false,configurable:true});o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleFileErrorCleared=function(){this.uploadButtonEl.focus()};o.prototype.storeDeletedId=function(o){this.fileIdToDelete=o.target.id};o.prototype.announceError=function(){var o=this;if(this.errorMessage){setTimeout((function(){return o.announce(o.errorMessage,o.politeLiveRegionEl)}),100)}};o.prototype.componentWillLoad=function(){if(!this.buttonText){console.error("wm-uploader: button-text is a required property")}};o.prototype.componentDidLoad=function(){var o=this;if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}var t=new MutationObserver((function(t){return t.forEach((function(t){return o.handleChildMutation(t)}))}));t.observe(this.el,{childList:true,subtree:true,attributes:true,attributeOldValue:true,attributeFilter:["progress"]})};o.prototype.handleChildMutation=function(o){var t=this;if(o.type==="attributes"){this.handleProgressUpdate(o)}else if(o.type==="childList"){if(this.isTabbing&&o.removedNodes.length===1&&o.removedNodes[0].id===this.fileIdToDelete){this.focusAfterFileRemoval(o);this.fileIdToDelete=""}if(o.addedNodes.length>0){o.addedNodes.forEach((function(o){if(o.errorMessage){setTimeout((function(){return t.announce(o.errorMessage,t.politeLiveRegionEl)}),500)}}))}e(this.el)}};o.prototype.handleProgressUpdate=function(o){var t=this;if(this.inProgressFileEls.length!==0){var r=this.prevUploadCount!==this.inProgressFileEls.length;r&&this.announce(l.getFilesUploading(this.inProgressFileEls.length),this.assertiveLiveRegionEl);this.notif=l.getFilesUploading(this.inProgressFileEls.length);this.prevUploadCount=this.inProgressFileEls.length;if(!this.srProgress){this.srProgress=setInterval((function(){var o=t.fileEls.reduce((function(o,t){return t.progress?o+t.progress:o}),0);t.announce(l.getUploadProgress(Math.floor(o/t.batchCount)),t.assertiveLiveRegionEl)}),5e3)}}else if(this.inProgressFileEls.length===0&&o.oldValue&&parseInt(o.oldValue)<100){this.notif=l.finishedUploading;this.announce(l.finishedUploading,this.assertiveLiveRegionEl);clearInterval(this.srProgress);setTimeout((function(){t.notif=""}),20*1e3)}};o.prototype.focusAfterFileRemoval=function(o){var t=o.previousSibling;while(t&&!(t.nodeName==="WM-FILE"&&t.shadowRoot.querySelector("wm-button"))){t=t.previousSibling}if(t){var r=t.shadowRoot.querySelectorAll("wm-button");r[r.length-1].focus()}else{this.uploadButtonEl.focus()}};o.prototype.handleUploadButtonClick=function(o){if(this.isDisabled){o.preventDefault();if(this.inProgressFileEls.length>0){this.announce(l.waitToUpload,this.assertiveLiveRegionEl)}else if(this.fileLimitReached){this.announce(l.fileLimitReached,this.assertiveLiveRegionEl)}}};o.prototype.handleUploadButtonChange=function(o){var t=o.target;if(t.files){var r=Array.from(t.files);if(r.length>0){this.batchCount=r.length;this.wmUploaderFilesSelected.emit(r)}o.target.value=""}};o.prototype.announce=function(o,t){if(t.textContent===o){o+=" "}t.textContent=o};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderUploadButton=function(o){var t=this;var r="".concat(this.label&&this.label!==this.buttonText?"".concat(this.label,", "):"").concat(this.buttonText);return n("div",{class:"info-wrapper"},n("input",{name:"input",id:"input",ref:function(o){return t.uploadButtonEl=o},class:"sr-only","aria-label":r,"aria-required":this.requiredField?"true":null,"aria-describedby":"".concat(this.errorMessage?"error ":"","file-count max-size accepted-types"),type:"file",multiple:true,onClick:function(o){return t.handleUploadButtonClick(o)},onChange:function(o){return t.handleUploadButtonChange(o)}}),n("label",{htmlFor:"input",class:"wm-button ".concat(o)},this.icon&&this.renderIcon(),this.buttonText))};o.prototype.renderHeader=function(){return n("div",{class:"header"},n("div",{class:"notif-wrapper"},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderRequirements()),n("div",{id:"accepted-types",class:"accepted-types"},l.getAcceptedFileTypes(this.validTypes,this.fileTypes.split(" ").length)),this.notif&&n("div",{class:"notif"},this.notif),n("div",{id:"error"},this.errorMessage))};o.prototype.renderRequirements=function(){return n("div",{class:"requirements"},this.maxFiles&&n("span",{id:"file-count"},l.getFileCount(this.uploadedFileEls.length,this.maxFiles)),this.maxSize&&n("span",{id:"max-size"},l.getMaxSize(this.maxSize)))};o.prototype.renderListContainer=function(){var o=this.fileEls.filter((function(o){return o.progress&&o.progress===100})).length;return n("div",{class:"list-container ".concat(o?"checkmark-spacer":"")},n("ul",{class:"file-list"},n("slot",null)))};o.prototype.renderLabel=function(){return n("div",{class:"wrapper ".concat(this.errorMessage?"invalid":"")},n("div",{id:"label",class:"label"},this.label,this.requiredField&&n("span",{class:"required","aria-hidden":"true"},"*")))};o.prototype.render=function(){var o=this;return n(i,null,this.label&&this.renderLabel(),this.renderHeader(),this.renderListContainer(),n("div",{ref:function(t){return o.assertiveLiveRegionEl=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}),n("div",{ref:function(t){return o.politeLiveRegionEl=t},class:"live-region sr-only","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(o,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{errorMessage:["announceError"]}},enumerable:false,configurable:true});return o}());d.style=s}}}));
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-fb751343.system.js","./p-55668879.system.js"],(function(o){"use strict";var t,r,e,n,i,a,l;return{setters:[function(o){t=o.r;r=o.c;e=o.f;n=o.h;i=o.H;a=o.g},function(o){l=o.u},function(){}],execute:function(){var s=':host .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:100%;border:2px solid transparent;font-family:inherit;font-size:0.75rem;font-weight:700;min-height:2.75rem;padding:12px 1.3333333333em;cursor:pointer;position:relative;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button{min-height:3.3333333333em}}:host .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,:host .wm-button:focus-visible{outline:none;-webkit-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled){outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-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-button .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}:host .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem;font-size:0.875rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly){background:var(--wmcolor-button-background-primary);color:var(--wmcolor-button-text-primary)}:host .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);box-shadow:0 0 4px 0 rgba(0, 0, 0, 0.14), 0 3px 4px 0 rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-primary-hover)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-primary-ondark);background:var(--wmcolor-button-background-primary-ondark)}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-primary-hover-ondark)}:host .wm-button.-secondary{color:var(--wmcolor-button-text-secondary);border:2px solid var(--wmcolor-button-border-secondary);background:var(--wmcolor-button-background-secondary)}:host .wm-button.-secondary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-secondary-hover);color:var(--wmcolor-button-text-secondary-hover);border-color:transparent}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-secondary-ondark);background:var(--wmcolor-button-background-secondary-ondark);border-color:var(--wmcolor-button-border-secondary-ondark)}:host .wm-button.-secondary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-secondary-hover-ondark);background:var(--wmcolor-button-background-secondary-hover-ondark);border-color:transparent}:host .wm-button.-textonly{color:var(--wmcolor-button-text-textonly);-webkit-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding:0;height:auto;min-height:unset;border-radius:0;line-height:1;overflow-wrap:anywhere;border-radius:2px}:host .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline}:host .wm-button.-textonly.dark{color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-textonly.dark:hover:not(:disabled):not(.disabled){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete{color:var(--wmcolor-button-background-delete)}:host .wm-button.-textonly.-permanentlydelete:hover:not(:disabled):not(.disabled):not(.dark){text-decoration:underline}:host .wm-button.-textonly.-permanentlydelete.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-textonly-ondark)}:host .wm-button.-icononly,:host .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,:host .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly .mdi,:host .wm-button.-navigational .mdi{font-size:1.12rem}:host .wm-button.-icononly{border-width:1px !important;color:var(--wmcolor-button-icon-icononly);border-color:var(--wmcolor-button-border-icononly);background-color:var(--wmcolor-button-background-icononly)}:host .wm-button.-icononly: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}:host .wm-button.-icononly:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-icononly-hover);color:var(--wmcolor-button-icon-icononly-hover);border-color:transparent}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-icononly-ondark);background:var(--wmcolor-button-background-icononly-ondark);border-color:var(--wmcolor-button-border-icononly-ondark)}:host .wm-button.-icononly.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-icononly-hover-ondark);background:var(--wmcolor-button-background-icononly-hover-ondark);border-color:transparent}:host .wm-button.-navigational{border:none !important;background-color:var(--wmcolor-button-background-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational)}:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled):not(.disabled).selected{background-color:var(--wmcolor-button-background-navigational-hover)}:host .wm-button.-navigational: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}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-icon-navigational-ondark);background:var(--wmcolor-button-background-navigational-ondark)}:host .wm-button.-navigational.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-icon-navigational-hover-ondark);background:var(--wmcolor-button-background-navigational-hover-ondark)}:host .wm-button.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly):hover:not(:disabled):not(.disabled):not(.dark){background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-delete);border-color:var(--wmcolor-button-background-delete);color:var(--wmcolor-button-text-delete)}:host .wm-button.-permanentlydelete:not(.-textonly).dark:not(:disabled):not(.disabled):hover{background:var(--wmcolor-button-background-delete-hover);border-color:var(--wmcolor-button-background-delete-hover)}:host .wm-button.-pairnegative{background:var(--wmcolor-button-background-negative);border-color:var(--wmcolor-button-background-negative);color:var(--wmcolor-button-text-negative)}:host .wm-button.-pairnegative:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-negative-hover);border-color:var(--wmcolor-button-background-negative-hover)}:host .wm-button.-pairpositive{background:var(--wmcolor-button-background-positive);border-color:var(--wmcolor-button-background-positive);color:var(--wmcolor-button-text-positive)}:host .wm-button.-pairpositive:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-positive-hover);border-color:var(--wmcolor-button-background-positive-hover)}:host .wm-button.-selector,:host .wm-button.-selector-primary{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;border-radius:3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;font-weight:700;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selector,:host .wm-button.-selector-primary{height:2.5rem}}:host .wm-button.-selector:before,:host .wm-button.-selector-primary: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;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:1.12rem;font-weight:700;pointer-events:none}:host .wm-button.-selector:active,:host .wm-button.-selector-primary:active{-ms-transform:scale(1, 1) !important;-webkit-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selector::-moz-focus-inner,:host .wm-button.-selector-primary::-moz-focus-inner{border:0}:host .wm-button.-selector .overflowcontrol,:host .wm-button.-selector-primary .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button.-selector{background:var(--wmcolor-button-background-selector);color:var(--wmcolor-button-text-selector);border-color:var(--wmcolor-button-border-selector)}:host .wm-button.-selector:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selector-hover);color:var(--wmcolor-button-text-selector-hover);border-color:transparent}:host .wm-button.-selector.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selector-ondark);border-color:var(--wmcolor-button-border-selector-ondark);background:var(--wmcolor-button-background-selector-ondark)}:host .wm-button.-selector.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selector-hover-ondark);background:var(--wmcolor-button-background-selector-hover-ondark);border-color:transparent}:host .wm-button.-selector-primary{background:var(--wmcolor-button-background-selectorprimary);color:var(--wmcolor-button-text-selectorprimary)}:host .wm-button.-selector-primary:hover:not(:disabled):not(.disabled){background:var(--wmcolor-button-background-selectorprimary-hover)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled){color:var(--wmcolor-button-text-selectorprimary-ondark);background:var(--wmcolor-button-background-selectorprimary-ondark)}:host .wm-button.-selector-primary.dark:not(:disabled):not(.disabled):hover{color:var(--wmcolor-button-text-selectorprimary-hover-ondark);background:var(--wmcolor-button-background-selectorprimary-hover-ondark)}:host .wm-button:disabled,:host .wm-button.disabled{cursor:default;pointer-events:none}:host .wm-button:disabled.-secondary:not(.-permanentlydelete),:host .wm-button.disabled.-secondary:not(.-permanentlydelete){-webkit-box-shadow:none;box-shadow:none;border-color:var(--wmcolor-button-border-secondary-disabled);color:var(--wmcolor-button-text-secondary-disabled)}:host .wm-button:disabled.-primary,:host .wm-button.disabled.-primary{background:var(--wmcolor-button-background-primary-disabled);color:var(--wmcolor-button-text-primary-disabled)}:host .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-permanentlydelete{background:var(--wmcolor-button-background-delete-disabled);color:var(--wmcolor-button-text-delete-disabled);border-color:var(--wmcolor-button-background-delete-disabled)}:host .wm-button:disabled.-pairnegative,:host .wm-button.disabled.-pairnegative{background:var(--wmcolor-button-background-negative-disabled);border-color:var(--wmcolor-button-background-negative-disabled);color:var(--wmcolor-button-text-negative-disabled)}:host .wm-button:disabled.-pairpositive,:host .wm-button.disabled.-pairpositive{background:var(--wmcolor-button-background-positive-disabled);border-color:var(--wmcolor-button-background-positive-disabled);color:var(--wmcolor-button-text-positive-disabled)}:host .wm-button:disabled.-selector,:host .wm-button.disabled.-selector{color:var(--wmcolor-button-text-selector-disabled);border-color:var(--wmcolor-button-border-selector-disabled)}:host .wm-button:disabled.-selector-primary,:host .wm-button.disabled.-selector-primary{background:var(--wmcolor-button-background-selectorprimary-disabled);color:var(--wmcolor-button-text-selectorprimary-disabled)}:host .wm-button:disabled.-navigational,:host .wm-button.disabled.-navigational{color:var(--wmcolor-button-icon-navigational-disabled)}:host .wm-button:disabled.-icononly,:host .wm-button.disabled.-icononly{color:var(--wmcolor-button-icon-icononly-disabled);border-color:var(--wmcolor-button-border-icononly-disabled)}:host .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly{color:var(--wmcolor-button-text-textonly-disabled);background:transparent}:host .wm-button:disabled.dark.-icononly,:host .wm-button.disabled.dark.-icononly{background:transparent;color:var(--wmcolor-button-icon-icononly-disabled-ondark);border-color:var(--wmcolor-button-border-icononly-disabled-ondark)}:host .wm-button:disabled.dark.-navigational,:host .wm-button.disabled.dark.-navigational{color:var(--wmcolor-button-icon-navigational-disabled-ondark)}:host .wm-button:disabled.dark.-textonly,:host .wm-button.disabled.dark.-textonly{color:var(--wmcolor-button-text-textonly-disabled-ondark)}:host .wm-button:disabled.dark.-primary,:host .wm-button.disabled.dark.-primary{color:var(--wmcolor-button-text-primary-disabled-ondark);background:var(--wmcolor-button-background-primary-disabled-ondark)}:host .wm-button:disabled.dark.-secondary,:host .wm-button.disabled.dark.-secondary{background:transparent;color:var(--wmcolor-button-text-secondary-disabled-ondark);border-color:var(--wmcolor-button-border-secondary-disabled-ondark)}:host .wm-button:disabled.dark.-selector,:host .wm-button.disabled.dark.-selector{color:var(--wmcolor-button-text-selector-disabled-ondark);border-color:var(--wmcolor-button-border-selector-disabled-ondark);background:var(--wmcolor-button-background-selector-disabled-ondark)}:host .wm-button:disabled.dark.-selector-primary,:host .wm-button.disabled.dark.-selector-primary{color:var(--wmcolor-button-text-selectorprimary-disabled-ondark);background:var(--wmcolor-button-background-selectorprimary-disabled-ondark)}:host .wm-button:disabled.dark.-permanentlydelete:not(.-textonly),:host .wm-button.disabled.dark.-permanentlydelete:not(.-textonly){background:var(--wmcolor-button-background-delete-disabled-ondark);color:var(--wmcolor-button-text-delete-disabled-ondark)}:host a.wm-button,:host label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host{display:block;position:relative;max-width:1140px}:host[dir=RTL] .mdi{margin-left:0.3125rem;margin-right:0}:host input:focus-visible+.wm-button{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}.wm-button.disabled{pointer-events:initial !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}#label{margin-bottom:0.5rem}.info-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.info-wrapper .info{font-size:0.875rem;margin-left:1rem}.accepted-types{font-size:0.875rem}.notif-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-bottom:0.75rem}.requirements{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:0.875rem;margin-left:1rem}.notif,#error{font-size:0.875rem;font-style:italic}.notif#error,#error#error{display:block;font-style:italic;color:var(--wmcolor-text-error);font-size:0.875rem}.notif#error:not(:empty),#error#error:not(:empty){margin-top:0.25rem}.list-container{overflow-y:unset}.list-container.checkmark-spacer{margin-right:2.75rem}.list-container .file-list{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:0.5rem;padding:0;width:100%;margin: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}::slotted(wm-file:nth-of-type(1)){margin-top:2.5rem}';var d=o("wm_uploader",function(){function o(o){t(this,o);this.wmUploaderFilesSelected=r(this,"wmUploaderFilesSelected",7);this.batchCount=0;this.prevUploadCount=0;this.fileIdToDelete="";this.label=undefined;this.buttonText=undefined;this.icon=undefined;this.fileTypes="pdf txt log xml doc docx xls xlsx ppt pptx gif jpg jpeg png csv";this.maxSize=undefined;this.maxFiles=undefined;this.errorMessage=undefined;this.requiredField=undefined;this.showInfo="time";this.isTabbing=false;this.notif="";this.isCondensed=false}Object.defineProperty(o.prototype,"isDisabled",{get:function(){return this.fileLimitReached||this.inProgressFileEls.length>0},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"fileEls",{get:function(){return Array.from(this.el.querySelectorAll("wm-file"))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"inProgressFileEls",{get:function(){return this.fileEls.filter((function(o){return o.progress!==undefined&&o.progress<100}))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"uploadedFileEls",{get:function(){return this.fileEls.filter((function(o){return!o.errorMessage}))},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"fileLimitReached",{get:function(){return this.maxFiles&&this.uploadedFileEls.length>=this.maxFiles},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"validTypes",{get:function(){return"."+this.fileTypes.split(" ").join(", .")},enumerable:false,configurable:true});o.prototype.toggleTabbingOn=function(){this.isTabbing=true};o.prototype.toggleTabbingOff=function(){this.isTabbing=false};o.prototype.handleFileErrorCleared=function(){this.uploadButtonEl.focus()};o.prototype.storeDeletedId=function(o){this.fileIdToDelete=o.target.id};o.prototype.announceError=function(){var o=this;if(this.errorMessage){setTimeout((function(){return o.announce(o.errorMessage,o.politeLiveRegionEl)}),100)}};o.prototype.componentWillLoad=function(){if(!this.buttonText){console.error("wm-uploader: button-text is a required property")}};o.prototype.componentDidLoad=function(){var o=this;if(document.body.classList.contains("wmcl-user-is-tabbing")){this.toggleTabbingOn()}var t=new MutationObserver((function(t){return t.forEach((function(t){return o.handleChildMutation(t)}))}));t.observe(this.el,{childList:true,subtree:true,attributes:true,attributeOldValue:true,attributeFilter:["progress"]})};o.prototype.handleChildMutation=function(o){var t=this;if(o.type==="attributes"){this.handleProgressUpdate(o)}else if(o.type==="childList"){if(this.isTabbing&&o.removedNodes.length===1&&o.removedNodes[0].id===this.fileIdToDelete){this.focusAfterFileRemoval(o);this.fileIdToDelete=""}if(o.addedNodes.length>0){o.addedNodes.forEach((function(o){if(o.errorMessage){setTimeout((function(){return t.announce(o.errorMessage,t.politeLiveRegionEl)}),500)}}))}e(this.el)}};o.prototype.handleProgressUpdate=function(o){var t=this;if(this.inProgressFileEls.length!==0){var r=this.prevUploadCount!==this.inProgressFileEls.length;r&&this.announce(l.getFilesUploading(this.inProgressFileEls.length),this.assertiveLiveRegionEl);this.notif=l.getFilesUploading(this.inProgressFileEls.length);this.prevUploadCount=this.inProgressFileEls.length;if(!this.srProgress){this.srProgress=setInterval((function(){var o=t.fileEls.reduce((function(o,t){return t.progress?o+t.progress:o}),0);t.announce(l.getUploadProgress(Math.floor(o/t.batchCount)),t.assertiveLiveRegionEl)}),5e3)}}else if(this.inProgressFileEls.length===0&&o.oldValue&&parseInt(o.oldValue)<100){this.notif=l.finishedUploading;this.announce(l.finishedUploading,this.assertiveLiveRegionEl);clearInterval(this.srProgress);setTimeout((function(){t.notif=""}),20*1e3)}};o.prototype.focusAfterFileRemoval=function(o){var t=o.previousSibling;while(t&&!(t.nodeName==="WM-FILE"&&t.shadowRoot.querySelector("wm-button"))){t=t.previousSibling}if(t){var r=t.shadowRoot.querySelectorAll("wm-button");r[r.length-1].focus()}else{this.uploadButtonEl.focus()}};o.prototype.handleUploadButtonClick=function(o){if(this.isDisabled){o.preventDefault();if(this.inProgressFileEls.length>0){this.announce(l.waitToUpload,this.assertiveLiveRegionEl)}else if(this.fileLimitReached){this.announce(l.fileLimitReached,this.assertiveLiveRegionEl)}}};o.prototype.handleUploadButtonChange=function(o){var t=o.target;if(t.files){var r=Array.from(t.files);if(r.length>0){this.batchCount=r.length;this.wmUploaderFilesSelected.emit(r)}o.target.value=""}};o.prototype.announce=function(o,t){if(t.textContent===o){o+=" "}t.textContent=o};o.prototype.renderIcon=function(){var o=this.icon&&this.icon==="f066";return n("span",{class:"mdi ".concat(o?"rotate":"")},String.fromCodePoint(parseInt("0x".concat(this.icon))))};o.prototype.renderUploadButton=function(o){var t=this;var r="".concat(this.label&&this.label!==this.buttonText?"".concat(this.label,", "):"").concat(this.buttonText);return n("div",{class:"info-wrapper"},n("input",{name:"input",id:"input",ref:function(o){return t.uploadButtonEl=o},class:"sr-only","aria-label":r,"aria-required":this.requiredField?"true":null,"aria-describedby":"".concat(this.errorMessage?"error ":"","file-count max-size accepted-types"),type:"file",multiple:true,onClick:function(o){return t.handleUploadButtonClick(o)},onChange:function(o){return t.handleUploadButtonChange(o)}}),n("label",{htmlFor:"input",class:"wm-button ".concat(o)},this.icon&&this.renderIcon(),this.buttonText))};o.prototype.renderHeader=function(){return n("div",{class:"header"},n("div",{class:"notif-wrapper"},this.renderUploadButton("-secondary ".concat(this.isDisabled?"disabled":"")),this.renderRequirements()),n("div",{id:"accepted-types",class:"accepted-types"},l.getAcceptedFileTypes(this.validTypes,this.fileTypes.split(" ").length)),this.notif&&n("div",{class:"notif"},this.notif),n("div",{id:"error"},this.errorMessage))};o.prototype.renderRequirements=function(){return n("div",{class:"requirements"},this.maxFiles&&n("span",{id:"file-count"},l.getFileCount(this.uploadedFileEls.length,this.maxFiles)),this.maxSize&&n("span",{id:"max-size"},l.getMaxSize(this.maxSize)))};o.prototype.renderListContainer=function(){var o=this.fileEls.filter((function(o){return o.progress&&o.progress===100})).length;return n("div",{class:"list-container ".concat(o?"checkmark-spacer":"")},n("ul",{class:"file-list"},n("slot",null)))};o.prototype.renderLabel=function(){return n("div",{class:"wrapper ".concat(this.errorMessage?"invalid":"")},n("div",{id:"label",class:"label"},this.label,this.requiredField&&n("span",{class:"required","aria-hidden":"true"},"*")))};o.prototype.render=function(){var o=this;return n(i,null,this.label&&this.renderLabel(),this.renderHeader(),this.renderListContainer(),n("div",{ref:function(t){return o.assertiveLiveRegionEl=t},class:"live-region sr-only","aria-live":"assertive","aria-atomic":"true"}),n("div",{ref:function(t){return o.politeLiveRegionEl=t},class:"live-region sr-only","aria-live":"polite","aria-atomic":"true"}))};Object.defineProperty(o,"delegatesFocus",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(o.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{errorMessage:["announceError"]}},enumerable:false,configurable:true});return o}());d.style=s}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-ab8d78cc.system.js","./p-55668879.system.js","./p-fb751343.system.js"],(function(e){"use strict";var t,i,r,o,s,n,a,l,c,h,u,d,p;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H;s=e.g;n=e.f},function(e){a=e.i;l=e.d;c=e.t;h=e.a;u=e.k;d=e.y},function(e){p=e.g}],execute:function(){var f=':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-selected);font-weight:500}:host([aria-selected=true]) .checkbox:before{content:"\\f132"}:host([aria-disabled=true]){color:var(--wmcolor-select-option-text-disabled);background:var(--wmcolor-select-option-background-disabled);cursor:default}:host([aria-disabled=true]) .checkbox:before{color:var(--wmcolor-select-option-text-disabled)}:host([aria-disabled=true]) .subinfo{color:var(--wmcolor-select-option-text-disabled)}:host(.multi-option){background:unset}:host(.clone.last){border-bottom:12px solid;border-color:var(--wmcolor-select-option-border)}:host(.hassubinfo){display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;gap:16px}:host(.hidden),:host(.filtered-out){display:none}.subinfo{font-style:italic}.option-wrapper{display:-ms-flexbox;display:flex}.option-text{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=i(this,"wmOptionSelected",7);this.wmOptionDeselected=i(this,"wmOptionDeselected",7);this.intCloneClicked=i(this,"intCloneClicked",7);this.wmKeyUpPressed=i(this,"wmKeyUpPressed",7);this.wmKeyDownPressed=i(this,"wmKeyDownPressed",7);this.wmEscKeyPressed=i(this,"wmEscKeyPressed",7);this.wmHomeKeyPressed=i(this,"wmHomeKeyPressed",7);this.wmEndKeyPressed=i(this,"wmEndKeyPressed",7);this.wmEnterKeyPressed=i(this,"wmEnterKeyPressed",7);this.wmLetterPressed=i(this,"wmLetterPressed",7);this.wmOptionBlurred=i(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"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){e.preventDefault();this.wmLetterPressed.emit({letter:e.key,optionEl:this.el})}}};e.prototype.handleSelection=function(){if(!this.disabled){if(this.el.classList.contains("clone")){this.intCloneClicked.emit(this.el)}else{if(this.parentSelectEl.multiple){this.selected?this.wmOptionDeselected.emit(this.el):this.wmOptionSelected.emit(this.el)}else{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&&this.el.textContent.toLowerCase().includes(this.searchTerm)){var t=this.el.textContent.toLowerCase().indexOf(this.searchTerm);var i=this.el.textContent.slice(0,t);var r=this.el.textContent.slice(t,t+this.searchTerm.length);var o=this.el.textContent.slice(t+this.searchTerm.length);var s=document.createElement("span");s.textContent=i;var n=document.createElement("strong");n.textContent=r;var a=document.createElement("span");a.textContent=o;this.textEl.innerHTML="";this.textEl.appendChild(s);this.textEl.appendChild(n);this.textEl.appendChild(a)}else{this.textEl.textContent=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 r(o,{role:"option",tabindex:this.focused?0:-1,class:this.hostClasses},r("div",{class:"option-wrapper ".concat(this.parentSelectEl.multiple?"checkbox":"")},r("span",{class:"option-text","aria-hidden":"true",ref:function(t){return e.textEl=t}},this.el.textContent),r("span",{class:"sr-only"},this.el.textContent)),r("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=f;var m=':host{--wmcolor-select-background:var(--wmcolor-background);--wmcolor-select-border:var(--wmcolor-input-border);--wmcolor-select-option-background-disabled:var(--wmcolor-option-background-disabled);--wmcolor-select-option-background-focus:var(--wmcolor-option-background-focus);--wmcolor-select-option-background-hover:var(--wmcolor-option-background-hover);--wmcolor-select-option-background-selected:var(--wmcolor-option-background-selected);--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:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}.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-bottom:0.25rem;top:100%;left:0}.wrapper .error-message:not(:empty){margin-top:0.25rem}.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{outline:2px solid var(--wmcolor-input-border-focus);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 w=e("wm_select",function(){function e(e){var r=this;t(this,e);this.wmSelectDidLoad=i(this,"wmSelectDidLoad",7);this.wmSelectBlurred=i(this,"wmSelectBlurred",7);this.wmSelectSearchChanged=i(this,"wmSelectSearchChanged",7);this.wmSelectAllSelected=i(this,"wmSelectAllSelected",7);this.wmSelectAllDeselected=i(this,"wmSelectAllDeselected",7);this.selectAllMessage=a.formatMessage({id:"select.selectAll",defaultMessage:"Select All"});this.deselectAllMessage=a.formatMessage({id:"select.deselectAll",defaultMessage:"Deselect All"});this.allOptionsSelectedMessage=a.formatMessage({id:"select.allOptionsSelected",defaultMessage:"All options selected"});this.allOptionsDeselectedMessage=a.formatMessage({id:"select.allOptionsDeselected",defaultMessage:"All options deselected"});this.keysSoFar="";this.searchIndex=0;this.openUp=false;this.overflowCount=0;this.displayedOptions=[];this.debouncedClearKeysSoFar=l((function(){r.keysSoFar=""}),500);this.debouncedSearch=l((function(){r.wmSelectSearchChanged.emit({searchTerm:r.searchTerm});if(r.filteredOptions.length){r.announce(r.resultsFoundMessage)}else{r.announce(r.noResultsFoundMessage)}}),150);this.disabled=false;this.maxHeight=undefined;this.label=undefined;this.labelPosition="top";this.requiredField=false;this.errorMessage=undefined;this.multiple=false;this.search=false;this.selectAll=false;this.placeholder=a.formatMessage({id:"select.multiPlaceholder",defaultMessage:"Make a selection",description:"Placeholder text. Use imperative"});this.searchPlaceholder=a.formatMessage({id:"select.searchPlaceholder",defaultMessage:"Search",description:"Placeholder text. Use imperative"});this.allSelectedMessage=a.formatMessage({id:"select.allSelected",defaultMessage:"All selected",description:"Text displayed when all options are selected"});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,"cloneOptions",{get:function(){return Array.from(this.el.shadowRoot.querySelectorAll("wm-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"allOptionEls",{get:function(){return this.cloneOptions.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 i;return(i=t.textContent)===null||i===void 0?void 0:i.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,"visibleSelectAllButton",{get:function(){return this.selectAll&&this.multiple&&this.searchTerm===""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"resultsFoundMessage",{get:function(){return a.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 a.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.handleOptionSelection=function(e){this.focusOption(e.detail);if(!this.multiple){this.close()}};e.prototype.handleOptionCloneSelection=function(e){var t=this.findCorrespondingOption(e.detail);t.click()};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.announce(this.allOptionsSelectedMessage);this.wmSelectAllSelected.emit()};e.prototype.deselectAllOptions=function(){this.announce(this.allOptionsDeselectedMessage);this.wmSelectAllDeselected.emit()};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`).")}if(!this.multiple&&this.selectedOptions.length===0){console.error("wm-select should have one initial option selected")}h(this.el,this.isDisabled);var t=new MutationObserver((function(t){return t.forEach((function(t){return e.handleChildChange(t)}))}));t.observe(this.el,{childList:true,attributes:true,subtree:true,attributeFilter:["selected"]})};e.prototype.handleChildChange=function(e){this.setButtonText();n(this.el)};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("clone")}));var t=e.length===this.visibleOptionEls.length;e.forEach((function(i,r){if(!t&&r===e.length-1){i.classList.add("last")}else{i.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 i=t[t.indexOf(e)-1]||t[t.length-1];if(i){this.focusOption(i)}};e.prototype.moveDown=function(e){var t=this.visibleOptionEls;if(this.selectAllEl){t.unshift(this.selectAllEl)}if(this.searchFieldEl){t.unshift(this.searchFieldEl)}var i=t[t.indexOf(e)+1]||t[0];if(i){this.focusOption(i)}};e.prototype.open=function(e){var t=this;if(!this.isDisabled){var i=this.el.clientHeight;var r=this.buttonEl.clientHeight;this.openUp=u(this.el,this.dropdownEl.clientHeight,i,r);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,i){var r=e.cloneOptions[i];if(t.selected){t.classList.add("hidden");r.classList.remove("hidden")}else{t.classList.remove("hidden");r.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.findAndFocusOption=function(e){var t=this;var i=e.detail.letter.toLowerCase();var r=e.detail.optionEl;if(!this.keysSoFar&&i==" "){r.click()}else{if(!this.keysSoFar){this.visibleOptionEls.forEach((function(e,i){if(e.focused){t.searchIndex=i}}))}this.keysSoFar+=i;var o=this.findMatchInRange(this.visibleOptionEls,this.searchIndex+1,this.visibleOptionEls.length);if(!o){o=this.findMatchInRange(this.visibleOptionEls,0,this.searchIndex)}if(o){this.focusOption(o)}this.debouncedClearKeysSoFar()}};e.prototype.findMatchInRange=function(e,t,i){var r=this;var o=null;var s=e.slice(t,i);s.forEach((function(e){var t=e.textContent;if(!o&&t&&t.toLowerCase().startsWith(r.keysSoFar)){o=e}}));return o};e.prototype.findCorrespondingOption=function(e){var t=e.classList.contains("clone");return t?this.childOptions[this.cloneOptions.indexOf(e)]:this.cloneOptions[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.announceError=function(){var e=this;if(this.errorMessage){setTimeout((function(){return e.announce(e.errorMessage)}),100)}};e.prototype.handleDisabledChange=function(){h(this.el,this.isDisabled)};e.prototype.handleComponentBlur=function(e){if(!this.el.contains(e.relatedTarget)){this.close(false);this.wmSelectBlurred.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 i=window.getComputedStyle(this.buttonEl);var r=parseInt(i.getPropertyValue("padding-left").slice(0,-2));var o=parseInt(i.getPropertyValue("padding-right").slice(0,-2));var s=this.buttonEl.clientWidth-r-o-t;var n=this.displayedOptions.map((function(e){return e.shadowRoot.querySelector(".option-text").clientWidth}));var a=n.reduce((function(e,t){return e+t}),0);this.overflowCount=0;while(a>s&&this.displayedOptions.length>1){this.overflowCount++;a-=n[n.length-1];n.pop();this.displayedOptions.pop()}}};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 r("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 r("span",null,t>0?", ":"",e.textContent)}))}};e.prototype.renderOverflowCount=function(){if(this.overflowCount>0&&!this.allSelected){return r("span",null,r("span",{class:"overflow-counter"},"+",this.overflowCount))}};e.prototype.renderSearchField=function(){var e=this;return r("div",{class:"search"},r("div",{class:"searchfield-wrapper",ref:function(t){return e.searchFieldWrapperEl=t}},r("div",{class:"icon"}),r("input",{ref:function(t){return e.searchFieldEl=t},class:"searchfield",role:"combobox","aria-controls":"list","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 r("div",{class:"search-results-message"},this.noResultsFoundMessage)};e.prototype.renderSelectAllButton=function(){var e=this;return r("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.renderCloneOptions=function(){return Array.from(this.el.children).map((function(e){var t=e;return r("wm-option",{class:"clone",subinfo:t.subinfo,selected:t.selected},t.textContent)}))};e.prototype.render=function(){var e;var t=this;var i=!this.multiple&&this.selectedOptions.length>0&&this.selectedOptions[0].subinfo;var s=(e={id:"selectbtn"},e["disabled"]=this.isDisabled,e["aria-controls"]="list",e["aria-labelledby"]="label selectbtn",e["aria-describedby"]="error",e["aria-expanded"]=this.isExpanded?"true":"false",e.onClick=function(){return t.isExpanded?t.close():t.open()},e);return r(o,{onBlur:function(e){return t.handleComponentBlur(e)}},r("div",{class:"wrapper ".concat(d()," label-").concat(this.labelPosition," ").concat(this.errorMessage?"invalid":"")},r("div",{class:"label-wrapper"},r("label",{class:"label",id:"label",htmlFor:"selectbtn"},this.label,this.requiredField?r("span",{class:"required"},r("span",{class:"sr-only"},p.requiredField),r("span",{"aria-hidden":"true"},"*")):"")),r("div",{class:"button-wrapper"},r("button",Object.assign({},s,{class:"displayedoption",ref:function(e){return t.buttonEl=e},onBlur:function(e){return t.handleButtonBlur(e)},onFocus:function(){return t.close()}}),r("span",{class:"overflowcontrol ".concat(i?"hassubinfo":"")},r("span",{class:"button-text"},this.renderButtonText()),i&&r("span",{class:"subinfo"},this.selectedOptions[0].subinfo)),this.renderOverflowCount()),r("div",{class:"dropdown ".concat(this.isExpanded?"open":""," ").concat(this.openUp?"upwards":""),ref:function(e){return t.dropdownEl=e}},this.search&&this.renderSearchField(),this.visibleSelectAllButton&&this.renderSelectAllButton(),r("div",{id:"list",class:"options-wrapper",tabindex:-1,role:"listbox","aria-multiselectable":this.multiple?"true":null,"aria-labelledby":"label",ref:function(e){return t.listboxEl=e}},this.search&&this.filteredOptions.length===0&&this.renderSearchFailedMessage(),this.multiple&&this.renderCloneOptions(),r("slot",null))),r("div",{id:"error",class:this.errorMessage?"error-message":""},this.errorMessage),r("div",{id:"announcement","aria-live":"polite","aria-atomic":"true",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:["announceError"],disabled:["handleDisabledChange"]}},enumerable:false,configurable:true});return e}());w.style=m}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i,g as o}from"./p-568c595f.js";import{t as r,i as n,a}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i,g as o}from"./p-568c595f.js";import{t as r,i as n,a}from"./p-76825602.js";import{g as l}from"./p-fb229776.js";const h=class{constructor(e){t(this,e),this.wmSearchBrowseResults=s(this,"wmSearchBrowseResults",7),this.wmSearchValueChanged=s(this,"wmSearchValueChanged",7),this.linkEl=null,this.searchType="basic",this.disabled=!1,this.placeholder="",this.label="",this.numResults=0,this.value="",this.isTabbing=!1,this.highlightedId="",this.highlightedName=null,this.highlightedNum=0,this.previousBlurredValue="",this.parentModal=void 0,this.announcement=""}get isDisabled(){return r(this.disabled)}get resultCount(){let t="";const s=n.formatMessage({id:"search.resultsFound",defaultMessage:"{numResults, plural, =0 {No results} one {1 result} other {# results}} found"},{numResults:this.numResults}),e=n.formatMessage({id:"search.xOfYResults",defaultMessage:"{numResults, plural, =0 {No results found} other {{current} of {numResults} results}}"},{numResults:this.numResults,current:this.highlightedNum});return"basic"===this.searchType?t=s:"find"===this.searchType&&(t=e),t}toggleTabbingOn(){this.isTabbing=!0,this.linkEl&&this.linkEl.classList.remove("sr-only"),this.linkEl&&this.linkEl.classList.add("user-is-tabbing")}toggleTabbingOff(){this.isTabbing=!1,this.linkEl&&this.linkEl.classList.add("sr-only"),this.linkEl&&this.linkEl.classList.remove("user-is-tabbing")}componentWillLoad(){""===this.placeholder&&console.error("You must set the placeholder property for the wm-search component."),""===this.label&&console.error("You must set the label property for the wm-search component."),this.hookToModal(),a(this.el,this.isDisabled)}hookToModal(){let t=this.el;for(;t;)"WM-MODAL"===t.tagName&&(this.parentModal=t),t=t.parentElement;this.parentModal&&["wmModalCloseTriggered","wmModalPrimaryTriggered","wmModalSecondaryTriggered"].map((t=>{this.parentModal.addEventListener(t,(()=>{this.updateValue("")}))}))}async updateValue(t){this.value=t,this.resetHighlightCountToStart()}handleNumResultsUpdate(){this.resetHighlightCountToStart(),this.value&&this.announceChanges()}handleDisabledChange(){a(this.el,this.isDisabled)}resetHighlightCountToStart(){"find"===this.searchType&&(this.highlightedNum=this.numResults?1:0)}announce(t){this.resultsLiveRegion.textContent===t&&(t+=" "),this.announcement=t}announceChanges(){window.requestAnimationFrame((()=>{let t=this.resultCount;"find"===this.searchType&&this.highlightedName&&(t+=`, ${this.highlightedName}`),this.announce(t)}))}changeHighlightedNum(t){this.numResults&&(this.highlightedNum=t<1?this.numResults:t>this.numResults?1:t,this.wmSearchBrowseResults.emit({position:this.highlightedNum}),this.announceChanges())}handleBlur(){this.previousBlurredValue!==this.value&&this.wmSearchValueChanged.emit({value:this.value}),this.previousBlurredValue=this.value}renderResultsAndBrowseButtons(){return e("div",{class:"wm-find-elements"},e("div",{id:"results-display",class:"results"},!!this.value&&this.resultCount),e("div",{class:"wm-button-collection"},e("wm-button",{"button-type":"icononly",icon:"f05d",tooltip:l.previous,"tooltip-position":"bottom",onClick:()=>this.changeHighlightedNum(this.highlightedNum-1),disabled:this.isDisabled||this.numResults<2,"label-for-identical-buttons":n.formatMessage({id:"search.previousResult",defaultMessage:"Press to hear previous matching result"})}),e("wm-button",{"button-type":"icononly",icon:"f045",tooltip:l.next,"tooltip-position":"bottom",onClick:()=>this.changeHighlightedNum(this.highlightedNum+1),disabled:this.isDisabled||this.numResults<2,"label-for-identical-buttons":n.formatMessage({id:"search.nextResult",defaultMessage:"Press to hear next matching result"})})))}renderJumpToLink(){return this.numResults&&this.highlightedId?e("a",{ref:t=>this.linkEl=t,href:`#${this.highlightedId}`,class:"jump-results sr-only"},n.formatMessage({id:"search.jumpToResult",defaultMessage:"Jump to search result in list"})):null}render(){return e(i,null,e("div",{id:"wm-search-wrapper",class:`wm-search-wrapper ${this.searchType}`},e("input",{disabled:this.isDisabled,id:"wm-search-input",placeholder:this.placeholder,"aria-label":`${this.label?this.label+". ":""}${n.formatMessage({id:"search.typeToFilterResults",defaultMessage:"Type to filter the results"})}`,onInput:t=>this.updateValue(t.target.value),onBlur:()=>this.handleBlur(),"aria-autocomplete":"none",autocomplete:"off",value:this.value}),e("span",{class:"mdi search-icon"},String.fromCodePoint(parseInt("0xf349"))),"find"===this.searchType&&this.renderResultsAndBrowseButtons(),e("div",{id:"wm-search-live",class:"sr-only","aria-live":"polite","aria-atomic":"true",ref:t=>this.resultsLiveRegion=t},this.announcement)),"find"===this.searchType&&this.renderJumpToLink())}static get delegatesFocus(){return!0}get el(){return o(this)}static get watchers(){return{numResults:["handleNumResultsUpdate"],disabled:["handleDisabledChange"]}}};h.style=':host{--wmcolor-search-background:var(--wmcolor-input-background);--wmcolor-search-border:var(--wmcolor-input-border);--wmcolor-search-jump-text-focus:var(--wmcolor-interactive-focus);--wmcolor-search-jump-text:var(--wmcolor-button-text-textonly);width:100%;font-size:0.875rem}:host *{-webkit-box-sizing:border-box;box-sizing:border-box}:host .wm-search-wrapper{border-radius:3px;position:relative;border:1px solid var(--wmcolor-search-border);display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center}:host .wm-search-wrapper .search-icon{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.12rem;position:absolute;left:0.4375rem}:host .wm-search-wrapper input{border:none;height:40px;padding:0 1.75rem;background:var(--wmcolor-search-background);overflow:visible;width:100%;-ms-flex:1;flex:1;font-family:inherit}:host .wm-search-wrapper:focus-within{outline:2px solid var(--wmcolor-input-border-focus);border-color:var(--wmcolor-input-border-focus)}:host .wm-search-wrapper:focus-within input{outline:none}:host .find{min-height:3rem}:host .find input{padding:16px 8px 16px 28px}:host .find .wm-find-elements{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:start;justify-content:flex-start;padding-right:16px}:host .find .wm-find-elements wm-button+wm-button{margin-left:0.25rem}:host .find .wm-find-elements .results{margin-right:0.5rem;font-style:italic}: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}:host .jump-results{all:unset;color:var(--wmcolor-search-jump-text);text-decoration:none;font-weight:500;font-size:0.875rem;display:inline-block;margin:8px 0}:host .jump-results:focus-visible{outline:3px solid var(--wmcolor-interactive-focus);outline-offset:2px}';export{h as wm_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):n(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-ab8d78cc.system.js","./p-ae82b3d2.system.js"],(function(t){"use strict";var r,e,i,n,a;return{setters:[function(t){r=t.h},function(t){e=t.i;i=t.c;n=t.e;a=t.f}],execute:function(){t({b:U,c:L,d:K,e:j,f:P,g:D,h:z,i:X,j:B,k:d,l:Q,m:J,n:f,o:w,r:O});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.periwinkle,s.cyan,s.midnight,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function u(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var h=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,i){var n=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(i!==undefined){var s=v(t+t*r*Math.cos(Math.PI*i/180));var o=v(t+t*r*Math.sin(Math.PI*i/180));return{x1:n,y1:a,x2:s,y2:o}}return{x:n,y:a}}function p(t,r,e,i,n){var a=v(n/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(i))}function b(t,r,e,i,n){var a=(t-r)*(n-i)/(e-r)+i;return a<i?i:a>n?n:a}function m(t){return b(t,300,900,70,150)}function y(t){return Math.round(t/m(t))}function w(t,r){var e=t/r;var i=Math.pow(10,Math.floor(Math.log10(e)));var n=e/i;var a;if(n>5){a=10*i}else if(n>3){a=5*i}else if(n>2){a=3*i}else if(n>1.5){a=2*i}else if(n>1){a=1.5*i}else{a=i}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=n(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":B.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,r)}function C(){if(this.sliceEls){var t=a(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}S.call(this,r)}}function S(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function B(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var r,e,i;var n=this;return __generator(this,(function(a){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);i=__spreadArray([],o[t].colors,true);if(this.chartType==="bar2"&&this.el.children.length<=4){i.splice(2,1)}if(t==="bar3"&&e.length===2){i=[i[1],i[3]]}if(t==="doughnut2"&&e.length<5){i.splice(2,1);if(e.length<4){i.shift()}}if(t==="bar5"&&!this.notStartedColor){i.shift()}e.forEach((function(e,a){var o=parseInt(e.getAttribute("amount")||"0");var u=d(o,n.total,true);var c=a;if(t==="bar6"){c=0}var h={amount:o,perc:u,legend:e.getAttribute("legend"),color:i[c]||s.gray,offset:r,id:"".concat(n.uid,"-").concat(a+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:a};r+=o;n.slicesDetails.push(h)}));return[2]}))}))}function F(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var i=0;e.filter((function(t){return t.amount>0})).forEach((function(t,n){var a=e[n===0?e.length-1:n-1];var s=e[n===e.length-1?0:n+1];var o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=i;i+=t.amount}));return e}function T(t,r,e){var i=l(r,this.total)-90;var n=t/this.total*360;var a=i+n;var s=n>180?"1 1":"0 1";var o=n>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(n===360){a-=.01}var b=g(u,h,i+d,a);var m=g(u,c,i+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function I(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function H(t,r,e){var i=r.map((function(t){return l(t.amount,e)}));var n=i.some((function(r){return r!==0&&r<t}));if(n){var a=i.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var i=f[r]/360*e;var n=d;d+=i;return Object.assign(Object.assign({},t),{amount:i,offset:n})}))}return r}function K(t){var e=this;var i=this.chartDetails.size+this.chartDetails.padding;var n=t==="doughnut";var a=n?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:i+"px",height:i+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return E.call(e,r,t)})),G.call(this),n?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?W.call(e,t):""})))))}function N(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function O(t){t.forEach((function(t){t.classList.remove("faded")}))}function E(t,e){var i=this;var n=d(t.amount,this.total,true)+"%";return!isNaN(t.amount)&&r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:T.call(this,t.amount,t.offset,e),onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(n),"data-segmentindex":t.index}))}function G(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function W(t){var e=l(t.offset+t.amount/2,this.total);var i=g(this.chartDetails.size/2,1.4,e-90),n=i.x,a=i.y;return r("text",{class:"value",x:n+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function L(t){var e=this;var i=t==="bar";var n=this.el.shadowRoot.querySelectorAll(".value");if(n.length>0){requestAnimationFrame((function(){var t=[];var r=4;var i=false;n.forEach((function(e){e.classList.remove("hidden");var n=parseInt(e.dataset.value);if(t.length>0&&n!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var o=n<r?e:t;o.classList.add("hidden");i=true}}))}if(!e.classList.contains("hidden")&&n>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(i)}))}return r("div",{class:"chart-wrapper bar-wrapper"},i?r("div",{class:"single-perc"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!i?r("div",{class:"values ".concat(this.valueFormat)},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),i?Q.call(this):""),this.chartType==="bar3"?r("div",{class:"bar3-axis-label","aria-hidden":"true"},r("span",null,"0%"),r("span",null,"100%")):"")}function R(t,e){var i=this;var n=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=n/100*s>=e;var u=o||t.amount==0?"".concat(n,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function U(t){var e=this;var n=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(n,h);var l=h*d;var v=Math.floor((l-n)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,n))}));var p=[];for(var b=1;b<=h;b++){var m=f(i(b,d));p.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,i){var n=i==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(n)},t)}function q(t,e,i,n){var a=this;var s=this.currentChartType==="bar6"?e*i:n;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},h))}function P(t){var e=this;if(this.showLegend){var i=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(i);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(d(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,i){var n=this;if(e===void 0){e=""}if(i===void 0){i=null}var a=function(t){if(i){i.coords={x:t.clientX,y:t.clientY};A(n.popoverEl,i);N(Array.from(n.el.shadowRoot.querySelectorAll("[data-segmentindex")),i)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":i?i.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),h)}}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,r,e,i){function n(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?e(t.value):n(t.value).then(s,o)}u((i=i.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(r){return u([t,r])}}function u(o){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,o[0]&&(e=0)),e)try{if(i=1,n&&(a=o[0]&2?n["return"]:o[0]?n["throw"]||((a=n["return"])&&a.call(n),0):n.next)&&!(a=a.call(n,o[1])).done)return a;if(n=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:e.label++;return{value:o[1],done:false};case 5:e.label++;n=o[1];o=[0];continue;case 7:o=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){e=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){e.label=o[1];break}if(o[0]===6&&e.label<a[1]){e.label=a[1];a=o;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(o);break}if(a[2])e.ops.pop();e.trys.pop();continue}o=r.call(t,e)}catch(t){o=[6,t];n=0}finally{i=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var i=0,n=r.length,a;i<n;i++){if(a||!(i in r)){if(!a)a=Array.prototype.slice.call(r,0,i);a[i]=r[i]}}return t.concat(a||Array.prototype.slice.call(r))};System.register(["./p-ab8d78cc.system.js","./p-55668879.system.js"],(function(t){"use strict";var r,e,i,n,a;return{setters:[function(t){r=t.h},function(t){e=t.i;i=t.c;n=t.e;a=t.f}],execute:function(){t({b:U,c:L,d:K,e:j,f:P,g:D,h:z,i:X,j:B,k:d,l:Q,m:J,n:f,o:w,r:O});var s={salmon:"#ff5f4e",cyan:"#19a1a9",forest:"#088000",sleet:"#7f97ad",midnight:"#2e1b46",lavender:"#8b86ca",periwinkle:"#575195",gray:"#6b6b6b"};var o=t("a",{doughnut:{size:155,colors:[s.forest,s.gray],thickness:.73,padding:25,category:"doughnut"},doughnut1:{size:130,colors:[s.lavender,s.midnight,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut2:{size:130,colors:[s.periwinkle,s.cyan,s.midnight,s.salmon,s.gray],thickness:.5,padding:90,category:"doughnut"},doughnut3:{size:130,colors:[s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],thickness:.5,padding:90,category:"doughnut"},bar:{size:350,colors:[s.forest,s.gray],padding:0,category:"stackedBar"},bar2:{size:400,colors:[s.gray,s.periwinkle,s.midnight,s.cyan,s.salmon],padding:0,category:"stackedBar"},bar3:{size:300,colors:["#0d696e",s.cyan,"#8e4129",s.salmon],padding:0,category:"stackedBar"},bar4:{size:400,colors:[s.salmon,s.cyan,s.periwinkle],padding:0,category:"stackedBar"},bar5:{size:400,colors:[s.gray,s.lavender,s.midnight,"#0089e4",s.forest,"#ea8500","#d54f41","#146ca9"],padding:0,category:"stackedBar"},bar6:{size:400,colors:[s.lavender],padding:0,category:"simpleBar"},bar7:{size:400,colors:[s.periwinkle,s.cyan,s.salmon,s.gray],padding:0,category:"simpleBar"}});function u(t){return t==="percentage"||t==="amount"?"show-values":""}var c=e.formatMessage({id:"chart.hiddenValues",defaultMessage:"Values are hidden when too close together.",description:"Text displayed when a chart has some values hidden"});var h=e.formatMessage({id:"chart.clickToSeeDetails",defaultMessage:"Click or use arrow keys to see details.",description:"Text displayed, guiding user to interact to see more details."});function f(t){return t>999||t<-999?Math.round(t/100)/10+"K":t}function d(t,r,e){return e?Math.round(t*100/r):Math.round(t*1e4/r)/100}function l(t,r){return t*360/r}function v(t){return parseFloat((Math.floor(t*100)/100).toFixed(2))}function g(t,r,e,i){var n=v(t+t*r*Math.cos(Math.PI*e/180));var a=v(t+t*r*Math.sin(Math.PI*e/180));if(i!==undefined){var s=v(t+t*r*Math.cos(Math.PI*i/180));var o=v(t+t*r*Math.sin(Math.PI*i/180));return{x1:n,y1:a,x2:s,y2:o}}return{x:n,y:a}}function p(t,r,e,i,n){var a=v(n/2*t);return"A ".concat(a,", ").concat(a," 0 ").concat(r," ").concat(v(e),", ").concat(v(i))}function b(t,r,e,i,n){var a=(t-r)*(n-i)/(e-r)+i;return a<i?i:a>n?n:a}function m(t){return b(t,300,900,70,150)}function y(t){return Math.round(t/m(t))}function w(t,r){var e=t/r;var i=Math.pow(10,Math.floor(Math.log10(e)));var n=e/i;var a;if(n>5){a=10*i}else if(n>3){a=5*i}else if(n>2){a=3*i}else if(n>1.5){a=2*i}else if(n>1){a=1.5*i}else{a=i}return a}function x(t){if(this.popoverEl&&this.popoverEl.open&&t.key==="Enter"){var r=this.popoverEl.querySelector("button");r&&r.click()}}function k(t,r){if(this.popoverEl&&!this.isTabbing){r.coords={x:t.clientX,y:t.clientY};A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function M(t,r){if(this.popoverEl&&this.isTabbing){this.focusedSliceId=r.id;r.coords=n(t.target);r.coords.x=r.coords.x+30;r.coords.y=r.coords.y+30;A(this.popoverEl,r);N(Array.from(this.el.shadowRoot.querySelectorAll("[data-segmentindex")),r)}}function z(t){switch(t.key){case"ArrowUp":case"ArrowLeft":t.preventDefault();this.isTabbing=true;C.call(this);break;case"ArrowRight":case"ArrowDown":t.preventDefault();this.isTabbing=true;_.call(this);break;case"Tab":B.call(this);break;case"Escape":this.popoverEl.open=false;this.userIsNavigating=false;break}}function A(t,r){t.open=false;if(r.title&&r.text){t.sliceDetails=Object.assign({},r);window.setTimeout((function(){return t.open=true}),30)}}function _(){var t=a(document.activeElement);var r=(this.sliceEls.indexOf(t)+1)%this.sliceEls.length;S.call(this,r)}function C(){if(this.sliceEls){var t=a(document.activeElement);var r=this.sliceEls.indexOf(t);if(r===-1){r=0}else if(r===0){r=this.sliceEls.length-1}else{r-=1}S.call(this,r)}}function S(t){var r=this;if(this.sliceEls&&this.el){this.userIsNavigating=true;this.componentWrapperEl.tabIndex=-1;this.el.focusable=false;this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.sliceEls[t].tabIndex=0;this.sliceEls[t].focusable=true;this.sliceEls[t].focus();this.focusedSliceId=this.sliceEls[t].id;window.setTimeout((function(){if(r.popoverEl){r.popoverEl.open=true}}),10)}}function B(){var t=this;this.focusedSliceId=undefined;this.sliceEls&&this.sliceEls.map((function(t){t.tabIndex=-1;t.focusable=false}));this.userIsNavigating=false;window.setTimeout((function(){t.componentWrapperEl.tabIndex=0;t.el.focusable=true;if(t.popoverEl){t.popoverEl.open=false}}),100)}function D(t){return __awaiter(this,void 0,void 0,(function(){var r,e,i;var n=this;return __generator(this,(function(a){this.slicesDetails=[];r=0;e=Array.from(this.el.children);this.total=e.reduce((function(t,r){return t+=parseInt(r.getAttribute("amount")||"0")}),0);i=__spreadArray([],o[t].colors,true);if(this.chartType==="bar2"&&this.el.children.length<=4){i.splice(2,1)}if(t==="bar3"&&e.length===2){i=[i[1],i[3]]}if(t==="doughnut2"&&e.length<5){i.splice(2,1);if(e.length<4){i.shift()}}if(t==="bar5"&&!this.notStartedColor){i.shift()}e.forEach((function(e,a){var o=parseInt(e.getAttribute("amount")||"0");var u=d(o,n.total,true);var c=a;if(t==="bar6"){c=0}var h={amount:o,perc:u,legend:e.getAttribute("legend"),color:i[c]||s.gray,offset:r,id:"".concat(n.uid,"-").concat(a+1),title:e.getAttribute("popover-title"),text:e.getAttribute("popover-text"),buttonText:e.getAttribute("popover-button-text"),sliceRef:e,inSmallCluster:false,index:a};r+=o;n.slicesDetails.push(h)}));return[2]}))}))}function F(t,r){var e=__spreadArray([],t,true).sort((function(t,r){return t.amount===r.amount?0:t.amount>r.amount?-1:1}));var i=0;e.filter((function(t){return t.amount>0})).forEach((function(t,n){var a=e[n===0?e.length-1:n-1];var s=e[n===e.length-1?0:n+1];var o=d(a.amount,r,true);var u=d(s.amount,r,true);var c=t.perc===0?8:5;var h=t.perc<4;var f=o<c;var l=u<c;var v=h&&(f||l);t.inSmallCluster=v;t.offset=i;i+=t.amount}));return e}function T(t,r,e){var i=l(r,this.total)-90;var n=t/this.total*360;var a=i+n;var s=n>180?"1 1":"0 1";var o=n>180?"1 0":"0 0";var u=this.chartDetails.size/2;var c=this.chartDetails.thickness;var h=1;var f=e==="doughnut";var d=1.5;var v=f?2.25:3;if(n===360){a-=.01}var b=g(u,h,i+d,a);var m=g(u,c,i+v,a);var y="M ".concat(b.x1,", ").concat(b.y1," ");var w=p(h,s,b.x2,b.y2,this.chartDetails.size);var x=" L ".concat(m.x2,", ").concat(m.y2," ");var k=p(c,o,m.x1,m.y1,this.chartDetails.size);return y+w+x+k+" z"}function j(){var t=e.formatMessage({id:"chart.instructions",defaultMessage:"Use arrow keys to browse elements, press Tab to exit.",description:"For screen readers only, instructions on how to interact with the chart component"});return r("div",{id:"chart-instructions"},t)}function I(){return r("defs",null,r("filter",{id:"wmHoverDropShadow"},r("feGaussianBlur",{stdDeviation:"3"}),r("feOffset",{result:"offsetblur"}),r("feFlood",{"flood-color":"#333"}),r("feComposite",{operator:"in",in2:"offsetblur"}),r("feMerge",null,r("feMergeNode",null),r("feMergeNode",{in:"SourceGraphic"}))))}function H(t,r,e){var i=r.map((function(t){return l(t.amount,e)}));var n=i.some((function(r){return r!==0&&r<t}));if(n){var a=i.map((function(r){return r==0?r:Math.max(r,t)}));var s=a.reduce((function(r,e){return r+(e>t&&e!==0?e:0)}),0);var o=a.reduce((function(r,e){return r+(e>t&&e!==0?0:e)}),0);var u=360-o;var c=s-u;var h=c/u;var f=a.map((function(r){return r>t?r-h*r:r==0?0:t}));var d=0;r=r.map((function(t,r){var i=f[r]/360*e;var n=d;d+=i;return Object.assign(Object.assign({},t),{amount:i,offset:n})}))}return r}function K(t){var e=this;var i=this.chartDetails.size+this.chartDetails.padding;var n=t==="doughnut";var a=n?this.slicesDetails:F(this.slicesDetails,this.total);a=H(7,a,this.total);return r("div",{class:"chart-wrapper doughnut-wrapper"},r("svg",{width:i+"px",height:i+"px",id:"graphic-".concat(this.uid),class:"doughnut-svg"},I(),a.map((function(r){return E.call(e,r,t)})),G.call(this),n?r("text",{class:"value",x:"50%",y:"50%","font-size":"1.5rem","font-weight":"500","text-anchor":"middle","dominant-baseline":"middle"},d(a[0].amount,this.total,true)+"%"):r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")"),"text-anchor":"middle","dominant-baseline":"middle"},a.map((function(t){return t.amount>0&&!t.inSmallCluster?W.call(e,t):""})))))}function N(t,r){t.forEach((function(t){if(t.dataset.segmentindex&&parseInt(t.dataset.segmentindex)!==r.index){t.classList.add("faded")}else{t.classList.remove("faded")}}))}function O(t){t.forEach((function(t){t.classList.remove("faded")}))}function E(t,e){var i=this;var n=d(t.amount,this.total,true)+"%";return!isNaN(t.amount)&&r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("path",{id:t.id,class:"segment doughnut-segment",fill:t.amount?t.color:"transparent",d:T.call(this,t.amount,t.offset,e),onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},role:"img","aria-label":"".concat(t.legend,", ").concat(n),"data-segmentindex":t.index}))}function G(){return this.isTabbing?r("g",{transform:"translate(".concat(this.chartDetails.padding/2,", ").concat(this.chartDetails.padding/2,")")},r("use",{tabindex:-1,id:"kfbg1",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfstroke",xlinkHref:"#".concat(this.focusedSliceId)}),r("use",{tabindex:-1,id:"kfbg2",xlinkHref:"#".concat(this.focusedSliceId)})):""}function W(t){var e=l(t.offset+t.amount/2,this.total);var i=g(this.chartDetails.size/2,1.4,e-90),n=i.x,a=i.y;return r("text",{class:"value",x:n+"px",y:a+"px","data-segmentindex":t.index},"".concat(t.perc>0?t.perc:"<1","%"))}function L(t){var e=this;var i=t==="bar";var n=this.el.shadowRoot.querySelectorAll(".value");if(n.length>0){requestAnimationFrame((function(){var t=[];var r=4;var i=false;n.forEach((function(e){e.classList.remove("hidden");var n=parseInt(e.dataset.value);if(t.length>0&&n!=0){var a=e.getBoundingClientRect().left-r;t.forEach((function(t){var r=parseInt(t.dataset.value);var s=t.getBoundingClientRect().right>a;if(s){var o=n<r?e:t;o.classList.add("hidden");i=true}}))}if(!e.classList.contains("hidden")&&n>0){t.push(e)}}));(e.isBar||e.isDoughnut)&&e.showHiddenValuesMessage(i)}))}return r("div",{class:"chart-wrapper bar-wrapper"},i?r("div",{class:"single-perc"},d(this.slicesDetails[0].amount,this.total,true)+"%"):"",this.chartType==="bar3"&&this.drawAxis(),r("div",{class:"inner-stacked-bar-wrapper ".concat(u(this.valueFormat))},!i?r("div",{class:"values ".concat(this.valueFormat)},this.slicesDetails.map((function(t){return e.renderBarText(t,5)}))):"",r("div",{class:"stacked-bar-segments-wrapper"},this.slicesDetails.map((function(t){return R.call(e,t,5)}))),i?Q.call(this):""),this.chartType==="bar3"?r("div",{class:"bar3-axis-label","aria-hidden":"true"},r("span",null,"0%"),r("span",null,"100%")):"")}function R(t,e){var i=this;var n=d(t.amount,this.total,false);var a=this.el.shadowRoot.querySelector(".stacked-bar-segments-wrapper");var s=a?a.offsetWidth:this.el.offsetWidth;var o=n/100*s>=e;var u=o||t.amount==0?"".concat(n,"%"):"".concat(e,"px");var c="";if(this.valueFormat=="percentage"){c="".concat(d(t.amount,this.total,true)," %")}else if(this.valueFormat=="amount"){c=t.amount.toString()}return r("div",{class:"segment stacked-bar-segment ".concat(d(t.amount,this.total,false)===0?"zero":""," ").concat(o?"":"fixed-width"),style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(i,r,t)},onFocus:function(r){return M.call(i,r,t)},onKeyDown:function(t){return x.call(i,t)},"data-segmentindex":t.index},r("span",{class:"sr-only"},"".concat(t.legend," ").concat(c)))}function U(t){var e=this;var n=this.slicesDetails.map((function(t){return t.amount})).reduce((function(t,r){return t>r?t:r}));var a=parseInt(getComputedStyle(this.el).getPropertyValue("--labelWidth"),10);var s=48;var o=this.el.getBoundingClientRect().width;var c=o-a-s;var h=y(c);var d=w(n,h);var l=h*d;var v=Math.floor((l-n)/d);h-=v;this.el.style.setProperty("--backgroundSize",100/h+"%");this.el.style.setProperty("--labelWidth",this.labelWidth);if(t==="bar7"&&!this.showBarLegend){this.el.style.setProperty("--labelWidth","0px")}var g=[];this.slicesDetails.forEach((function(r){r.legend&&g.push(V(r.legend,e.showBarLegend,t));g.push(q.call(e,r,d,h,n))}));var p=[];for(var b=1;b<=h;b++){var m=f(i(b,d));p.push(r("div",{class:"tick"},r("span",null,m)))}var x=t==="bar6"&&this.showGrid&&this.el.getBoundingClientRect().width>300;return r("div",{class:"chart-wrapper simple-bar-wrapper"},r("div",{class:"chart ".concat(u(this.valueFormat))},x&&r("div",{class:"gridlines"}),r("div",{class:"rows"},g)),x&&r("div",{class:"x-axis","aria-hidden":"true"},r("div",{class:"zero"},r("span",null,"0")),p))}function V(t,e,i){var n=i==="bar7"&&!e?" hidden":"";return r("label",{class:"label".concat(n)},t)}function q(t,e,i,n){var a=this;var s=this.currentChartType==="bar6"?e*i:n;var o=d(t.amount,s,false);var u=o?o+"%":"1px";var c=f(t.amount);var h=this.valueFormat==="amount"?c:"";if(this.currentChartType==="bar6"&&this.valueFormat==="percentage"){h=t.amount+"%"}else if(this.currentChartType==="bar7"&&this.valueFormat==="percentage"){h=(this.total===0?"0":d(t.amount,this.total,true))+"%"}return r("div",{class:"bar segment",style:{backgroundColor:t.color,width:u},onClick:function(r){return k.call(a,r,t)},onFocus:function(r){return M.call(a,r,t)},onKeyDown:function(t){return x.call(a,t)},"data-segmentindex":t.index},r("div",{class:"value"},h))}function P(t){var e=this;if(this.showLegend){var i=this.slicesDetails.reduce((function(t,r){return t=r.inSmallCluster?true:t}),false);this.isDoughnut&&this.showHiddenValuesMessage(i);return r("div",{class:"legend-wrapper"},r("div",{class:"legend ".concat(t," ").concat(this.mode==="bar"?"--top":"--bottom"),"aria-hidden":"true"},this.slicesDetails.map((function(t){var r=e.printModeFormat=="amount"?"".concat(t.amount,"/").concat(e.total):"".concat(d(t.amount,e.total,true),"%");if(!!t.amount||!!t.legend){return J.call(e,{key:t.legend,color:t.color},r,t)}}))),this.isDoughnut&&!this.printMode&&X())}}function J(t,e,i){var n=this;if(e===void 0){e=""}if(i===void 0){i=null}var a=function(t){if(i){i.coords={x:t.clientX,y:t.clientY};A(n.popoverEl,i);N(Array.from(n.el.shadowRoot.querySelectorAll("[data-segmentindex")),i)}};return r("div",{class:"legend-item",onClick:function(t){return a(t)},"data-segmentindex":i?i.index:null},r("div",{class:"legend-color",style:{backgroundColor:t.color}}),r("div",{class:"legend-text"},t.key,e&&r("span",{class:"print-value ".concat(this.printMode?"force-visible":"")},": ",e)))}function Q(){if(this.completionMessage){return r("div",{class:"completion-message"},this.completionMessage)}}function X(){return r("div",{class:"hidden-values-warning hidden"},c,r("br",null),h)}}}}));
|