text: var __awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function c(e){try{l(r.next(e))}catch(e){o(e)}}function u(e){try{l(r["throw"](e))}catch(e){o(e)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(c,u)}l((r=r.apply(e,t||[])).next())})};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(e){return function(t){return l([e,t])}}function l(c){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=c[0]&2?i["return"]:c[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;if(i=0,o)c=[c[0]&2,o.value];switch(c[0]){case 0:case 1:o=c;break;case 4:n.label++;return{value:c[1],done:false};case 5:n.label++;i=c[1];c=[0];continue;case 7:c=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1];o=c;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(c);break}if(o[2])n.ops.pop();n.trys.pop();continue}c=t.call(e,n)}catch(e){c=[6,e];i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};System.register(["./p-565e9835.system.js"],function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.r;n=e.c;r=e.h;i=e.g}],execute:function(){var o="/";var c=function(){function e(e){t(this,e);this.sections=[];this.selectedSection=localStorage.getItem("core-playground:selectedSection")||"";this.sectionChange=n(this,"sectionChange",7)}Object.defineProperty(e.prototype,"currentSection",{get:function(){var e=this;var t=function(n){return n.reduce(function(n,r){if(n){return n}if(r.slot===e.selectedSection){return r}return t(r.children)},undefined)};var n=t(this.sections);return n?n.slot:""},enumerable:true,configurable:true});e.prototype.componentDidLoad=function(){this.sectionChange.emit(this.selectedSection)};e.prototype.addSection=function(e){return __awaiter(this,void 0,void 0,function(){var t,n;return __generator(this,function(r){t=function(n,r){if(n.length===0){return r}var i=n[0];var o=r.find(function(e){return e.name===i});if(o){o.children=t(n.slice(1),o.children);return r}else{var c={name:i,children:t(n.slice(1),[]),slot:n.length===1?e:undefined};return r.concat(c)}};n=function(e){var t=e.slice(0);t.sort(function(e,t){return e.name.localeCompare(t.name)});t.forEach(function(e){return e.children=n(e.children)});return t};this.sections=n(t(e.split(o),this.sections));if(!this.selectedSection){this.select(e)}return[2]})})};e.prototype.select=function(e){this.selectedSection=e;localStorage.setItem("core-playground:selectedSection",this.selectedSection);this.sectionChange.emit(this.selectedSection)};e.prototype.getTree=function(e,t){var n=this;if(t===void 0){t=0}if(e.length===0){return""}return r("ul",null,e.map(function(e){var i={"padding-left":10+20*t+"px"};return r("li",null,r("div",{class:"node "+(n.currentSection===e.slot?"active":""),style:i,onClick:function(){if(e.children.length>0){var t=function(e){if(e[0].children.length>0){return t(e[0].children)}return e[0].slot};n.select(t(e.children))}else{n.select(e.slot)}}},e.name),n.getTree(e.children,t+1))}))};e.prototype.render=function(){return[r("aside",null,this.getTree(this.sections),r("div",{class:"custom-area"},r("slot",{name:"playground-custom-area"}))),r("main",null,r("slot",{name:this.currentSection}))]};Object.defineProperty(e,"style",{get:function(){return":host{-ms-flex-direction:row;flex-direction:row;width:var(--my-playground-width);height:var(--my-playground-height);font-size:var(--my-playground-font-size)}:host,aside{display:-ms-flexbox;display:flex;overflow:hidden}aside{-ms-flex:0 0 auto;flex:0 0 auto;width:var(--my-playground-menu-width);height:100%;background:var(--my-playground-menu-bg-color);color:var(--my-playground-menu-color);-webkit-box-shadow:2px 0 2px 0 rgba(0,0,0,.5);box-shadow:2px 0 2px 0 rgba(0,0,0,.5);-ms-flex-direction:column;flex-direction:column}main{height:100%;padding:10px}main,ul{-ms-flex:1 1;flex:1 1;overflow:auto}ul{list-style:none;margin:0;padding:0}li .node{height:40px;line-height:40px;padding:0 10px;cursor:pointer;-webkit-transition:color .5s,background .5s;transition:color .5s,background .5s}.node.active,.node:focus,.node:hover{color:var(--my-playground-menu-color-active);background:var(--my-playground-menu-bg-color-active)}.custom-area{-ms-flex:0 0 auto;flex:0 0 auto}"},enumerable:true,configurable:true});return e}();e("my_playground",c);var u=function(){function e(e){t(this,e);this.slot=""}e.prototype.componentDidLoad=function(){this.element.parentElement.addSection(this.slot)};e.prototype.render=function(){return[r("h1",null,this.title),r("slot",null)]};Object.defineProperty(e.prototype,"title",{get:function(){return this.slot.split("/").join(" / ")},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"element",{get:function(){return i(this)},enumerable:true,configurable:true});Object.defineProperty(e,"style",{get:function(){return"h1{margin-top:0;color:var(--my-playground-section-title-color)}"},enumerable:true,configurable:true});return e}();e("playground_section",u)}}});