halleyx-ui-framework 11.5.23 → 11.5.25
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/index.css +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/index.css +1 -1
- package/dist/es/index.js +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.umd.js +1 -1
- package/dist/umd/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),o=require("textarea-caret"),a=require("vue-prism-editor"),i=require("js-beautify"),t=require("vue-draggable-next"),n=require("vue3-apexcharts"),l=require("vue3-country-flag-icon");require("vue3-country-flag-icon/dist/CountryFlag.css");var c=require("chart.js"),r=require("chartjs-chart-geo"),s=require("vue3-click-away");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),o.default=e,Object.freeze(o)}var u=m(o),f=m(i),p=m(n),h=m(l),g=d(r),b={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:Math.floor(1e3*Math.random()+1)}),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,o,a){0==a?"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).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-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border")),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.remove("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose"))}}};const A=["id","multiple"],y=["id"],v={key:0,style:{display:"flex"}},k=["id"],C={style:{width:"100%"}},w={key:1,style:{display:"flex"}},E=["id"],S=["id"];b.render=function(o,a,i,t,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:i.multiple},[e.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:a[0]||(a[0]=e=>l.toggleView(e,n.unique,i.multiple))},["left"==i.direction?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,k)])):e.createCommentVNode("v-if",!0),e.createElementVNode("header",C,[e.renderSlot(o.$slots,"item-title")]),"right"==i.direction?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,E)])):e.createCommentVNode("v-if",!0)],8,y),e.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[e.renderSlot(o.$slots,"item-body")],8,S)],8,A)),e.createCommentVNode(" </div> ")],2112)},b.__file="src/components/AccordionComponent.vue";var B={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 o=Math.floor(65536*(1+Math.random())).toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:o})},immediate:!0,deep:!0}},methods:{getClass:e=>e?.type?"alert-"+e?.type.toLowerCase():"alert-success",closeAlert(e){this.$refs["hlx-alert-"+e][0]?.classList.add("close"),setTimeout((()=>{this.notifications=this.notifications.filter((o=>o.id&&o.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 V={key:0,class:"hlx-alert-wrapper"},N=["id"],I={class:"icon"},x={class:"text"},M={class:"alert-description"},R=["onClick"],T=[e.createElementVNode("i",{class:"icon-times-filled"},null,-1)];B.render=function(o,a,i,t,n,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(e.openBlock(),e.createElementBlock("section",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.notifications,(o=>(e.openBlock(),e.createElementBlock("div",{id:"alert"+o.id,ref_for:!0,ref:"hlx-alert-"+o.id,key:o,class:e.normalizeClass(["hlx alert",l.getClass(o)])},[e.createElementVNode("span",I,[e.createElementVNode("i",{class:e.normalizeClass(l.icon(o.type))},null,2)]),e.createElementVNode("div",x,[e.createElementVNode("p",M,e.toDisplayString(o.message),1)]),e.createElementVNode("button",{class:"close","aria-label":"close",onClick:e=>l.closeAlert(o.id)},[...T],8,R)],10,N)))),128))])):e.createCommentVNode("v-if",!0)])},B.__file="src/components/AlertComponent.vue";var D={name:"HlxBadge",props:{icon:{type:String,default:""},count:{type:Number,default:0}}};const q=["aria-label"],z={class:"icon-button__badge",style:{"font-size":"10px"}};D.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":i.icon},[e.createElementVNode("span",{class:e.normalizeClass(i.icon)},null,2),e.createElementVNode("span",z,e.toDisplayString(i.count),1)],8,q)},D.__file="src/components/BadgeComponent.vue";var L={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:Math.floor(1e3*Math.random()+1)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,o){let a=e,i=o;this.ellipsis(a,i)},tooltipleave(e,o){let a=e,i=o;this.ellipses(a,i)},ellipsis(e,o){console.log(e,o),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("."+o);console.log(a.getBoundingClientRect().top);let i=a.getBoundingClientRect().top,t=a.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=i+"px",e.style.left=t+"px",!0}return!1}}))},ellipses(e,o){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("."+o).style.display="none",!0}return!1}}))}}};const O={class:"breadcrumb","aria-label":"Breadcrumb"},P={key:0},U=["onClick"],F=["id","onMouseover","onMouseleave"],K=["id","onMouseover","onMouseleave"],j={key:3,class:"breadcrumb-separator"},H={key:1},G=e.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1);L.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("nav",O,["Pathway-breadcrumb"===i.type?(e.openBlock(),e.createElementBlock("ul",P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,((o,a)=>(e.openBlock(),e.createElementBlock("li",{key:a,onClick:e=>l.current(o)},[null!=o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(o.icon)},null,2)):e.createCommentVNode("v-if",!0),a===i.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(o.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+a+n.unique)},e.toDisplayString(o.label),3)],40,F)):(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(o.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+n.unique+a)},e.toDisplayString(o.label),3)],40,K)),e.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),a<i.items.length-1?(e.openBlock(),e.createElementBlock("span",j,[l.isIconSeparator?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(i.separator.icon)},null,2)):(e.openBlock(),e.createElementBlock("span",H,e.toDisplayString(i.separator),1))])):e.createCommentVNode("v-if",!0)],8,U)))),128))])):e.createCommentVNode("v-if",!0),"back-breadcrumb"===i.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"))},[G,e.createElementVNode("p",null,e.toDisplayString(i.labelValue),1)])):e.createCommentVNode("v-if",!0)])},L.__file="src/components/BreadcrumbComponent.vue";var Q={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 W=["value","type","name","aria-label"],J=["aria-label","href","target"];Q.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:i.value,type:i.type,name:i.name,class:e.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":i.label,onClick:a[0]||(a[0]=(...e)=>l.clicked&&l.clicked(...e))},[e.renderSlot(o.$slots,"default"),null!=i.href?(e.openBlock(),e.createElementBlock("a",{key:0,ref:"link-ele","aria-label":i.label,href:i.href,target:i.target},null,8,J)):e.createCommentVNode("v-if",!0)],10,W)},Q.__file="src/components/ButtonComponent.vue";var Z={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:{en:{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},es:{sun:"DOM",mon:"LUN",tue:"MAR",wed:"MIÉ",thu:"JUE",fri:"VIE",sat:"SÁB"},fr:{sun:"DIM",mon:"LUN",tue:"MAR",wed:"MER",thu:"JEU",fri:"VEN",sat:"SAM"},de:{sun:"SO",mon:"MO",tue:"DI",wed:"MI",thu:"DO",fri:"FR",sat:"SA"},ta:{sun:"ஞாயி",mon:"திங்கள்",tue:"செவ்வாய்",wed:"புதன்",thu:"வியாழன்",fri:"வெள்ளி",sat:"சனி"},hi:{sun:"रवि",mon:"सोम",tue:"मंगल",wed:"बुध",thu:"गुरु",fri:"शुक्र",sat:"शनि"},ja:{sun:"日",mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土"},zh:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},sw:{sun:"Jumapili",mon:"Jumatatu",tue:"Jumanne",wed:"Jumatano",thu:"Alhamisi",fri:"Ijumaa",sat:"Jumamosi"},ar:{sun:"أحد",mon:"اثنين",tue:"ثلاثاء",wed:"أربعاء",thu:"خميس",fri:"جمعة",sat:"سبت"},bn:{sun:"রবি",mon:"সোম",tue:"মঙ্গল",wed:"বুধ",thu:"বৃহস্পতি",fri:"শুক্র",sat:"শনি"},pt:{sun:"Dom",mon:"Seg",tue:"Ter",wed:"Qua",thu:"Qui",fri:"Sex",sat:"Sáb"},ru:{sun:"Вс",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],de:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],ta:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"],hi:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],ja:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],sw:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],bn:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],pt:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]}}),mounted(){console.log(this.event,"cal eve",this.dateFormatLanguage);const e=document.querySelector(".calendar"),o=document.querySelector(".light");e.clientY=this.event.clientY,o.right=this.event.clientX+"px";const a=["January","February","March","April","May","June","July","August","September","October","November","December"],i=[];let t=this.startYear;const n=this.endYear;for(;t<=n;)i.push(t++);const l=e.querySelector(".month-list");i.forEach(((e,o)=>{const a=document.createElement("div");a.innerHTML=`<div data-month="${o}" id="year${o}" class="idd${e}">${e}</div>`;let i=(new Date).getFullYear();i+=1,e===i&&(document.getElementById("year"+(o-1)).classList.add("theme-background"),document.getElementById("year"+(o-1)).style.color="white"),a.querySelector("div").onclick=()=>{l.classList.remove("show"),s.value=e,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.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 c="";if(""===this.preValue)c=new Date;else{const e=this.preValue.split("-");c=new Date(e[2],e[1]-1,e[0])}const r={value:c.getMonth()},s={value:c.getFullYear()};this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.value);const m=document.querySelector(".calendar");340===m.offsetHeight||(m.style.marginTop="0px"),document.querySelector("#prev-year").onclick=()=>{"January"===a[r.value]?(r.value=11,--s.value):--r.value,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.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[r.value]?(r.value=0,++s.value):++r.value,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.value),340===e.offsetHeight||(e.style.marginTop="0")};document.querySelectorAll(".disable-weekend").forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()}))}))},methods:{log(e){console.log(e.target.innerHTML,"inner html"),""!==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))},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,o){console.log(e,o,"jui");const a=document.querySelector(".calendar"),i=a.querySelector(".calendar-days"),t=a.querySelector("#year"),n=[31,this.getFebDays(o),31,30,31,30,31,31,30,31,30,31];i.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])}o||(o=l.getFullYear());const c=`${this.monthNames[this.dateFormatLanguage][e]}`;a.querySelector("#month-picker").innerHTML=c,t.innerHTML=o;const r=new Date(o,e,1);for(let a=0;a<=n[e]+r.getDay()-1;a++){const t=document.createElement("div");if(a>=r.getDay()){t.classList.add("calendar-day-hover");const i=a-r.getDay()+1;if(i>0&&i<=n[e]){const a=`${i}-${e+1}-${o}`;t.classList.add(a),console.log("fkoko",a),t.id="calender-day",this.holidayList.includes(a)&&(t.classList.remove("calendar-day-hover"),t.classList.add("disable-weekend")),t.innerHTML=i,i===l.getDate()&&o===l.getFullYear()&&e===l.getMonth()&&t.classList.add("curr-date")}}i.appendChild(t)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,o=[0,6,7,13,14,20,21,27,28,34,35];for(const a in o)e[o[a]]&&""!==e[o[a]].innerHTML&&(e[o[a]].classList.remove("calendar-day-hover"),e[o[a]].classList.add("disable-weekend"))}}}};const X={class:"light"},Y={class:"calendar"},$=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),_={class:"calendar-body"},ee={class:"calendar-week-day"},oe=e.createElementVNode("div",{class:"month-list"},null,-1);Z.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",Y,[$,e.createElementVNode("div",_,[e.createElementVNode("div",ee,[e.createElementVNode("div",null,[e.createCommentVNode(" SUN "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].sun),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" MON "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].mon),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" TUE "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].tue),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" WED "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].wed),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" THU "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].thu),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" FRI "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].fri),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" SAT "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].sat),1)])]),e.createElementVNode("div",{class:"calendar-days",onClick:a[0]||(a[0]=(...e)=>l.log&&l.log(...e))})]),e.createCommentVNode(' <div class="calendar-footer">\r\n\r\n </div> '),oe])])},Z.__file="src/components/CalendarComponent.vue";var ae={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 ie={key:0,class:"card-title"},te={key:1,class:"card-footer"};ae.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{cardhover:i.hover,cardshadow:i.shadow,padding:i.padding,cardActive:i.active}]),style:e.normalizeStyle("width:"+i.width+"px; height:"+i.height+"px;")},[1==i.cardTitle?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("header",null,[e.renderSlot(o.$slots,"card-title",{},(()=>[e.createTextVNode("Card title")]))])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"card-body",style:e.normalizeStyle(i.cardTitle&&i.cardFooter?{height:i.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[e.createCommentVNode(" {{this.card_body}} "),e.createElementVNode("main",null,[e.renderSlot(o.$slots,"card-body",{},(()=>[e.createTextVNode("Card body")]))])],4),1==i.cardFooter?(e.openBlock(),e.createElementBlock("div",te,[e.createCommentVNode(" {{this.cardFooter}} "),e.createElementVNode("footer",null,[e.renderSlot(o.$slots,"card-footer",{},(()=>[e.createTextVNode("Card footer")]))])])):e.createCommentVNode("v-if",!0)],6)},ae.__file="src/components/CardsComponent.vue";var ne={name:"HlxOverlay",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:Math.floor(1e3*Math.random()+1),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){console.log(e),this.$emit("close-overlay",e)}}};const le=["id"];ne.render=function(o,a,i,t,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:"+i.width+"px","top:"+n.containertop+"px","left:"+i.left+"px"]])},[e.renderSlot(o.$slots,"overlay")],12,le)])},ne.__file="src/components/OverlayComponent.vue";var ce={name:"HlxColorPalette",components:{hlxOverlay:ne},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Math.floor(1e3*Math.random()+1),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 o=0;o<Object.values(this.colordata[e])[0].length;o++);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})),console.log(this.containerleft,"left",this.containertop,"top"),!1===this.colorcontainer?this.colorcontainer=!0:!0===this.colorcontainer&&(this.colorcontainer=!1)},colorpicker(){this.colorpick=!0}}};const re={class:"color-palette-container"},se={class:"color-palette-icon"},me={key:0,class:"icon-palette-regular"},de={key:1,class:"highlight-container"},ue={key:0,class:"highlight-icon"},fe=["id"],pe=[e.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)],he=["id"],ge=e.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1),be={class:"color-container-specific-color"},Ae={class:"color-container-specific-color1"},ye=e.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1),ve={class:"color-container-specific-color"},ke={class:"color-container2323"},Ce=["value"],we={key:0,class:"color-container-title"},Ee={class:"color-container-specific-color2"};ce.render=function(o,a,i,t,n,l){const c=e.resolveComponent("hlx-overlay");return e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("div",se,[1==n.fill_color?(e.openBlock(),e.createElementBlock("i",me)):e.createCommentVNode("v-if",!0),!0===i.highlightColor?(e.openBlock(),e.createElementBlock("div",de,[!0===i.highlightColor?(e.openBlock(),e.createElementBlock("p",ue,"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))},[...pe],8,fe),n.colorcontainer?(e.openBlock(),e.createBlock(c,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:o.onClose},{overlay:e.withCtx((()=>[e.createElementVNode("button",{id:"color-container"+n.unique,class:"color-container"},[ge,e.createElementVNode("button",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i])[0]})},null,4)])))),128))]),e.createElementVNode("button",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i])[0].length,((o,a)=>(e.openBlock(),e.createElementBlock("button",{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[i])[0][a]})},null,4)])))),128))])))),128))]),ye,e.createElementVNode("button",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.standardcolor,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i]})},null,4)])))),128))]),e.createElementVNode("button",ke,[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,Ce),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",we,"Recent color")):e.createCommentVNode("v-if",!0),e.createElementVNode("button",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.recentcolor,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i]})},null,4)])))),128))])],8,he)])),_:1},8,["show","top","left","onCloseOverlay"])):e.createCommentVNode("v-if",!0)])},ce.__file="src/components/ColorpaletteComponent.vue";var Se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Be={exports:{}};!function(e){var o=function(e){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,i={},t={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(o){return o instanceof n?new n(o.type,e(o.content),o.alias):Array.isArray(o)?o.map(e):o.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function e(o,a){var i,n;switch(a=a||{},t.util.type(o)){case"Object":if(n=t.util.objId(o),a[n])return a[n];for(var l in i={},a[n]=i,o)o.hasOwnProperty(l)&&(i[l]=e(o[l],a));return i;case"Array":return n=t.util.objId(o),a[n]?a[n]:(i=[],a[n]=i,o.forEach((function(o,t){i[t]=e(o,a)})),i);default:return o}},getLanguage:function(e){for(;e;){var a=o.exec(e.className);if(a)return a[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,a){e.className=e.className.replace(RegExp(o,"gi"),""),e.classList.add("language-"+a)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(e){var o=document.getElementsByTagName("script");for(var a in o)if(o[a].src==e)return o[a]}return null}},isActive:function(e,o,a){for(var i="no-"+o;e;){var t=e.classList;if(t.contains(o))return!0;if(t.contains(i))return!1;e=e.parentElement}return!!a}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(e,o){var a=t.util.clone(t.languages[e]);for(var i in o)a[i]=o[i];return a},insertBefore:function(e,o,a,i){var n=(i=i||t.languages)[e],l={};for(var c in n)if(n.hasOwnProperty(c)){if(c==o)for(var r in a)a.hasOwnProperty(r)&&(l[r]=a[r]);a.hasOwnProperty(c)||(l[c]=n[c])}var s=i[e];return i[e]=l,t.languages.DFS(t.languages,(function(o,a){a===s&&o!=e&&(this[o]=l)})),l},DFS:function e(o,a,i,n){n=n||{};var l=t.util.objId;for(var c in o)if(o.hasOwnProperty(c)){a.call(o,c,o[c],i||c);var r=o[c],s=t.util.type(r);"Object"!==s||n[l(r)]?"Array"!==s||n[l(r)]||(n[l(r)]=!0,e(r,a,c,n)):(n[l(r)]=!0,e(r,a,null,n))}}},plugins:{},highlightAll:function(e,o){t.highlightAllUnder(document,e,o)},highlightAllUnder:function(e,o,a){var i={callback:a,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};t.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),t.hooks.run("before-all-elements-highlight",i);for(var n,l=0;n=i.elements[l++];)t.highlightElement(n,!0===o,i.callback)},highlightElement:function(o,a,i){var n=t.util.getLanguage(o),l=t.languages[n];t.util.setLanguage(o,n);var c=o.parentElement;c&&"pre"===c.nodeName.toLowerCase()&&t.util.setLanguage(c,n);var r={element:o,language:n,grammar:l,code:o.textContent};function s(e){r.highlightedCode=e,t.hooks.run("before-insert",r),r.element.innerHTML=r.highlightedCode,t.hooks.run("after-highlight",r),t.hooks.run("complete",r),i&&i.call(r.element)}if(t.hooks.run("before-sanity-check",r),(c=r.element.parentElement)&&"pre"===c.nodeName.toLowerCase()&&!c.hasAttribute("tabindex")&&c.setAttribute("tabindex","0"),!r.code)return t.hooks.run("complete",r),void(i&&i.call(r.element));if(t.hooks.run("before-highlight",r),r.grammar)if(a&&e.Worker){var m=new Worker(t.filename);m.onmessage=function(e){s(e.data)},m.postMessage(JSON.stringify({language:r.language,code:r.code,immediateClose:!0}))}else s(t.highlight(r.code,r.grammar,r.language));else s(t.util.encode(r.code))},highlight:function(e,o,a){var i={code:e,grammar:o,language:a};if(t.hooks.run("before-tokenize",i),!i.grammar)throw new Error('The language "'+i.language+'" has no grammar.');return i.tokens=t.tokenize(i.code,i.grammar),t.hooks.run("after-tokenize",i),n.stringify(t.util.encode(i.tokens),i.language)},tokenize:function(e,o){var a=o.rest;if(a){for(var i in a)o[i]=a[i];delete o.rest}var t=new r;return s(t,t.head,e),c(e,t,o,t.head,0),function(e){var o=[],a=e.head.next;for(;a!==e.tail;)o.push(a.value),a=a.next;return o}(t)},hooks:{all:{},add:function(e,o){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(o)},run:function(e,o){var a=t.hooks.all[e];if(a&&a.length)for(var i,n=0;i=a[n++];)i(o)}},Token:n};function n(e,o,a,i){this.type=e,this.content=o,this.alias=a,this.length=0|(i||"").length}function l(e,o,a,i){e.lastIndex=o;var t=e.exec(a);if(t&&i&&t[1]){var n=t[1].length;t.index+=n,t[0]=t[0].slice(n)}return t}function c(e,o,a,i,r,d){for(var u in a)if(a.hasOwnProperty(u)&&a[u]){var f=a[u];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(d&&d.cause==u+","+p)return;var h=f[p],g=h.inside,b=!!h.lookbehind,A=!!h.greedy,y=h.alias;if(A&&!h.pattern.global){var v=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}for(var k=h.pattern||h,C=i.next,w=r;C!==o.tail&&!(d&&w>=d.reach);w+=C.value.length,C=C.next){var E=C.value;if(o.length>e.length)return;if(!(E instanceof n)){var S,B=1;if(A){if(!(S=l(k,w,e,b))||S.index>=e.length)break;var V=S.index,N=S.index+S[0].length,I=w;for(I+=C.value.length;V>=I;)I+=(C=C.next).value.length;if(w=I-=C.value.length,C.value instanceof n)continue;for(var x=C;x!==o.tail&&(I<N||"string"==typeof x.value);x=x.next)B++,I+=x.value.length;B--,E=e.slice(w,I),S.index-=w}else if(!(S=l(k,0,E,b)))continue;V=S.index;var M=S[0],R=E.slice(0,V),T=E.slice(V+M.length),D=w+E.length;d&&D>d.reach&&(d.reach=D);var q=C.prev;if(R&&(q=s(o,q,R),w+=R.length),m(o,q,B),C=s(o,q,new n(u,g?t.tokenize(M,g):M,y,M)),T&&s(o,C,T),B>1){var z={cause:u+","+p,reach:D};c(e,o,a,C.prev,w,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function r(){var e={value:null,prev:null,next:null},o={value:null,prev:e,next:null};e.next=o,this.head=e,this.tail=o,this.length=0}function s(e,o,a){var i=o.next,t={value:a,prev:o,next:i};return o.next=t,i.prev=t,e.length++,t}function m(e,o,a){for(var i=o.next,t=0;t<a&&i!==e.tail;t++)i=i.next;o.next=i,i.prev=o,e.length-=t}if(e.Prism=t,n.stringify=function e(o,a){if("string"==typeof o)return o;if(Array.isArray(o)){var i="";return o.forEach((function(o){i+=e(o,a)})),i}var n={type:o.type,content:e(o.content,a),tag:"span",classes:["token",o.type],attributes:{},language:a},l=o.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(n.classes,l):n.classes.push(l)),t.hooks.run("wrap",n);var c="";for(var r in n.attributes)c+=" "+r+'="'+(n.attributes[r]||"").replace(/"/g,""")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+c+">"+n.content+"</"+n.tag+">"},!e.document)return e.addEventListener?(t.disableWorkerMessageHandler||e.addEventListener("message",(function(o){var a=JSON.parse(o.data),i=a.language,n=a.code,l=a.immediateClose;e.postMessage(t.highlight(n,t.languages[i],i)),l&&e.close()}),!1),t):t;var d=t.util.currentScript();function u(){t.manual||t.highlightAll()}if(d&&(t.filename=d.src,d.hasAttribute("data-manual")&&(t.manual=!0)),!t.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return t}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("vue"),o=require("textarea-caret"),a=require("vue-prism-editor"),i=require("js-beautify"),t=require("vue-draggable-next"),n=require("vue3-apexcharts"),l=require("vue3-country-flag-icon");require("vue3-country-flag-icon/dist/CountryFlag.css");var c=require("chart.js"),r=require("chartjs-chart-geo"),s=require("vue3-click-away");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var o=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(o,a,i.get?i:{enumerable:!0,get:function(){return e[a]}})}})),o.default=e,Object.freeze(o)}var u=m(o),f=m(i),p=m(n),h=m(l),g=d(r),b={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:Math.floor(1e3*Math.random()+1)}),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,o,a){0==a?"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).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-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(0==this.headerBorder&&(document.querySelectorAll(".accordion-header").forEach((e=>{e.classList.remove("noo-border")})),document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border")),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose")):"right icon-angle-right-regular"===document.querySelector("#arrow-"+o).className?(0==this.headerBorder&&document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.add("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-right-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-down-regular"),document.querySelector("#content-"+o).style.display="flex",this.$emit("accordionopen")):"right icon-angle-down-regular"===document.querySelector("#arrow-"+o).className&&(document.querySelector("#header-"+o)&&document.querySelector("#header-"+o).classList.remove("noo-border"),document.querySelector("#arrow-"+o).classList.remove("icon-angle-down-regular"),document.querySelector("#arrow-"+o).classList.add("icon-angle-right-regular"),document.querySelector("#content-"+o).style.display="none",this.$emit("accordionclose"))}}};const A=["id","multiple"],y=["id"],v={key:0,style:{display:"flex"}},k=["id"],C={style:{width:"100%"}},w={key:1,style:{display:"flex"}},E=["id"],S=["id"];b.render=function(o,a,i,t,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:i.multiple},[e.createElementVNode("div",{id:["header-"+n.unique],class:"accordion-header",onClick:a[0]||(a[0]=e=>l.toggleView(e,n.unique,i.multiple))},["left"==i.direction?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,k)])):e.createCommentVNode("v-if",!0),e.createElementVNode("header",C,[e.renderSlot(o.$slots,"item-title")]),"right"==i.direction?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("i",{id:["arrow-"+n.unique],class:"right icon-angle-right-regular"},null,8,E)])):e.createCommentVNode("v-if",!0)],8,y),e.createElementVNode("div",{id:["content-"+n.unique],class:"accordion-content"},[e.renderSlot(o.$slots,"item-body")],8,S)],8,A)),e.createCommentVNode(" </div> ")],2112)},b.__file="src/components/AccordionComponent.vue";var B={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 o=Math.floor(65536*(1+Math.random())).toString(16).substring(1);Object.keys(e).length>0&&this.push({...e,id:o})},immediate:!0,deep:!0}},methods:{getClass:e=>e?.type?"alert-"+e?.type.toLowerCase():"alert-success",closeAlert(e){this.$refs["hlx-alert-"+e][0]?.classList.add("close"),setTimeout((()=>{this.notifications=this.notifications.filter((o=>o.id&&o.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 V={key:0,class:"hlx-alert-wrapper"},N=["id"],I={class:"icon"},x={class:"text"},M={class:"alert-description"},R=["onClick"],T=[e.createElementVNode("i",{class:"icon-times-filled"},null,-1)];B.render=function(o,a,i,t,n,l){return e.openBlock(),e.createBlock(e.Teleport,{to:"body",class:"alert-not"},[n.notifications.length>0?(e.openBlock(),e.createElementBlock("section",V,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.notifications,(o=>(e.openBlock(),e.createElementBlock("div",{id:"alert"+o.id,ref_for:!0,ref:"hlx-alert-"+o.id,key:o,class:e.normalizeClass(["hlx alert",l.getClass(o)])},[e.createElementVNode("span",I,[e.createElementVNode("i",{class:e.normalizeClass(l.icon(o.type))},null,2)]),e.createElementVNode("div",x,[e.createElementVNode("p",M,e.toDisplayString(o.message),1)]),e.createElementVNode("button",{class:"close","aria-label":"close",onClick:e=>l.closeAlert(o.id)},[...T],8,R)],10,N)))),128))])):e.createCommentVNode("v-if",!0)])},B.__file="src/components/AlertComponent.vue";var D={name:"HlxBadge",props:{icon:{type:String,default:""},count:{type:Number,default:0}}};const q=["aria-label"],z={class:"icon-button__badge",style:{"font-size":"10px"}};D.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("button",{id:"badge",type:"button",class:"icon-button","aria-label":i.icon},[e.createElementVNode("span",{class:e.normalizeClass(i.icon)},null,2),e.createElementVNode("span",z,e.toDisplayString(i.count),1)],8,q)},D.__file="src/components/BadgeComponent.vue";var L={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:Math.floor(1e3*Math.random()+1)}),computed:{isIconSeparator(){return"object"==typeof this.separator}},methods:{current(e){!0===this.autoRoute&&this.$router.back(),this.$emit("path",e)},tooltipover(e,o){let a=e,i=o;this.ellipsis(a,i)},tooltipleave(e,o){let a=e,i=o;this.ellipses(a,i)},ellipsis(e,o){console.log(e,o),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("."+o);console.log(a.getBoundingClientRect().top);let i=a.getBoundingClientRect().top,t=a.getBoundingClientRect().left+77;return e.style.display="block",e.style.top=i+"px",e.style.left=t+"px",!0}return!1}}))},ellipses(e,o){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("."+o).style.display="none",!0}return!1}}))}}};const O={class:"breadcrumb","aria-label":"Breadcrumb"},P={key:0},U=["onClick"],F=["id","onMouseover","onMouseleave"],K=["id","onMouseover","onMouseleave"],j={key:3,class:"breadcrumb-separator"},H={key:1},G=e.createElementVNode("i",{style:{"font-weight":"800"},class:"icon-arrow-left-regular"},null,-1);L.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("nav",O,["Pathway-breadcrumb"===i.type?(e.openBlock(),e.createElementBlock("ul",P,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,((o,a)=>(e.openBlock(),e.createElementBlock("li",{key:a,onClick:e=>l.current(o)},[null!=o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(o.icon)},null,2)):e.createCommentVNode("v-if",!0),a===i.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(o.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+a+n.unique)},e.toDisplayString(o.label),3)],40,F)):(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(o.label)+" ",1),e.createElementVNode("p",{id:"tooltip-text1",class:e.normalizeClass("tooltip-textbreadcrumb"+n.unique+a)},e.toDisplayString(o.label),3)],40,K)),e.createCommentVNode(' <router-link :to="item.link" :class="{ disabled: index === items.length - 1 } " >{{ item.label }}</router-link> '),a<i.items.length-1?(e.openBlock(),e.createElementBlock("span",j,[l.isIconSeparator?(e.openBlock(),e.createElementBlock("i",{key:0,"aria-hidden":"true",class:e.normalizeClass(i.separator.icon)},null,2)):(e.openBlock(),e.createElementBlock("span",H,e.toDisplayString(i.separator),1))])):e.createCommentVNode("v-if",!0)],8,U)))),128))])):e.createCommentVNode("v-if",!0),"back-breadcrumb"===i.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"))},[G,e.createElementVNode("p",null,e.toDisplayString(i.labelValue),1)])):e.createCommentVNode("v-if",!0)])},L.__file="src/components/BreadcrumbComponent.vue";var Q={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 W=["value","type","name","aria-label"],J=["aria-label","href","target"];Q.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("button",{id:"hlx-button-0009",ref:"hlx-button",value:i.value,type:i.type,name:i.name,class:e.normalizeClass([l.primaryClass,"hlx-button"]),"aria-label":i.label,onClick:a[0]||(a[0]=(...e)=>l.clicked&&l.clicked(...e))},[e.renderSlot(o.$slots,"default"),null!=i.href?(e.openBlock(),e.createElementBlock("a",{key:0,ref:"link-ele","aria-label":i.label,href:i.href,target:i.target},null,8,J)):e.createCommentVNode("v-if",!0)],10,W)},Q.__file="src/components/ButtonComponent.vue";var Z={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:{en:{sun:"SUN",mon:"MON",tue:"TUE",wed:"WED",thu:"THU",fri:"FRI",sat:"SAT"},es:{sun:"DOM",mon:"LUN",tue:"MAR",wed:"MIÉ",thu:"JUE",fri:"VIE",sat:"SÁB"},fr:{sun:"DIM",mon:"LUN",tue:"MAR",wed:"MER",thu:"JEU",fri:"VEN",sat:"SAM"},de:{sun:"SO",mon:"MO",tue:"DI",wed:"MI",thu:"DO",fri:"FR",sat:"SA"},ta:{sun:"ஞாயி",mon:"திங்கள்",tue:"செவ்வாய்",wed:"புதன்",thu:"வியாழன்",fri:"வெள்ளி",sat:"சனி"},hi:{sun:"रवि",mon:"सोम",tue:"मंगल",wed:"बुध",thu:"गुरु",fri:"शुक्र",sat:"शनि"},ja:{sun:"日",mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土"},zh:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},sw:{sun:"Jumapili",mon:"Jumatatu",tue:"Jumanne",wed:"Jumatano",thu:"Alhamisi",fri:"Ijumaa",sat:"Jumamosi"},ar:{sun:"أحد",mon:"اثنين",tue:"ثلاثاء",wed:"أربعاء",thu:"خميس",fri:"جمعة",sat:"سبت"},bn:{sun:"রবি",mon:"সোম",tue:"মঙ্গল",wed:"বুধ",thu:"বৃহস্পতি",fri:"শুক্র",sat:"শনি"},pt:{sun:"Dom",mon:"Seg",tue:"Ter",wed:"Qua",thu:"Qui",fri:"Sex",sat:"Sáb"},ru:{sun:"Вс",mon:"Пн",tue:"Вт",wed:"Ср",thu:"Чт",fri:"Пт",sat:"Сб"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],es:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],fr:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],de:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],ta:["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்"],hi:["जनवरी","फ़रवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितंबर","अक्टूबर","नवंबर","दिसंबर"],ja:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],zh:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],sw:["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Desemba"],ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],bn:["জানুয়ারি","ফেব্রুয়ারি","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর"],pt:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],ru:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]}}),async mounted(){console.log(this.event,"cal eve",this.dateFormatLanguage);const e=document.querySelector(".calendar"),o=document.querySelector(".light");e.clientY=this.event.clientY,o.right=this.event.clientX+"px";const a=["January","February","March","April","May","June","July","August","September","October","November","December"],i=[];let t=this.startYear;const n=this.endYear;for(;t<=n;)i.push(t++);const l=e.querySelector(".month-list");i.forEach(((e,o)=>{const a=document.createElement("div");a.innerHTML=`<div data-month="${o}" id="year${o}" class="idd${e}">${e}</div>`;let i=(new Date).getFullYear();i+=1,e===i&&(document.getElementById("year"+(o-1)).classList.add("theme-background"),document.getElementById("year"+(o-1)).style.color="white"),a.querySelector("div").onclick=()=>{l.classList.remove("show"),s.value=e,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.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 c="";if(""===this.preValue)c=new Date;else{const e=this.preValue.split("-");c=new Date(e[2],e[1]-1,e[0])}const r={value:c.getMonth()},s={value:c.getFullYear()};this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.value);const m=document.querySelector(".calendar");340===m.offsetHeight||(m.style.marginTop="0px"),document.querySelector("#prev-year").onclick=()=>{"January"===a[r.value]?(r.value=11,--s.value):--r.value,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.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[r.value]?(r.value=0,++s.value):++r.value,this.selectedMonth=r.value,this.selectedYear=s.value,this.generateCalendar(r.value,s.value),340===e.offsetHeight||(e.style.marginTop="0")};document.querySelectorAll(".disable-weekend").forEach((e=>{e.addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()}))}))},methods:{log(e){console.log(e.target.innerHTML,"inner html"),""!==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))},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,o){console.log(e,o,"jui");const a=document.querySelector(".calendar"),i=a.querySelector(".calendar-days"),t=a.querySelector("#year"),n=[31,this.getFebDays(o),31,30,31,30,31,31,30,31,30,31];i.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])}o||(o=l.getFullYear());const c=`${this.monthNames[this.dateFormatLanguage][e]}`;a.querySelector("#month-picker").innerHTML=c,t.innerHTML=o;const r=new Date(o,e,1);for(let a=0;a<=n[e]+r.getDay()-1;a++){const t=document.createElement("div");if(a>=r.getDay()){t.classList.add("calendar-day-hover");const i=a-r.getDay()+1;if(i>0&&i<=n[e]){const a=`${i}-${e+1}-${o}`;t.classList.add(a),console.log("fkoko",a),t.id="calender-day",this.holidayList.includes(a)&&(t.classList.remove("calendar-day-hover"),t.classList.add("disable-weekend")),t.innerHTML=i,i===l.getDate()&&o===l.getFullYear()&&e===l.getMonth()&&t.classList.add("curr-date")}}i.appendChild(t)}if(!0===this.disableWeekend){const e=document.querySelector(".calendar-days").children,o=[0,6,7,13,14,20,21,27,28,34,35];for(const a in o)e[o[a]]&&""!==e[o[a]].innerHTML&&(e[o[a]].classList.remove("calendar-day-hover"),e[o[a]].classList.add("disable-weekend"))}}}};const X={class:"light"},Y={class:"calendar"},$=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),_={class:"calendar-body"},ee={class:"calendar-week-day"},oe=e.createElementVNode("div",{class:"month-list"},null,-1);Z.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",Y,[$,e.createElementVNode("div",_,[e.createElementVNode("div",ee,[e.createElementVNode("div",null,[e.createCommentVNode(" SUN "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].sun),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" MON "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].mon),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" TUE "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].tue),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" WED "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].wed),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" THU "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].thu),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" FRI "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].fri),1)]),e.createElementVNode("div",null,[e.createCommentVNode(" SAT "),e.createTextVNode(" "+e.toDisplayString(n.staticDataDays[i.dateFormatLanguage].sat),1)])]),e.createElementVNode("div",{class:"calendar-days",onClick:a[0]||(a[0]=(...e)=>l.log&&l.log(...e))})]),e.createCommentVNode(' <div class="calendar-footer">\r\n\r\n </div> '),oe])])},Z.__file="src/components/CalendarComponent.vue";var ae={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 ie={key:0,class:"card-title"},te={key:1,class:"card-footer"};ae.render=function(o,a,i,t,n,l){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card",{cardhover:i.hover,cardshadow:i.shadow,padding:i.padding,cardActive:i.active}]),style:e.normalizeStyle("width:"+i.width+"px; height:"+i.height+"px;")},[1==i.cardTitle?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("header",null,[e.renderSlot(o.$slots,"card-title",{},(()=>[e.createTextVNode("Card title")]))])])):e.createCommentVNode("v-if",!0),e.createElementVNode("div",{class:"card-body",style:e.normalizeStyle(i.cardTitle&&i.cardFooter?{height:i.height-l.headerHeight-l.footerHeight+"px"}:{height:"100%"})},[e.createCommentVNode(" {{this.card_body}} "),e.createElementVNode("main",null,[e.renderSlot(o.$slots,"card-body",{},(()=>[e.createTextVNode("Card body")]))])],4),1==i.cardFooter?(e.openBlock(),e.createElementBlock("div",te,[e.createCommentVNode(" {{this.cardFooter}} "),e.createElementVNode("footer",null,[e.renderSlot(o.$slots,"card-footer",{},(()=>[e.createTextVNode("Card footer")]))])])):e.createCommentVNode("v-if",!0)],6)},ae.__file="src/components/CardsComponent.vue";var ne={name:"HlxOverlay",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:Math.floor(1e3*Math.random()+1),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){console.log(e),this.$emit("close-overlay",e)}}};const le=["id"];ne.render=function(o,a,i,t,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:"+i.width+"px","top:"+n.containertop+"px","left:"+i.left+"px"]])},[e.renderSlot(o.$slots,"overlay")],12,le)])},ne.__file="src/components/OverlayComponent.vue";var ce={name:"HlxColorPalette",components:{hlxOverlay:ne},props:{preValue:{type:String,default:"#000000"},highlightColor:{type:Boolean,default:!1}},emits:["customChange"],data:()=>({containerleft:0,containertop:0,unique:Math.floor(1e3*Math.random()+1),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 o=0;o<Object.values(this.colordata[e])[0].length;o++);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})),console.log(this.containerleft,"left",this.containertop,"top"),!1===this.colorcontainer?this.colorcontainer=!0:!0===this.colorcontainer&&(this.colorcontainer=!1)},colorpicker(){this.colorpick=!0}}};const re={class:"color-palette-container"},se={class:"color-palette-icon"},me={key:0,class:"icon-palette-regular"},de={key:1,class:"highlight-container"},ue={key:0,class:"highlight-icon"},fe=["id"],pe=[e.createElementVNode("i",{class:"icon-angle-down-regular"},null,-1)],he=["id"],ge=e.createElementVNode("p",{class:"color-container-title"},"Theme Colors",-1),be={class:"color-container-specific-color"},Ae={class:"color-container-specific-color1"},ye=e.createElementVNode("p",{class:"color-container-title"},"Standard Colors",-1),ve={class:"color-container-specific-color"},ke={class:"color-container2323"},Ce=["value"],we={key:0,class:"color-container-title"},Ee={class:"color-container-specific-color2"};ce.render=function(o,a,i,t,n,l){const c=e.resolveComponent("hlx-overlay");return e.openBlock(),e.createElementBlock("div",re,[e.createElementVNode("div",se,[1==n.fill_color?(e.openBlock(),e.createElementBlock("i",me)):e.createCommentVNode("v-if",!0),!0===i.highlightColor?(e.openBlock(),e.createElementBlock("div",de,[!0===i.highlightColor?(e.openBlock(),e.createElementBlock("p",ue,"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))},[...pe],8,fe),n.colorcontainer?(e.openBlock(),e.createBlock(c,{key:0,show:n.colorcontainer,top:n.containertop,left:n.containerleft,width:100,conditionvalue:150,conditionup:55,onCloseOverlay:o.onClose},{overlay:e.withCtx((()=>[e.createElementVNode("button",{id:"color-container"+n.unique,class:"color-container"},[ge,e.createElementVNode("button",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i])[0]})},null,4)])))),128))]),e.createElementVNode("button",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.colordata,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i])[0].length,((o,a)=>(e.openBlock(),e.createElementBlock("button",{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[i])[0][a]})},null,4)])))),128))])))),128))]),ye,e.createElementVNode("button",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.standardcolor,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i]})},null,4)])))),128))]),e.createElementVNode("button",ke,[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,Ce),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",we,"Recent color")):e.createCommentVNode("v-if",!0),e.createElementVNode("button",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.recentcolor,((o,i)=>(e.openBlock(),e.createElementBlock("button",{key:i,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[i]})},null,4)])))),128))])],8,he)])),_:1},8,["show","top","left","onCloseOverlay"])):e.createCommentVNode("v-if",!0)])},ce.__file="src/components/ColorpaletteComponent.vue";var Se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Be={exports:{}};!function(e){var o=function(e){var o=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,i={},t={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(o){return o instanceof n?new n(o.type,e(o.content),o.alias):Array.isArray(o)?o.map(e):o.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function e(o,a){var i,n;switch(a=a||{},t.util.type(o)){case"Object":if(n=t.util.objId(o),a[n])return a[n];for(var l in i={},a[n]=i,o)o.hasOwnProperty(l)&&(i[l]=e(o[l],a));return i;case"Array":return n=t.util.objId(o),a[n]?a[n]:(i=[],a[n]=i,o.forEach((function(o,t){i[t]=e(o,a)})),i);default:return o}},getLanguage:function(e){for(;e;){var a=o.exec(e.className);if(a)return a[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,a){e.className=e.className.replace(RegExp(o,"gi"),""),e.classList.add("language-"+a)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(i){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(i.stack)||[])[1];if(e){var o=document.getElementsByTagName("script");for(var a in o)if(o[a].src==e)return o[a]}return null}},isActive:function(e,o,a){for(var i="no-"+o;e;){var t=e.classList;if(t.contains(o))return!0;if(t.contains(i))return!1;e=e.parentElement}return!!a}},languages:{plain:i,plaintext:i,text:i,txt:i,extend:function(e,o){var a=t.util.clone(t.languages[e]);for(var i in o)a[i]=o[i];return a},insertBefore:function(e,o,a,i){var n=(i=i||t.languages)[e],l={};for(var c in n)if(n.hasOwnProperty(c)){if(c==o)for(var r in a)a.hasOwnProperty(r)&&(l[r]=a[r]);a.hasOwnProperty(c)||(l[c]=n[c])}var s=i[e];return i[e]=l,t.languages.DFS(t.languages,(function(o,a){a===s&&o!=e&&(this[o]=l)})),l},DFS:function e(o,a,i,n){n=n||{};var l=t.util.objId;for(var c in o)if(o.hasOwnProperty(c)){a.call(o,c,o[c],i||c);var r=o[c],s=t.util.type(r);"Object"!==s||n[l(r)]?"Array"!==s||n[l(r)]||(n[l(r)]=!0,e(r,a,c,n)):(n[l(r)]=!0,e(r,a,null,n))}}},plugins:{},highlightAll:function(e,o){t.highlightAllUnder(document,e,o)},highlightAllUnder:function(e,o,a){var i={callback:a,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};t.hooks.run("before-highlightall",i),i.elements=Array.prototype.slice.apply(i.container.querySelectorAll(i.selector)),t.hooks.run("before-all-elements-highlight",i);for(var n,l=0;n=i.elements[l++];)t.highlightElement(n,!0===o,i.callback)},highlightElement:function(o,a,i){var n=t.util.getLanguage(o),l=t.languages[n];t.util.setLanguage(o,n);var c=o.parentElement;c&&"pre"===c.nodeName.toLowerCase()&&t.util.setLanguage(c,n);var r={element:o,language:n,grammar:l,code:o.textContent};function s(e){r.highlightedCode=e,t.hooks.run("before-insert",r),r.element.innerHTML=r.highlightedCode,t.hooks.run("after-highlight",r),t.hooks.run("complete",r),i&&i.call(r.element)}if(t.hooks.run("before-sanity-check",r),(c=r.element.parentElement)&&"pre"===c.nodeName.toLowerCase()&&!c.hasAttribute("tabindex")&&c.setAttribute("tabindex","0"),!r.code)return t.hooks.run("complete",r),void(i&&i.call(r.element));if(t.hooks.run("before-highlight",r),r.grammar)if(a&&e.Worker){var m=new Worker(t.filename);m.onmessage=function(e){s(e.data)},m.postMessage(JSON.stringify({language:r.language,code:r.code,immediateClose:!0}))}else s(t.highlight(r.code,r.grammar,r.language));else s(t.util.encode(r.code))},highlight:function(e,o,a){var i={code:e,grammar:o,language:a};if(t.hooks.run("before-tokenize",i),!i.grammar)throw new Error('The language "'+i.language+'" has no grammar.');return i.tokens=t.tokenize(i.code,i.grammar),t.hooks.run("after-tokenize",i),n.stringify(t.util.encode(i.tokens),i.language)},tokenize:function(e,o){var a=o.rest;if(a){for(var i in a)o[i]=a[i];delete o.rest}var t=new r;return s(t,t.head,e),c(e,t,o,t.head,0),function(e){var o=[],a=e.head.next;for(;a!==e.tail;)o.push(a.value),a=a.next;return o}(t)},hooks:{all:{},add:function(e,o){var a=t.hooks.all;a[e]=a[e]||[],a[e].push(o)},run:function(e,o){var a=t.hooks.all[e];if(a&&a.length)for(var i,n=0;i=a[n++];)i(o)}},Token:n};function n(e,o,a,i){this.type=e,this.content=o,this.alias=a,this.length=0|(i||"").length}function l(e,o,a,i){e.lastIndex=o;var t=e.exec(a);if(t&&i&&t[1]){var n=t[1].length;t.index+=n,t[0]=t[0].slice(n)}return t}function c(e,o,a,i,r,d){for(var u in a)if(a.hasOwnProperty(u)&&a[u]){var f=a[u];f=Array.isArray(f)?f:[f];for(var p=0;p<f.length;++p){if(d&&d.cause==u+","+p)return;var h=f[p],g=h.inside,b=!!h.lookbehind,A=!!h.greedy,y=h.alias;if(A&&!h.pattern.global){var v=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}for(var k=h.pattern||h,C=i.next,w=r;C!==o.tail&&!(d&&w>=d.reach);w+=C.value.length,C=C.next){var E=C.value;if(o.length>e.length)return;if(!(E instanceof n)){var S,B=1;if(A){if(!(S=l(k,w,e,b))||S.index>=e.length)break;var V=S.index,N=S.index+S[0].length,I=w;for(I+=C.value.length;V>=I;)I+=(C=C.next).value.length;if(w=I-=C.value.length,C.value instanceof n)continue;for(var x=C;x!==o.tail&&(I<N||"string"==typeof x.value);x=x.next)B++,I+=x.value.length;B--,E=e.slice(w,I),S.index-=w}else if(!(S=l(k,0,E,b)))continue;V=S.index;var M=S[0],R=E.slice(0,V),T=E.slice(V+M.length),D=w+E.length;d&&D>d.reach&&(d.reach=D);var q=C.prev;if(R&&(q=s(o,q,R),w+=R.length),m(o,q,B),C=s(o,q,new n(u,g?t.tokenize(M,g):M,y,M)),T&&s(o,C,T),B>1){var z={cause:u+","+p,reach:D};c(e,o,a,C.prev,w,z),d&&z.reach>d.reach&&(d.reach=z.reach)}}}}}}function r(){var e={value:null,prev:null,next:null},o={value:null,prev:e,next:null};e.next=o,this.head=e,this.tail=o,this.length=0}function s(e,o,a){var i=o.next,t={value:a,prev:o,next:i};return o.next=t,i.prev=t,e.length++,t}function m(e,o,a){for(var i=o.next,t=0;t<a&&i!==e.tail;t++)i=i.next;o.next=i,i.prev=o,e.length-=t}if(e.Prism=t,n.stringify=function e(o,a){if("string"==typeof o)return o;if(Array.isArray(o)){var i="";return o.forEach((function(o){i+=e(o,a)})),i}var n={type:o.type,content:e(o.content,a),tag:"span",classes:["token",o.type],attributes:{},language:a},l=o.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(n.classes,l):n.classes.push(l)),t.hooks.run("wrap",n);var c="";for(var r in n.attributes)c+=" "+r+'="'+(n.attributes[r]||"").replace(/"/g,""")+'"';return"<"+n.tag+' class="'+n.classes.join(" ")+'"'+c+">"+n.content+"</"+n.tag+">"},!e.document)return e.addEventListener?(t.disableWorkerMessageHandler||e.addEventListener("message",(function(o){var a=JSON.parse(o.data),i=a.language,n=a.code,l=a.immediateClose;e.postMessage(t.highlight(n,t.languages[i],i)),l&&e.close()}),!1),t):t;var d=t.util.currentScript();function u(){t.manual||t.highlightAll()}if(d&&(t.filename=d.src,d.hasAttribute("data-manual")&&(t.manual=!0)),!t.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",u):window.requestAnimationFrame?window.requestAnimationFrame(u):window.setTimeout(u,16)}return t}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
2
2
|
/**
|
|
3
3
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
4
4
|
*
|