halleyx-ui-framework
Version:
The Halleyx UI Framework is a Vue 3 component framework.
1 lines • 2.12 MB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),t=require("vue-draggable-next"),a=require("vue3-apexcharts"),o=require("chart.js"),i=require("chartjs-chart-geo");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if("default"!==a){var o=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,o.get?o:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var r=n(a),s=l(i),c={name:"HlxAccordion",props:{accordionData:{type:Array,default:()=>[]},direction:{type:String,default:"right"},multiple:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},headerBorder:{type:Boolean,default:!1}},emits:["accordionopen","accordionclose"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5)}),mounted(){this.expand&&document.querySelectorAll(".accordion-item")?.forEach(e=>{e?.children[0]?.children[1]?.children[0]?.classList?.remove("icon-angle-right-regular"),e?.children[0]?.children[1]?.children[0]?.classList?.add("icon-angle-down-regular"),e.children[1].style.display="flex",this.$emit("accordionopen")})},methods:{toggleView(e,t,a){0==a?"right icon-angle-right-regular"===document.querySelector("#arrow-"+t).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach(e=>{e.classList.remove("noo-border")}),document.querySelector("#header-"+t)&&document.querySelector("#header-"+t).classList.add("noo-border")),document.querySelectorAll(".icon-angle-down-regular").forEach(e=>{"right icon-angle-down-regular"==e.className&&(document.querySelectorAll(".accordion-content").forEach(e=>{e.style.display="none"}),e.classList.remove("icon-angle-down-regular"),e.classList.add("icon-angle-right-regular"))}),document.querySelector("#arrow-"+t).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+t).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+t).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+t).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach(e=>{e.classList.remove("noo-border")}),document.querySelector("#header-"+t)&&document.querySelector("#header-"+t).classList.add("noo-border")),document.querySelector("#arrow-"+t).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+t).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+t).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+t).className?(0==this.headerBorder&&document.querySelector("#header-"+t)&&document.querySelector("#header-"+t).classList.add("noo-border"),document.querySelector("#arrow-"+t).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+t).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+t).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+t).className&&(document.querySelector("#header-"+t)&&document.querySelector("#header-"+t).classList.remove("noo-border"),document.querySelector("#arrow-"+t).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+t).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+t).style.display="none",this.$emit("accordionclose"))}}};const d=["id","multiple"],m=["id"],u={key:0,style:{display:"flex"}},f=["id"],p={style:{width:"100%"}},h={key:1,style:{display:"flex"}},g=["id"],y=["id"];c.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createCommentVNode(' <div class="accordion-container"> '),(e.openBlock(),e.createElementBlock("div",{id:["item-"+n.unique],key:n.unique,class:"accordion-item",multiple:o.multiple},[e.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:a[0]||(a[0]=e=>l.toggleView(e,n.unique,o.multiple))},["left"==o.direction?(e.openBlock(),e.createElementBlock("div",u,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,f)])):e.createCommentVNode("v-if",!0),e.createElementVNode("header",p,[e.renderSlot(t.$slots,"item-title")]),"right"==o.direction?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,g)])):e.createCommentVNode("v-if",!0)],8,m),e.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[e.renderSlot(t.$slots,"item-body")],8,y)],8,d)),e.createCommentVNode(" </div> ")],2112)},c.__file="src/components/AccordionComponent.vue";var v={name:"HlxAlertNotification",props:{notify:{type:Object,default:()=>({})},autoClose:{type:Boolean,default:()=>!0},delay:{type:Number,default:e=>e>3e3?e:2e3,validator:e=>e>3e3?e:2e3}},data:()=>({notifications:[],alertStatus:!1,typeData:""}),computed:{computedAlert(){return this.alertStatus}},watch:{notify:{handler(e){const t=(new Date).toISOString().replace(/[.\:-]/g,"")+crypto.randomUUID().toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:t})},immediate:!0,deep:!0}},methods:{closeAlert(e){this.$refs["hlx-alert-"+e][0]?.classList.add("close"),setTimeout(()=>{this.notifications=this.notifications.filter(t=>t.id&&t.id!=e)},1e3)},push(e){this.notifications.push({...e}),this.autoClose&&setTimeout(()=>{this.$refs["hlx-alert-"+e.id][0]?.classList.add("close"),setTimeout(()=>{this.notifications.shift()},1e3)},this.delay+1e3*this.notifications.length)},icon(e){if(e)switch(e.toLowerCase()){case"danger":case"warning":return"icon-exclamation-circle-regular";case"primary":return"icon-info-circle-regular";default:return"icon-check-circle-regular"}return"tick-bg"}}};const b={key:0,class:"hlx-alert-wrapper"},k=["id"],_={class:"icon"},w={class:"text"},C={class:"alert-description"},S=["onClick"];v.render=function(t,a,o,i,n,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(e.openBlock(),e.createElementBlock("section",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.notifications,t=>(e.openBlock(),e.createElementBlock("div",{id:"alert"+t.id,ref_for:!0,ref:"hlx-alert-"+t.id,key:t,class:e.normalizeClass(["hlx alert",t?.type?"alert-"+t?.type.toLowerCase():"alert-success"])},[e.createElementVNode("span",_,[e.createElementVNode("i",{class:e.normalizeClass(l.icon(t.type))},null,2)]),e.createElementVNode("div",w,[e.createElementVNode("p",C,e.toDisplayString(t?.message),1)]),e.createElementVNode("button",{class:"close","aria-label":"close",onClick:e=>l.closeAlert(t.id)},[...a[0]||(a[0]=[e.createElementVNode("i",{class:"icon-times-filled"},null,-1)])],8,S)],10,k))),128))])):e.createCommentVNode("v-if",!0)])},v.__file="src/components/AlertComponent.vue";var E={name:"HlxBadge",props:{icon:{type:String,default:""},count:{type:Number,default:0}}};const N=["aria-label"],x={class:"icon-button__badge",style:{"font-size":"10px"}};E.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":o.icon},[e.createElementVNode("span",{class:e.normalizeClass(o.icon)},null,2),e.createElementVNode("span",x,e.toDisplayString(o.count),1)],8,N)},E.__file="src/components/BadgeComponent.vue";var B={name:"HlxBreadcrumb",props:{labelValue:{type:String,default:"Back"},autoRoute:{type:Boolean,default:!1},type:{type:String,default:"back-breadcrumb"},items:{type:Array,required:!0},separator:{type:[String,Object],default:"/"}},emits:["path"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,t){let a=e,o=t;this.ellipsis(a,o)},tooltipleave(e,t){let a=e,o=t;this.ellipses(a,o)},ellipsis(e,t){this.$nextTick(()=>{const a=document.querySelector("#"+e);if(null!=a){if(a.clientWidth<a.scrollWidth)if("ellipsis"===(a.currentStyle||window.getComputedStyle(a)).textOverflow){const e=document.querySelector("."+t);let o=a.getBoundingClientRect().top,i=a.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=o+"px",e.style.left=i+"px",!0}return!1}})},ellipses(e,t){this.$nextTick(()=>{const a=document.querySelector("#"+e);if(null!=a){if(a.clientWidth<a.scrollWidth)if("ellipsis"===(a.currentStyle||window.getComputedStyle(a)).textOverflow){return document.querySelector("."+t).style.display="none",!0}return!1}})}}};const V={class:"breadcrumb","aria-label":"Breadcrumb"},A={key:0},R=["onClick"],M=["id","onMouseover","onMouseleave"],T=["id","onMouseover","onMouseleave"],I={key:3,class:"breadcrumb-separator"},$={key:1};B.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("nav",V,["Pathway-breadcrumb"===o.type?(e.openBlock(),e.createElementBlock("ul",A,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,(t,a)=>(e.openBlock(),e.createElementBlock("li",{key:a,onClick:e=>l.current(t)},[null!=t.icon?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(t.icon)},null,2)):e.createCommentVNode("v-if",!0),a===o.items.length-1?(e.openBlock(),e.createElementBlock("a",{key:1,id:"breadcrumb"+a+n.unique,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","min-width":"45px",width:"auto","max-width":"80px",display:"inline-block"},onMouseover:e=>l.tooltipover("breadcrumb"+a+n.unique,"tooltip-textbreadcrumb"+a+n.unique),onMouseleave:e=>l.tooltipleave("breadcrumb"+a+n.unique,"tooltip-textbreadcrumb"+a+n.unique)},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+a+n.unique)},e.toDisplayString(t.label),3)],40,M)):(e.openBlock(),e.createElementBlock("a",{key:2,id:"breadcrumb"+n.unique+a,class:"show-breadcrumb",style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis","min-width":"45px",width:"auto","max-width":"80px",display:"inline-block"},onMouseover:e=>l.tooltipover("breadcrumb"+n.unique+a,"tooltip-textbreadcrumb"+n.unique+a),onMouseleave:e=>l.tooltipleave("breadcrumb"+n.unique+a,"tooltip-textbreadcrumb"+n.unique+a)},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+n.unique+a)},e.toDisplayString(t.label),3)],40,T)),e.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),a<o.items.length-1?(e.openBlock(),e.createElementBlock("span",I,[l.isIconSeparator?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(o.separator.icon)},null,2)):(e.openBlock(),e.createElementBlock("span",$,e.toDisplayString(o.separator),1))])):e.createCommentVNode("v-if",!0)],8,R))),128))])):e.createCommentVNode("v-if",!0),"back-breadcrumb"===o.type?(e.openBlock(),e.createElementBlock("div",{key:1,class:"back-breadcrumb",style:{display:"flex",cursor:"pointer","align-items":"center",gap:"8px","max-width":"100px"},onClick:a[0]||(a[0]=e=>l.current("back"))},[a[1]||(a[1]=e.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(o.labelValue),1)])):e.createCommentVNode("v-if",!0)])},B.__file="src/components/BreadcrumbComponent.vue";var D={name:"HlxButton",props:{value:{type:String,default:"Hlx click :)"},type:{type:String,default:"button"},name:{type:String,default:"hlx-button"},target:{type:String,default:"_blank"},href:{type:String,default:void 0},disabled:{type:Boolean,default:!1},label:{type:String,default:"Button"}},computed:{primaryClass(){return this.disabled?"disabled-button":""}},watch:{disabled:{handler(e){e&&this.primaryClass},immediate:!0}},methods:{clicked(){this.href&&this.$refs["link-ele"].click()}}};const z=["value","type","name","aria-label"],O=["aria-label","href","target"];D.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:o.value,type:o.type,name:o.name,class:e.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":o.label,onClick:a[0]||(a[0]=(...e)=>l.clicked&&l.clicked(...e))},[e.renderSlot(t.$slots,"default"),null!=o.href?(e.openBlock(),e.createElementBlock("a",{key:0,ref:"link-ele","aria-label":o.label,href:o.href,target:o.target},null,8,O)):e.createCommentVNode("v-if",!0)],10,z)},D.__file="src/components/ButtonComponent.vue";var P={name:"HlxCalendar",props:{disableWeekend:{type:Boolean,default:!1},dateFormatLanguage:{type:String,default:"en"},event:{type:[Array,PointerEvent],default:()=>[]},preValue:{type:[Date,String],default:""},startYear:{type:Number,default:1950},endYear:{type:Number,default:2050},holidayList:{type:Array,default:()=>[]}},emits:["selectedDate","formattedDate"],data:()=>({selectedMonth:"",selectedYear:"",selectedDay:"",formattedDate:"",staticDataDays:localStorage.getItem("dayDataShort")?JSON.parse(localStorage.getItem("dayDataShort")):{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},monthNames:localStorage.getItem("monthDataLong")?JSON.parse(localStorage.getItem("monthDataLong")):["January","February","March","April","May","June","July","August","September","October","November","December"]}),async mounted(){const e=document.querySelector(".calendar"),t=document.querySelector(".light");e.clientY=this.event.clientY,t.right=this.event.clientX+"px";const a=["January","February","March","April","May","June","July","August","September","October","November","December"],o=[];let i=this.startYear;const n=this.endYear;for(;i<=n;)o.push(i++);const l=e.querySelector(".month-list");o.forEach((e,t)=>{const a=document.createElement("div");a.innerHTML=`<div data-month="${t}" id="year${t}" class="idd${e}">${e}</div>`;let o=(new Date).getFullYear();o+=1,e===o&&(document.getElementById("year"+(t-1)).classList.add("theme-background"),document.getElementById("year"+(t-1)).style.color="white"),a.querySelector("div").onclick=()=>{l.classList.remove("show"),c.value=e,this.selectedMonth=s.value,this.selectedYear=c.value,this.generateCalendar(s.value,c.value)},l.appendChild(a)});e.querySelector("#year").onclick=()=>{l.classList.add("show"),document.querySelector(".selected-curr-year")?.classList?.remove("selected-curr-year");let e=document.querySelector(".idd"+this.selectedYear);e.classList.add("selected-curr-year"),e.scrollIntoView({behavior:"smooth",block:"start"})};let r="";if(""===this.preValue)r=new Date;else{const e=this.preValue.split("-");r=new Date(e[2],e[1]-1,e[0])}const s={value:r.getMonth()},c={value:r.getFullYear()};this.selectedMonth=s.value,this.selectedYear=c.value,this.generateCalendar(s.value,c.value);const d=document.querySelector(".calendar");340===d.offsetHeight||(d.style.marginTop="0px"),document.querySelector("#prev-year").onclick=()=>{"January"===a[s.value]?(s.value=11,--c.value):--s.value,this.selectedMonth=s.value,this.selectedYear=c.value,this.generateCalendar(s.value,c.value);const e=document.querySelector(".calendar");340===e.offsetHeight||(e.style.marginTop="0")},document.querySelector("#next-year").onclick=()=>{const e=document.querySelector(".calendar");"December"===a[s.value]?(s.value=0,++c.value):++s.value,this.selectedMonth=s.value,this.selectedYear=c.value,this.generateCalendar(s.value,c.value),340===e.offsetHeight||(e.style.marginTop="0")};document.querySelectorAll(".disable-weekend").forEach(e=>{e.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault()})})},methods:{async translateStaticDataDays(e,t){const a=Object.keys(e).map(t=>e[t]),o=await this.languageTransferArray(a,t),i=Object.keys(e).reduce((e,t,a)=>(e[t]=o[a],e),{});return i},hlxUIKitCalendarOnClickHandler(e){try{""!==e.target.innerHTML&&e.target.innerHTML.length<=2&&(e.target.innerHTML.length<2?this.selectedDay=0+e.target.innerHTML:this.selectedDay=e.target.innerHTML,this.selectedDate=this.selectedDay+"-"+(this.selectedMonth+1<10?"0"+String(this.selectedMonth+1):this.selectedMonth+1)+"-"+this.selectedYear,this.$emit("selectedDate",this.selectedDate))}catch(e){this.$emit("selectedDate",null)}},isLeapYear:e=>e%4==0&&e%100!=0&&e%400!=0||e%100==0&&e%400==0,getFebDays(e){return this.isLeapYear(e)?29:28},generateCalendar(e,t){const a=document.querySelector(".calendar"),o=a.querySelector(".calendar-days"),i=a.querySelector("#year"),n=[31,this.getFebDays(t),31,30,31,30,31,31,30,31,30,31];o.innerHTML="";let l="";if(""===this.preValue)l=new Date;else{const e=this.preValue.split("-");l=new Date(e[2],e[1]-1,e[0])}t||(t=l.getFullYear());const r=`${this.monthNames[e]}`;a.querySelector("#month-picker").innerHTML=r,i.innerHTML=t;const s=new Date(t,e,1);for(let a=0;a<=n[e]+s.getDay()-1;a++){const i=document.createElement("div");if(a>=s.getDay()){i.classList.add("calendar-day-hover");const o=a-s.getDay()+1;if(o>0&&o<=n[e]){const a=`${o}-${e+1}-${t}`;i.classList.add(a),i.id="calender-day",this.holidayList.includes(a)&&(i.classList.remove("calendar-day-hover"),i.classList.add("disable-weekend")),i.innerHTML=o,o===l.getDate()&&t===l.getFullYear()&&e===l.getMonth()&&i.classList.add("curr-date")}}o.appendChild(i)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,t=[0,6,7,13,14,20,21,27,28,34,35];for(const a in t)e[t[a]]&&""!==e[t[a]].innerHTML&&(e[t[a]].classList.remove("calendar-day-hover"),e[t[a]].classList.add("disable-weekend"))}}}};const q={class:"light"},L={class:"calendar"},F={class:"calendar-body"},j={class:"calendar-week-day"};P.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",L,[a[1]||(a[1]=e.createStaticVNode('<div class="calendar-header"><div class="year-picker"><span id="prev-year" class="year-change"><p style="margin:0px;"><i class="icon-angle-left-regular"></i></p></span><span><span id="month-picker" class="month-picker">February</span><span id="year">2021</span></span><span id="next-year" class="year-change"><p style="margin:0px;"><i class="icon-angle-right-regular"></i></p></span></div></div>',1)),e.createElementVNode("div",F,[e.createElementVNode("div",j,[e.createElementVNode("div",null,[e.createCommentVNode(" SUN "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.sun),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" MON "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.mon),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" TUE "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.tue),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" WED "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.wed),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" THU "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.thu),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" FRI "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.fri),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" SAT "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays?.sat),1)])]),e.createElementVNode("div",{class:"calendar-days",onClick:a[0]||(a[0]=(...e)=>l.hlxUIKitCalendarOnClickHandler&&l.hlxUIKitCalendarOnClickHandler(...e))})]),e.createCommentVNode(' <div class="calendar-footer">\n\n </div> '),a[2]||(a[2]=e.createElementVNode("div",{class:"month-list"},null,-1))])])},P.__file="src/components/CalendarComponent.vue";var U={name:"HlxCard",components:{},props:{cardTitle:{type:Boolean,default:!1},cardFooter:{type:Boolean,default:!1},width:{type:Number,default:null},hover:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1},padding:{type:Boolean,default:!1},active:{type:Boolean,default:!1},height:{type:Number,default:null}},computed:{headerHeight(){return this.cardTitle?60:0},footerHeight(){return this.cardFooter?60:0}},mounted(){}};const K={key:0,class:"card-title"},G={key:1,class:"card-footer"};U.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{cardhover:o.hover,cardshadow:o.shadow,padding:o.padding,cardActive:o.active}]),style:e.normalizeStyle("width:"+o.width+"px; height:"+o.height+"px;")},[1==o.cardTitle?(e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("header",null,[e.renderSlot(t.$slots,"card-title",{},()=>[a[0]||(a[0]=e.createTextVNode("Card title",-1))])])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"card-body",style:e.normalizeStyle(o.cardTitle&&o.cardFooter?{height:o.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[e.createCommentVNode(" {{this.card_body}} "),e.createElementVNode("main",null,[e.renderSlot(t.$slots,"card-body",{},()=>[a[1]||(a[1]=e.createTextVNode("Card body",-1))])])],4),1==o.cardFooter?(e.openBlock(),e.createElementBlock("div",G,[e.createCommentVNode(" {{this.cardFooter}} "),e.createElementVNode("footer",null,[e.renderSlot(t.$slots,"card-footer",{},()=>[a[2]||(a[2]=e.createTextVNode("Card footer",-1))])])])):e.createCommentVNode("v-if",!0)],6)},U.__file="src/components/CardsComponent.vue";var H={props:{show:{type:Boolean,default:!1},height:{type:Number,default:0},top:{type:Number,default:0},width:{type:Number,default:0},left:{type:Number,default:0},conditionvalue:{type:Number,default:0},conditionup:{type:Number,default:0},conditiondown:{type:Number,default:0},search:{type:String,default:""}},emits:["close-overlay"],data:()=>({unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5),containertop:0,containerwidth:0,containerleft:0,containerheight:0}),watch:{search:{handler(e){1==this.show?this.$nextTick(()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown}):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)}},show:{handler(e){1==e?this.$nextTick(()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown}):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)}},top:{handler(e){this.containertop=e,1==this.show?this.$nextTick(()=>{this.containerheight=document.querySelector("#container-overlay"+this.unique).offsetHeight,this.containertop=this.top,this.containerleft=this.left,this.containerwidth=this.width,window.innerHeight-this.containertop<this.conditionvalue?this.containertop=this.containertop-(this.containerheight+this.conditionup):this.containertop=this.containertop+this.conditiondown}):(this.containertop=0,this.containerleft=0,this.containerwidth=0,this.containerheight=0)},immediate:!0,deep:!0},left:{handler(e){this.containerleft=e},immediate:!0,deep:!0},width:{handler(e){this.containerwidth=e},immediate:!0,deep:!0}},methods:{emitfunction(e){this.$emit("close-overlay",e)}}};const W=["id"];H.render=function(t,a,o,i,n,l){return e.openBlock(),e.createElementBlock("div",{class:"outer-overlay",onClick:a[0]||(a[0]=(...e)=>l.emitfunction&&l.emitfunction(...e))},[e.createElementVNode("div",{id:"container-overlay"+n.unique,class:"container-overlay",style:e.normalizeStyle([{position:"fixed"},["width:"+o.width+"px","top:"+n.containertop+"px","left:"+o.left+"px"]])},[e.renderSlot(t.$slots,"overlay")],12,W)])},H.__file="src/components/OverlayComponent.vue";var J={name:"HlxColorPalette",components:{hlxOverlay:H},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Date.now().toString(36)+Math.random().toString(36).substr(2,5),colorcontainer:!1,fill_color:!0,colorvalue:"#000000",recent:!1,recentvalue:"",recentcolor:[],colordata:[{"#ffffff":["#f2f2f2","#d9d9d9","#bfbfbf","#a6a6a6","#808080"]},{"#000000":["#808080","#595959","#404040","#262626","#0d0d0d"]},{"#e7e6e6":["#d0cece","#aeaaaa","#757171","#3a3838","#161616"]},{"#44546a":["#d6dce4","#acb9ca","#8497b0","#333f4f","#222b35"]},{"#4472c4":["#d9e1f2","#b4c6e7","#8ea9db","#305496","#203764"]},{"#ed7d31":["#fce4d6","#f8cbad","#f4b084","#c65911","#833c0c"]},{"#a5a5a5":["#ededed","#dbdbdb","#c9c9c9","#7b7b7b","#525252"]},{"#ffc000":["#fff2cc","#ffe699","#ffd966","#bf8f00","#806000"]},{"#5b9bd5":["#ddebf7","#bdd7ee","#9bc2e6","#2f75b5","#1f4e78"]},{"#70ad47":["#e2efda","#c6e0b4","#a9d08e","#548235","#375623"]}],standardcolor:["#c00000","#ff0000","#ffc000","#ffff00","#92d050","#00b050","#00b0f0","#0070c0","#002060","#7030a0"],colorpick:""}),watch:{preValue:{handler(e){""!=e&&(this.colorvalue=e,this.$emit("customChange",this.colorvalue))},immediate:!0,deep:!0}},mounted(){!0===this.highlightColor?this.fill_color=!1:this.fill_color=!0;for(let e=0;e<this.colordata.length;e++)for(let t=0;t<Object.values(this.colordata[e])[0].length;t++);document.addEventListener("click",e=>{"color-container"!=e.target.className&&"color-container-title"!=e.target.className&&"color-container-specific-color-checkbox-border"!=e.target.className&&"color-container-specific-color-checkbox-border-fill-color"!=e.target.className&&"color-container-specific-color"!=e.target.className&&"color-container-specific-color1"!=e.target.className&&"color-container-specific-color2"!=e.target.className&&"color-container-specific-color1-container"!=e.target.className&&"color-container2323"!=e.target.className&&"favcolor"!=e.target.className&&"color-palette-container"!=e.target.className&&"color-palette-icon"!=e.target.className&&"icon-color-fill"!=e.target.className&&"color-icon-border"!=e.target.className&&"color-palette-open-icon"!=e.target.className&&"icon-angle-down-regular"!=e.target.className&&(this.colorcontainer=!1)})},methods:{getcolorvalue(e){this.recent=!0,this.colorvalue=e.target.value,this.$emit("customChange",this.colorvalue),1!=this.recentcolor.includes(this.colorvalue)&&(document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach(e=>{e.classList.remove("add-border")}),this.recentvalue=this.colorvalue,this.recentcolor.push(this.colorvalue))},getcolor(e){document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach(e=>{e.classList.remove("add-border")}),"color-container-specific-color-checkbox-border-fill-color"===e.target.className?(this.colorvalue=e.target.style.background,this.$emit("customChange",this.colorvalue),e.target.parentElement.classList.add("add-border"),this.colorcontainer=!1):"color-container-specific-color-checkbox-border"===e.target.className&&(this.colorvalue=e.target.children[0].style.background,this.$emit("customChange",this.colorvalue),e.target.classList.add("add-border"),this.colorcontainer=!1),this.recent=!0,1!=this.recentcolor.includes(this.colorvalue)&&(document.querySelectorAll(".color-container-specific-color-checkbox-border").forEach(e=>{e.classList.remove("add-border")}),this.recentvalue=this.colorvalue,this.recentcolor.push(this.colorvalue))},colorpalette(){this.$nextTick(()=>{this.containerleft=document.getElementById("color-palette-open-icon"+this.unique).getBoundingClientRect().left+5,this.containertop=document.getElementById("color-palette-open-icon"+this.unique).getBoundingClientRect().top+50}),!1===this.colorcontainer?this.colorcontainer=!0:!0===this.colorcontainer&&(this.colorcontainer=!1)},colorpicker(){this.colorpick=!0}}};const Z={class:"color-palette-container"},Y={class:"color-palette-icon"},X={key:0,class:"icon-palette-regular"},Q={key:1,class:"highlight-container"},ee={key:0,class:"highlight-icon"},te=["id"],ae=["id"],oe={class:"color-container-specific-color"},ie={class:"color-container-specific-color1"},ne={class:"color-container-specific-color"},le={class:"color-container2323"},re=["value"],se={key:0,class:"color-container-title"},ce={class:"color-container-specific-color2"};J.render=function(t,a,o,i,n,l){const r=e.resolveComponent("hlx-overlay");return e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("div",Y,[1==n.fill_color?(e.openBlock(),e.createElementBlock("i",X)):e.createCommentVNode("v-if",!0),!0===o.highlightColor?(e.openBlock(),e.createElementBlock("div",Q,[!0===o.highlightColor?(e.openBlock(),e.createElementBlock("p",ee,"A")):e.createCommentVNode("v-if",!0),e.createCommentVNode(' <div class="higlight-icon-border" v-if="this.highlightColor === true"></div> ')])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"color-icon-border",style:e.normalizeStyle({background:n.colorvalue})},null,4)]),e.createElementVNode("button",{id:"color-palette-open-icon"+n.unique,"aria-dis":"",class:"color-palette-open-icon",onClick:a[0]||(a[0]=(...e)=>l.colorpalette&&l.colorpalette(...e))},[...a[7]||(a[7]=[e.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)])],8,te),n.colorcontainer?(e.openBlock(),e.createBlock(r,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:t.onClose},{overlay:e.withCtx(()=>[e.createElementVNode("div",{id:"color-container"+n.unique,class:"color-container"},[a[8]||(a[8]=e.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1)),e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"color-container-specific-color-checkbox-border",onClick:a[1]||(a[1]=(...e)=>l.getcolor&&l.getcolor(...e))},[e.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:e.normalizeStyle({background:Object.keys(n.colordata[o])[0]})},null,4)]))),128))]),e.createElementVNode("button",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"color-container-specific-color1-container",onClick:a[2]||(a[2]=(...e)=>l.getcolor&&l.getcolor(...e))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.values(n.colordata[o])[0].length,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"color-container-specific-color-checkbox-border"},[e.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:e.normalizeStyle({background:Object.values(n.colordata[o])[0][a]})},null,4)]))),128))]))),128))]),a[9]||(a[9]=e.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1)),e.createElementVNode("button",ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.standardcolor,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"color-container-specific-color-checkbox-border",onClick:a[3]||(a[3]=(...e)=>l.getcolor&&l.getcolor(...e))},[e.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:e.normalizeStyle({background:n.standardcolor[o]})},null,4)]))),128))]),e.createElementVNode("button",le,[e.createElementVNode("input",{id:"favcolor",type:"color",name:"favcolor",value:n.recentvalue,class:"favcolor",onChange:a[4]||(a[4]=(...e)=>l.getcolorvalue&&l.getcolorvalue(...e))},null,40,re),e.createElementVNode("p",{class:"color-container-title",onClick:a[5]||(a[5]=(...e)=>l.colorpicker&&l.colorpicker(...e))}," More Colors ")]),!0===n.recent?(e.openBlock(),e.createElementBlock("p",se," Recent color ")):e.createCommentVNode("v-if",!0),e.createElementVNode("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.recentcolor,(t,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"color-container-specific-color-checkbox-border",onClick:a[6]||(a[6]=(...e)=>l.getcolor&&l.getcolor(...e))},[e.createElementVNode("button",{class:"color-container-specific-color-checkbox-border-fill-color",style:e.normalizeStyle({background:n.recentcolor[o]})},null,4)]))),128))])],8,ae)]),_:1},8,["show","top","left","onCloseOverlay"])):e.createCommentVNode("v-if",!0)])},J.__file="src/components/ColorpaletteComponent.vue";var de="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function me(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ue,fe={exports:{}};var pe,he,ge,ye,ve=(ue||(ue=1,pe=fe,he=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],ge="undefined"!=typeof window,ye=ge&&null!=window.mozInnerScreenX,pe.exports=function(e,t,a){if(!ge)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var o=a&&a.debug||!1;if(o){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var n=document.createElement("div");n.id="input-textarea-caret-position-mirror-div",document.body.appendChild(n);var l=n.style,r=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,s="INPUT"===e.nodeName;l.whiteSpace="pre-wrap",s||(l.wordWrap="break-word"),l.position="absolute",o||(l.visibility="hidden"),he.forEach(function(e){s&&"lineHeight"===e?l.lineHeight=r.height:l[e]=r[e]}),ye?e.scrollHeight>parseInt(r.height)&&(l.overflowY="scroll"):l.overflow="hidden",n.textContent=e.value.substring(0,t),s&&(n.textContent=n.textContent.replace(/\s/g," "));var c=document.createElement("span");c.textContent=e.value.substring(t)||".",n.appendChild(c);var d={top:c.offsetTop+parseInt(r.borderTopWidth),left:c.offsetLeft+parseInt(r.borderLeftWidth),height:parseInt(r.lineHeight)};return o?c.style.backgroundColor="#aaa":document.body.removeChild(n),d}),fe.exports),be=me(ve);function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e},ke.apply(this,arguments)}var _e,we="undefined"!=typeof window&&navigator&&/Win/i.test(navigator.platform),Ce="undefined"!=typeof window&&navigator&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),Se=e.defineComponent({props:{lineNumbers:{type:Boolean,default:!1},autoStyleLineNumbers:{type:Boolean,default:!0},readonly:{type:Boolean,default:!1},modelValue:{type:String,default:""},highlight:{type:Function,required:!0},tabSize:{type:Number,default:2},insertSpaces:{type:Boolean,default:!0},ignoreTabKey:{type:Boolean,default:!1},placeholder:{type:String,default:""}},data:function(){return{capture:!0,history:{stack:[],offset:-1},lineNumbersHeight:"20px",codeData:""}},watch:{modelValue:{immediate:!0,handler:function(e){this.codeData=e||""}},content:{immediate:!0,handler:function(){var e=this;this.lineNumbers&&this.$nextTick(function(){e.setLineNumbersHeight()})}},lineNumbers:function(){var e=this;this.$nextTick(function(){e.styleLineNumbers(),e.setLineNumbersHeight()})}},computed:{isEmpty:function(){return 0===this.codeData.length},content:function(){return this.highlight(this.codeData)+"<br />"},lineNumbersCount:function(){return this.codeData.split(/\r\n|\n/).length}},mounted:function(){this._recordCurrentState(),this.styleLineNumbers()},methods:{setLineNumbersHeight:function(){this.lineNumbersHeight=getComputedStyle(this.$refs.pre).height},styleLineNumbers:function(){if(this.lineNumbers&&this.autoStyleLineNumbers){var e=this.$refs.pre,t=this.$el.querySelector(".prism-editor__line-numbers"),a=window.getComputedStyle(e);this.$nextTick(function(){var o="border-top-left-radius",i="border-bottom-left-radius";if(t){t.style[o]=a[o],t.style[i]=a[i],e.style[o]="0",e.style[i]="0";["background-color","margin-top","padding-top","font-family","font-size","line-height"].forEach(function(e){t.style[e]=a[e]}),t.style["margin-bottom"]="-"+a["padding-top"]}})}},_recordCurrentState:function(){var e=this.$refs.textarea;if(e){var t=e.value,a=e.selectionStart,o=e.selectionEnd;this._recordChange({value:t,selectionStart:a,selectionEnd:o})}},_getLines:function(e,t){return e.substring(0,t).split("\n")},_applyEdits:function(e){var t=this.$refs.textarea,a=this.history.stack[this.history.offset];a&&t&&(this.history.stack[this.history.offset]=ke({},a,{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),this._recordChange(e),this._updateInput(e)},_recordChange:function(e,t){void 0===t&&(t=!1);var a=this.history,o=a.stack,i=a.offset;if(o.length&&i>-1){this.history.stack=o.slice(0,i+1);var n=this.history.stack.length;if(n>100){var l=n-100;this.history.stack=o.slice(l,n),this.history.offset=Math.max(this.history.offset-l,0)}}var r=Date.now();if(t){var s=this.history.stack[this.history.offset];if(s&&r-s.timestamp<3e3){var c,d,m=/[^a-z0-9]([a-z0-9]+)$/i,u=null===(c=this._getLines(s.value,s.selectionStart).pop())||void 0===c?void 0:c.match(m),f=null===(d=this._getLines(e.value,e.selectionStart).pop())||void 0===d?void 0:d.match(m);if(u&&f&&f[1].startsWith(u[1]))return void(this.history.stack[this.history.offset]=ke({},e,{timestamp:r}))}}this.history.stack.push(ke({},e,{timestamp:r})),this.history.offset++},_updateInput:function(e){var t=this.$refs.textarea;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,this.$emit("update:modelValue",e.value))},handleChange:function(e){var t=e.target,a=t.value,o=t.selectionStart,i=t.selectionEnd;this._recordChange({value:a,selectionStart:o,selectionEnd:i},!0),this.$emit("update:modelValue",a)},_undoEdit:function(){var e=this.history,t=e.stack,a=e.offset,o=t[a-1];o&&(this._updateInput(o),this.history.offset=Math.max(a-1,0))},_redoEdit:function(){var e=this.history,t=e.stack,a=e.offset,o=t[a+1];o&&(this._updateInput(o),this.history.offset=Math.min(a+1,t.length-1))},handleKeyDown:function(e){var t=this.tabSize,a=this.insertSpaces,o=this.ignoreTabKey;if(this.$emit("keydown",e),!e.defaultPrevented){27===e.keyCode&&(e.target.blur(),this.$emit("blur",e));var i=e.target,n=i.value,l=i.selectionStart,r=i.selectionEnd,s=(a?" ":"\t").repeat(t);if(9===e.keyCode&&!o&&this.capture)if(e.preventDefault(),e.shiftKey){var c=this._getLines(n,l),d=c.length-1,m=this._getLines(n,r).length-1,u=n.split("\n").map(function(e,t){return t>=d&&t<=m&&e.startsWith(s)?e.substring(s.length):e}).join("\n");if(n!==u){var f=c[d];this._applyEdits({value:u,selectionStart:f.startsWith(s)?l-s.length:l,selectionEnd:r-(n.length-u.length)})}}else if(l!==r){var p=this._getLines(n,l),h=p.length-1,g=this._getLines(n,r).length-1,y=p[h];this._applyEdits({value:n.split("\n").map(function(e,t){return t>=h&&t<=g?s+e:e}).join("\n"),selectionStart:/\S/.test(y)?l+s.length:l,selectionEnd:r+s.length*(g-h+1)})}else{var v=l+s.length;this._applyEdits({value:n.substring(0,l)+s+n.substring(r),selectionStart:v,selectionEnd:v})}else if(8===e.keyCode){var b=l!==r;if(n.substring(0,l).endsWith(s)&&!b){e.preventDefault();var k=l-s.length;this._applyEdits({value:n.substring(0,l-s.length)+n.substring(r),selectionStart:k,selectionEnd:k})}}else if(13===e.keyCode){if(l===r){var _=this._getLines(n,l).pop(),w=null==_?void 0:_.match(/^\s+/);if(w&&w[0]){e.preventDefault();var C="\n"+w[0],S=l+C.length;this._applyEdits({value:n.substring(0,l)+C+n.substring(r),selectionStart:S,selectionEnd:S})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var E;57===e.keyCode&&e.shiftKey?E=["(",")"]:219===e.keyCode?E=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?E=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(E=["`","`"]),l!==r&&E&&(e.preventDefault(),this._applyEdits({value:n.substring(0,l)+E[0]+n.substring(l,r)+E[1]+n.substring(r),selectionStart:l,selectionEnd:r+2}))}else!(Ce?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(Ce?e.metaKey&&90===e.keyCode&&e.shiftKey:we?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),this._redoEdit()):77!==e.keyCode||!e.ctrlKey||Ce&&!e.shiftKey||(e.preventDefault(),this.capture=!this.capture):(e.preventDefault(),this._undoEdit())}}},render:function(){var t=this,a=e.h("div",{class:"prism-editor__line-width-calc",style:"height: 0px; visibility: hidden; pointer-events: none;"},"999"),o=e.h("div",{class:"prism-editor__line-numbers",style:{"min-height":this.lineNumbersHeight},"aria-hidden":"true"},[a,Array.from(Array(this.lineNumbersCount).keys()).map(function(t,a){return e.h("div",{class:"prism-editor__line-number token comment"},""+ ++a)})]),i=e.h("textarea",{ref:"textarea",onInput:this.handleChange,onKeydown:this.handleKeyDown,onClick:function(e){t.$emit("click",e)},onKeyup:function(e){t.$emit("keyup",e)},onFocus:function(e){t.$emit("focus",e)},onBlur:function(e){t.$emit("blur",e)},class:{"prism-editor__textarea":!0,"prism-editor__textarea--empty":this.isEmpty},spellCheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","data-gramm":"false",placeholder:this.placeholder,"data-testid":"textarea",readonly:this.readonly,value:this.codeData}),n=e.h("pre",{ref:"pre",class:"prism-editor__editor","data-testid":"preview",innerHTML:this.content}),l=e.h("div",{class:"prism-editor__container"},[i,n]);return e.h("div",{class:"prism-editor-wrapper"},[this.lineNumbers&&o,l])}}),Ee={exports:{}},Ne={},xe={exports:{}},Be={},Ve={};function Ae(){if(_e)return Ve;function e(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function t(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}function a(a,o){this.__indent_cache=new t(a,o),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}return _e=1,e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},e.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1},e.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},e.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===e.__items[0]&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf("\n");-1!==t?this.__character_count=e.length-t:this.__character_count+=e.length},e.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;" "===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e},t.prototype.get_indent_size=function(e,t){var a=this.__base_string_length;return t=t||0,e<0&&(a=0),a+=e*this.__indent_size,a+=t},t.prototype.get_indent_string=function(e,t){var a=this.__base_string;return t=t||0,e<0&&(e=0,a=""),t+=e*this.__indent_size,this.__ensure_cache(t),a+=this.__cache[t]},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,t=0,a="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,a=new Array(t+1).join(this.__indent_string)),e&&(a+=new Array(e+1).join(" ")),this.__cache.push(a)},a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)},a.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(e){return!(this.is_empty()||!e&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&("\n"===t[t.length-1]&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join("\n");return"\n"!==e&&(a=a.replace(/[\n]/g,e)),a},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},a.prototype.remove_indent=function(e){for(var t=this.__lines.length;e<t;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(e){for(e=void 0!==e&&e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(t,a){for(var o=this.__lines.length-2;o>=0;){var i=this.__lines[o];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==a){this.__lines.splice(o+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},Ve.Output=a,Ve}var Re,Me={};function Te(){if(Re)return Me;return Re=1,Me.Token=function(e,t,a,o){this.type=e,this.text=t,this.comments_before=null,this.newlines=a||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null},Me}var Ie,$e={};function De(){return Ie||(Ie=1,function(e){var t="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",a="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\