var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,s){function a(e){try{c(i.next(e))}catch(e){s(e)}}function r(e){try{c(i["throw"](e))}catch(e){s(e)}}function c(e){e.done?n(e.value):o(e.value).then(a,r)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,o,s,a;return a={next:r(0),throw:r(1),return:r(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function r(e){return function(t){return c([e,t])}}function c(r){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,r[0]&&(n=0)),n)try{if(i=1,o&&(s=r[0]&2?o["return"]:r[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,r[1])).done)return s;if(o=0,s)r=[r[0]&2,s.value];switch(r[0]){case 0:case 1:s=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;o=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(s=n.trys,s=s.length>0&&s[s.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!s||r[1]>s[0]&&r[1]<s[3])){n.label=r[1];break}if(r[0]===6&&n.label<s[1]){n.label=s[1];s=r;break}if(s&&n.label<s[2]){n.label=s[2];n.ops.push(r);break}if(s[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];o=0}finally{i=s=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};System.register(["./p-0607228f.system.js","./p-bbed38ef.system.js"],(function(e){"use strict";var t,n,i,o,s;return{setters:[function(e){t=e.r;n=e.h;i=e.H;o=e.g},function(e){s=e.c}],execute:function(){var a="x-collapse{display:block;position:relative;-webkit-transition:0.3s;transition:0.3s}.is-dark-mode x-collapse{color:var(--color-text-light, #FEFEFE)}x-collapse .collapse-header{position:relative;padding:0.5rem 0;line-height:1em;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}x-collapse .collapse-header:hover:after{-webkit-animation:0.75s fadeBreathe infinite;animation:0.75s fadeBreathe infinite}x-collapse .collapse-header h4{margin:0}x-collapse .collapse-header .collapse-action{position:absolute;top:calc(50% - 0.5rem);right:0.75rem}x-collapse .collapse-container{overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:0.3s;transition:0.3s;max-height:0;opacity:0;-webkit-transition:max-height 0.2s ease-out, opacity 0.2s;transition:max-height 0.2s ease-out, opacity 0.2s}x-collapse.collapse-expanded .collapse-container{opacity:1}";var r=a;var c=e("x_collapse",function(){function e(e){t(this,e);this.header=undefined;this.show=false;this.expanded=false}e.prototype.toggle=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.toggleCollapse();return[2]}))}))};e.prototype.onExpandedChange=function(){this.updateCollapse()};e.prototype.componentDidLoad=function(){this.container=this.el.querySelector(".collapse-container");if(this.show){this.expanded=true}};e.prototype.toggleCollapse=function(){this.expanded=!this.expanded};e.prototype.updateCollapse=function(){var e=this.el.querySelector(".collapse-container");if(e.style.maxHeight){this.hideCollapseContainer()}else{this.showCollapseContainer()}};e.prototype.hideCollapseContainer=function(){this.container.style.maxHeight=null;this.container.style.overflow="hidden"};e.prototype.showCollapseContainer=function(){var e=this;this.container.style.maxHeight="".concat(this.container.scrollHeight,"px");setTimeout((function(){e.container.style.overflow="auto"}),200)};e.prototype.render=function(){var e=this;var t;return n(i,{key:"9ed3bd4c972558ad23875a1ccf3fd6491e683006",class:s({"collapse-expanded":this.expanded})},n("div",{key:"0b5781b9394ca980fe37d5d60fa7ef4d69cc3d91",class:"collapse-header",onClick:function(){return e.toggleCollapse()}},((t=this.header)===null||t===void 0?void 0:t.length)?n("h4",null,this.header):n("slot",{name:"header"}),n("span",{key:"f331b0fb71b476c7dd1a196577c9b6d930245719",class:"collapse-action"},n("x-icon",{key:"263e701340a1149f3b0c85bd440a5071281596b8",name:this.expanded?"minus":"dropdown"}))),n("div",{key:"33cac6ebf7f23451d7e9ef24622f387023568325",class:"collapse-container"},n("slot",{key:"ba3dfe9f1a5237ffb93d5bc6596d4c5d5ca26406"})))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{expanded:["onExpandedChange"]}},enumerable:false,configurable:true});return e}());c.style=r}}}));