var __awaiter=this&&this.__awaiter||function(e,r,t,n){function a(e){return e instanceof t?e:new t((function(r){r(e)}))}return new(t||(t=Promise))((function(t,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n["throw"](e))}catch(e){i(e)}}function l(e){e.done?t(e.value):a(e.value).then(o,s)}l((n=n.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(r){return l([e,r])}}function l(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(t=0)),t)try{if(n=1,a&&(i=s[0]&2?a["return"]:s[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;if(a=0,i)s=[s[0]&2,i.value];switch(s[0]){case 0:case 1:i=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;a=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1];i=s;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(s);break}if(i[2])t.ops.pop();t.trys.pop();continue}s=r.call(e,t)}catch(e){s=[6,e];a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-bcb8811f.system.js","./p-0ab50155.system.js","./p-2a7d1b84.system.js","./p-0d486769.system.js","./p-972941e8.system.js","./p-7dff37f8.system.js","./p-1e8a53fb.system.js","./p-4c963f30.system.js","./p-a7c6873b.system.js","./p-874d1f8e.system.js"],(function(e){"use strict";var r,t,n,a,i,o;return{setters:[function(e){r=e.r;t=e.h;n=e.H;a=e.g},function(e){i=e.B},function(){},function(e){o=e.L},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var s=":root{--bal-progress-bar-background-white:var(--bal-color-white);--bal-progress-bar-background-grey:var(--bal-color-grey-3);--bal-progress-bar-line-background:var(--bal-color-primary);--bal-progress-bar-line-radius:var(--bal-radius-rounded)}.bal-progress-bar{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;width:100%;min-width:0;height:.25rem}.bal-progress-bar--background-white{background:var(--bal-progress-bar-background-white)}.bal-progress-bar--background-grey{background:var(--bal-progress-bar-background-grey)}.bal-progress-bar__line{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;height:.25rem;width:0;background:var(--bal-progress-bar-line-background);border-top-right-radius:var(--bal-progress-bar-line-radius);border-bottom-right-radius:var(--bal-progress-bar-line-radius)}.bal-progress-bar__line--animated{will-change:width;-webkit-transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing);transition:all var(--bal-animation-transition-duration) var(--bal-animation-transition-easing)}.bal-progress-bar__line--full{border-top-right-radius:0;border-bottom-right-radius:0}";var l=undefined&&undefined.__decorate||function(e,r,t,n){var a=arguments.length,i=a<3?r:n===null?n=Object.getOwnPropertyDescriptor(r,t):n,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,r,t,n);else for(var s=e.length-1;s>=0;s--)if(o=e[s])i=(a<3?o(i):a>3?o(r,t,i):o(r,t))||i;return a>3&&i&&Object.defineProperty(r,t,i),i};var c=e("bal_progress_bar",function(){function e(e){r(this,e);this.animated=true;this.value=0;this.background="white"}e.prototype.componentDidRender=function(){this.updateProgress()};e.prototype.breakpointListener=function(e){this.updateProgress()};e.prototype.configChanged=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){this.animated=e.animated;return[2]}))}))};e.prototype.updateProgress=function(){if(this.lineEl){var e=this.el.clientWidth;var r=Math.max(0,Math.min(100,this.value));var t=e/100*r;this.lineEl.style.width="".concat(t,"px");if(r===100){this.lineEl.classList.add("bal-progress-bar__line--full")}else{this.lineEl.classList.remove("bal-progress-bar__line--full")}}};e.prototype.render=function(){var e=this;var r=i.block("progress-bar");var a=r.element("line");return t(n,{class:Object.assign(Object.assign({},r.class()),r.modifier("background-".concat(this.background)).class())},t("div",{class:Object.assign(Object.assign({},a.class()),a.modifier("animated").class(this.animated)),ref:function(r){return e.lineEl=r}}))};Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());l([o()],c.prototype,"breakpointListener",null);c.style={css:s}}}}));