File manager - Edit - /home/met-r-devuser/htdocs/devuser.met-r.io/js/app.a5915b72.js
Back
(function(t){function e(e){for(var a,r,n=e[0],c=e[1],l=e[2],d=0,u=[];d<n.length;d++)r=n[d],Object.prototype.hasOwnProperty.call(o,r)&&o[r]&&u.push(o[r][0]),o[r]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);m&&m(e);while(u.length)u.shift()();return i.push.apply(i,l||[]),s()}function s(){for(var t,e=0;e<i.length;e++){for(var s=i[e],a=!0,r=1;r<s.length;r++){var n=s[r];0!==o[n]&&(a=!1)}a&&(i.splice(e--,1),t=c(c.s=s[0]))}return t}var a={},r={app:0},o={app:0},i=[];function n(t){return c.p+"js/"+({404:"404"}[t]||t)+"."+{404:"d65444a0","chunk-456005ef":"3e6515a5","chunk-6a0c29e7":"cd65225f"}[t]+".js"}function c(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,c),s.l=!0,s.exports}c.e=function(t){var e=[],s={"chunk-456005ef":1,"chunk-6a0c29e7":1};r[t]?e.push(r[t]):0!==r[t]&&s[t]&&e.push(r[t]=new Promise((function(e,s){for(var a="css/"+({404:"404"}[t]||t)+"."+{404:"31d6cfe0","chunk-456005ef":"6dda502a","chunk-6a0c29e7":"942f70d5"}[t]+".css",o=c.p+a,i=document.getElementsByTagName("link"),n=0;n<i.length;n++){var l=i[n],d=l.getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(d===a||d===o))return e()}var u=document.getElementsByTagName("style");for(n=0;n<u.length;n++){l=u[n],d=l.getAttribute("data-href");if(d===a||d===o)return e()}var m=document.createElement("link");m.rel="stylesheet",m.type="text/css",m.onload=e,m.onerror=function(e){var a=e&&e.target&&e.target.src||o,i=new Error("Loading CSS chunk "+t+" failed.\n("+a+")");i.code="CSS_CHUNK_LOAD_FAILED",i.request=a,delete r[t],m.parentNode.removeChild(m),s(i)},m.href=o;var h=document.getElementsByTagName("head")[0];h.appendChild(m)})).then((function(){r[t]=0})));var a=o[t];if(0!==a)if(a)e.push(a[2]);else{var i=new Promise((function(e,s){a=o[t]=[e,s]}));e.push(a[2]=i);var l,d=document.createElement("script");d.charset="utf-8",d.timeout=120,c.nc&&d.setAttribute("nonce",c.nc),d.src=n(t);var u=new Error;l=function(e){d.onerror=d.onload=null,clearTimeout(m);var s=o[t];if(0!==s){if(s){var a=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+r+")",u.name="ChunkLoadError",u.type=a,u.request=r,s[1](u)}o[t]=void 0}};var m=setTimeout((function(){l({type:"timeout",target:d})}),12e4);d.onerror=d.onload=l,document.head.appendChild(d)}return Promise.all(e)},c.m=t,c.c=a,c.d=function(t,e,s){c.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},c.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},c.t=function(t,e){if(1&e&&(t=c(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(c.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)c.d(s,a,function(e){return t[e]}.bind(null,a));return s},c.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return c.d(e,"a",e),e},c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.p="/",c.oe=function(t){throw console.error(t),t};var l=window["webpackJsonp"]=window["webpackJsonp"]||[],d=l.push.bind(l);l.push=e,l=l.slice();for(var u=0;u<l.length;u++)e(l[u]);var m=d;i.push([0,"chunk-vendors"]),s()})({0:function(t,e,s){t.exports=s("56d7")},"0187":function(t,e,s){"use strict";s.d(e,"a",(function(){return d}));var a=s("5f5b"),r=s("3d20"),o=s.n(r),i=s("2b0e"),n=s("365ce"),c=s("e31e");i["default"].use(a["a"]);const l=new i["default"]({});function d(t){if(409===t.response.status&&(console.log(t),localStorage.clear(),o.a.fire({icon:"error",title:t.response.data.message||"Your session has expired."}).then(async e=>{const s=Object.keys(e);if(s.includes("isConfirmed")&&s.includes("isDismissed")&&(!0===e.isConfirmed||!0===e.isDismissed))return await n["b"].post(c["d"]+"api/logout",{},{headers:{userid:t.response.data.userId}}),window.location.href="/",Promise.resolve()})),401===t.response.status)return l.$bvToast.toast("Please login to access the application.",{title:"Unauthorized request.",variant:"danger",solid:!0}),Promise.resolve();document.getElementsByClassName("toast").length}},"063d":function(t,e,s){"use strict";s("1ce0")},"0d14":function(t,e,s){"use strict";s("2880")},1:function(t,e){},10:function(t,e){},11:function(t,e){},"11c0":function(t,e,s){"use strict";s.r(e);var a=s("365ce"),r=s("cee4"),o=s("e31e"),i=s("3452"),n=s.n(i),c=s("0187");const l=t=>{const e=n.a.AES.encrypt(JSON.stringify(t),o["e"]).toString();return e},d=t=>{try{const e=n.a.AES.decrypt(t,o["e"]),s=JSON.parse(e.toString(n.a.enc.Utf8));return s}catch(e){return null}},u=(t,e)=>{localStorage.setItem(t,l(e))},m={state:()=>({token:d(localStorage.getItem("token"))||null,sessionId:d(localStorage.getItem("sessionId"))||null,refresh:d(localStorage.getItem("refresh"))||null,orgId:d(localStorage.getItem("orgId"))||null,userId:d(localStorage.getItem("userId"))||null,userEmail:d(localStorage.getItem("userEmail"))||null,userName:d(localStorage.getItem("userName"))||null,gitToken:d(localStorage.getItem("gitToken"))||null,githubUsername:d(localStorage.getItem("githubUsername"))||null,isActive:null,isDeleted:null,isSuperUser:null,isEmailVerified:null,unauthClient:a["c"],ditaOtVersions:[],notificationData:[],recentPublicationsData:[],projectsData:[],projectsList:[],creditsDetails:null,repoUser:"",repoName:"",orgDetails:"",isWorkspaceCreated:"",endpoints:{obtain:"/orguser/authenticate"},currentWorkingProject:JSON.parse(localStorage.getItem("currentWorkingProject"))||null}),mutations:{updateTokens(t,e){u("token",e.token),u("refresh",e.refresh||e.token),u("orgId",e.orgId),u("userId",e.userId),u("userEmail",e.email||e.userEmail),u("userName",e.username||e.userName),u("githubUsername",e.githubUsername),u("gitToken",e.gitToken),t.token=e.token,t.refresh=e.refresh||e.token,t.orgId=e.orgId,t.userId=e.userId,t.userEmail=e.email||e.userEmail,t.userName=e.username||e.userName,t.gitToken=e.gitToken,t.githubUsername=e.githubUsername,t.isActive=e.isActive,t.isDeleted=e.isDeleted,t.isSuperUser=e.isSuperUser,t.isEmailVerified=e.isEmailVerified,t.isWorkspaceCreated=e.hasWorkspace},updateSessionId(t,e){t.sessionId=e,u("sessionId",e)},updateUserId(t,e){t.userId=e,localStorage.setItem("userId",e)},updateAccess(t,e){localStorage.setItem("token",e),t.token=e},updateGitToken(t,e){u("gitToken",e.gitToken),t.gitToken=e.gitToken},updateActiveStatus(t,e){t.isActive=e.isActive},updateDeletedStatus(t,e){t.isDeleted=e.isDeleted},updateSuperUserStatus(t,e){t.isSuperUser=e.isSuperUser},updateEmailVerifiedStatus(t,e){t.isEmailVerified=e.isEmailVerified},removeToken(t){localStorage.setItem("token",null),localStorage.setItem("sessionId",null),localStorage.setItem("refresh",null),localStorage.setItem("reponame",null),localStorage.setItem("orgId",null),localStorage.setItem("userId",null),localStorage.setItem("userName",null),localStorage.setItem("userEmail",null),localStorage.setItem("gitToken",null),localStorage.setItem("repouser",null),localStorage.setItem("githubUsername",null),t.token=null,t.sessionId=null,t.refresh=null,t.orgId=null,t.userId=null,t.userEmail=null,t.userName=null,t.gitToken=null,t.githubUsername=null,t.isActive=null,t.isDeleted=null,t.isSuperUser=null,t.isEmailVerified=null},SET_DITA_OT_VERSIONS(t,e){t.ditaOtVersions=e},setNotificationData(t,e){t.notificationData=e},setRecentPublicationsData(t,e){t.recentPublicationsData=e},setProjectsData(t,e){t.projectsData=e},setProjectsList(t,e){t.projectsList=e},setCreditsDetails(t,e){t.creditsDetails=e},setRepoUser(t,e){t.repoUser=e},setRepoName(t,e){t.repoName=e},setOrgDetails(t,e){t.orgDetails=e},setWorkspaceStatus(t,e){t.isWorkspaceCreated=e},setCurrentWorkingProject(t,e){localStorage.setItem("currentWorkingProject",JSON.stringify(e)),t.currentWorkingProject=e}},getters:{client:t=>{const e=r["a"].create({...a["a"],headers:{Authorization:"Bearer "+t.token,sessionId:t.sessionId,userId:t.userId,orgId:t.orgId,gitToken:""+t.gitToken}});return e.interceptors.response.use(t=>t,t=>{if(Object(c["a"])(t),401!==t.response.status)return new Promise((e,s)=>{s(t)})}),e},ditaOtVersions:t=>t.ditaOtVersions},actions:{obtainToken(t,e){return t.state.unauthClient.post(t.state.endpoints.obtain,e).then(t=>{this.commit("updateTokens",{token:t.data.token,refresh:t.data.refresh,orgId:t.data.orgId,userEmail:t.data.email,userName:t.data.username,userId:t.data.id,githubUsername:t.data.githubUsername}),this.commit("updateEmailVerifiedStatus",{isEmailVerified:t.data.isEmailVerified}),this.commit("updateGitToken",{gitToken:t.data.gitToken}),this.commit("updateActiveStatus",{isActive:t.data.isActive}),this.commit("updateDeletedStatus",{isDeleted:t.data.isDeleted}),this.commit("updateSuperUserStatus",{isSuperUser:t.data.isSuperUser})})},refreshToken(t){const e={refresh:t.state.refresh};t.state.unauthClient.post(t.state.endpoints.refresh,e).then(t=>{this.commit("updateAccess",t.data.token)}).catch(()=>{})},registerUser(t,e){return t.state.unauthClient.post(t.state.endpoints.register,e).then(()=>{})},fetchDitaOtVersions({commit:t},e){return r["a"].get(`${o["d"]}api/serveradmin/organization/byorgid?orgId=${e}`,{headers:{Authorization:"Bearer "+d(localStorage.getItem("token")),sessionId:d(localStorage.getItem("sessionId")),userId:d(localStorage.getItem("userId")),orgId:d(localStorage.getItem("orgId"))}}).then(e=>{const s=e.data[0].ditaotVersion;return t("SET_DITA_OT_VERSIONS",s),s}).catch(t=>{throw t})}}};e["default"]=m},12:function(t,e){},13:function(t,e){},14:function(t,e){},1408:function(t,e,s){},15:function(t,e){},1508:function(t,e,s){},1522:function(t,e,s){"use strict";s("256f")},16:function(t,e){},"186b":function(t,e,s){},1871:function(t,e,s){"use strict";s("5893")},"1b6e":function(t,e,s){},"1ce0":function(t,e,s){},"1d0b":function(t,e,s){"use strict";s("ef66")},"1dd5":function(t,e,s){"use strict";s("adf6")},"1e72":function(t,e,s){},2:function(t,e){},"20c5":function(t,e,s){},"20e6":function(t,e,s){},2208:function(t,e,s){"use strict";s.r(e),s.d(e,"state",(function(){return a})),s.d(e,"mutations",(function(){return r})),s.d(e,"actions",(function(){return o}));const a={type:null,message:null},r={success(t,e){t.type="success",t.message=e},error(t,e){t.type="danger",t.message=e},clear(t){t.type=null,t.message=null}},o={success({commit:t},e){t("success",e)},error({commit:t},e){t("error",e)},clear({commit:t}){t("clear")}}},"256f":function(t,e,s){},"27cb":function(t,e,s){"use strict";s("4af1")},"283e":function(t,e,s){},2880:function(t,e,s){},"28c3":function(t,e,s){"use strict";s("ba6f")},3:function(t,e){},3229:function(t,e,s){"use strict";s("dfc1")},3504:function(t){t.exports=JSON.parse('{"navbar":{"search":{"text":"搜索..."},"dropdown":{"megamenu":{"text":"超级菜单","uicontent":{"title":"UI组件","list":{"lightbox":"灯箱","rangeslider":"范围滑块","sweetalert":"甜蜜警报","rating":"评分","forms":"形式","tables":"桌子","charts":"图表"}},"application":{"title":"应用领域","list":{"ecommerce":"电子商务","calendar":"日历","email":"电子邮件","projects":"专案","tasks":"任务","contacts":"联络人"}},"extrapages":{"title":"额外页面","list":{"lightsidebar":"侧边灯","compactsidebar":"紧凑型侧边栏","horizontallayout":"水平布局","maintenance":"保养","comingsoon":"快来了","timeline":"时间线","faqs":"常见问题"}}},"site":{"list":{"github":"的GitHub","bitbucket":"比特桶","dribbble":"运球","dropbox":"投寄箱","mailchimp":"邮件黑猩猩","slack":"松弛"}},"notification":{"text":"通知事项","subtext":"查看全部","order":{"title":"您的订单已下达","text":"如果几种语言合并了语法","time":"3分钟前"},"james":{"title":"詹姆斯·勒米尔","text":"好像是简体英语。","time":"1小时前"},"item":{"title":"您的物品已发货","text":"如果几种语言合并了语法","time":"3分钟前"},"salena":{"title":"萨莱娜·莱菲尔德","text":"作为西方的一个怀疑的剑桥朋友。","time":"1小时前"},"button":"装载更多.."},"kevin":{"text":"凯文","list":{"profile":"轮廓","mywallet":"我的钱包","settings":"设定值","lockscreen":"锁屏","logout":"登出"}}}},"menuitems":{"menu":{"text":"菜单"},"dashboard":{"text":"仪表板","badge":"3"},"layouts":{"text":"版面","list":{"horizontal":"卧式","lightsidebar":"侧边灯","compactsidebar":"紧凑型侧边栏","iconsidebar":"图标侧栏","boxed":"盒装版式","vertical":"垂直","lighttopbar":"轻顶杆"}},"apps":{"text":"应用"},"calendar":{"text":"日历"},"chat":{"text":"聊天室","badge":"新"},"ecommerce":{"text":"电子商务","list":{"products":"产品展示","productdetail":"产品明细","orders":"订单","customers":"顾客","cart":"大车","checkout":"查看","shops":"商店","addproduct":"添加产品"}},"email":{"text":"电子邮件","list":{"inbox":"收件箱","reademail":"阅读电子邮件"}},"kanban":{"text":"看板委员会"},"pages":{"text":"页数"},"authentication":{"text":"认证方式","list":{"login":"登录","register":"寄存器","recoverpwd":"恢复密码","lockscreen":"锁屏"}},"utility":{"text":"效用","list":{"starter":"起始页","maintenance":"保养","comingsoon":"快来了","timeline":"时间线","faqs":"常见问题","pricing":"价钱","error404":"错误404","error500":"错误500"}},"components":{"text":"组件"},"uielements":{"text":"UI元素","list":{"alerts":"警报","buttons":"纽扣","cards":"牌","carousel":"轮播","dropdowns":"下拉菜单","grid":"格网","images":"图片","modals":"模态","rangeslider":"范围滑块","progressbar":"进度条","sweetalert":"甜蜜警报","tabs":"标签和手风琴","typography":"版式","video":"视频","general":"一般","lightbox":"灯箱","sessiontimeout":"会话超时","rating":"评分","notifications":"通知事项"}},"forms":{"text":"形式","badge":"8","list":{"elements":"表单元素","validation":"表格验证","advanced":"表格高级","editor":"表格编辑器","fileupload":"表格文件上传","wizard":"表单向导","mask":"表格蒙版"}},"tables":{"text":"桌子","list":{"basic":"基本表","advanced":"高级表"}},"charts":{"text":"图表","list":{"apex":"顶点图","chartjs":"Chartjs图表","chartist":"宪章图","echart":"电子图表"}},"icons":{"text":"图示","list":{"remix":"混音图标","materialdesign":"材料设计","dripicons":"滴灌","fontawesome":"字体很棒"}},"maps":{"text":"地图","list":{"googlemap":"谷歌地图","leaflet":"传单地图"}},"multilevel":{"text":"多层次","list":{"level1":{"1":"1.1级","2":"1.2级","level2":{"1":"2.1级","2":"2.2级"}}}}}}')},"359b":function(t,e,s){"use strict";s("7072")},"365ce":function(t,e,s){"use strict";s.d(e,"c",(function(){return n})),s.d(e,"a",(function(){return i})),s.d(e,"b",(function(){return c}));var a=s("cee4"),r=s("e31e"),o=s("0187");const i={baseURL:r["d"]+"api",timeout:1e6},n=a["a"].create({baseURL:r["d"]+"api",timeout:1e6}),c=a["a"].create();c.interceptors.response.use(t=>t,t=>{if(Object(o["a"])(t),401!==t.response.status)return new Promise((e,s)=>{s(t)})})},3876:function(t,e,s){},"3ba8":function(t,e,s){},"3dde":function(t,e,s){t.exports=s.p+"img/Octocat.0ba2aa20.png"},4:function(t,e){},"44cc":function(t,e,s){},4513:function(t,e,s){"use strict";s("20c5")},4678:function(t,e,s){var a={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn-bd":"9686","./bn-bd.js":"9686","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-mx":"b5b7","./es-mx.js":"b5b7","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tk":"5aff","./tk.js":"5aff","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf755","./tlh.js":"cf755","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function r(t){var e=o(t);return s(e)}function o(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}r.keys=function(){return Object.keys(a)},r.resolve=o,t.exports=r,r.id="4678"},4728:function(t,e,s){"use strict";s("5571")},"473d":function(t,e,s){},"474e":function(t,e,s){"use strict";s("473d")},"49f8":function(t,e,s){var a={"./ar.json":"af08","./en.json":"edd4","./es.json":"a306","./fr.json":"f693","./zh.json":"3504"};function r(t){var e=o(t);return s(e)}function o(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}r.keys=function(){return Object.keys(a)},r.resolve=o,t.exports=r,r.id="49f8"},"49fa":function(t,e,s){"use strict";s("3876")},"4af1":function(t,e,s){},5:function(t,e){},"51c2":function(t,e,s){"use strict";s("96ff")},5571:function(t,e,s){},"557a":function(t,e,s){"use strict";s("1b6e")},"56d7":function(t,e,s){"use strict";s.r(e),s.d(e,"eventBus",(function(){return I}));var a=s("2b0e"),r=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},o=[],i=s("c2a4"),n={name:"app",page:{titleTemplate(t){return t="function"===typeof t?t(this.$store):t,t?`${t} | ${i.title}`:i.title}},created(){this.$store.state.Auth.orgId&&this.$store.dispatch("fetchDitaOtVersions",this.$store.state.Auth.orgId).then(t=>{this.ditaOtVersions=t}).catch(t=>{})},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})}}},c=n,l=(s("57d4"),s("2877")),d=Object(l["a"])(c,r,o,!1,null,null,null),u=d.exports,m=s("5f5b"),h=s("f9d5"),p=s.n(h),g=s("7bb1"),f=s("18fa"),b=s.n(f),v=(s("e40d"),s("c28b")),y=s.n(v),C=s("a18c"),w=s("86b6"),x=s("9225"),_=s("d3c8"),$=s.n(_),T=s("9b40"),k=s.n(T),S=(s("7e7d"),s("ad3a")),j=s("8d3b");s("ed18").config(),a["default"].component("PageHeader",S["a"]),a["default"].component("Simplebar",j["a"]),a["default"].config.productionTip=!1,a["default"].use(b.a),a["default"].use(k.a),a["default"].use(m["a"]),a["default"].use(g["a"]),a["default"].use(y.a),a["default"].use(p.a),a["default"].component("v-jstree",$.a),a["default"].prototype.$eventBus=new a["default"];const I=new a["default"];new a["default"]({router:C["a"],store:w["a"],i18n:x["a"],render:t=>t(u)}).$mount("#app")},"57d4":function(t,e,s){"use strict";s("1408")},5893:function(t,e,s){},"5b19":function(t,e,s){"use strict";s("5f5d")},"5b4d":function(t,e,s){t.exports=s.p+"img/placeholder.ada0529a.png"},"5f5d":function(t,e,s){},"5f8e":function(t,e,s){},6:function(t,e){},"606e":function(t,e,s){"use strict";s("c539")},"62b4":function(t,e,s){},6488:function(t,e,s){"use strict";s.r(e);var a=s("365ce"),r=s("e31e"),o=s("3d20"),i=s.n(o);const n={state:{suserprojectdata:null},mutations:{setUserProjectDetails:(t,e)=>t.suserprojectdata=e},actions:{async userProjectDetails({commit:t},e){try{let s=localStorage.getItem("token");const{data:o}=await a["b"].get(`${r["d"]}api${e}`,{headers:{"Content-Type":"application/json",Authorization:"Bearer "+s,sessionId:localStorage.getItem("sessionId"),userId:localStorage.getItem("userId"),orgId:localStorage.getItem("orgId")}});t("setUserProjectDetails",o)}catch(s){if("Another device has login with your account!"==s.response.data.message){localStorage.clear();const t=i.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({icon:"error",title:"Oops...",text:"Another device has logged in with your account!"}).then(()=>{window.location.href="/"})}if("Invalid Token"==s.response.data.message){localStorage.clear();const t=i.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({icon:"error",title:"Oops...",text:"Your session has expired. Please log in again to continue accessing the metR. "}).then(()=>{window.location.href="/"})}if("The current subscription of your organization has been expired !"==s.response.data.message){localStorage.clear();const t=i.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({icon:"error",title:"Oops...",text:"The current subscription for your organization has expired. Please kindly request your organization to renew the subscription plan in order to continue using our services. If you require any assistance, please feel free to contact metR support at support@metr.com. Thank you!"}).then(()=>{window.location.href="/"})}}}}};e["default"]=n},"64d6":function(t,e,s){},"65f1":function(t,e,s){"use strict";s("186b")},6849:function(t,e,s){},6939:function(t,e,s){},"6c36":function(t,e,s){"use strict";s("44cc")},7:function(t,e){},7072:function(t,e,s){},7081:function(t,e,s){},"71fd":function(t,e,s){"use strict";s("64d6")},"742b":function(t,e,s){"use strict";s("fcce")},7455:function(t,e,s){"use strict";s.r(e);const a={state:{owner:"",projectName:""},mutations:{setOwner(t,e){t.owner=e},setProjectName(t,e){t.projectName=e}}};e["default"]=a},"7bbe":function(t,e,s){"use strict";s("85c0")},"7d4e":function(t,e,s){"use strict";s("e883")},"7e7d":function(t,e,s){},"7eba":function(t,e,s){"use strict";s("9ad4")},8:function(t,e){},"82e4":function(t,e,s){"use strict";s("90f0")},8315:function(t,e,s){"use strict";s("cc69")},"85c0":function(t,e,s){},"86b6":function(t,e,s){"use strict";var a=s("2b0e"),r=s("2f62"),o=s("bba4"),i=s.n(o),n=s("11c0"),c=s("6488"),l=s("7455");const d={},u={modules:{Auth:n["default"],UserProject:c["default"],Gitdetails:l["default"]}};function m(t,e){if(1===e.length)return t;const s=e.shift();return t.modules[s]={modules:{},namespaced:!0,...t.modules[s]},m(t.modules[s],e)}(function(){const t=s("cfa9");t.keys().forEach(e=>{const s=t(e);if(d[e]===s)return;d[e]=s;const a=e.replace(/^\.\//,"").replace(/\.\w+$/,"").split(/\//).map(i.a),{modules:r}=m(u,a);r[a.pop()]={namespaced:!0,...s}})})();var h=u.modules;a["default"].use(r["a"]);const p=new r["a"].Store({modules:h,strict:!1});e["a"]=p},9:function(t,e){},"90f0":function(t,e,s){},9225:function(t,e,s){"use strict";var a=s("2b0e"),r=s("a925");function o(){const t=s("49f8"),e={};return t.keys().forEach(s=>{const a=s.match(/([A-Za-z0-9-_]+)\./i);if(a&&a.length>1){const r=a[1];e[r]=t(s)}}),e}a["default"].use(r["a"]),e["a"]=new r["a"]({locale:Object({VUE_APP_API_KEY:"https://devapi.met-r.io/",VUE_APP_CLIENT_ID:"https://github.com/login/oauth/authorize?client_id=Ov23liENS9zY01g2BXrv&scope=repo&redirect_uri=https://devapi.met-r.io/api/orguser/github/callback",VUE_APP_SECRETKEY:"xyxyz1620",VUE_APP_INSTALLEDPATH:"/home/met-r-devapi/htdocs/DITAxPressoWorkspace",VUE_APP_CHATBOT_FRONTEND_URL:"https://demo-staging-portal.met-r.io/",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_I18N_LOCALE||"en",fallbackLocale:Object({VUE_APP_API_KEY:"https://devapi.met-r.io/",VUE_APP_CLIENT_ID:"https://github.com/login/oauth/authorize?client_id=Ov23liENS9zY01g2BXrv&scope=repo&redirect_uri=https://devapi.met-r.io/api/orguser/github/callback",VUE_APP_SECRETKEY:"xyxyz1620",VUE_APP_INSTALLEDPATH:"/home/met-r-devapi/htdocs/DITAxPressoWorkspace",VUE_APP_CHATBOT_FRONTEND_URL:"https://demo-staging-portal.met-r.io/",NODE_ENV:"production",BASE_URL:"/"}).VUE_APP_I18N_FALLBACK_LOCALE||"en",messages:o()})},"934c":function(t,e,s){},"96ff":function(t,e,s){},"9ad4":function(t,e,s){},a18c:function(t,e,s){"use strict";var a=s("2b0e"),r=s("8c4f"),o=function(){var t=this,e=t._self._c;return e("div",[t._m(0),e("div",{staticClass:"container-fluid p-0"},[e("div",{staticClass:"row no-gutters"},[e("div",{staticClass:"col-lg-4"},[e("div",{staticClass:"authentication-page-content p-4 d-flex align-items-center min-vh-100"},[e("div",{staticClass:"w-100"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-lg-9"},[t._m(1),e("b-alert",{directives:[{name:"show",rawName:"v-show",value:t.isAuthenticate,expression:"isAuthenticate"}],attrs:{show:"",dismissible:"",variant:"danger"}},[t._v(" "+t._s(t.authErrorMessage)+" ")]),e("b-alert",{directives:[{name:"show",rawName:"v-show",value:t.isLoading,expression:"isLoading"}],attrs:{show:"",variant:"info"}},[e("div",{staticClass:"d-flex align-items-center"},[e("b-spinner",{staticClass:"mr-2",attrs:{small:""}}),t._v(" Processing authentication... ")],1)]),e("div",{staticClass:"p-2 mt-5 text-center"},[e("button",{staticClass:"btn btn-dark btn-lg w-100 d-flex align-items-center justify-content-center",attrs:{disabled:t.isLoading},on:{click:t.loginWithGitHub}},[t.isLoading?e("b-spinner",{staticClass:"mr-2",attrs:{small:""}}):e("i",{staticClass:"mdi mdi-github mr-2 h5 mb-0"}),t._v(" "+t._s(t.isLoading?"Signing in...":"Sign in with GitHub")+" ")],1)]),e("div",{staticClass:"mt-5 text-center"},[e("p",[t._v(" © "+t._s((new Date).getFullYear())+" "),e("a",{attrs:{href:"https://metapercept.com/",target:"_blank"}},[t._v("Metapercept Technology Services LLP")]),t._v(" All Rights Reserved ")])])],1)])])])]),t._m(2)])])])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-btn btn-sm d-none d-sm-block"},[e("a",{attrs:{href:"/"}},[e("i",{staticClass:"mdi mdi-home-variant h2 text-white"})])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"text-center"},[e("h4",{staticClass:"font-size-18 mt-4"},[t._v("Welcome Back !")]),e("p",{staticClass:"text-muted"},[t._v("Sign in to continue to metR.")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-8"},[e("div",{staticClass:"authentication-bg"},[e("div",{staticClass:"bg-overlay"})])])}],n=(s("88a7"),s("271a"),s("5494"),s("14d9"),{data(){return{isAuthenticate:!1,authErrorMessage:"",isLoading:!1}},methods:{loginWithGitHub(){this.isLoading=!0;const t="https://devapi.met-r.io/";if(!t)return console.error("VUE_APP_API_KEY environment variable is not set"),this.messageToast("Error","danger","Configuration error. Please contact support."),void(this.isLoading=!1);const e=t.endsWith("/")?t.slice(0,-1):t,s=e+"/api/orguser/github/login";try{window.location.href=s}catch(a){console.error("Error redirecting to GitHub login:",a),this.messageToast("Error","danger","Failed to redirect to GitHub. Please try again."),this.isLoading=!1}},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0,autoHideDelay:5e3})},checkAuthSuccess(){try{const t=new URLSearchParams(window.location.search),e=t.get("auth"),s=t.get("data"),a=t.get("error");if(a)return this.showAuthError(decodeURIComponent(a)),void window.history.replaceState({},document.title,"/user-login");"success"===e&&s&&(this.isLoading=!0,this.handleSuccessfulAuth(s))}catch(t){console.error("Error checking auth success:",t),this.showAuthError("Authentication check failed. Please try again.")}},handleSuccessfulAuth(t){try{const e=JSON.parse(decodeURIComponent(t));this.$store&&this.$store.commit("updateTokens",{token:e.token,email:e.email,username:e.username,userId:e.userId,orgId:e.orgId,githubUsername:e.githubUsername,gitToken:e.gitToken,isChangePassword:!0,name:e.username,hasWorkspace:e.hasWorkspace}),window.history.replaceState({},document.title,"/user-login"),this.messageToast("Success","success","Login successful! Redirecting..."),setTimeout(()=>{e.hasWorkspace?this.$router.push("/dashboard"):this.$router.push("/docmanager")},1500)}catch(e){console.error("Error parsing user data:",e),this.showAuthError("Authentication failed: "+e.message)}},showAuthError(t){this.isAuthenticate=!0,this.authErrorMessage=t,this.isLoading=!1}},mounted(){this.checkAuthSuccess()}}),c=n,l=(s("742b"),s("2877")),d=Object(l["a"])(c,o,i,!1,null,"6a877520",null),u=d.exports,m=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"container-fluid p-0"},[e("div",{staticClass:"row no-gutters"},[e("div",{staticClass:"col-lg-4"},[e("div",{staticClass:"authentication-page-content p-4 d-flex align-items-center min-vh-100"},[e("div",{staticClass:"w-100"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-lg-9"},[e("div",[t._m(0),0==t.isVerify?e("b-alert",{attrs:{show:"",variant:"danger"}},[t._v(" Token Expired! If you want to get another link, you need to contact administrator using this email.. "),e("a",{staticClass:"text-decoration-underline",attrs:{href:"mailto:techsupport@metr.com"}},[t._v("techsupport@metr.com")])]):e("b-alert",{attrs:{show:"",variant:"success"}},[t._v("Your account is verified successfully and instructions will be sent to you on email!")]),e("div",{staticClass:"mt-5 text-center"},[e("p",[t._v(" Copyright © "+t._s((new Date).getFullYear())+" "),e("a",{attrs:{href:"https://metapercept.com/",target:"_blank"}},[t._v(" Metapercept Technology Services LLP ")]),t._v(" All Rights Reserved ")])])],1)])])])])]),t._m(1)])])])])},h=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"text-center"},[e("h4",{staticClass:"font-size-18 mt-4"},[t._v("Welcome !")]),e("p",{staticClass:"text-muted"},[t._v(" Verify to continue to metR User. ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-8"},[e("div",{staticClass:"authentication-bg"},[e("div",{staticClass:"bg-overlay"})])])}],p={data(){return{isVerify:!1}},computed:{currentYear(){return(new Date).getFullYear()}},mounted(){this.tokenVerify()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},async tokenVerify(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.put("orguser/emailverification?token="+this.$route.params.token).then(e=>{"User Verified"===e.data.message&&(this.isVerify=!0),t.hide()}).catch(()=>{t.hide()})}}},g=p,f=Object(l["a"])(g,m,h,!1,null,null,null),b=f.exports,v=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"container-fluid p-0"},[e("div",{staticClass:"row no-gutters"},[e("div",{staticClass:"col-lg-4"},[e("div",{staticClass:"authentication-page-content p-4 d-flex align-items-center min-vh-100"},[e("div",{staticClass:"w-100"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-lg-9"},[e("div",[t._m(0),!0===t.isEmailSend?e("b-alert",{attrs:{show:"",variant:"success"}},[t._v(" Check your email for a link to reset your password. If it doesn’t appear within a few minutes, check your spam folder. "),e("br"),e("div",{staticClass:"mt-4 text-center"},[e("router-link",{staticClass:"btn btn-sm btn-primary w-md waves-effect waves-light",attrs:{tag:"a",to:"/"}},[t._v(" Log In ")])],1)]):e("div",{staticClass:"p-2 mt-5"},[e("b-alert",{staticClass:"mb-4",attrs:{variant:"danger",dismissible:""},model:{value:t.isResetError,callback:function(e){t.isResetError=e},expression:"isResetError"}},[t._v(t._s(t.error))]),e("form",{staticClass:"form-horizontal",on:{submit:function(e){return e.preventDefault(),t.forgotpassword.apply(null,arguments)}}},[e("div",{staticClass:"alert alert-success mb-4",attrs:{role:"alert"}},[t._v(" Enter your Email, and instructions will be sent to you! ")]),e("div",{staticClass:"form-group auth-form-group-custom mb-4"},[e("i",{staticClass:"ri-mail-line auti-custom-input-icon"}),e("label",{attrs:{for:"email"}},[t._v("Email")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"},{name:"validate",rawName:"v-validate",value:"required|email",expression:"'required|email'"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.email.$error},attrs:{id:"email",name:"email",placeholder:"Enter email"},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("email"),expression:"errors.has('email')"}],staticClass:"text-danger text-sm"},[t._v(" "+t._s(t.errors.first("email"))+" ")]),t.submitted&&t.$v.email.$error?e("div",{staticClass:"invalid-feedback"},[t.$v.email.required?t._e():e("span",[t._v("Email is required.")]),t.$v.email.email?t._e():e("span",[t._v("Please enter a valid email.")])]):t._e()]),e("div",{staticClass:"mt-4 text-center"},[e("button",{staticClass:"btn btn-sm btn-primary w-md waves-effect waves-light",attrs:{type:"submit"}},[t._v(" Send password reset email ")])])])],1),e("div",{staticClass:"mt-5 text-center"},[e("p",[t._v(" Copyright © "+t._s((new Date).getFullYear())+" "),e("a",{attrs:{href:"https://metapercept.com/",target:"_blank"}},[t._v(" Metapercept Technology Services LLP ")]),t._v(" All Rights Reserved ")])])],1)])])])])]),t._m(1)])])])])},y=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"text-center"},[e("h4",{staticClass:"font-size-18 mt-4"},[t._v("Reset Password")]),e("p",{staticClass:"text-muted"},[t._v("Reset your password to metR.")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-8"},[e("div",{staticClass:"authentication-bg"},[e("div",{staticClass:"bg-overlay"})])])}],C={data(){return{isVerify:!1,email:"",submitted:!1,error:null,tryingToReset:!1,isResetError:!1,isEmailSend:!1}},created(){},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},forgotpassword(){this.$validator.validateAll().then(t=>{if(t){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/forgotpassword",{email:this.email}).then(e=>{t.hide(),e?(this.isEmailSend=!0,this.messageToast("Success","success",e.message)):(this.isEmailSend=!1,this.messageToast("Error","danger","An error occurred"))}).catch(e=>{this.isEmailSend=!1,t.hide(),this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred")})}})}}},w=C,x=(s("6c36"),Object(l["a"])(w,v,y,!1,null,"1a4fbf8c",null)),_=x.exports,$=function(){var t=this,e=t._self._c;return e("div",[t._m(0),e("div",[e("div",{staticClass:"container-fluid p-0"},[e("div",{staticClass:"row no-gutters"},[e("div",{staticClass:"col-lg-4"},[e("div",{staticClass:"authentication-page-content p-4 d-flex align-items-center min-vh-100"},[e("div",{staticClass:"w-100"},[e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-lg-9"},[e("div",[t._m(1),e("b-alert",{directives:[{name:"show",rawName:"v-show",value:t.isAuthenticate,expression:"isAuthenticate"}],attrs:{show:"",dismissible:"",variant:"danger"}},[t._v("Invalid Credentials!")]),e("div",{staticClass:"p-2 mt-5"},[e("form",{ref:"form",staticClass:"form-horizontal",on:{submit:function(e){return e.preventDefault(),t.resetPassword.apply(null,arguments)}}},[e("div",{staticClass:"form-group auth-form-group-custom mb-4"},[e("i",{staticClass:"ri-lock-2-line auti-custom-input-icon"}),e("label",{attrs:{for:"password"}},[t._v("New Password")]),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required|verify_password",expression:"'required|verify_password'"},{name:"model",rawName:"v-model",value:t.password,expression:"password"}],ref:"password",staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.password.$error},attrs:{name:"password",type:"password",id:"password",placeholder:"Enter new password"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("password")&&"required"==t._.find(t.errors.items,{field:"password"}).rule,expression:"\n errors.has('password') &&\n _.find(errors.items, { field: 'password' })\n .rule == 'required'\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("The new password field is required")])]),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("password")&&"verify_password"==t._.find(t.errors.items,{field:"password"}).rule,expression:"\n errors.has('password') &&\n _.find(errors.items, { field: 'password' })\n .rule == 'verify_password'\n "}],staticClass:"text-danger text-sm"},[t._v(" "+t._s(t.errors.first("password"))+" ")])]),e("div",{staticClass:"form-group auth-form-group-custom mb-4"},[e("i",{staticClass:"ri-lock-2-line auti-custom-input-icon"}),e("label",{attrs:{for:"confirmPassword"}},[t._v("Confirm Password")]),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required|confirmed:password",expression:"'required|confirmed:password'"},{name:"model",rawName:"v-model",value:t.password_confirmation,expression:"password_confirmation"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.password_confirmation.$error},attrs:{name:"password_confirmation",type:"password",id:"password_confirmation",placeholder:"Enter password"},domProps:{value:t.password_confirmation},on:{input:function(e){e.target.composing||(t.password_confirmation=e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("password_confirmation"),expression:"errors.has('password_confirmation')"}],staticClass:"text-danger text-sm"},[t._v(" The password confirmation field does not match ")])]),t._m(2)])]),e("div",{staticClass:"mt-5 text-center"},[e("p",[t._v(" Copyright © "+t._s((new Date).getFullYear())+" "),e("a",{attrs:{href:"https://metapercept.com/",target:"_blank"}},[t._v(" Metapercept Technology Services LLP ")]),t._v(" All Rights Reserved ")])])],1)])])])])]),t._m(3)])])])])},T=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"home-btn btn-sm d-none d-sm-block"},[e("a",{attrs:{href:"/"}},[e("i",{staticClass:"mdi mdi-home-variant h2 text-white"})])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"text-center"},[e("h4",{staticClass:"font-size-18 mt-4"},[t._v("Welcome Back !")]),e("p",{staticClass:"text-muted"},[t._v(" Reset Password to continue to metR Client Admin. ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"mt-4 text-center"},[e("button",{staticClass:"btn btn-sm btn-primary w-md waves-effect waves-light",attrs:{type:"submit"}},[t._v(" Reset Password ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"col-lg-8"},[e("div",{staticClass:"authentication-bg"},[e("div",{staticClass:"bg-overlay"})])])}],k=s("7bb1"),S=s("2ef0"),j=s.n(S),I={data(){return{isAuthenticate:!1,password:null,password_confirmation:null,validateCredentials:!1,error:null,submitted:!1}},computed:{_(){return j.a}},created(){k["a"].Validator.extend("verify_password",{getMessage:()=>"The password must contain at least: minimum 8 characters, 1 uppercase letter, 1 lowercase letter, 1 number, and one special character (E.g. , . _ & ? etc)",validate:t=>{var e=new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#%&])(?=.{8,})");return e.test(t)}})},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},resetPassword(){this.$validator.validateAll().then(t=>{if(t){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.put("orguser/resetpassword",{token:this.$route.params.token,newPassword:this.password}).then(e=>{e&&e.data?"Token Expired"===e.data.message?this.handleTokenExpired(t):this.handlePasswordResetSuccess(t):this.handlePasswordResetError(t,"An error occurred")}).catch(e=>{this.handlePasswordResetError(t,e.response?e.response.data.message:"An error occurred")})}})},handleTokenExpired(t){this.messageToast("Error","danger","Link Expired"),t.hide(),setTimeout(()=>{t.hide(),this.$refs.form.reset(),this.$router.push({name:"Login"})},2e3)},handlePasswordResetSuccess(t){this.messageToast("Success","primary","Password reset successfully"),t.hide(),setTimeout(()=>{t.hide(),this.$refs.form.reset(),this.$router.push({name:"Login"})},2e3)},handlePasswordResetError(t,e){this.messageToast("Error","danger",e),t.hide()}}},P=I,D=(s("359b"),Object(l["a"])(P,$,T,!1,null,"02217321",null)),N=D.exports;const A=[{path:"/",component:u,name:"Login",beforeEnter:(t,e,s)=>{const a=localStorage.getItem("token");a?s("/dashboard"):s()}},{path:"/user-login",component:u,name:"UserLogin"},{path:"/verify/:token",component:b,name:"EmailVerification"},{path:"/forgotpassword",component:_,name:"forgotpassword"},{path:"/resetpassword/:token",component:N,name:"resetpassword"}];var F=A,B=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row mt-2 d-flex justify-content-between mx-3"},[e("div",{staticClass:"dataTables_length",attrs:{id:"tickets-table_length"}},[e("label",{staticClass:"d-inline-flex align-items-center"},[t._v(" Show "),e("b-form-select",{attrs:{size:"sm",options:t.pageOptions},model:{value:t.perPage,callback:function(e){t.perPage=e},expression:"perPage"}}),t._v(" entries ")],1)]),e("div",{staticClass:"table-responsive mb-0"},[e("b-table",{ref:"adminTable",attrs:{items:t.creditsDetails.data,fields:t.colfields,responsive:"sm","per-page":t.perPage,"current-page":t.currentPage,"show-empty":""}})],1),e("div",{staticClass:"col-12 border-top pt-3"},[e("div",{staticClass:"d-flex justify-content-end"},[e("b-pagination",{attrs:{"total-rows":t.filteredData.length,"per-page":t.perPage},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1)])])])])])])])],1)},O=[],L=s("c1df"),E=s.n(L),U=s("56d7"),R={data(){return{creditsDetails:[],filteredData:[],title:"Total Credits Usage",items:[{text:"Dashboard",href:"/dashboard"},{text:"Total Credits Usage",active:!0}],userId:this.$store.state.Auth.userId,gitToken:this.$store.state.Auth.gitToken,totalRows:1,currentPage:1,perPage:5,pageOptions:[5,10,25,50,100],filter:null,filterOn:[],sortBy:"",sortDesc:!0,colfields:this.generateTableColumns()}},computed:{rows(){return this.creditsDetails.data.length},_(){return j.a},totalPages(){return Math.ceil(this.rows/this.perPage)}},watch:{perPage:{handler(){this.currentPage=1}},creditsDetails:{handler(){this.filteredData=this.creditsDetails.data}}},created(){U["eventBus"].$emit("update-sidebar","menuitems.dashboard.text")},mounted(){this.$store.state.Auth.creditsDetails?this.creditsDetails=this.$store.state.Auth.creditsDetails:this.getCreditsDetails()},methods:{moment:E.a,onFiltered(t){this.totalRows=t.length,this.currentPage=1},onPageChange(t){this.currentPage=t},generateTableColumns(){return[{key:"docMigrationType.text",label:"Migration Type",sortable:!0},{key:"fileName",label:"File Name",sortable:!0},{key:"pagesConverted",label:"Credits Usage",sortable:!0},{key:"convertedAt",label:"Migrated At",sortable:!0,sortByFormatted:!0,formatter:(t,e,s)=>E()(s.convertedAt).format("DD-MM-YYYY hh:mm A")}]},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},getCreditsDetails(){this.$store.getters.client.get("/orguser/credits-info").then(t=>{this.creditsDetails=t.data,this.$store.commit("setCreditsDetails",t.data)}).catch(t=>{console.log(t)})}}},q=R,M=(s("4728"),Object(l["a"])(q,B,O,!1,null,"0a45fabe",null)),z=M.exports,V=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-8 col-sm-12 mb-3"},[e("InfoCard"),e("div",{staticClass:"card mb-0"},[e("div",{staticClass:"card-body"},[e("Chart")],1)])],1),e("div",{staticClass:"col-md-4 col-sm-12 mb-3"},[e("RecentNotification",{staticClass:"h-100"})],1)]),e("b-card",[e("b-tabs",{staticClass:"btabs-height",attrs:{justified:"","nav-class":"nav-tabs-custom","content-class":"text-muted"}},[e("b-tab",{attrs:{title:"Recent Activities",active:""}},[e("div",[e("div",[e("RecentActivities")],1)])]),e("b-tab",{attrs:{title:"Recent Release Log"}},[e("div",[e("div",[e("RecentPublication",{staticClass:"m-0 p-0"})],1)])])],1)],1)],1)},H=[],W=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"card",staticStyle:{"max-height":"500px"}},[t._m(0),e("div",{staticClass:"card-body border-top mb-3",attrs:{"data-simplebar":""}},[e("ul",{staticClass:"list-unstyled activity-wid m-0"},[t.showSpinner?e("b-skeleton-table",{attrs:{rows:5,columns:1,"table-props":{bordered:!0,striped:!0}}}):t.notificationData.length>0&&!t.showSpinner?e("div",t._l(t.notificationData,(function(s){return e("li",{key:s.id,staticClass:"activity-list publication-list-cust-cls"},[e("div",{},[e("div",{staticClass:"activity-icon avatar-xs"},[e("span",{staticClass:"avatar-title bg-soft-primary text-secondary rounded-circle font-size-24 avatar-title-cust-cls"},[e("span",{staticClass:"dot"})])]),e("div",[e("div",[e("h5",{staticClass:"font-size-13 ptitle-cust-cls"},[t._v(" "+t._s(s.projectName)+" ")])]),e("div",[e("p",{staticClass:"text-muted mb-0"},[t._v(t._s(s.message))])])]),e("div",[e("p",{staticClass:"text-muted mb-0 mr-1 mt-1 font-12"},[t._v(" "+t._s(t.getTimeAgo(s.committer.date))+" ")])])])])})),0):e("div",{staticClass:"d-flex justify-content-center align-items-center m-0 p-0"},[e("div",{staticClass:"text-center"},[e("img",{staticClass:"custom-image",attrs:{src:s("5b4d")}}),e("div",{staticClass:"custom-text"},[t._v(" No commits added in the last 24 hours ")])])])],1)])])])},Y=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-notifications d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("Notifications")])])}],G=s("2f62"),J={props:{items:Object},data(){return{showSpinner:!0,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,notificationData:[],userProjects:null}},mounted(){this.$store.state.Auth.notificationData.length?(this.showSpinner=!1,this.notificationData=this.$store.state.Auth.notificationData):this.getrecentnotification()},created(){this.fetchDitaOtVersions(this.orgId)},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},...Object(G["b"])({get:"userProjectDetails"}),...Object(G["b"])(["fetchDitaOtVersions"]),...Object(G["b"])(["fetchRecentNotification"]),getTimeAgo(t){const e=new Date,s=e.getTime()-new Date(t).getTime(),a=Math.floor(s/6e4);if(a<1)return"just now";if(a<60)return`${a} minute${a>1?"s":""} ago`;{const t=Math.floor(a/60);if(t<24)return`${t} hour${t>1?"s":""} ago`;{const e=Math.floor(t/24);if(e<30)return`${e} day${e>1?"s":""} ago`;{const t=Math.floor(e/30);if(t<12)return`${t} month${t>1?"s":""} ago`;{const e=Math.floor(t/12);return`${e} year${e>1?"s":""} ago`}}}}},getrecentnotification(){this.$store.getters.client.get("/orguser/repo/24hrsCommitNotifications?userId="+this.userId).then(t=>{t.data?(this.showSpinner=!1,this.notificationData=t.data,this.$store.commit("setNotificationData",t.data)):(this.messageToast("Invalid request","danger","No data received from the server"),this.showSpinner=!1)}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred"),this.showSpinner=!1})}}},K=J,Z=(s("e3b2"),Object(l["a"])(K,W,Y,!1,null,"77708854",null)),Q=Z.exports,X=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("div",{staticClass:"custom-notifications d-flex justify-content-end align-items-center"},[e("div",[e("button",{staticClass:"btn text-primary view-details-btn btn-sm m-0",on:{click:t.viewMore}},[e("span",{staticClass:"mdi mdi-eye-outline mr-2"}),t._v(" View More ")])])]),e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{},[e("div",{},[e("div",{staticClass:"row mt-2 d-flex justify-content-between mx-3"},[e("div",{staticClass:"table-responsive mb-0"},[e("b-table",{ref:"adminTable",attrs:{items:t.activityData,fields:t.colfields,responsive:"sm","show-empty":""},scopedSlots:t._u([{key:"cell(createdAt)",fn:function(e){return[t._v(" "+t._s(t.moment(e.item.createdAt).format("YYYY-MM-DD h:mm A"))+" ")]}},{key:"cell(download)",fn:function(s){return[e("b-button",{attrs:{size:"sm",variant:"primary"},on:{click:function(e){return t.downloadFun(s.item)}}},[e("i",{staticClass:"mdi mdi-download"})])]}}])})],1)])])])])])])])},tt=[],et=(s("d9e2"),s("86b6"));const st=async({repoName:t,commitSHA:e=""})=>{console.log("in downloadSourceFiles: ",t,e);const s=et["a"].getters.client;await s.get(`/orguser/docpublish/download-output?repoName=${t}&commitSHA=${e}`,{responseType:"blob"}).then(e=>{console.log("download res: ",e);const s=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",t+".zip"),document.body.appendChild(a),a.click()}).catch(async t=>{let e=null;if(t.response.data instanceof Blob){const s=new FileReader;await new Promise((a,r)=>{s.onload=()=>{e=s.result?s.result:"Error in the downloading file.",console.log("📢[tree.vue:203]: errorText: ",e);try{const t=JSON.parse(e);e=t.message||"An unknown error occurred",console.log("📢[download-source-files.js:35]: errorText: ",e),a()}catch(t){e="Error parsing the error message.",r(t)}},s.onerror=t=>{r(t)},s.readAsText(t.response.data)})}throw null===e?t:new Error(e)})};var at=st,rt={data(){return{activityData:[],userId:this.$store.state.Auth.userId,gitToken:this.$store.state.Auth.gitToken,colfields:this.generateTableColumns()}},computed:{_(){return j.a}},created(){U["eventBus"].$emit("update-sidebar","menuitems.dashboard.text"),this.$store.state.Auth.recentPublicationsData.length?this.activityData=this.$store.state.Auth.recentPublicationsData.splice(0,10):this.getReleasePublication()},methods:{viewMore(){this.$router.push({name:"Releasetable"})},moment:E.a,generateTableColumns(){return[{key:"releaseTitle",label:"Release Title",sortable:!0},{key:"projectName",label:"Project Name",sortable:!0},{key:"outputFormat",label:"Output Format",sortable:!0},{key:"ditaotVersion",label:"DITA OT Version",sortable:!0},{key:"createdAt",label:"Created At",sortable:!0,sortByFormatted:!0,formatter:(t,e,s)=>E()(s.createdAt).format("YYYY-MM-DD HH:mm:ss")},{key:"download",label:"Download",sortable:!1}]},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},getReleasePublication(){this.$store.getters.client.get("/orguser/release/byuserId?userId="+this.userId).then(t=>{t.data?(this.activityData=t.data.splice(0,10),this.$store.commit("setRecentPublicationsData",t.data)):this.messageToast("Invalid request","danger","No data received from the server")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred"),this.showSpinner=!1})},async downloadFun(t){console.log("📢[releasetable.vue:389]: item: ",t);let e=this.$loading.show({loader:"dots"});try{await at({repoName:t.projectName,commitSHA:t.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(s){this.messageToast("Invalid request","danger",s.message)}finally{e.hide()}}}},ot=rt,it=(s("a8de"),Object(l["a"])(ot,X,tt,!1,null,"23bdb6d5",null)),nt=it.exports,ct=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{height:"320px"}},[t.isFetching?t._e():e("apexchart",{attrs:{type:"area",options:t.chartOptions,series:t.chartSeries,height:"320"}}),t.isChartLoading?e("div",[e("b-overlay",{attrs:{show:"",variant:"light"}},[e("div",{staticStyle:{height:"320px"}})])],1):t._e()],1)},lt=[],dt=s("1321"),ut=s.n(dt),mt={components:{apexchart:ut.a},data(){return{userId:this.$store.state.Auth.userId,releases:[],isFetching:!1,chartOptions:{chart:{type:"area"},dataLabels:{enabled:!1},xaxis:{type:"datetime",title:{text:"Date & Time"}},yaxis:{title:{text:"Release Count"}},title:{text:"Releases by Output Format"},stroke:{curve:"smooth",width:"2"},fill:{opacity:.3},colors:["#FF5733","#33FF57","#3357FF","#FF33A1"],legend:{position:"top"},tooltip:{x:{format:"yyyy-MM-dd HH:mm"},theme:"dark",fillSeriesColor:!1},noData:{text:"No Releases Available",align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{fontSize:"16px",fontFamily:"Helvetica, Arial, sans-serif",color:"#777"}}},chartSeries:[]}},mounted(){this.isFetching=!0,this.$store.state.Auth.recentPublicationsData.length?(this.releases=this.$store.state.Auth.recentPublicationsData,console.log("called direct",this.releases),this.prepareChartData(this.$store.state.Auth.recentPublicationsData)):(console.log("called api "),this.getReleaseNote())},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},prepareChartData(t){console.log("📢[chart.vue:73]: releases: ",t);const e={};t.forEach(t=>{const s=t.outputFormat,a=new Date(t.createdAt),r=new Date(18e5*Math.floor(a.getTime()/18e5)).toISOString();e[s]||(e[s]={}),e[s][r]||(e[s][r]=0),e[s][r]++});const s=Array.from(new Set(t.map(t=>{const e=new Date(t.createdAt);return new Date(18e5*Math.floor(e.getTime()/18e5)).toISOString()}))).sort();this.chartSeries=Object.keys(e).map(t=>({name:t,data:s.map(s=>e[t][s]||0)})),this.chartOptions.xaxis.categories=s,console.log("📢[chart.vue:123]: this.chartOptions.xaxis.categories: ",this.chartOptions.xaxis.categories),this.isFetching=!1},getReleaseNote(){this.$store.getters.client.get("/orguser/release/byuserId?userId="+this.userId).then(t=>{t.data&&(this.releases=t.data,this.$store.commit("setRecentPublicationsData",t.data),this.prepareChartData(t.data))}).catch(()=>{}).finally(()=>{this.isFetching=!1})},setData(){}}},ht=mt,pt=(s("ae9a"),Object(l["a"])(ht,ct,lt,!1,null,"511e8a35",null)),gt=pt.exports,ft=function(){var t,e=this,s=e._self._c;return s("div",{staticClass:"align-items-stretch row"},[e._l(e.cardData,(function(t,a){return s("div",{key:a,staticClass:"col-12 col-sm-4 mb-3"},[s("router-link",{attrs:{to:t.link}},[s("div",{staticClass:"card mb-0 h-100"},[s("div",{staticClass:"card-body"},[s("div",{staticClass:"custom-title mb-0"},[e._v(e._s(t.name))]),s("div",{staticClass:"d-flex align-items-start justify-content-between mt-3"},[s("span",{staticClass:"mdi d-flex align-items-center justify-content-center",class:t.icon,style:{color:t.color,fontSize:"25px",width:"40px",height:"40px",borderRadius:"50%",backgroundColor:t.color+"42"}}),s("h2",{staticClass:"mb-0",staticStyle:{"font-size":"30px","font-weight":"300"}},[e._v(" "+e._s(e.formatNumber(t.value))+" ")])])])])])],1)})),s("div",{staticClass:"col-12 col-sm-4 mb-3"},[s("router-link",{attrs:{to:"/usage"}},[s("div",{staticClass:"card mb-0 h-100"},[s("div",{staticClass:"card-body"},[s("div",{staticClass:"custom-title mb-0"},[e._v("Credits Usage")]),s("div",{staticClass:"d-flex align-items-start justify-content-between mt-3"},[s("div",[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px","font-weight":"300"}},[s("b",[e._v("Used: ")]),e._v(" "+e._s(e.formatNumber(null===(t=e.creditsDetails)||void 0===t?void 0:t.totalCreditsUsed))+" ")]),e.creditsDetails.remainingCredits>=0?s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px","font-weight":"300"}},[s("b",[e._v("Remaining: ")]),e._v(" "+e._s(e.formatNumber(e.creditsDetails.remainingCredits))+" ")]):e._e()])])])])])],1)],2)},bt=[],vt={mounted(){this.$store.state.Auth.projectsData.length?(this.projectList=this.$store.state.Auth.projectsData,this.cardData[0].value=this.projectList.length):this.getProjectData(),this.$store.state.Auth.recentPublicationsData.length?(this.releases=this.$store.state.Auth.recentPublicationsData,this.cardData[1].value=this.releases.length):this.getReleaseNote(),this.getCreditsDetails()},data(){return{userId:this.$store.state.Auth.userId,projectList:[],releases:[],publisherTypes:[],migrationsOptions:[],creditsDetails:null,cardData:[{name:"Projects",icon:"mdi-file-document-edit-outline",value:0,link:"/docmanager",color:"#03a9f3"},{name:"Releases",icon:"mdi-folder-multiple count-icon-cust-cls",value:0,link:"/release",color:"#ab8ce4"}]}},methods:{formatNumber(t){return String(t).padStart(2,"0")},async getProjectData(){this.$store.getters.client.get(`/projectuser/byuserid?userId=${this.userId}&show=hide`).then(t=>{t.data&&(this.projectList=t.data,this.cardData[0].value=this.projectList.length,this.$store.commit("setProjectsData",t.data))}).catch(()=>{})},getReleaseNote(){this.$store.getters.client.get("/orguser/release/byuserId?userId="+this.userId).then(t=>{t.data&&(this.releases=t.data,this.$store.commit("setRecentPublicationsData",t.data),this.cardData[1].value=this.releases.length)}).catch(()=>{})},async getoutputFormat(){try{const t=await this.$store.getters.client.get("/plugins");return t.data}catch(t){return[]}},async getCustomOutputFormat(){try{const t=await this.$store.getters.client.get("/orguser/docpublisher/customplugin");return t.data}catch(t){return console.error("Error fetching custom output format:",t),null}},async getPublisherTypes(){const t=await this.getoutputFormat(),e=await this.getCustomOutputFormat();this.publisherTypes=[...t,...e],this.cardData[2].value=this.publisherTypes.length},async getMigrationsOptions(){const t=await this.$store.getters.client.get("/orguser/docMigration/get-docMigrationType-available ");this.migrationsOptions=t.data.data,console.log("📢[InfoCard.vue:140]: migrationsOptions: ",this.migrationsOptions),this.cardData[3].value=this.migrationsOptions.length},getCreditsDetails(){this.$store.getters.client.get("/orguser/credits-info").then(t=>{this.creditsDetails=t.data}).catch(t=>{console.log(t)})}}},yt=vt,Ct=(s("4513"),Object(l["a"])(yt,ft,bt,!1,null,"0f8b58f1",null)),wt=Ct.exports,xt=function(){var t=this,e=t._self._c;return e("div",{},[e("div",{},[e("b-table",{ref:"adminTable",attrs:{items:t.activityData,fields:t.colFields,responsive:"sm","show-empty":""},scopedSlots:t._u([{key:"cell(activity)",fn:function(s){return[e("div",{},[e("div",{},[e("p",{},[t._v(" "+t._s(s.item.activity.name)+" "),s.item.activity.subModule?e("span",{staticStyle:{"font-weight":"bold"}},[t._v("("+t._s(s.item.activity.subModule)+")")]):t._e()])])])]}},{key:"cell(date)",fn:function(e){return[t._v(" "+t._s(t.moment(e.item.date).format("YYYY-MM-DD/HH:MM A"))+" ")]}},{key:"cell(action)",fn:function(s){return[s.item.isActive?e("b-dropdown",{attrs:{right:"","toggle-class":"arrow-none card-drop",variant:"white"},scopedSlots:t._u([{key:"button-content",fn:function(){return[e("i",{staticClass:"mdi mdi-dots-vertical"})]},proxy:!0}],null,!0)},t._l(t.remainingActivitiesRelatedToCurrent(s.item.activity.name),(function(a,r){return e("b-dropdown-item",{key:r,on:{click:function(e){return t.callToActionRelatedToActivity(s.item,a)}}},[t._v(t._s(a.name))])})),1):e("div",{staticClass:"ml-3"},[e("span",[t._v(" - ")])])]}}])})],1)])},_t=[],$t=s("3452"),Tt=s.n($t),kt=s("e31e");const St=t=>{const e=Tt.a.AES.encrypt(t,kt["e"]).toString();return encodeURIComponent(e)},jt=t=>{const e=decodeURIComponent(t),s=Tt.a.AES.decrypt(e,kt["e"]).toString(Tt.a.enc.Utf8);return s};var It={data(){return{activityData:[],colFields:[{key:"projectDetails.projectName",label:"Project Name"},{key:"branch",label:"Branch"},{key:"activity",label:"Activity"},{key:"date",label:"Date & Time"},{key:"action",label:"Action"}]}},mounted(){this.getActivityData()},methods:{moment:E.a,remainingActivitiesRelatedToCurrent(t){const e={DocMigration:[{name:"DocManager"},{name:"DocEditor"},{name:"DocPublisher"}],DocEditor:[{name:"DocManager"},{name:"DocEditor"},{name:"DocPublisher"}],DocPublisher:[{name:"DocManager"}]};return e[t]},callToActionRelatedToActivity(t,e){console.log("object: "+e.name);const s={DocManager:()=>this.redirectToDocManager(t),DocEditor:()=>this.redirectToDocEditor(t),DocPublisher:()=>this.redirectToDocPublisher(t)};s[e.name]()},redirectToDocManager(t){var e,s;this.$router.push({path:`/docmanager/${St(null===(e=t.projectDetails)||void 0===e?void 0:e.owner)}/${St(null===(s=t.projectDetails)||void 0===s?void 0:s.projectName)}?branchName=${St(t.branch)}`})},redirectToDocEditor(t){var e;this.$router.push({path:`/doceditor?projectName=${St(null===(e=t.projectDetails)||void 0===e?void 0:e.projectName)}&branchName=${St(t.branch)}`})},redirectToDocPublisher(t){var e;this.$router.push({path:`/docpublisher?projectName=${St(null===(e=t.projectDetails)||void 0===e?void 0:e.projectName)}&branchName=${St(t.branch)}`})},getActivityData(){this.$store.getters.client.get("/orguser/recent-activities").then(t=>{var e;this.activityData=null===(e=t.data.data)||void 0===e?void 0:e.filter(t=>{var e;return null===t||void 0===t||null===(e=t.projectDetails)||void 0===e?void 0:e.projectName})}).catch(t=>{console.log(t)})}}},Pt=It,Dt=(s("3229"),Object(l["a"])(Pt,xt,_t,!1,null,"5b3105d8",null)),Nt=Dt.exports,At={name:"Dashboard",components:{RecentNotification:Q,RecentPublication:nt,Chart:gt,InfoCard:wt,RecentActivities:Nt},data(){return{title:"Dashboard",items:[{text:"Dashboard",active:!0}]}},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.dashboard.text")}},Ft=At,Bt=(s("474e"),Object(l["a"])(Ft,V,H,!1,null,"592dc162",null)),Ot=Bt.exports,Lt=[{path:"/dashboard",component:Ot,name:"Dashboard"},{path:"/usage",component:z,name:"Usage"}],Et=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.item}}),e("b-modal",{ref:"modalprogress",attrs:{id:"modal-progress","hide-header":"",title:"Setting Up Your Workspace","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("h5",{staticClass:"card-title"},[t._v("Setting Up Your Workspace")]),e("div",{staticClass:"custom-control custom-checkbox mb-3"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck1",disabled:"",checked:""}}),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck1"}},[t._v("DITA-OT")])]),e("div",{staticClass:"custom-control custom-checkbox mb-3"},[e("input",{staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customCheck2",disabled:"",checked:""}}),e("label",{staticClass:"custom-control-label",attrs:{for:"customCheck2"}},[t._v("Projects")])]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1)])]),e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-output-progress",title:"Processing","hide-header":"","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Fetching assigned project lists...")]),e("b-progress",{staticClass:"custom-progress",attrs:{value:t.progress,max:100}})],1),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-3 col-sm-12 mb-0"},[e("div",{staticClass:"d-flex align-items-center mb-1"},[e("b-form-input",{staticClass:"w-100",attrs:{placeholder:"Search Projects"},on:{input:t.searchProject},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})],1)]),e("div",{staticClass:"col-md-9 col-sm-12"},[e("div",{staticClass:"d-flex align-items-center justify-content-end mb-1"},[e("button",{staticClass:"btn btn-primary btn-sm custom-button",on:{click:function(e){return e.preventDefault(),t.syncprojects.apply(null,arguments)}}},[t._m(0),e("span",{staticClass:"custom-text ml-2"},[t._v("Refresh")])])])])]),e("div",{staticClass:"row"},[e("div",{staticClass:"col-xl-12"},[e("b-row",{staticClass:"mt-4"},t._l(t.paginatedProjectList,(function(t){return e("b-col",{key:t.id,attrs:{cols:"12",md:"6",lg:"6"}},[e("projectcard",{attrs:{items:t}})],1)})),1),e("div",{staticClass:"d-flex justify-content-end"},[e("b-pagination",{attrs:{"total-rows":this.projectList.length,"per-page":t.perPage},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1)],1)]),e("div",[e("div",{staticClass:"my-4 text-center"},[e("b-modal",{ref:"modal",attrs:{"hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-escer":"",id:"modal-standard",title:"Github Login","title-class":"font-18"}},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("b-card",{staticClass:"text-center",attrs:{"no-body":""}},[e("b-card-body",[e("img",{attrs:{src:s("3dde"),height:"200"}}),e("b-card-title",[e("h4",{staticClass:"card-title"},[t._v("Connect with GitHub")])]),e("b-card-text",[t._v(" To access the project using GitHub, you need to log in to GitHub. ")]),e("button",{staticClass:"btn btn-primary btn-sm btn-block custom-button",on:{click:t.syncGithub}},[t._v(" Login ")])],1)],1)],1)])])],1)])],1)},Ut=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"custom-icon"},[e("i",{staticClass:"mdi mdi-folder-refresh mdi-16px"})])}],Rt=function(){var t=this,e=t._self._c;return e("div",[e("b-card",{staticClass:"p-0 org-card"},[e("div",{staticClass:"media"},[e("div",{staticClass:"media-body overflow-hidden bg-primary card-header bg-card"},[e("h5",{staticClass:"custom-title d-flex align-items-center mb-0"},[e("i",{staticClass:"d-inline-block mdi cmh-icon mdi-file-document-outline"}),t._v(" "+t._s(t.items.projectName)+" ")])])]),e("div",{staticClass:"mx-5 my-3"},[e("div",{staticClass:"custom-headlines mb-2"},[e("span",{staticClass:"mr-2 text-primary"},[t._v("Total User :")]),e("span",[t._v(t._s(t.userList.length))])])]),e("hr"),e("div",[e("button",{staticClass:"btn card-btn text-primary view-details-btn btn-sm m-0",on:{click:function(e){return t.setdata(t.items.owner,t.items.projectName)}}},[e("span",{staticClass:"mdi mdi-eye-outline mr-1"}),t._v(" View details ")])])])],1)},qt=[],Mt={props:{items:Object},data(){return{item:[{text:"Dashboard",href:"/"},{text:"Projects",active:!0}],modalShow:!1,projectList:[],userList:[],projectOwner:null,projectName:null}},created(){this.userId=this.$store.state.Auth.userId},mounted(){this.getUserInProject()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},async getUserInProject(){this.$store.getters.client.get("/projectuser/byprojectid?projectId="+this.items.projectId).then(t=>{t.data?this.userList=t.data:this.messageToast("Invalid request","danger","An error occurred")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred")})},setdata(t,e){"AI-Deployment"!==e&&(localStorage.setItem("repouser",Tt.a.AES.encrypt(t,kt["e"]).toString()),localStorage.setItem("reponame",Tt.a.AES.encrypt(e,kt["e"]).toString()),this.$store.commit("setCurrentWorkingProject",this.items)),this.$store.commit("setRepoUser",t),this.$store.commit("setRepoName",e),this.redirectProject(t,e)},async redirectProject(t,e){const s=Tt.a.AES.encrypt(t,kt["e"]).toString(),a=Tt.a.AES.encrypt(e,kt["e"]).toString(),r=encodeURIComponent(s),o=encodeURIComponent(a);this.$router.push({path:`/docmanager/${r}/${o}`})}}},zt=Mt,Vt=(s("aebc"),Object(l["a"])(zt,Rt,qt,!1,null,null,null)),Ht=Vt.exports,Wt=s("a15b"),Yt=s("b28b"),Gt=s("26d2"),Jt={components:{projectcard:Ht,BRow:Wt["a"],BCol:Yt["a"],BPagination:Gt["a"]},data(){return{title:"Projects",item:[{text:"Dashboard",href:"/"},{text:"Projects",active:!0}],gitToken:null,projectData:null,clientId:""+kt["b"],appAccess:{},isLoading:!1,orgGithubUser:"",orgAccessURL:"",userGithubUsername:"",projectList:[],currentPage:parseInt(localStorage.getItem("currentPage"))||1,progress:0,perPage:6,gitCode:null,search:"",projectListSearch:""}},created(){if(U["eventBus"].$emit("update-sidebar","menuitems.docmanager.text"),this.gitToken=this.$store.state.Auth.gitToken,this.orgId=this.$store.state.Auth.orgId,this.userId=this.$store.state.Auth.userId,this.userGithubUsername=this.$store.state.Auth.githubUsername,!this.userGithubUsername)try{this.userGithubUsername=JSON.parse(Tt.a.AES.decrypt(localStorage.getItem("githubUsername"),kt["e"]).toString(Tt.a.enc.Utf8))}catch(t){}this.getProjectData()},computed:{paginatedProjectList(){if(null===this.projectList)return[];const t=(this.currentPage-1)*this.perPage,e=t+this.perPage;return this.projectList.slice(t,e)}},watch:{currentPage(t){localStorage.setItem("currentPage",t)}},mounted(){this.getToken(),this.getfoldertree();const t=this.$store.state.Auth.gitToken;t&&""!==t&&null!==t&&"null"!==t&&void 0!==t&&"undefined"!==t||window.location.search.includes("code")||this.$refs["modal"].show()},methods:{...Object(G["b"])({get:"userProjectDetails"}),syncGithub(){const t="https://devapi.met-r.io/";if(!t)return void this.messageToast("Error","danger","Configuration error. Please contact support.");const e=t.endsWith("/")?t.slice(0,-1):t,s=e+"/api/orguser/github/login";window.location.href=s},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},makeToast(t=null){this.$bvToast.toast("Toast body content",{title:"Toast "+(t||"default"),variant:t,solid:!0})},searchProject(){this.search?this.projectList=this.projectListSearch.filter(t=>t.projectName.toLowerCase().includes(this.search.toLowerCase())):this.projectList=this.projectListSearch},async getfoldertree(){await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.$store.state.Auth.userId).then(t=>{const e=t.data&&t.data.userId;this.$store.commit("setWorkspaceStatus",e)}).catch(()=>{this.$store.commit("setWorkspaceStatus",!1)})},async getToken(){const t=window.location.search,e=new URLSearchParams(t),s=e.get("code");if(this.gitCode=s,!s)return;this["$refs"].modal.hide();const a=this.$loading.show({loader:"dots"});await this.getOrgDetails(),this.$store.getters.client.get("/orguser/github/success?code="+s).then(t=>{if(this.$store.commit("updateGitToken",{gitToken:t.data.access_token}),t.data.userData.login){if(null!==t.data.access_token&&""!==t.data.access_token&&(this.gitToken=t.data.access_token,this.username=t.data.userData.login),this.$store.state.Auth.isWorkspaceCreated)return;if(""!==t.data.access_token){let t={userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,packeges:["DITAOt-"+this.appAccess.ditaotVersion,"Custom plugin"],installedPath:""+kt["c"],isInstalled:!0};this.$refs["modalprogress"].show(),this.$store.getters.client.post("/orguser/workspace?orgId="+this.$store.state.Auth.orgId,t).then(()=>{this.$store.commit("setWorkspaceStatus",!0),this.$refs["modalprogress"].hide(),this.messageToast("Workspace Created","primary","Workspace Created Successfully")}).catch(()=>{this.$refs["modalprogress"].hide(),this.isLoading=!1})}}else this.messageToast("Invalid response","danger","Received an invalid response from the server")}).catch(t=>{this.messageToast("Error","danger",t.response?t.response.data.message:"An error occurred")}).finally(()=>{a.hide()})},async getOrgDetails(){this.isLoading=!0,this.$store.getters.client.get("/serveradmin/organization/byorgid?orgId="+this.orgId).then(t=>{if(t.data){this.appAccess=t.data[0];const e=t.data[0].orgGithubURL,s=e.split("/");this.orgGithubUser=s[3],this.orgAccessURL=t.data[0].accessURL}else this.messageToast("Invalid request","danger","An error occurred");this.isLoading=!1}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred"),this.isLoading=!1})},syncprojects(){this.progress=0;const t=this.$store.state.Auth.gitToken;if(!t||"null"===t||null===t)return this.messageToast("GitHub Not Connected","warning","Please connect your GitHub account first."),void this.$refs["modal"].show();let e={userId:this.userId,orgId:this.orgId,gitToken:t,githubUsername:this.userGithubUsername};const s=setInterval(()=>{this.progress<90&&(this.progress+=10)},500);this.$refs["modaloutputprogress"].show(),this.$store.getters.client.put("/orguser/workspace/sync",e).then(()=>{clearInterval(s),this.$refs["modaloutputprogress"].hide(),this.messageToast("Sync Complete","primary","Your assigned project list is up to date!"),this.getProjectData()}).catch(t=>{var e;clearInterval(s),this.$refs["modaloutputprogress"].hide();const a=(null===(e=t.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.message)||t.message;a&&(a.includes("Workspace not found")||a.includes("directory not found")||a.includes("incomplete"))?(this.messageToast("Workspace Required","warning","Please wait while we set up your workspace. This may take a few moments."),this.createWorkspace()):this.messageToast("Error","danger",a||"An error occurred while syncing your project. Please try again later or contact our support team for assistance.")})},async getProjectData(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`/projectuser/byuserid?userId=${this.userId}&show=hide`).then(e=>{e.data?(this.projectList=e.data,this.projectListSearch=e.data):this.messageToast("Invalid request","danger","An error occurred"),t.hide()}).catch(e=>{this.messageToast("Invalid request","danger",e.response?e.response.data.message:"An error occurred"),t.hide()})},async createWorkspace(){let t=!1;try{var e;if(!kt["c"])throw new Error("InstalledPath is required");this.$refs["modalprogress"].show(),t=!0;const s=await this.$store.getters.client.get("/serveradmin/organization/byorgid?orgId="+this.$store.state.Auth.orgId),a=(null===(e=s.data[0])||void 0===e?void 0:e.ditaotVersion)||"3.6.1",r={userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,packeges:["DITAOt-"+a,"Custom plugin"],installedPath:kt["c"],isInstalled:!0};await this.$store.getters.client.post("/orguser/workspace?orgId="+this.$store.state.Auth.orgId,r),this.$store.commit("setWorkspaceStatus",!0),this.messageToast("Workspace Created","success","Workspace created successfully! You can now sync your projects.")}catch(a){var s;const t=(null===(s=a.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.message)||a.message||"Failed to create workspace. Please try again.";throw this.messageToast("Error","danger",t),a}finally{t&&this.$refs["modalprogress"].hide()}}}},Kt=Jt,Zt=(s("d13b"),Object(l["a"])(Kt,Et,Ut,!1,null,"60ced28a",null)),Qt=Zt.exports,Xt=function(){var t,e,a,r,o=this,i=o._self._c;return i("div",[i("PageHeader",{attrs:{title:o.title,items:o.items}}),i("div",{staticClass:"d-sm-flex justify-content-between align-items-center"},[i("div",{staticClass:"mb-3"},[i("div",{staticClass:"mr-2 px-1"},[i("span",{staticClass:"project-name"},[o._v(o._s(o.projectName))])]),i("div",{staticClass:"mr-2 dita-ot-cont px-1"},[i("span",{staticClass:"dita-ot"},[o._v("DITA-OT Version:")]),i("span",{staticClass:"dita-ot-version ml-2"},[o._v(o._s(o.ditaOtVersions))])])]),o.repobranchesdata.length?i("div",[i("button",{staticClass:"btn btn-primary btn-sm mr-3 mb-2",attrs:{type:"button"},on:{click:o.navigateToDiff}},[o._m(0)]),o.ditaTreeData&&(null===(t=o.ditaTreeData[0])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length)>0?i("button",{staticClass:"btn btn-primary btn-sm mr-3 mb-2",attrs:{type:"submit"},on:{click:function(t){return o.downloadZip()}}},[o._m(1)]):o._e(),"AI-Deployment"!==o.projectName&&o.isDocEditor&&o.ditaTreeData&&(null===(e=o.ditaTreeData[0])||void 0===e||null===(e=e.children)||void 0===e?void 0:e.length)>0?i("button",{staticClass:"btn btn-primary btn-sm mb-2",attrs:{type:"submit"},on:{click:function(t){return o.openEditor()}}},[o._m(2)]):o._e()]):o._e()]),i("div",{staticClass:"row mb-2 mt-3"},["AI-Deployment"!==o.projectName?i("button",{staticClass:"btn btn-primary btn-sm ml-3 mb-2",on:{click:function(t){return o.$bvModal.show("changeBranch-bv-modal")}}},[o._v(" Create new branch ")]):o._e(),i("div",{staticClass:"col-lg-12"},[i("multiselect",{attrs:{"max-height":150,options:o.repobranchesdata.map(t=>t.text),placeholder:"Choose a branch","allow-empty":!1},model:{value:o.brachName,callback:function(t){o.brachName=t},expression:"brachName"}})],1)]),i("div",{staticClass:"row"},[i("div",{staticClass:"container-fluid"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col-md-12"},[i("div",{staticClass:"card"},[i("div",{staticClass:"card-body"},[i("div",{staticClass:"row"},[i("div",{staticClass:"col-md-6"},[o._m(3),i("div",{staticClass:"border-top mt-1 infoDiv folderStructure"},[o.ditaTreeData&&(null===(a=o.ditaTreeData[0])||void 0===a||null===(a=a.children)||void 0===a?void 0:a.length)>0?i("simplebar",{staticClass:"pt-1 custom-jstree p-3"},[i("v-jstree",{attrs:{data:o.ditaTreeData},on:{"item-click":o.itemClick}})],1):[i("div",{staticClass:"d-flex justify-content-center align-items-center no-output-cont"},[i("div",{staticClass:"mb-5 no-output-div"},[i("img",{staticClass:"custom-img",attrs:{src:s("5b4d")}}),i("div",{staticClass:"no-output-text"},[o._v(" Repository is empty. ")])])])]],2)]),o.ditaTreeData&&(null===(r=o.ditaTreeData[0])||void 0===r||null===(r=r.children)||void 0===r?void 0:r.length)>0?i("div",{staticClass:"col-md-6 mt-3 mt-md-0"},[o._m(4),o.displayDitaContent?i("div",{staticClass:"border-top mt-1 infoDiv"},[i("simplebar",{staticClass:"custom-jstree p-3"},[i("ssh-pre",{attrs:{language:o.contentTypeFormat}},[o._v(" "+o._s(o.displayDitaContent)+" ")])],1)],1):[o._m(5)]],2):o._e()])])])])])])]),i("changeBranch",{attrs:{branches:o.repobranchesdata.map(t=>t.value),createNewBranchHandler:o.createNewBranchHandler,clone:!0}})],1)},te=[function(){var t=this,e=t._self._c;return e("span",{staticClass:"d-flex align-items-center justify-content-center"},[e("span",[e("i",{staticClass:"mdi mdi-file-compare mdi-16px"})]),e("span",{staticClass:"ml-2"},[t._v(" Compare branches ")])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"d-flex align-items-center justify-content-center"},[e("span",[e("i",{staticClass:"mdi mdi-content-save mdi-16px"})]),e("span",{staticClass:"ml-2"},[t._v(" Download Source Files ")])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"d-flex align-items-center justify-content-center"},[e("span",[e("i",{staticClass:"mdi mdi-file-edit mdi-16px"})]),e("span",{staticClass:"ml-2"},[t._v(" DocEditor ")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-source d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("Source")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-source d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("Content Preview")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"d-flex justify-content-center align-items-center no-output-cont"},[e("div",{staticClass:"mb-5 no-output-div"},[e("img",{staticClass:"custom-img",attrs:{src:s("5b4d")}}),e("div",{staticClass:"no-output-text"},[t._v("No file selected.")])])])}],ee=(s("5b81"),s("8d3b")),se=s("3d20"),ae=s.n(se);function re(){window.location.href="/not-found"}var oe=re,ie=s("ad3a"),ne=s("fb3d"),ce=s.n(ne),le=s("8327"),de=s.n(le),ue=s("d3c8"),me=s.n(ue),he=s("9f94");s("737e");const pe=async t=>{console.log("project name: ",t);const e=et["a"].getters.client,{data:s}=await e.get("/orguser/branch/get-current-branch?repoName="+t);return console.log("branch name:",s),s},ge=async(t,e)=>{console.log("create new branch: ",t,e);const s=et["a"].getters.client;try{const{data:e}=await s.post("/orguser/branch/create",t);return console.log("new branch create:",e),{type:"success",data:e}}catch(a){return console.error(a),{type:"error",error:a}}},fe=async t=>{console.log("discardOrCommit : ",t);const e=et["a"].getters.client;try{const{data:s}=await e.patch("/orguser/branch/discard-or-commit",t);return console.log("res discardOrCommit:",s),s}catch(s){console.error(s)}},be=async(t,e)=>{const s=et["a"].getters.client;let a;try{a=e.$loading.show({loader:"dots"});const{data:r}=await s.put("/orguser/branch/checkout",t);return console.log("checkout service:",r),a&&a.hide(),r}catch(r){if(console.log(r),a&&a.hide(),"discard-or-commit"===r.response.data.data){const s=await ae.a.fire({title:"Warning",text:"You have unsaved changes. Do you want to discard them or commit?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#556ee6",confirmButtonText:"Discard",cancelButtonColor:"#f46a6a",cancelButtonText:"Commit"});return console.log(s),a=e.$loading.show({loader:"dots"}),s.isConfirmed?(console.log("User clicked Discard"),await fe({action:"discard",branchToCheckout:t.branchName,repoName:t.repoName})):s.dismiss===ae.a.DismissReason.cancel?(console.log("User clicked Commit"),await fe({action:"commit",branchToCheckout:t.branchName,commitMessage:`Committing changes while checkout ${t.repoName} : ${t.branchName}`,repoName:t.repoName})):(a&&a.hide(),!1)}console.error(r.response.data.data)}finally{a&&a.hide()}},ve={currentBranch:pe,createNewBranch:ge,discardOrCommit:fe,checkout:be};var ye=ve,Ce=s("8e5f"),we=s.n(Ce),xe=function(){var t=this,e=t._self._c;return e("b-modal",{attrs:{id:"changeBranch-bv-modal","hide-footer":""},scopedSlots:t._u([{key:"modal-title",fn:function(){return[t._v(" Create new branch "+t._s(t.clone?"(Clone)":"(Empty)"))]},proxy:!0}])},[e("div",[e("label",[t._v("Select Base Branch"),e("span",{staticClass:"text-danger"},[t._v("*")])]),e("multiselect",{attrs:{options:t.branches,placeholder:"Choose a branch","max-height":150},model:{value:t.baseBranchName,callback:function(e){t.baseBranchName=e},expression:"baseBranchName"}}),e("div",{staticClass:"my-3"},[e("label",[t._v("New Branch Name"),e("span",{staticClass:"text-danger"},[t._v("*")])]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newBranchName,expression:"newBranchName"}],staticClass:"form-control",attrs:{id:"newBranchName"},domProps:{value:t.newBranchName},on:{input:function(e){e.target.composing||(t.newBranchName=e.target.value)}}})]),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary",attrs:{disabled:!t.baseBranchName||!t.newBranchName},on:{click:t.handleBranchChange}},[t._v(" Create new branch ")])])],1)])},_e=[],$e={name:"changeBranch",components:{Multiselect:we.a},props:{branches:{type:Array,default:()=>[]},createNewBranchHandler:{type:Function},clone:{type:Boolean}},data(){return{newBranchName:"",baseBranchName:""}},methods:{async handleBranchChange(){await this.createNewBranchHandler({baseBranchName:this.baseBranchName,newBranchName:this.newBranchName}),console.log("after complete create branch"),this.newBranchName="",this.baseBranchName=""}}},Te=$e,ke=Object(l["a"])(Te,xe,_e,!1,null,"64a8007a",null),Se=ke.exports,je={components:{VJstree:me.a,SshPre:he["a"],PageHeader:ie["a"],simplebar:ee["a"],Multiselect:we.a,changeBranch:Se},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{title:"DocManager",items:[{text:"Projects",href:"/docmanager"},{text:"DocManager",active:!0}],treeData:[],contentTypeFormat:"xml",repobranchesdata:[],ditaotVersion:"",projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),isLoading:!1,downloadURL:"",brachName:"",previousSelectedBranch:"",urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/,outputURL:null,gitToken:this.$store.state.Auth.gitToken,isDocEditor:null,isDocPublisher:null,editor:ce.a,editorData:null,editorLoader:!1,modal:!1,userId:this.$store.state.Auth.userId,isDitaFilesPresent:!1,ditaTreeData:[],selectedFile:null,displayDitaContent:null,ignoreNextChange:!1}},async mounted(){U["eventBus"].$emit("update-sidebar","menuitems.docmanager.text"),this.getRepoBranch(),this.getOrgDetails(),this.getfoldertree()},methods:{navigateToDiff(){const t=Tt.a.AES.encrypt(this.repouser,kt["e"]).toString(),e=Tt.a.AES.encrypt(this.projectName,kt["e"]).toString(),s=Tt.a.AES.encrypt(this.brachName,kt["e"]).toString(),a=encodeURIComponent(t),r=encodeURIComponent(e),o=encodeURIComponent(s);this.$router.push(`/docmanager/${a}/${r}/${o}/diff`)},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},async openEditor(){this.$store.state.Auth.projectsData.length?this.navigateToEditor():(this.userId=this.$store.state.Auth.userId,this.$store.getters.client.get("/projectuser/byuserid?userId="+this.userId).then(t=>{this.$store.commit("setProjectsData",t.data),this.navigateToEditor()}).catch(()=>{}))},navigateToEditor(){console.log(this.repouser,this.projectName,this.brachName);const t=Tt.a.AES.encrypt(this.repouser,kt["e"]).toString(),e=Tt.a.AES.encrypt(this.projectName,kt["e"]).toString(),s=Tt.a.AES.encrypt(this.brachName,kt["e"]).toString(),a=encodeURIComponent(t),r=encodeURIComponent(e),o=encodeURIComponent(s);this.$router.push({path:`/doceditor/${a}/${r}/${o}`})},handleAccessDenied(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({icon:"error",title:"Oops...",text:"Sorry, you do not have access to DocEditor. Please contact your administrator if you would like to access this feature. Thank you."})},async getOrgDetails(){let t=this.$loading.show({loader:"dots"}),e=this.$store.state.Auth.orgId;this.$store.getters.client.get("serveradmin/organization/byorgid?orgId="+e).then(e=>{t.hide(),e.data&&e.data.length>0?(this.isDocEditor=e.data[0].editor,this.isDocPublisher=e.data[0].publisher):this.messageToast("Invalid request","danger","An error occurred")}).catch(e=>{alert(e.message),t.hide(),this.messageToast("Invalid request","danger",e.response?e.response.data.message:"An error occurred")})},async getRepoBranch(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.repouser}&repoName=${this.projectName}`).then(async t=>{if(this.$route.query.branchName)this.brachName=jt(this.$route.query.branchName),this.previousSelectedBranch=this.brachName,this.getObject(this.brachName),this.$router.push({});else{const t=await ye.currentBranch(this.projectName);this.brachName=t.data,this.previousSelectedBranch=t.data}if(t.data&&t.data.length>0)return this.repobranchesdata=t.data.map(t=>({value:t.name,text:t.name})),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/${this.brachName}/output`,this.$store.getters.client.get(`project/outputtree?gitUsername=${this.repouser}&gitReponame=${this.projectName}&branchsha=${this.brachName}`);this.messageToast("Invalid request","danger","No branches found in the repository.")}).then(t=>{t.data?this.treeData=t.data:this.messageToast("Invalid request","danger","No data found in the output tree.")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred while fetching data.")}).finally(()=>{t.hide()})},async getObject(t){console.log("📢[details.vue:414]: branch: ",t),this.brachName=t;const e=await ye.checkout({repoName:this.projectName,branchName:this.brachName},this);if(console.log("ckeckout res: ",e),!1===e)return this.messageToast("Invalid request","danger","Failed to checkout branch."),this.brachName=this.previousSelectedBranch,void(this.ignoreNextChange=!0);this.previousSelectedBranch=this.brachName,this.messageToast("Branch checkout","success",e.message);let s=this.$loading.show({loader:"dots"});this.outputURL=`https://github.com/${Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8)}/${Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8)}/tree/${this.brachName}/bin/output`,this.$store.getters.client.get(`project/outputtree?gitUsername=${Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8)}&gitReponame=${Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8)}&branchsha=${this.brachName}`).then(t=>{s.hide(),t.data?this.treeData=t.data:this.messageToast("Invalid request","danger","An error occurred")}).catch(t=>{s.hide(),this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred")}),this.selectedFile=null,this.displayDitaContent=null,await this.getfoldertree(),await this.getIndentedContent()},async createNewBranchHandler({baseBranchName:t,newBranchName:e}){let s=this.$loading.show({loader:"dots"});const a=this.repobranchesdata.map(t=>t.value),r=await ye.createNewBranch({repoName:this.projectName,clone:!0,baseBranchName:t,newBranchName:e},a);console.log("res",r),s.hide(),this.$bvModal.hide("changeBranch-bv-modal"),"success"===r.type?(this.selectedFile=null,this.displayDitaContent=null,await this.getRepoBranch(),await this.getfoldertree(),await this.getIndentedContent(),this.messageToast("New branch","success",r.data.message)):this.messageToast("Failed to create new branch.","danger",r.error.response.data.message)},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")},hasDitaOrDitamapFile(t){function e(t){return t.endsWith(".dita")||t.endsWith(".ditamap")}function s(t){if(e(t.name))return!0;if(t.children&&t.children.length>0)for(let e of t.children)if(s(e))return!0;return!1}for(let a of t)if(s(a))return!0;return!1},addFieldsToNestedArray(t){return t.forEach(t=>{var e,s;const a=null===t||void 0===t?void 0:t.name.split(".").pop();"ditamap"!=a&&"index.html"!=(null===t||void 0===t?void 0:t.name)||this.selectedFile||(this.selectedFile=t,this.getIndentedContent(),t.selected=!0),t.text=null===t||void 0===t?void 0:t.name,t.isDirectory=(null===t||void 0===t||null===(e=t.children)||void 0===e?void 0:e.length)>0,t.icon=t.isDirectory?"fa-solid fa-folder-open custom-structure-img":"fa-solid fa-file-lines custom-structure-img",null!==t&&void 0!==t&&null!==(s=t.children)&&void 0!==s&&s.length&&(t.children=t.children.filter(t=>![".git","README.md","images","log.txt"].includes(t.name)),this.addFieldsToNestedArray(t.children)),[".git","output"].includes(t.name)?t.opened=!1:t.opened=!0}),t},async getfoldertree(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.$store.state.Auth.userId).then(async t=>{let e=t.data.installedPath+"/"+this.projectName;await this.$store.getters.client.get("/orguser/workspace/repotree?path="+e).then(t=>{this.ditaTreeData=this.addFieldsToNestedArray([t.data]),this.isDitaFilesPresent=this.hasDitaOrDitamapFile([t.data])}).catch(()=>{})}).catch(()=>{}).finally(()=>{t.hide()})},itemClick(t){t.model.name.endsWith(".dita")||t.model.name.endsWith(".ditamap")||t.model.name.endsWith(".html")||t.model.name.endsWith(".css")||t.model.name.endsWith(".js")?(this.selectedFile=t.model,this.getIndentedContent()):this.selectedFile=null;const e=document.querySelectorAll(".tree-selected");e.forEach((function(t){t.classList.remove("tree-selected")}))},xmlFormat:de.a,getIndentedContent(){console.log("selected file: ",this.selectedFile);const t=this.selectedFile.name.split(".").pop();t.startsWith("dita")||t.startsWith("xml")||t.startsWith("html")||t.startsWith("css")||t.startsWith("js")?(["dita","ditamap","xml","html"].includes(t)?this.contentTypeFormat="xml":["css","js"].includes(t)&&(this.contentTypeFormat="css"),this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.selectedFile.path).then(t=>{this.displayDitaContent=t.data})):this.displayDitaContent=null},async downloadZip(){let t,e;try{console.log("object url",this.outputURL);const s=new URL(this.outputURL);[,t,e]=this.urlParserRegex.exec(s.pathname)}catch(a){return void this.messageToast("Invalid request","danger","Error parsing URL")}let s=this.$loading.show({loader:"dots"});await this.$store.getters.client.post("/orguser/downloadSourceFiles",{owner:t,projectName:e},{responseType:"blob"}).then(t=>{const a=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=a,r.setAttribute("download",e+".zip"),document.body.appendChild(r),r.click(),s.hide(),this.messageToast("Success","primary","Downloaded successfull!")}).catch(t=>{s.hide(),this.messageToast("Invalid request","danger",t.message)})},downloadRepoContent(){let t,e;try{const s=new URL(this.outputURL);[,t,e]=this.urlParserRegex.exec(s.pathname)}catch(a){return void this.messageToast("Invalid request","danger","Error parsing URL")}const s=`https://github.com/${t}/${e}/archive/refs/heads/main.zip`;window.open(s,"_blank")}},watch:{brachName(t,e){this.ignoreNextChange?this.ignoreNextChange=!1:e&&t&&(console.log("in brachName: ",t,e),this.getObject(t))}}},Ie=je,Pe=(s("7bbe"),s("71fd"),Object(l["a"])(Ie,Xt,te,!1,null,"4ca364bc",null)),De=Pe.exports,Ne=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pr-comparison-container"},[e("h2",{staticClass:"page-heading"},[t._v("Compare Branches")]),e("div",{staticClass:"pr-header"},[e("span",{staticClass:"branch-label"},[t._v("Base:")]),e("multiselect",{staticClass:"branch-multiselect",attrs:{options:t.branches,placeholder:"Select branch",label:"name","track-by":"name",disabled:!t.branches.length||t.isLoading},scopedSlots:t._u([{key:"singleLabel",fn:function({option:e}){return[t._v(" "+t._s(e.name||"Select branch")+" ")]}}]),model:{value:t.baseBranch,callback:function(e){t.baseBranch=e},expression:"baseBranch"}}),e("i",{staticClass:"mdi mdi-arrow-left-right arrow-icon"}),e("span",{staticClass:"branch-label"},[t._v("Target:")]),e("multiselect",{staticClass:"branch-multiselect",attrs:{options:t.filteredBranches,placeholder:"Select branch",label:"name","track-by":"name",disabled:!t.branches.length||t.isLoading},scopedSlots:t._u([{key:"singleLabel",fn:function({option:e}){return[t._v(" "+t._s(e.name||"Select branch")+" ")]}}]),model:{value:t.headBranch,callback:function(e){t.headBranch=e},expression:"headBranch"}}),e("button",{staticClass:"compare-btn",attrs:{disabled:t.isLoading},on:{click:t.fetchDiff}},[e("i",{staticClass:"mdi mdi-file-compare mdi-16px"}),t._v(" Compare ")])],1),t.isLoading?e("div",{staticClass:"loader-container"},[e("i",{staticClass:"mdi mdi-loading mdi-spin mdi-36px"}),e("p",[t._v("Fetching data...")])]):t._e(),t.originalDiff&&!t.isLoading?e("button",{staticClass:"toggle-btn",class:{active:"side-by-side"===t.diffFormat},on:{click:t.toggleDiffView}},[e("i",{staticClass:"mdi",class:"side-by-side"===t.diffFormat?"mdi-toggle-switch":"mdi-toggle-switch-off"}),t._v(" "+t._s("side-by-side"===t.diffFormat?"Split View":"Unified View")+" ")]):t._e(),t.originalDiff&&!t.isLoading?e("div",{staticClass:"custom-diff-container",domProps:{innerHTML:t._s(t.computedDiffHtml)}}):t._e(),t.originalDiff||t.isLoading?t._e():e("div",{staticClass:"no-changes-container"},[e("i",{staticClass:"mdi mdi-information-outline mdi-36px"}),e("p",[t._v("There isn’t anything to compare.")]),e("span",[t._v("Select different branches to compare.")])])])},Ae=[],Fe=s("ae7d"),Be=(s("ef6b"),{components:{Multiselect:we.a},data(){return{headBranch:null,branches:[],originalDiff:"",isLoading:!1,diffFormat:"side-by-side",token:this.$store.state.Auth.gitToken,repoOwner:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),repoName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),baseBranch:Tt.a.AES.decrypt(this.$route.params.currentbranch,kt["e"]).toString(Tt.a.enc.Utf8)}},computed:{filteredBranches(){return this.branches.filter(t=>{var e;return t.name!==(null===(e=this.baseBranch)||void 0===e?void 0:e.name)})},computedDiffHtml(){return this.originalDiff?Fe["a"](this.originalDiff,{fileListToggle:!0,drawFileList:!0,fileListStartVisible:!1,outputFormat:this.diffFormat,synchronisedScroll:!0,highlight:!0,highlightCode:!0,diffMaxChanges:200,matching:"words"}):""}},mounted(){this.fetchBranches()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},toggleDiffView(){this.diffFormat="side-by-side"===this.diffFormat?"line-by-line":"side-by-side"},async fetchBranches(){this.isLoading=!0;try{const t=await this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.repoOwner}&repoName=${this.repoName}`);this.branches=t.data.map(t=>({name:t.name}))}catch(t){console.error("Error fetching branches:",t.response),this.messageToast("Internal Server Error","danger","Error fetching branches")}finally{this.isLoading=!1}},async fetchDiff(){if(this.baseBranch&&this.headBranch){this.isLoading=!0;try{var t;const e=await this.$store.getters.client.get(`orguser/branch/diff?repoOwner=${this.repoOwner}&repoName=${this.repoName}&baseBranch=${this.baseBranch.name}&compareBranch=${this.headBranch.name}`);this.originalDiff=(null===(t=e.data)||void 0===t?void 0:t.data)||""}catch(e){this.messageToast("Internal Server Error","danger","Error fetching diff")}finally{this.isLoading=!1}}else this.messageToast("Branch Selection Required","warning","Please select both base and target branches.")}}}),Oe=Be,Le=(s("28c3"),Object(l["a"])(Oe,Ne,Ae,!1,null,"0386c9c6",null)),Ee=Le.exports,Ue=[{path:"/docmanager",component:Qt,name:"DocManager",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame)})},{path:"/docmanager/:repouser/:reponame",component:De,name:"ProjectDetail",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame)})},{path:"/docmanager/:repouser/:reponame/:currentbranch/diff",component:Ee,name:"GitHubDiff",props:t=>({owner:decodeURIComponent(t.params.repouser),repo:decodeURIComponent(t.params.reponame),currentBranch:decodeURIComponent(t.params.currentbranch)})}],Re=s("5f5b"),qe=s("365ce"),Me=s("0187");a["default"].use(Re["a"]);const ze=new a["default"]({}),Ve=(t,e,s,a)=>{const r=t=>{try{const e=Tt.a.AES.decrypt(t,kt["e"]),s=JSON.parse(e.toString(Tt.a.enc.Utf8));return s}catch(e){return null}};qe["b"].get(kt["d"]+"api/orguser/available-permissions",{headers:{Authorization:"Bearer "+r(localStorage.getItem("token")),sessionId:r(localStorage.getItem("sessionId")),userId:r(localStorage.getItem("userId")),orgId:r(localStorage.getItem("orgId"))}}).then(t=>{console.log("📢[secure-route.js:33]: res: ",t),t.data&&t.data.permissions&&t.data.permissions.includes(a)?s():(ze.$bvToast.toast(a+" role is not assigned to you.",{title:"Unassigned role",variant:"danger",autoHideDelay:2e3,solid:!0}),s(e.path))}).catch(t=>{console.log("📢[secure-route.js:50]: error: ",t),Object(Me["a"])(t),s(e.path)})};var He=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",[e("div",{staticClass:"mr-2 px-1"},[e("span",{staticClass:"project-name mr-3"},[t._v(t._s(t.projectName))]),e("span",[t._v(t._s(t.brachName))])]),e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])])]),e("div",{staticClass:"row mt-3"},[this.$store.state.Auth.orgDetails.customPlugin&&t.customPluginOutputFormat.length?e("div",{staticClass:"col-xl-12"},[e("b-card",[e("b-tabs",{staticClass:"btabs-height",attrs:{justified:"","nav-class":"nav-tabs-custom","content-class":"text-muted"}},[e("b-tab",{attrs:{title:"Default Publisher",active:""}},[e("div",[e("div",[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1)])]),e("b-tab",{attrs:{title:"Custom Publisher"}},[e("div",[e("div",[e("customPlugin",{attrs:{ditaotVersion:t.ditaOtVersions}})],1)])])],1)],1)],1):e("div",{staticClass:"col-xl-12"},[null!==t.ditaOtVersions?e("div",[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1):t._e()])])],1)},We=[],Ye=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Document publishing is currently in progress.")]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-primary btn-sm",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit ")])],1)]),t.hideform?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"bg-primary text-white"}),e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body text-center"},[e("h5",{staticClass:"mb-4"},[t._v("Project Name : "+t._s(t.projectName))]),e("p",[t._v("Important! Commit changes to download the output.")]),e("div",{staticClass:"d-flex justify-content-center pt-1"},[e("button",{staticClass:"btn btn-primary btn-sm mr-2 mb-2",attrs:{disabled:t.disablecommitbutton},on:{click:function(e){return e.preventDefault(),t.githubCommit.apply(null,arguments)}}},[t._v(" Commit on GitHub ")]),e("button",{staticClass:"btn btn-light btn-sm mr-2 mb-2",on:{click:function(e){return t.downloadFun()}}},[t._v(" Download Output ")]),["html5","metrhtml5"].includes(t.typeform.outputFormat)?e("button",{staticClass:"btn btn-info btn-sm mr-2 mb-2",attrs:{disabled:!t.userActivityId},on:{click:function(e){return t.deployToChatbotSelectBranch()}}},[t._v(" Deploy to chatbot ")]):t._e()]),e("ChatbotPublishStatus")],1)])])]):t._e(),t.hideform?t._e():e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("form",{attrs:{novalidate:""},on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"form-group"},[t._m(0),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.releaseTitle,expression:"typeform.releaseTitle"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.releaseTitle.$error},attrs:{required:"",name:"releaseTitle",type:"text",id:"releaseTitle",placeholder:"Enter release title"},domProps:{value:t.typeform.releaseTitle},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.typeform,"releaseTitle",e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("releaseTitle")&&"required"==t._.find(t.errors.items,{field:"releaseTitle"}).rule,expression:"\n errors.has('releaseTitle') &&\n _.find(errors.items, { field: 'releaseTitle' }).rule ==\n 'required'\n "}],staticClass:"text-danger text-sm"})]),e("div",{staticClass:"form-group"},[t._m(1),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.inputPath,expression:"typeform.inputPath"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"inputPath",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v(" Select source Ditamap ")]),t._l(t.selectInput,(function(s){return e("option",{key:s.path,domProps:{value:s.path}},[t._v(" "+t._s(s.fileName)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.inputPath")&&t.$v.typeform.inputPath.required,expression:"\n errors.has('typeform.inputPath') &&\n $v.typeform.inputPath.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Input Format selection is required")])])])]),e("div",{staticClass:"form-group"},[t._m(2),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.outputFormat,expression:"typeform.outputFormat"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"outputFormat",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v("Select output format")]),t._l(t.selectOutputFormat,(function(s){return e("option",{key:s.id,domProps:{value:s.transtype}},[t._v(" "+t._s(s.transtype)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.outputFormat")&&t.$v.typeform.outputFormat.required,expression:"\n errors.has('typeform.outputFormat') &&\n $v.typeform.outputFormat.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Output Format selection is required")])])])]),e("div",{staticClass:"form-group text-right mb-0"},[e("div",[e("button",{staticClass:"btn btn-sm btn-primary",attrs:{disabled:!(t.typeform.outputFormat&&t.typeform.inputPath&&t.typeform.releaseTitle)},on:{click:function(e){return t.generateOutputFun(t.projectPath,t.workspacePath)}}},[t._v(" Transform ")]),e("button",{staticClass:"btn btn-light btn-sm m-l-5 ml-1",on:{click:t.resetform}},[t._v(" Cancel ")])])])])])]),e("b-modal",{ref:"pull-modal",attrs:{size:"lg",centered:"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-escer":"",title:"Create a Pull Request"}},[e("div",{staticClass:"d-block"},[e("p",{staticClass:"modal-text"},[t._v("Your files are not updated. Update now.")])]),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary mt-2 px-2 py-1 btn-sm",attrs:{block:""},on:{click:function(e){return t.createPullreq()}}},[t._v(" Pull Repository ")])])]),e("DeployToChatbot",{ref:"deplotToChatbotRef",attrs:{userActivityId:t.userActivityId,repouser:t.repouser},on:{deleteUserActivityId:t.deleteUserActivityId,publishSuccess:t.handlePublishSuccess}})],1)},Ge=[function(){var t=this,e=t._self._c;return e("label",[t._v("Title "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Input Source Ditamap "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Output Format "),e("span",{staticClass:"text-secondary"},[t._v("*")])])}],Je=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"deployToChatbotModal",attrs:{"hide-footer":""}},[e("div",["new"==t.newOrExistingBranch?e("div",{staticClass:"my-3"},[e("label",[t._v("New Branch Name"),e("span",{staticClass:"text-danger"},[t._v("*")])]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.selectedName,expression:"selectedName"}],staticClass:"form-control",attrs:{id:"newBranchName"},domProps:{value:t.selectedName},on:{input:function(e){e.target.composing||(t.selectedName=e.target.value)}}})]):t._e(),"existing"==t.newOrExistingBranch?e("div",{staticClass:"my-3"},[e("label",[t._v("Select Branch Name"),e("span",{staticClass:"text-danger"},[t._v("*")])]),e("multiselect",{attrs:{options:t.repobranchesdata,placeholder:"Choose a branch","max-height":150},model:{value:t.selectedName,callback:function(e){t.selectedName=e},expression:"selectedName"}})],1):t._e(),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary",attrs:{disabled:!t.selectedName},on:{click:function(e){return t.deployToChatbotHandler()}}},[t._v(" Deploy to chatbot ")])])])]),e("b-modal",{ref:"modalProgress",attrs:{id:"modal-progress",title:"Deploying...","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":"",centered:""}},[e("div",{staticClass:"text-center"},[t.progress<100?e("p",[t._v("Deployment in progress...")]):e("p",{staticClass:"text-success"},[t._v("Deployment successful!")])]),e("b-progress",{staticClass:"mb-3 custom-progress",attrs:{value:t.progress,max:100}})],1)],1)},Ke=[],Ze={components:{Multiselect:we.a},props:{userActivityId:String,repouser:String},data(){return{selectedName:null,newOrExistingBranch:null,repobranchesdata:[],progress:0}},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},deployToChatbotSelectBranch(){ae.a.fire({title:"Choose Existing or New Branch?",icon:"info",showCancelButton:!0,confirmButtonText:"New",cancelButtonText:"Extisting"}).then(async t=>{t.isConfirmed?(this.selectedName=null,console.log("confirm new"),this.newOrExistingBranch="new",this.$refs["deployToChatbotModal"].show()):t.dismiss===ae.a.DismissReason.cancel&&(console.log("cancle existing"),await this.getRepoBranch(),this.newOrExistingBranch="existing",this.$refs["deployToChatbotModal"].show())})},async getRepoBranch(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.repouser}&repoName=AI-Deployment`).then(async t=>{t.data&&t.data.length>0?(this.repobranchesdata=t.data.map(t=>t.name).filter(t=>"main"!==t),0==this.repobranchesdata.length&&this.messageToast("No branch found","danger","No branch found in the repository.")):this.messageToast("No branch found","danger","No branch found in the repository.")}).catch(t=>{this.messageToast("invalid request","danger",t.response.data.message)}).finally(()=>{t.hide()})},async simulateProgress(){for(let t=5;t<=90;t+=2){if(await new Promise(t=>setTimeout(t,500)),this.progress>=100)break;this.progress=t}},async deployToChatbotHandler(){this.progress=0,this.$refs["deployToChatbotModal"].hide(),this.$refs.modalProgress.show();const t={selectedName:this.selectedName,publishOption:this.newOrExistingBranch,userActivityId:this.userActivityId};try{this.simulateProgress();const e=await this.$store.getters.client.post("/orguser/workspace/publish-to-chatbot",t);console.log("📢Publish Response",e),this.progress=100,this.messageToast("Success","primary",e.data.message),this.$refs["deployToChatbotModal"].hide(),this.$emit("deleteUserActivityId"),this.$root.$emit("publishSuccess"),setTimeout(()=>{this.$refs.modalProgress.hide()},1e3)}catch(s){var e;this.messageToast("Error","danger",(null===(e=s.response)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.message)||"Deployment failed"),this.progress=0,this.$refs.modalProgress.hide()}}}},Qe=Ze,Xe=(s("1871"),Object(l["a"])(Qe,Je,Ke,!1,null,null,null)),ts=Xe.exports,es=function(){var t=this,e=t._self._c;return t.isPublishedToChatbot?e("b-alert",{staticClass:"mt-2 mb-0",attrs:{variant:"info",show:""}},[e("p",{staticClass:"deploy-text"},[t._v(" Your HTML output has been successfully published. "),e("br"),t._v(" View it here: "),e("a",{attrs:{href:t.ChatbotFrontendURL,target:"_blank"}},[t._v(t._s(t.ChatbotFrontendURL))])])]):t._e()},ss=[],as={data(){return{ChatbotFrontendURL:kt["a"],isPublishedToChatbot:!1}},created(){this.$root.$on("publishSuccess",this.handlePublishSuccess)},beforeDestroy(){this.$root.$off("publishSuccess",this.handlePublishSuccess)},methods:{handlePublishSuccess(){this.isPublishedToChatbot=!0}}},rs=as,os=(s("27cb"),Object(l["a"])(rs,es,ss,!1,null,"5c33f4a8",null)),is=os.exports,ns={components:{DeployToChatbot:ts,ChatbotPublishStatus:is},props:{ditaotVersion:String},data(){return{isPublishedToChatbot:!1,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,userName:this.$store.state.Auth.userName,typeform:{inputPath:"",outputPath:"",outputFormat:"",releaseTitle:""},selectInput:null,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectOutputFormat:null,submitted:!1,projectPath:null,typesubmit:!1,workspacePath:null,disablebutton:!1,disablecommitbutton:!1,commitMsg:null,hideform:!1,showModal:!1,model:"",releaseParams:null,outputURL:null,gitToken:this.$store.state.Auth.gitToken,urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/,userActivityId:null,chatbotDeplyedFlag:!1}},created(){this.getWorkspace(),this.hideform=!1},mounted(){this.getoutputFormat(),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/${this.brachName}/output`,this.makedefaultplugin(),this.hideform=!1},computed:{_(){return j.a}},methods:{handlePublishSuccess(){this.isPublishedToChatbot=!0},preventLeadingSpace(t){t.target.value?" "==t.target.value[0]&&(t.target.value=t.target.value.replace(/^\s*/,"")):t.preventDefault()},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},createPullreq(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/workspace/pullGitChanges?projectName="+this.projectName).then(()=>{this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.currentfilePath).then(t=>{U["eventBus"].$emit("getcontent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("textViewContent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("clearHistory")}).catch(()=>{}),this.$refs["pull-modal"].hide(),t.hide(),this.messageToast("Success","primary","Pull request completed")}).catch(e=>{t.hide(),this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred during the pull request.")})},async getWorkspace(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.userId).then(async e=>{let s=e.data.installedPath+"/"+this.projectName;this.workspacePath=e.data.installedPath,this.projectPath=e.data.installedPath+"/"+this.projectName,await this.$store.getters.client.post("/orguser/workspace/fetchGitRemoteChanges?path="+s).then(t=>{t.data.message.includes("please pull your branch to proceed")&&this.$refs["pull-modal"].show()});let a="ditamap";await this.$store.getters.client.get(`/orguser/workspace/inputfiles?path=${s}&extenssion=${a}`).then(e=>{t.hide(),this.selectInput=e.data}).catch(()=>{t.hide()}),await this.$store.getters.client.get("/orguser/workspace/repotree?path="+s).then(e=>{t.hide(),this.model=e.data}).catch(()=>{t.hide()})}).catch(()=>{t.hide()})},makedefaultplugin(){const t={userId:this.userId,orgId:this.orgId,customizationOptions:{}};this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",t).then(()=>{}).catch(()=>{}),this.$store.getters.client.post("/orguser/docstyler/customizehtmlOutput",t).then(()=>{}).catch(()=>{})},async generateOutputFun(t,e){this.disablebutton=!0;let s=e+"/dita-ot-"+this.ditaotVersion+"/bin",a={inputPath:this.typeform.inputPath,ditaotVersion:this.ditaotVersion,binPath:s,outputPath:t+"/output",outputFormat:this.typeform.outputFormat};this.releaseParams={ditaMapFileName:this.typeform.inputPath.split("/").pop(),outputFormat:this.typeform.outputFormat,ditaotVersion:this.ditaotVersion,orgId:this.orgId,userId:this.userId,releaseTitle:this.typeform.releaseTitle,releasedBy:this.userName,projectName:this.projectName},await this.$validator.validateAll().then(t=>{t&&(this.$refs["modaloutputprogress"].show(),this.$store.getters.client.post("/orguser/docpublish",a).then(t=>{this.disablebutton=!1,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","primary",t.data.message),this.typeform.inputPath=null,this.hideform=!0,this.disablecommitbutton=!1,this.typeform.releaseTitle=null}).catch(t=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("invalid request","danger",t.response.data.message)}))})},commitOnGithub(){this.showModal=!0},githubCommit(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit.",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,confirmButtonColor:"#556ee6",cancelButtonColor:"#f46a6a",preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={path:this.projectPath,githubUsername:this.$store.state.Auth.githubUsername,email:this.$store.state.Auth.userEmail,message:e,repoName:this.projectName,transType:this.typeform.outputFormat};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.put("/orguser/workspace/commit",s).then(e=>{this.disablecommitbutton=!0,this.releaseParams.commitSHA=e.data.commitSHA,this.userActivityId=e.data.userActivityId,this.releaseParams.owner=Tt.a.AES.decrypt(this.$route.params.repoowner,kt["e"]).toString(Tt.a.enc.Utf8),this.$store.getters.client.post("/orguser/release",this.releaseParams).then(()=>{this.$store.commit("setRecentPublicationsData",[])}).catch(t=>{this.$refs["modaloutputprogress"].hide(),t.response&&t.response.data&&"release validation failed: commitSHA: Path `commitSHA` is required."===t.response.data.message||this.messageToast("Invalid request","danger",t.response&&t.response.data?t.response.data.message:"Unknown error occurred")}),t.fire({icon:"success",title:"Commit request completed.",text:e.data.message||"Files committed successfully."})}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message})})}})},deployToChatbotSelectBranch(){this.$refs.deplotToChatbotRef.deployToChatbotSelectBranch()},deleteUserActivityId(){this.userActivityId=null},async getoutputFormat(){await this.$store.getters.client.get("/plugins?category=default").then(t=>{this.selectOutputFormat=t.data}).catch(()=>{})},resetform(){this.typeform.inputPath="",this.typeform.outputFormat="",this.typeform.releaseTitle=""},async downloadFun(){let t=this.$loading.show({loader:"dots"});try{await at({repoName:this.projectName,commitSHA:this.releaseParams.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(e){this.messageToast("Invalid request","danger",e.message)}finally{t.hide()}},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")}}},cs=ns,ls=(s("1d0b"),Object(l["a"])(cs,Ye,Ge,!1,null,"578b78d9",null)),ds=ls.exports,us=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Document publishing is currently in progress.")]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-primary btn-sm",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit ")])],1)]),t.hideform?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"bg-primary text-white"}),e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body text-center"},[e("h5",{staticClass:"mb-4"},[t._v("Project Name : "+t._s(t.projectName))]),e("p",[t._v("Important! Commit changes to download the output.")]),e("div",{staticClass:"d-flex justify-content-center pt-1"},[e("button",{staticClass:"btn btn-primary btn-sm mr-2 mb-2",attrs:{disabled:t.disablecommitbutton},on:{click:function(e){return e.preventDefault(),t.githubCommit.apply(null,arguments)}}},[t._v(" Commit on GitHub ")]),e("button",{staticClass:"btn btn-light btn-sm mr-2 mb-2",on:{click:function(e){return t.downloadFun()}}},[t._v(" Download Output ")]),"metrhtml5"===t.ditaOtFolder[t.selectedOutputFormatIndex].transtype?e("button",{staticClass:"btn btn-info btn-sm mr-2 mb-2",attrs:{disabled:!t.userActivityId},on:{click:function(e){return t.deployToChatbotSelectBranch()}}},[t._v(" Deploy to chatbot ")]):t._e()]),e("ChatbotPublishStatus")],1)])])]):t._e(),t.hideform?t._e():e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("form",{attrs:{novalidate:""},on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"form-group"},[t._m(0),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.releaseTitle,expression:"typeform.releaseTitle"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.releaseTitle.$error},attrs:{required:"",name:"releaseTitle",type:"text",id:"releaseTitle",placeholder:"Enter Release Title"},domProps:{value:t.typeform.releaseTitle},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.typeform,"releaseTitle",e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("releaseTitle")&&"required"==t._.find(t.errors.items,{field:"releaseTitle"}).rule,expression:"\n errors.has('releaseTitle') &&\n _.find(errors.items, { field: 'releaseTitle' }).rule ==\n 'required'\n "}],staticClass:"text-danger text-sm"})]),e("div",{staticClass:"form-group"},[t._m(1),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.inputPath,expression:"typeform.inputPath"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"inputPath",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v(" Select Source Ditamap ")]),t._l(t.selectInput,(function(s){return e("option",{key:s.path,domProps:{value:s.path}},[t._v(" "+t._s(s.fileName)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.inputPath")&&t.$v.typeform.inputPath.required,expression:"\n errors.has('typeform.inputPath') &&\n $v.typeform.inputPath.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Input Format selection is required")])])])]),e("div",{staticClass:"form-group"},[t._m(2),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.selectedOutputFormatIndex,expression:"selectedOutputFormatIndex"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.selectedOutputFormatIndex=e.target.multiple?s:s[0]}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v("Select Output Format")]),t._l(t.selectOutputFormat,(function(s,a){return e("option",{key:s.id,domProps:{value:a}},[t._v(" "+t._s(s.transtype)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.outputFormat")&&t.$v.typeform.outputFormat.required,expression:"\n errors.has('typeform.outputFormat') &&\n $v.typeform.outputFormat.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Output Format selection is required")])])])]),e("div",{staticClass:"form-group mb-0 text-right"},[e("div",[e("button",{staticClass:"btn btn-sm btn-primary",attrs:{disabled:!(t.typeform.inputPath&&t.typeform.releaseTitle)},on:{click:function(e){return t.generateOutputFun(t.projectPath,t.workspacePath)}}},[t._v(" Transform ")]),e("button",{staticClass:"btn btn-light btn-sm m-l-5 ml-1",on:{click:t.resetform}},[t._v(" Cancel ")])])])])])]),e("DeployToChatbot",{ref:"deplotToChatbotRef",attrs:{userActivityId:t.userActivityId,repouser:t.repouser},on:{deleteUserActivityId:t.deleteUserActivityId,publishSuccess:t.handlePublishSuccess}})],1)},ms=[function(){var t=this,e=t._self._c;return e("label",[t._v("Title "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Input Source Ditamap "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Output Format "),e("span",{staticClass:"text-secondary"},[t._v("*")])])}],hs={components:{DeployToChatbot:ts,ChatbotPublishStatus:is},props:{ditaotVersion:String},data(){return{isPublishedToChatbot:!1,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,userName:this.$store.state.Auth.userName,typeform:{inputPath:"",outputPath:"",outputFormat:"",releaseTitle:""},projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectInput:null,selectOutputFormat:null,outputURL:null,submitted:!1,projectPath:null,typesubmit:!1,workspacePath:null,disablebutton:!1,disablecommitbutton:!1,commitMsg:null,hideform:!1,showModal:!1,model:"",ditaOtFolder:"",selectedOutputFormatIndex:"",releaseParams:null,gitToken:this.$store.state.Auth.gitToken,urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/,userActivityId:null}},created(){this.getWorkspace(),this.hideform=!1},mounted(){console.log("route param doc publish: ",this.$route.params),this.getoutputFormat(),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/${this.brachName}/output`,console.log("out url mounted: ",this.outputURL),this.makedefaultplugin(),this.hideform=!1},computed:{_(){return j.a}},methods:{handlePublishSuccess(){this.isPublishedToChatbot=!0},redirectToDocStyler(){const t=Tt.a.AES.encrypt(this.repouser,kt["e"]).toString(),e=Tt.a.AES.encrypt(this.projectName,kt["e"]).toString(),s=Tt.a.AES.encrypt(this.brachName,kt["e"]).toString(),a=encodeURIComponent(t),r=encodeURIComponent(e),o=encodeURIComponent(s);this.$router.push({path:`/docstyler/${a}/${r}/${o}`})},preventLeadingSpace(t){t.target.value?" "==t.target.value[0]&&(t.target.value=t.target.value.replace(/^\s*/,"")):t.preventDefault()},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},createPullreq(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/workspace/pullGitChanges?projectName="+this.projectName).then(()=>{this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.currentfilePath).then(t=>{U["eventBus"].$emit("getcontent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("textViewContent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("clearHistory")}).catch(()=>{}),this.$refs["pull-modal"].hide(),t.hide(),this.messageToast("Success","primary","Pull request completed")}).catch(e=>{t.hide(),this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred during the pull request.")})},async getWorkspace(){await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.userId).then(async t=>{let e=t.data.installedPath+"/"+this.projectName;this.workspacePath=t.data.installedPath,this.projectPath=t.data.installedPath+"/"+this.projectName,await this.$store.getters.client.post("/orguser/workspace/fetchGitRemoteChanges?path="+e).then(t=>{t.data.message.includes("please pull your branch to proceed")&&this.$refs["pull-modal"].show()});let s="ditamap";await this.$store.getters.client.get(`/orguser/workspace/inputfiles?path=${e}&extenssion=${s}`).then(t=>{this.selectInput=t.data}).catch(()=>{}),await this.$store.getters.client.get("/orguser/workspace/repotree?path="+e).then(t=>{this.model=t.data}).catch(()=>{})}).catch(()=>{})},makedefaultplugin(){const t={userId:this.userId,orgId:this.orgId,customizationOptions:{}};this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",t).then(()=>{}).catch(()=>{}),this.$store.getters.client.post("/orguser/docstyler/customizehtmlOutput",t).then(()=>{}).catch(()=>{})},async generateOutputFun(t){this.disablebutton=!0;let e={inputPath:this.typeform.inputPath,outputPath:t+"/output",transtype:this.ditaOtFolder[this.selectedOutputFormatIndex].transtype,ditaOtFolder:this.ditaOtFolder[this.selectedOutputFormatIndex].ditaOtFolder};this.releaseParams={ditaMapFileName:this.typeform.inputPath.split("/").pop(),outputFormat:this.ditaOtFolder[this.selectedOutputFormatIndex].transtype,ditaotVersion:this.ditaotVersion,orgId:this.orgId,userId:this.userId,releaseTitle:this.typeform.releaseTitle,releasedBy:this.userName,projectName:this.projectName},await this.$validator.validateAll().then(t=>{t&&(this.$refs["modaloutputprogress"].show(),this.$store.getters.client.post("/orguser/docpublisher/customplugin/publishOutput",e).then(t=>{this.disablebutton=!1,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","primary",t.data.message),this.typeform.inputPath=null,this.hideform=!0,this.disablecommitbutton=!1,this.typeform.releaseTitle=null}).catch(t=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("invalid request","danger",t.response.data.message)}))})},commitOnGithub(){this.showModal=!0},githubCommit(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit.",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,confirmButtonColor:"#556ee6",cancelButtonColor:"#f46a6a",preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={path:this.projectPath,githubUsername:this.$store.state.Auth.githubUsername,email:this.$store.state.Auth.userEmail,message:e,repoName:this.projectName,transType:this.ditaOtFolder[this.selectedOutputFormatIndex].transtype};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.put("/orguser/workspace/commit",s).then(e=>{this.disablecommitbutton=!0,this.releaseParams.commitSHA=e.data.commitSHA,this.userActivityId=e.data.userActivityId,this.releaseParams.owner=Tt.a.AES.decrypt(this.$route.params.repoowner,kt["e"]).toString(Tt.a.enc.Utf8),this.$store.getters.client.post("/orguser/release",this.releaseParams).then(()=>{this.$store.commit("setRecentPublicationsData",[])}).catch(t=>{this.$refs["modaloutputprogress"].hide(),t.response&&t.response.data&&"release validation failed: commitSHA: Path `commitSHA` is required."===t.response.data.message||this.messageToast("Invalid request","danger",t.response&&t.response.data?t.response.data.message:"Unknown error occurred")}),t.fire({icon:"success",title:"Commit request completed.",text:e.data.message||"Files committed successfully."})}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message})})}})},deployToChatbotSelectBranch(){this.$refs.deplotToChatbotRef.deployToChatbotSelectBranch()},deleteUserActivityId(){this.userActivityId=null},async getoutputFormat(){await this.$store.getters.client.get("/orguser/docpublisher/customplugin").then(t=>{this.selectOutputFormat=t.data,this.ditaOtFolder=t.data}).catch(()=>{})},resetform(){this.typeform.inputPath="",this.typeform.outputFormat="",this.typeform.releaseTitle=""},async downloadFun(){let t=this.$loading.show({loader:"dots"});try{await at({repoName:this.projectName,commitSHA:this.releaseParams.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(e){this.messageToast("Invalid request","danger",e.message)}finally{t.hide()}},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")}}},ps=hs,gs=Object(l["a"])(ps,us,ms,!1,null,null,null),fs=gs.exports,bs=s("f902"),vs=s("6190"),ys={components:{generateoutput:ds,BTabs:bs["a"],BTab:vs["a"],customPlugin:fs},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{organizationDetails:null,customPluginOutputFormat:null,orgId:this.$store.state.Auth.orgId,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),title:"DocPublisher",items:[{text:"Projects",href:"/docpublisher"},{text:"DocPublisher",active:!0}]}},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text"),this.getoutputFormat()},mounted(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm my-3",cancelButton:"btn btn-sm mr-2 btn-light"},buttonsStyling:!1});t.fire({text:"Do you want to style your document before publishing?",showCancelButton:!0,confirmButtonText:"Yes! Let's proceed",cancelButtonText:"No! Continue with DocPublisher",reverseButtons:!0}).then(t=>{if(t.isConfirmed){const t=encodeURIComponent(this.$route.params.repouser),e=encodeURIComponent(this.$route.params.reponame),s=encodeURIComponent(this.$route.params.repobranch);this.$router.push({path:`/docstyler/${t}/${e}/${s}`})}else t.dismiss,ae.a.DismissReason.cancel}),Object.keys(this.$store.state.Auth.orgDetails).length?this.organizationDetails=this.$store.state.Auth.orgDetails:this.getOrgDetails()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},async getOrgDetails(){await this.$store.getters.client.get("/serveradmin/organization/byorgid?orgId="+this.orgId).then(t=>{t.data?(this.organizationDetails=t.data[0],this.$store.commit("setOrgDetails",this.organizationDetails)):this.messageToast("Invalid request","danger","No data received from the server")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred")})},async getoutputFormat(){await this.$store.getters.client.get("/orguser/docpublisher/customplugin").then(t=>{this.customPluginOutputFormat=t.data,this.ditaOtFolder=t.data}).catch(()=>{})}}},Cs=ys,ws=(s("606e"),Object(l["a"])(Cs,He,We,!1,null,"cc60f998",null)),xs=ws.exports,_s=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.item}}),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"card shadow-sm"},[t._m(0),e("div",{staticClass:"container"},[e("form",[e("div",{staticClass:"form-group row"},[t._m(1),e("div",{staticClass:"col-md-12"},[e("multiselect",{staticClass:"custom-multiselect",staticStyle:{width:"100%"},attrs:{options:t.projectList.map(t=>t.projectName),"max-height":150,placeholder:"Choose a Project","allow-empty":!1},model:{value:t.selectedproject,callback:function(e){t.selectedproject=e},expression:"selectedproject"}})],1)]),t.hasData?e("div",{staticClass:"form-group row"},[t._m(2),e("div",{staticClass:"col-md-12"},[e("multiselect",{attrs:{"max-height":150,options:t.repobranchesdata.map(t=>t.text),placeholder:"Choose a branch","allow-empty":!1},model:{value:t.selectedBranch,callback:function(e){t.selectedBranch=e},expression:"selectedBranch"}})],1)]):t._e(),e("div",{staticClass:"row from-group"},[e("div",{staticClass:"col-md-12"},[e("button",{staticClass:"btn btn-primary mb-3 btn-sm",attrs:{type:"submit",disabled:t.isButtonDisabled},on:{click:function(e){e.preventDefault(),""!==t.selectedproject&&t.setdata(t.selectedProjectOwner,t.selectedProjectName)}}},[t._v(" Next ")])])])])])])])])])],1)},$s=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-notifications d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title"},[t._v(" Add details to proceed with DocPublisher ")]),e("div")])},function(){var t=this,e=t._self._c;return e("label",{staticClass:"col-md-12 col-form-label"},[t._v("Select Project"),e("span",{staticClass:"text-danger"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",{staticClass:"col-md-12 col-form-label"},[t._v("Select Branch"),e("span",{staticClass:"text-danger"},[t._v("*")])])}],Ts={components:{PageHeader:ie["a"],Multiselect:we.a},data(){return{selectedproject:"",userId:this.$store.state.Auth.userId,items:"",selectedProjectOwner:"",selectedProjectName:null,selectedBranch:"",previousSelectedBranch:"",projectList:[],repobranchesdata:[],title:"DocPublisher",item:[{text:"Dashboard",href:"/"},{text:"DocPublisher",active:!0}],ignoreNextChange:!1}},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text"),this.$store.state.Auth.projectsData.length?(this.projectList=this.$store.state.Auth.projectsData,this.initialSelectProjectIfQueryPresent()):this.getProjectData()},computed:{isButtonDisabled(){return null===this.selectedProjectName||""===this.selectedBranch},hasData(){return this.repobranchesdata.length>0}},methods:{...Object(G["b"])({get:"userProjectDetails"}),messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},setdata(t,e){this.redirectProject(t,e)},getProjectData(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get("/projectuser/byuserid?userId="+this.userId).then(e=>{t.hide(),Array.isArray(e.data)?(this.projectList=e.data,this.$store.commit("setProjectsList",e.data),this.initialSelectProjectIfQueryPresent()):this.messageToast("Error","danger","Received invalid project data from the server")}).catch(e=>{t.hide(),this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred while fetching project data.")})},async redirectProject(t,e){const s=Tt.a.AES.encrypt(t,kt["e"]).toString(),a=Tt.a.AES.encrypt(e,kt["e"]).toString(),r=Tt.a.AES.encrypt(this.selectedBranch,kt["e"]).toString(),o=Tt.a.AES.encrypt(this.selectedProjectOwner,kt["e"]).toString();localStorage.setItem("repouser",s),localStorage.setItem("reponame",a);const i=encodeURIComponent(s),n=encodeURIComponent(a),c=encodeURIComponent(r),l=encodeURIComponent(o);this.$router.push({path:`/docpublisher/${i}/${n}/${c}/${l}`})},async getRepoBranch(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.selectedProjectOwner}&repoName=${this.selectedProjectName}`).then(async t=>{if(this.$route.query.branchName)this.selectedBranch=jt(this.$route.query.branchName),this.previousSelectedBranch=this.selectedBranch,this.checkoutBranch(this.selectedBranch),this.$router.push({});else{const t=await ye.currentBranch(this.selectedProjectName);this.selectedBranch=t.data,this.previousSelectedBranch=t.data}t.data&&t.data.length>0?this.repobranchesdata=t.data.map(t=>({value:t.name,text:t.name})):this.messageToast("invalid request","danger","No branches found in the Project.")}).catch(t=>{this.messageToast("invalid request","danger",t.response.data.message)}).finally(()=>{t.hide()})},async checkoutBranch(t){this.selectedBranch=t,console.log("in checkoutBranch: ",this.selectedBranch);const e=await ye.checkout({repoName:this.selectedProjectName,branchName:this.selectedBranch},this);if(console.log("ckeckout res: ",e),!1===e)return this.messageToast("Invalid request","danger","Failed to checkout branch."),this.selectedBranch=this.previousSelectedBranch,void(this.ignoreNextChange=!0);this.previousSelectedBranch=this.selectedBranch,this.messageToast("Branch checkout","success",e.message)},initialSelectProjectIfQueryPresent(){const t=this.$route.query;if(t.projectName&&t.branchName)this.selectedproject=jt(t.projectName),this.selectedBranch=jt(t.branchName);else if(this.$store.state.Auth.currentWorkingProject){const t=this.projectList.some(t=>t.projectName===this.$store.state.Auth.currentWorkingProject.projectName);if(!t)return this.$store.commit("setCurrentWorkingProject",null),void localStorage.removeItem("currentWorkingProject");this.selectedproject=this.$store.state.Auth.currentWorkingProject.projectName}}},watch:{selectedproject(t){const e=this.projectList.find(e=>e.projectName===t);console.log("selected project: ",e),this.selectedProjectOwner=e.owner,this.selectedProjectName=e.projectName,this.repobranchesdata=[],this.getRepoBranch(),this.$store.commit("setCurrentWorkingProject",e)},selectedBranch(t,e){this.ignoreNextChange?this.ignoreNextChange=!1:e&&t&&(console.log("in selectedBranch: ",t,e),this.checkoutBranch(t))}}},ks=Ts,Ss=(s("d1aa"),Object(l["a"])(ks,_s,$s,!1,null,"14b754bd",null)),js=Ss.exports,Is=[{path:"/docpublisher/:repouser/:reponame/:repobranch/:repoowner",component:xs,name:"DocPublisher",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch),repoowner:decodeURIComponent(t.params.repoowner)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}},{path:"/docpublisher",component:js,name:"Projects",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}}],Ps=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])]),e("Details",{attrs:{currentStep:t.currentStep,steps:t.steps},on:{stepChanged:t.stepChanged}})],1)},Ds=[],Ns=function(){var t,e,a=this,r=a._self._c;return r("div",[r("multiselect",{staticClass:"custom-multiselect my-4",staticStyle:{width:"min(300px, 100%)"},attrs:{options:a.migrationsOptions.map(t=>t.text),"max-height":150,placeholder:"Select input source type"},on:{input:a.emitStepChanged},model:{value:a.selectedFileType,callback:function(t){a.selectedFileType=t},expression:"selectedFileType"}}),r("Steps",{attrs:{currentStep:a.currentStep,steps:a.steps}}),a.isLogGenerated?r("div",[r("div",{staticClass:"d-flex justify-content-between"},[r("div",[null!==(t=a.DitaLog)&&void 0!==t&&t.trim()?r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn customBtn",attrs:{type:"button",title:"Download Log",id:"save",variant:"light"},on:{click:function(t){return a.downloadLogFile()}}},[r("i",{staticClass:"fa-solid fa-circle-down"})]):a._e()]),r("button",{staticClass:"btn btn-primary btn-sm custom-button",on:{click:function(t){return a.gotoDownloadOutput()}}},[a._m(6),r("span",{staticClass:"custom-text ml-2"},[a._v("View generated output")])])]),r("div",{staticClass:"card mt-2"},[r("div",{staticClass:"card-body"},[null!==(e=a.DitaLog)&&void 0!==e&&e.trim()?r("div",{staticClass:"border-top pt-3 infoDiv"},[r("pre",{staticClass:"dita-log"},[a._v(a._s(a.DitaLog))])]):r("p",[a._v("No errors found in the post flight check")])])])]):r("div",{staticClass:"row justify-content-center"},[r("div",{staticClass:"col-md-10 col-sm-12 col-lg-7 text-center"},[r("div",{staticClass:"card"},[r("div",{staticClass:"card-body mx-4"},[a.currentScreen===a.screens.default?r("div",[a._m(0),r("form",{attrs:{enctype:"multipart/form-data"}},[r("div",{staticClass:"row my-4"},[r("div",{staticClass:"col-md-12 offset-md-0 col-lg-12 offset-lg-0 drop-zone",class:{dragging:a.dragging},on:{dragover:function(t){t.preventDefault()},dragenter:function(t){a.dragging=!0},dragleave:function(t){a.dragging=!1},drop:a.handleDrop}},[a.selectedFileType?a._e():r("div",{staticClass:"m-2 text-center",attrs:{role:"alert"}},[r("img",{staticClass:"img-fluid",staticStyle:{"max-width":"100%"},attrs:{src:s("ad34")}}),r("p",{staticClass:"mt-2 accepted-doc-type"},[a._v(" Please select the source format type first. ")])]),a.selectedFileType&&!a.fileSelected?r("div",{staticClass:"text-center",on:{click:a.openFileInput}},[r("img",{staticClass:"img-fluid",staticStyle:{"max-width":"100%"},attrs:{src:s("ad34")}}),a._m(1),a.fileName?a._e():r("p",{staticClass:"mt-2 accepted-doc-type"},[a._v(" Accepted file format: "+a._s(a.fileExtensionsType)+" only. ")])]):a._e(),a.selectedFileType&&a.fileSelected?r("div",{staticClass:"alert alert-primary text-left text-wrap m-2",attrs:{role:"alert"}},[a.fileName?r("p",{staticClass:"text-wrap text-break"},[a._v(" Selected file: "+a._s(a.fileName)+" ")]):a._e()]):a._e(),a.fileSelected?a._e():r("input",{ref:"fileInput",staticClass:"d-none",attrs:{type:"file",name:"wordFile",accept:a.fileExtensionsType},on:{change:t=>a.handleFileInput(t.target.files[0])}})])]),r("p",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{"font-size":"12px","text-align":"start"}},[r("b-form-checkbox",{attrs:{id:"checkbox-1",name:"checkbox-1"},model:{value:a.policyCheckbox,callback:function(t){a.policyCheckbox=t},expression:"policyCheckbox"}},[r("span",{staticClass:"mt-1 d-inline-block"},[a._v(" Refer to "),r("b-link",{directives:[{name:"b-modal",rawName:"v-b-modal.doc-con-policy",modifiers:{"doc-con-policy":!0}}]},[r("b",[a._v(" document conversion policy page.")])])],1)])],1),r("div",{staticClass:"text-right"},[r("div",[r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{type:"button",disabled:!(a.policyCheckbox&&a.fileSelected)},on:{click:function(t){return a.uploadFileBackend()}}},[a._v(" Upload ")]),r("button",{staticClass:"btn btn-sm btn-light",attrs:{type:"button"},on:{click:a.cancelForm}},[a._v(" Reset ")])])])])]):a._e(),a.currentScreen===a.screens.upload?r("div",{staticClass:"form-group"},[a._m(2),r("form",{attrs:{enctype:"multipart/form-data"}},[r("div",{staticClass:"showConvertbtn"},[a.fileSelected?r("div",{staticClass:"d-flex justify-content-between p-0 m-0"},[a.fileName?r("p",{staticClass:"text-break"},[a._v(a._s(a.fileName))]):a._e(),100===a.progress?r("p",{staticClass:"text-secondary"},[r("span",{staticClass:"mdi mdi-check-circle-outline mr-1"}),a._v("Done ")]):a._e()]):a._e(),r("b-progress",{staticClass:"custom-height",attrs:{variant:"secondary",value:a.progress,max:100}})],1),r("div",{staticClass:"text-right mt-3"},[r("button",{staticClass:"btn btn-light btn-sm mr-2",on:{click:function(t){return t.preventDefault(),a.goBack(a.screens.default)}}},[a._v(" Back ")]),r("button",{staticClass:"btn btn-primary btn-sm",attrs:{disabled:100!==this.progress},on:{click:function(t){return t.preventDefault(),a.preFlightCheck()}}},[a._v(" Pre-flight Check ")])])])]):a._e(),a.currentScreen===a.screens.preFlightCheck?r("div",{staticClass:"form-group"},[a._m(3),r("form",{attrs:{enctype:"multipart/form-data"}},[r("div",{staticClass:"showConvertbtn"},[a.fileSelected?r("div",{staticClass:"d-flex justify-content-between p-0 m-0"},[a.fileName?r("p",{staticClass:"text-break"},[a._v(a._s(a.fileName))]):a._e(),100===a.progress?r("p",{staticClass:"text-secondary"},[r("span",{staticClass:"mdi mdi-check-circle-outline mr-1"}),a._v("Done ")]):a._e()]):a._e(),r("b-progress",{staticClass:"custom-height",attrs:{variant:"secondary",value:a.progress,max:100}})],1),r("div",{staticClass:"text-right mt-3"},[r("button",{staticClass:"btn btn-primary btn-sm",attrs:{disabled:100!==this.progress},on:{click:function(t){return t.preventDefault(),a.convertToDita()}}},[a._v(" Convert Now ")])])])]):a._e(),a.currentScreen===a.screens.convertToDita?r("div",{staticClass:"form-group"},[a._m(4),r("form",{attrs:{enctype:"multipart/form-data"}},[r("div",{staticClass:"showConvertbtn"},[a.fileSelected?r("div",{staticClass:"d-flex justify-content-between p-0 m-0"},[a.fileName?r("p",{staticClass:"text-break"},[a._v(a._s(a.fileName))]):a._e(),100===a.progress?r("p",{staticClass:"text-secondary"},[r("span",{staticClass:"mdi mdi-check-circle-outline mr-1"}),a._v("Done ")]):a._e()]):a._e(),r("b-progress",{staticClass:"custom-height",attrs:{variant:"secondary",value:a.progress,max:100}})],1)])]):a._e(),a.currentScreen===a.screens.postFlightCheck?r("div",{staticClass:"form-group"},[a._m(5),r("form",{attrs:{enctype:"multipart/form-data"}},[r("div",{staticClass:"showConvertbtn"},[a.fileSelected?r("div",{staticClass:"d-flex justify-content-between p-0 m-0"},[a.fileName?r("p",{staticClass:"text-break"},[a._v(a._s(a.fileName))]):a._e(),100===a.progress?r("p",{staticClass:"text-secondary"},[r("span",{staticClass:"mdi mdi-check-circle-outline mr-1"}),a._v("Done ")]):a._e()]):a._e(),r("b-progress",{staticClass:"custom-height",attrs:{variant:"secondary",value:a.progress,max:100}})],1)])]):a._e()])])])]),r("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[r("strong",[a._v("Please wait")]),r("br"),r("p",[a._v("Document publishing is currently in progress.")]),r("b-progress",{attrs:{value:a.progress,max:100,animated:""}})],1),r("DocConPolicy"),r("PreFlightInvalidFile",{attrs:{files:a.invalidFiles}})],1)},As=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"text-left"},[e("div",{staticClass:"custom-title"},[t._v(" Upload input source file"),e("span",{staticClass:"text-danger"},[t._v("*")])])])},function(){var t=this,e=t._self._c;return e("p",{staticClass:"mt-2 drag-and-drop-text word-break word-wrap"},[t._v(" Browse or "),e("span",{staticClass:"text-primary"},[t._v("drag and drop ")]),t._v(" the files here. ")])},function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"custom-title text-left"},[t._v(" Uploading file"),e("span",{staticClass:"text-danger"},[t._v("*")])])])},function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"custom-title text-left"},[t._v(" Pre-flight check file"),e("span",{staticClass:"text-danger"},[t._v("*")])])])},function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"custom-title text-left"},[t._v(" Converting to DITA"),e("span",{staticClass:"text-danger"},[t._v("*")])])])},function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"custom-title text-left"},[t._v(" Post-flight check file"),e("span",{staticClass:"text-danger"},[t._v("*")])])])},function(){var t=this,e=t._self._c;return e("span",{staticClass:"custom-icon"},[e("i",{staticClass:"mdi mdi-folder-refresh mdi-16px"})])}],Fs=s("cee4"),Bs=function(){var t=this,e=t._self._c;return e("div",[e("ol",{staticClass:"step-indicator d-flex justify-content-between align-items-center mt-4"},[t._m(0),t._l(t.steps,(function(s){return e("li",{key:s.id,class:t.stepWrapperClass(s.id)},[e("div",{staticClass:"step"},[e("i",{class:s.icon_class})]),e("div",{staticClass:"caption"},[e("span",[t._v(t._s(s.title))])])])}))],2)])},Os=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"backtrace"},[e("div",{staticClass:"cover"})])}],Ls={props:{currentStep:{type:Number,required:!0},steps:{type:Array,required:!0}},methods:{stepWrapperClass(t){return{active:t===this.currentStep,complete:t<this.currentStep}}},watch:{currentStep:function(){const t=document.querySelector(".backtrace .cover");t.style.width=20*(this.currentStep-1)+"%"}}},Es=Ls,Us=(s("51c2"),Object(l["a"])(Es,Bs,Os,!1,null,"481dc8ec",null)),Rs=Us.exports;const qs=(t,e,s,a)=>{const r={"DOCX to DITA":{upload:`/orguser/docxToDita/uploadDocxFile?userId=${t}&orgId=${e}`,transform:"/orguser/docxToDita/convertDocxToDita",download:"/orguser/docxToDita/downloadOutputZip"},"HTML to DITA":{upload:`/orguser/htmlToDita/uploadHtmlFile?userId=${t}&orgId=${e}`,transform:"/orguser/htmlToDita/convertHtmlToDita",download:"/orguser/htmlToDita/downloadOutputZip"},"MD or MDX to DITA":{upload:`/orguser/mardownToDita/uploadMarkdownZipFile?userId=${t}&orgId=${e}`,transform:"/orguser/mardownToDita/convertMarkdownToDita",download:"/orguser/mardownToDita/downloadOutputZip"}};return r[s][a]};var Ms=function(){var t=this,e=t._self._c;return e("b-modal",{attrs:{id:"doc-con-policy",scrollable:"",size:"lg",title:"document conversion policy"}},[t.documentPolicy.length>0?e("ol",t._l(t.documentPolicy,(function(s,a){return e("li",{key:a},[e("p",[e("b",[t._v(" "+t._s(s.attributes.Question))])]),e("div",{domProps:{innerHTML:t._s(s.attributes.Answer)}})])})),0):t._e()])},zs=[],Vs={data(){return{documentPolicy:[]}},methods:{async getDocumentPolicy(){const t=await Fs["a"].get("https://admin.met-r.io/api/privacy-policies?populate=*");this.documentPolicy=t.data.data}},mounted(){this.getDocumentPolicy()}},Hs=Vs,Ws=(s("ee24"),Object(l["a"])(Hs,Ms,zs,!1,null,"51e0fb7d",null)),Ys=Ws.exports,Gs=function(){var t=this,e=t._self._c;return e("b-modal",{attrs:{id:"pre-flight-invalid-file",scrollable:"",title:"Following files does not content title."}},[e("ol",t._l(t.files,(function(s,a){return e("li",{key:a},[e("p",[t._v(t._s(s))])])})),0)])},Js=[],Ks={props:{files:{type:Array,required:!0}}},Zs=Ks,Qs=(s("1dd5"),Object(l["a"])(Zs,Gs,Js,!1,null,"3035b571",null)),Xs=Qs.exports,ta={components:{Multiselect:we.a,Steps:Rs,DocConPolicy:Ys,PreFlightInvalidFile:Xs},props:{currentStep:{type:Number,required:!0},steps:{type:Array,required:!0}},emits:["stepChanged"],data(){return{progress:0,dragging:!1,file:null,fileName:null,fileSelected:!1,uploadPercentage:0,showConvertbtn:!1,policyCheckbox:!1,screens:{default:"default",upload:"upload",preFlightCheck:"preFlightCheck",convertToDita:"convertToDita",postFlightCheck:"postFlightCheck"},currentScreen:"default",selectedFileType:null,migrationsOptions:[],fileExtensionsType:null,isLogGenerated:!1,DitaLog:null,invalidFiles:[]}},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},handleDrop(t){t.preventDefault(),this.dragging=!1;const e=t.dataTransfer.files[0];this.handleFileInput(e)},handleFileInput(t){if(t){const e=t.name.split(".").pop();this.fileExtensionsType.includes(e)?(this.file=t,this.fileName=t.name,this.fileSelected=!0):(this.messageToast("Error","danger","Please select a valid format file."),this.fileSelected=!1)}},openFileInput(){this.$refs.fileInput.click()},goBack(t){this.currentScreen=t,this.$emit("stepChanged",this.currentStep-1)},async uploadFileBackend(){this.currentScreen=this.screens.upload,this.progress=0;const t=new FormData,e=this.migrationsOptions.find(t=>t.text===this.selectedFileType);t.append(e.sourceFile,this.file);const s=this.$store.state.Auth.userId,a=this.$store.state.Auth.orgId;try{var r;const e=qs(s,a,this.selectedFileType,"upload");e||this.messageToast("Not Found","danger","This feature is not yet implemented.");const o=await this.$store.getters.client.post(e,t,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t=>{this.progress=Math.round(t.loaded/t.total*90)}});this.progress=100,this.fileSelected=!0,this.messageToast("Success","primary",(null===o||void 0===o||null===(r=o.data)||void 0===r?void 0:r.message)||"Document uploaded successfully."),this.$emit("stepChanged",3)}catch(o){this.fileName=null,this.fileSelected=!1,this.$emit("stepChanged",1),this.currentScreen=this.screens.default,this.messageToast("File validation failed","danger",o.response.data.message)}},async preFlightCheck(){this.currentScreen=this.screens.preFlightCheck,this.progress=0;try{var t,e;const s="/orguser/docMigration/pre-flight-check?migrationType="+this.getMigrationType(),a=setInterval(()=>{this.progress<97&&(this.progress+=.5)},500),r=await this.$store.getters.client.get(s,{headers:{"Content-Type":"multipart/form-data"},onDownloadProgress:t=>{clearInterval(a),this.progress=Math.round(t.loaded/t.total*97)}});null!==r&&void 0!==r&&null!==(t=r.data)&&void 0!==t&&t.message&&(clearInterval(a),this.progress=100),this.messageToast("Success","primary",null===r||void 0===r||null===(e=r.data)||void 0===e?void 0:e.message),this.$emit("stepChanged",4)}catch(r){var s,a;this.fileName=null,this.fileSelected=!1,this.$emit("stepChanged",1),this.currentScreen=this.screens.default,this.invalidFiles=(null===r||void 0===r||null===(s=r.response)||void 0===s||null===(s=s.data)||void 0===s?void 0:s.data)||[],this.invalidFiles.length>0&&this.$bvModal.show("pre-flight-invalid-file"),this.messageToast("File validation failed","danger",null!==(a=r.response.data.message)&&void 0!==a?a:"Invalid request")}},async convertToDita(){this.currentScreen=this.screens.convertToDita,this.progress=0;const t=this.$store.state.Auth.userId,e=this.$store.state.Auth.orgId;try{var s,a;const r=qs(t,e,this.selectedFileType,"transform");if(!r)return void this.messageToast("Not Found","danger","This feature is not yet implemented.");localStorage.removeItem("userActivityId");const o=await this.$store.getters.client.post(r,{},{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:t=>{this.progress=Math.round(t.loaded/t.total*90)}});this.progress=100,this.messageToast("Success","primary",(null===o||void 0===o||null===(s=o.data)||void 0===s?void 0:s.message)||"converting to DITA done successfully."),localStorage.setItem("userActivityId",null===o||void 0===o||null===(a=o.data)||void 0===a?void 0:a.userActivityId),this.$emit("stepChanged",5),ae.a.fire({icon:"question",title:"View Warning and Error Logs",showCancelButton:!0,confirmButtonText:"Verify Now",cancelButtonText:"No"}).then(s=>{if(s.isConfirmed)this.progress=0,this.currentScreen=this.screens.postFlightCheck,this.postFlightCheck();else{const s=qs(t,e,this.selectedFileType,"download");this.$router.push({path:`/docmigration/outputscreen/${encodeURIComponent(Tt.a.AES.encrypt(s,kt["e"]).toString())}/${encodeURIComponent(Tt.a.AES.encrypt(this.fileName,kt["e"]).toString())}/${encodeURIComponent(Tt.a.AES.encrypt(this.getMigrationType(),kt["e"]).toString())}`})}})}catch(r){this.fileName=null,this.fileSelected=!1,this.$emit("stepChanged",1),this.currentScreen=this.screens.default,this.messageToast("Invalid request","danger",r.response.data.message)}},async postFlightCheck(){this.progress=0;try{var t,e;const s="/orguser/docMigration/post-flight-check?migrationType="+this.getMigrationType(),a=setInterval(()=>{this.progress<97&&(this.progress+=.5)},500),r=await this.$store.getters.client.get(s,{headers:{"Content-Type":"multipart/form-data"},onDownloadProgress:t=>{clearInterval(a),this.progress=Math.round(t.loaded/t.total*97)}});null!==r&&void 0!==r&&null!==(t=r.data)&&void 0!==t&&t.message&&(clearInterval(a),this.progress=100),this.DitaLog=r.data.fileContents,this.isLogGenerated=!0,this.messageToast("Success","primary",(null===r||void 0===r||null===(e=r.data)||void 0===e?void 0:e.message)||"Post-flight check successful."),this.$emit("stepChanged",6)}catch(s){this.fileName=null,this.fileSelected=!1,this.$emit("stepChanged",1),this.currentScreen=this.screens.default,this.messageToast("Invalid request","danger",s.response.data.message)}},gotoDownloadOutput(){const t=this.$store.state.Auth.userId,e=this.$store.state.Auth.orgId,s=qs(t,e,this.selectedFileType,"download");this.$router.push({path:`/docmigration/outputscreen/${encodeURIComponent(Tt.a.AES.encrypt(s,kt["e"]).toString())}/${encodeURIComponent(Tt.a.AES.encrypt(this.fileName,kt["e"]).toString())}/${encodeURIComponent(Tt.a.AES.encrypt(this.getMigrationType(),kt["e"]).toString())}`})},async downloadLogFile(){const t="/orguser/docMigration/download-svrl-file?migrationType="+this.getMigrationType();await this.$store.getters.client.get(t,{responseType:"blob"}).then(t=>{const e=t=>{const e=t.lastIndexOf("."),s=t.substring(0,e);return s+"_log"},s=e(this.fileName),a=window.URL.createObjectURL(new Blob([t.data])),r=document.createElement("a");r.href=a,r.setAttribute("download",s),document.body.appendChild(r),r.click(),this.messageToast("Success","primary","Downloaded successfull!")}).catch(t=>{this.messageToast("Invalid request","danger",t.message)})},fixErrorAndWarning(){ae.a.fire({icon:"question",title:"Do you want to fix these errors and warnings?",showCancelButton:!0,confirmButtonText:"Yes",cancelButtonText:"No"}).then(async t=>{if(t.isConfirmed){this.progress=0,this.$refs["modaloutputprogress"].show();try{await Fs["a"].post("https://jsonplaceholder.typicode.com/posts",{title:"foo",body:"bar",userId:1},{onUploadProgress:t=>{this.progress=Math.round(t.loaded/t.total*90)}}),this.progress=100,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","primary","Errors and warnings are fixed successfully.")}catch(e){this.messageToast("Invalid request","danger",e.response.data.message)}}})},cancelForm(){this.file=null,this.fileName=null,this.dragging=!1,this.fileSelected=!1},emitNextStep(){this.$emit("nextStep")},emitLastStep(){this.$emit("lastStep")},emitStepChanged(){this.selectedFileType?(this.$emit("stepChanged",2),this.currentScreen=this.screens.default):this.$emit("stepChanged",1)},stepWrapperClass(t){return{active:t===this.currentStep,complete:t<this.currentStep}},getMigrationType(){const t=this.migrationsOptions.find(t=>t.text===this.selectedFileType);return t.migrationType},async getMigrationsOptions(){const t=await this.$store.getters.client.get("/orguser/docMigration/get-docMigrationType-available ");this.migrationsOptions=t.data.data}},mounted(){this.getMigrationsOptions()},watch:{selectedFileType:{handler(){this.migrationsOptions.forEach(t=>{t.text===this.selectedFileType&&(this.fileExtensionsType=t.type)})}}}},ea=ta,sa=(s("063d"),Object(l["a"])(ea,Ns,As,!1,null,"4ba16a88",null)),aa=sa.exports,ra={components:{Details:aa},data(){return{ditaotVersion:"",title:"DocMigration",items:[{text:"Dashboard",href:"/"},{text:"DocMigration",active:!0}],currentStep:1,steps:[{id:1,title:"Input Source Type",icon_class:"fa-solid fa-file-lines"},{id:2,title:"Upload Files",icon_class:"fa fa-folder-open"},{id:3,title:"Pre-flight Check",icon_class:"fa-solid fa-plane-arrival"},{id:4,title:"Transformation",icon_class:"fa-solid fa-money-bill-transfer"},{id:5,title:"Post-flight Check",icon_class:"fa-solid fa-plane-departure"},{id:6,title:"Download",icon_class:"fa-solid fa-floppy-disk"}]}},methods:{stepChanged(t){this.currentStep=t}},computed:{...Object(G["c"])(["ditaOtVersions"])},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.docmigration.text")}},oa=ra,ia=(s("0d14"),Object(l["a"])(oa,Ps,Ds,!1,null,"7cf1b10f",null)),na=ia.exports,ca=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"my-modal",attrs:{"hide-footer":"",title:"Important message","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("div",{staticClass:"d-block text-center"},[e("h6",[t._v(" It seems like you don't have the necessary permission to access this feature. If you wish to access, you'll need to contact the administrator in charge of granting access to it. ")])]),e("button",{staticClass:"btn btn-primary btn-sm mt-3",attrs:{block:""},on:{click:t.hideModal}},[t._v(" Close ")])])],1)},la=[],da={methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},showModal(){this.$refs["my-modal"].show()},hideModal(){this.$refs["my-modal"].hide(),this.$router.push({name:"Dashboard"})}},mounted(){this.showModal()}},ua=da,ma=(s("ffd2"),Object(l["a"])(ua,ca,la,!1,null,null,null)),ha=ma.exports,pa=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])])]),e("Steps",{attrs:{currentStep:6,steps:t.steps}}),e("Tree",{attrs:{downloadLink:t.downloadLink,fileName:t.fileName,migrationType:t.migrationType,isCommitted:t.isCommitted}})],1)},ga=[],fa=function(){var t=this,e=t._self._c;return e("div",{staticClass:"container-fluid"},[e("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn customBtn",attrs:{type:"button",title:"Save Output File",id:"save",variant:"light"},on:{click:t.downloadZip}},[e("i",{staticClass:"fa-solid fa-circle-down"})]),e("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn customBtn",attrs:{type:"button",title:"Commit on Github",id:"github",variant:"light"},on:{click:t.gitHubCommit}},[e("i",{staticClass:"fa-brands fa-github"})]),e("div",{staticClass:"row mt-2"},[e("div",{staticClass:"col-md-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-6"},[t._m(0),e("div",{staticClass:"border-top pt-3 infoDiv folderStructure"},[e("SimpleBar",{staticClass:"custom-jstree p-3"},[e("v-jstree",{attrs:{data:t.treeData},on:{"item-click":t.itemClick}})],1)],1)]),e("div",{staticClass:"col-md-6 mt-3 mt-md-0"},[t._m(1),t.selectedFile&&t.selectedFile.content?e("div",{staticClass:"border-top pt-3 infoDiv"},[e("SimpleBar",{staticClass:"custom-jstree p-3"},[e("ssh-pre",{attrs:{language:"xml"}},[t._v(" "+t._s(t.getIndentedContent())+" ")])],1)],1):e("div",{staticClass:"d-flex justify-content-center align-items-center no-output-cont"},[t._m(2)])])])])])])])])},ba=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-source d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("DITA Output")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-source d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("Content Preview")])])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"mb-5 text-center"},[e("img",{staticClass:"custom-img",attrs:{src:s("5b4d")}}),e("div",{staticClass:"no-output-text"},[t._v("File not selected.")])])}],va={name:"FileTree",components:{VJstree:me.a,SshPre:he["a"],SimpleBar:ee["a"]},props:{downloadLink:{type:String},fileName:{type:String},migrationType:{type:String},isCommitted:{type:Boolean}},data(){return{selectedFile:null,displayLog:!1,logBtnText:"View Log",treeData:[]}},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},itemClick(t){t.model.content?this.selectedFile=t.model:this.selectedFile=null;const e=document.querySelectorAll(".tree-selected");e.forEach((function(t){t.classList.remove("tree-selected")}))},xmlFormat:de.a,getIndentedContent(){const t=this.selectedFile.text.split(".").pop();return t.startsWith("dita")||t.startsWith("xml")?this.xmlFormat(this.selectedFile.content):this.selectedFile.content},onCopiedDoSomething(){this.$bvToast.toast("copied to clipboard!",{title:"Copied",variant:"success",solid:!0})},toggleLog(){this.displayLog=!this.displayLog,this.logBtnText=this.displayLog?"Hide Log":"View Log"},async downloadZip(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get(`${this.downloadLink}?userActivityId=${localStorage.getItem("userActivityId")}`,{responseType:"blob"}).then(e=>{const s=t=>{const e=t.lastIndexOf("."),s=t.substring(0,e);return s+".zip"},a=s(this.fileName),r=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=r,o.setAttribute("download",a),document.body.appendChild(o),o.click(),t.hide(),this.messageToast("Success","primary","Downloaded successfull!")}).catch(e=>{if(console.log("📢[tree.vue:188]: error: ",e),t.hide(),e.response)if(e.response.data instanceof Blob){const t=new FileReader;t.onload=()=>{const e=t.result?t.result:"Error in the downloading file.";console.log("📢[tree.vue:203]: errorText: ",e),this.messageToast("Invalid request","danger",JSON.parse(e).message)},t.readAsText(e.response.data)}else{const t=e.response.data?e.response.data.message:"Error in the downloading file.";this.messageToast("Invalid request","danger",t)}else this.messageToast("Invalid request","danger",e.message)})},gitHubCommit(){this.isCommitted?ae.a.fire({icon:"warning",title:"Commit Request",text:"Output is already committed."}):this.$router.push({path:"/docmigration/outputscreen/githubcommit/"+this.migrationType})},async getTreeStructure(){try{const t="/orguser/docMigration/zip-tree-structure?migrationType="+this.migrationType,e=await this.$store.getters.client.get(t);this.treeData=e.data.tree,this.selectedFile=this.treeData[0].children.find(t=>{const e=t.text.split(".").pop();if("ditamap"==e)return t.selected=!0,t})}catch(t){this.messageToast("Something went wrong","danger",t.response.data.message)}}},mounted(){this.getTreeStructure()}},ya=va,Ca=(s("8315"),s("49fa"),Object(l["a"])(ya,fa,ba,!1,null,"9996db58",null)),wa=Ca.exports,xa={components:{PageHeader:ie["a"],Steps:Rs,Tree:wa},data(){return{isCommitted:!1,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,ditaotVersion:"",downloadLink:Tt.a.AES.decrypt(this.$route.params.downloadLink,kt["e"]).toString(Tt.a.enc.Utf8),fileName:Tt.a.AES.decrypt(this.$route.params.fileName,kt["e"]).toString(Tt.a.enc.Utf8),migrationType:Tt.a.AES.decrypt(this.$route.params.migrationType,kt["e"]).toString(Tt.a.enc.Utf8),title:"DocMigration",items:[{text:"Dashboard",href:"/"},{text:"DocMigration",active:!0}],steps:[{id:1,title:"Format Type",icon_class:"fa-solid fa-file-lines"},{id:2,title:"Upload Files",icon_class:"fa fa-folder-open"},{id:3,title:"Pre-flight Check",icon_class:"fa-solid fa-plane-arrival"},{id:4,title:"Transformation",icon_class:"fa-solid fa-money-bill-transfer"},{id:5,title:"Post-flight Check",icon_class:"fa-solid fa-plane-departure"},{id:6,title:"Download",icon_class:"fa-solid fa-floppy-disk"}]}},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.docmigration.text"),this.$route.query.alreadyCommit?this.isCommitted=!0:this.isCommitted=!1},computed:{...Object(G["c"])(["ditaOtVersions"])},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},async downloadZip(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/mardownToDita/downloadOutputZip/zbxds",{responseType:"blob"}).then(e=>{const s=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=s,a.setAttribute("download",this.selectedfolder+".zip"),document.body.appendChild(a),a.click(),t.hide(),this.messageToast("Success","primary","Downloaded successfull!")}).catch(e=>{t.hide(),this.messageToast("Invalid request","danger",e.message)})}}},_a=xa,$a=Object(l["a"])(_a,pa,ga,!1,null,null,null),Ta=$a.exports,ka=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"min-height":"70vh"}},[e("PageHeader",{attrs:{title:t.title,items:t.item}}),e("div",[e("div",{staticClass:"mr-2 dita-ot-cont px-1 mb-4"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])]),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-sm btn-primary",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit on GitHub ")])],1)]),e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","hide-header":"","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("loading . . .")]),e("b-progress",{staticClass:"custom-progress",attrs:{value:t.progress,max:100}})],1),e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-4 bg-white"},[t._m(0),e("div",{staticClass:"card-body"},[t._m(1),e("multiselect",{attrs:{options:t.projectlist.map(t=>t.projectName),placeholder:"Choose a project","max-height":150},model:{value:t.selectedproject,callback:function(e){t.selectedproject=e},expression:"selectedproject"}}),e("div",{staticClass:"form-group"},[e("div",{staticClass:"my-2"},[t._m(2),e("button",{staticClass:"btn btn-primary btn-sm",attrs:{disabled:!t.disabledCommit},on:{click:function(e){return t.$bvModal.show("changeBranch-bv-modal")}}},[t._v(" Create new branch ")])]),e("div",{},[e("multiselect",{attrs:{options:t.repobranchesdata.map(t=>t.value),placeholder:"Choose a branch","max-height":150},model:{value:t.selectedBranch,callback:function(e){t.selectedBranch=e},expression:"selectedBranch"}})],1)]),e("div",{staticClass:"text-right pt-1"},[e("button",{staticClass:"btn btn-light btn-sm mb-2 mr-2",attrs:{type:"submit"},on:{click:function(e){return e.preventDefault(),t.syncprojects.apply(null,arguments)}}},[t._v(" Sync ")]),e("button",{staticClass:"btn btn-primary mb-2 btn-sm",attrs:{disabled:!t.disabledCommit||!t.selectedBranch,type:"submit"},on:{click:function(e){return e.preventDefault(),t.commitOutput.apply(null,arguments)}}},[t._v(" Commit ")])])],1)])]),e("changeBranch",{attrs:{branches:t.repobranchesdata.map(t=>t.value),createNewBranchHandler:t.createNewBranchHandler,clone:!1}})],1)},Sa=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-notifications d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("Github Commit")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Select Project"),e("span",{staticClass:"text-danger"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",{staticClass:"col-form-label mr-4"},[t._v("Select Branch"),e("span",{staticClass:"text-danger"},[t._v("*")])])}],ja={components:{Multiselect:we.a,changeBranch:Se},data(){return{previousRoute:null,ditaotVersion:"",progress:0,selectedBranch:"",selectedProjectOwner:"",previousSelectedBranch:"",selectedproject:"",projectlist:[],repobranchesdata:[],commitMsg:null,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,disabledCommit:!1,title:"DocMigration",migrationType:this.$route.params.migrationType,item:[{text:"Dashboard",href:"/"},{text:"DocMigration",active:!0}],ignoreNextChange:!1}},computed:{_(){return j.a},isCommitButtonDisabled(){return 0===this.commitMsg.length},...Object(G["c"])(["ditaOtVersions"])},watch:{selectedproject:function(t){if(t){this.disabledCommit=!0;const e=this.projectlist.find(e=>e.projectName===t);console.log("selected project:",this.projectlist),this.selectedProjectOwner=e.owner,this.selectedproject=e.projectName,this.repobranchesdata=[],this.getRepoBranch()}else this.disabledCommit=!1},selectedBranch(t,e){this.ignoreNextChange?this.ignoreNextChange=!1:e&&t&&(console.log("in brachName: ",t,e),this.checkoutBranch())}},beforeRouteEnter(t,e,s){s(t=>{t.previousRoute=e.path})},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.docmigration.text"),this.getprojectslist()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},...Object(G["b"])({get:"userProjectDetails"}),getprojectslist(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get("/projectuser/byuserid?userId="+this.userId).then(e=>{e.data&&Array.isArray(e.data)?this.projectlist=e.data:this.messageToast("Error","danger","Received invalid data from the server"),t.hide()}).catch(e=>{this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred while fetching project names."),t.hide()})},async getRepoBranch(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.selectedProjectOwner}&repoName=${this.selectedproject}`).then(async t=>{const e=await ye.currentBranch(this.selectedproject);this.selectedBranch=e.data,this.previousSelectedBranch=e.data,t.data&&t.data.length>0?this.repobranchesdata=t.data.map(t=>({value:t.name,text:t.name})):this.messageToast("invalid request","danger","No branches found in the Project.")}).catch(t=>{this.messageToast("invalid request","danger",t.response.data.message)}).finally(()=>{t.hide()})},async checkoutBranch(){console.log("in checkoutBranch: ",this.selectedBranch);const t=await ye.checkout({repoName:this.selectedproject,branchName:this.selectedBranch},this);if(console.log("ckeckout res: ",t),!1===t)return this.messageToast("Invalid request","danger","Failed to checkout branch."),this.selectedBranch=this.previousSelectedBranch,void(this.ignoreNextChange=!0);this.previousSelectedBranch=this.selectedBranch,this.messageToast("Branch checkout","success",t.message)},async createNewBranchHandler({baseBranchName:t,newBranchName:e}){let s=this.$loading.show({loader:"dots"});const a=this.repobranchesdata.map(t=>t.value),r=await ye.createNewBranch({repoName:this.selectedproject,clone:!1,baseBranchName:t,newBranchName:e},a);console.log("res",r),s.hide(),this.$bvModal.hide("changeBranch-bv-modal"),"success"===r.type?(this.getRepoBranch(),this.messageToast("New branch","success",r.data.message)):this.messageToast("Failed to create new branch.","danger",r.error.response.data.message)},gitHubCommit(){this.$refs["modalcommit"].show()},commitOutput(){this.progress=0;const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit. ",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={commitFolderName:this.selectedproject,commitMessage:e,branchName:this.selectedBranch,userActivityId:localStorage.getItem("userActivityId")};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.post("/orguser/docMigration/commit-to-github?migrationType="+this.migrationType,s,{onUploadProgress:t=>{this.progress=Math.round(t.loaded/t.total*100)}}).then(e=>{this.showCommitBtn=!1,t.fire({icon:"success",title:"Commit request completed.",text:e.data.message||"Files committed successfully."}),this.$router.push({path:this.previousRoute,query:{alreadyCommit:"committed"}})}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message}),this.commitMsg=null,this.selectedproject=""})}})},syncprojects(){this.progress=0;let t={userId:this.userId,orgId:this.orgId,gitToken:this.$store.state.Auth.gitToken,githubUsername:JSON.parse(Tt.a.AES.decrypt(localStorage.getItem("githubUsername"),kt["e"]).toString(Tt.a.enc.Utf8))};setInterval(()=>{this.progress<90&&(this.progress+=10)},500),this.$refs["modaloutputprogress"].show(),this.$store.getters.client.put("/orguser/workspace/sync?migrationType="+this.migrationType,t).then(t=>{this.$refs["modaloutputprogress"].hide(),this.selectedproject="",this.projectlist=[...this.projectlist,...t.data.syncedProjects],this.messageToast("Sync Complete","primary","Your assigned project list is up to date!")}).catch(()=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("Invalid request","danger","Sorry, we were unable to sync your projects at this time. Please check your network connectivity and try again. If the issue persists, please contact our technical support team for further assistance.")})}}},Ia=ja,Pa=(s("ecab"),Object(l["a"])(Ia,ka,Sa,!1,null,"4fb3ed50",null)),Da=Pa.exports,Na=[{path:"/docmigration",component:na,name:"DocMigration",beforeEnter:(t,e,s)=>{Ve(t,e,s,"docMigration")}},{path:"/noaccess",component:ha,name:"PopUpMessage"},{path:"/docmigration/outputscreen/:downloadLink/:fileName/:migrationType",component:Ta,name:"outputscreen",beforeEnter:(t,e,s)=>{Ve(t,e,s,"docMigration")}},{path:"/docmigration/outputscreen/githubcommit/:migrationType",component:Da,name:"githubcommit",beforeEnter:(t,e,s)=>{Ve(t,e,s,"docMigration")}}],Aa=function(){var t=this,e=t._self._c;return e("div",[e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"d-flex align-items-center justify-content-between mb-2"},[e("div",[e("div",{staticClass:"mr-2 px-1"},[e("span",{staticClass:"project-name"},[t._v(t._s(t.projectName))])]),e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])])])]),e("b-tabs",{staticClass:"custom-tabs bg-white",attrs:{justified:"","nav-class":"nav-tabs-custom","content-class":"p-3 text-muted"},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("b-tab",{attrs:{title:"HTML Styler",active:""}},[e("htmlstyler")],1),e("b-tab",{attrs:{title:"PDF Styler"}},[e("pdfstyler")],1)],1)],1)])},Fa=[],Ba=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Working on customization to receive the desired output.")]),e("b-progress",{staticClass:"custom-progress",attrs:{value:t.progress,max:100}})],1),e("div",{staticClass:"row"},[e("div",{staticClass:"col-xl-3 col-lg-4 mb-5 user-select-none"},[e("div",{attrs:{"no-body":""}},[t._m(0),e("div",{staticClass:"border-top"},[e("div",{staticClass:"categories-group-card"},[e("a",{staticClass:"categories-group-list card-title",class:{active:1===t.currentFormNumber,"":1===t.currentFormNumber},attrs:{"aria-controls":"collapseTwo"},on:{click:function(e){return t.changeForm(1)}}},[e("i",{staticClass:"mdi mdi-page-layout-header font-size-18 align-middle mr-2"}),t._v(" Header ")])]),e("div",{staticClass:"categories-group-card"},[e("a",{staticClass:"categories-group-list card-title",class:{active:2===t.currentFormNumber,"":2===t.currentFormNumber},attrs:{"data-toggle":"collapse","aria-expanded":"false","aria-controls":"collapseFour"},on:{click:function(e){return t.changeForm(2)}}},[e("i",{staticClass:"mdi mdi-table font-size-18 align-middle mr-2"}),t._v(" Footer ")])])])])]),e("div",{staticClass:"col-lg-9 border-left"},[e("div",{attrs:{"no-body":""}},[e("div",{staticClass:"custom-html-styler d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[e("span",{staticClass:"text-uppercase"},[t._v(t._s(t.childData.title))])])]),e("div",{staticClass:"mx-1 border-top"},[e("b-card-sub-title",{staticClass:"mt-3 mb-4"},[e("h6",{staticClass:"card-subtitle text-center"},[t._v(" "+t._s(t.childData.paragraph)+" ")])]),t.currentFormNumber>0&&t.currentFormNumber<=t.totalForms?e("div",[e(t.currentForm,{tag:"component",attrs:{formDataList:t.formDataList,"form-number":t.currentFormNumber,selectedLogoFile:t.selectedLogoFile},on:{"form-submitnew":t.handleformSubmit,"data-mounted":t.handleChildData,"next-form":t.handlenextbtn,"prev-form":t.handlePreviousBtn,"reset-form":t.resetForm,"final-submit":t.finalSubmit,fileSelected:t.handleFileSelected}})],1):e("div",[e("p",[t._v("No form found")])])],1)])])])],1)},Oa=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-html-styler d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("HTML STYLER")])])}],La=function(){var t,e=this,s=e._self._c;return s("div",[s("h5",{staticClass:"text-primary p-2 mb-2"},[e._v("Logo")]),s("div",{staticClass:"form-group row"},[s("b-col",{attrs:{sm:"6"}},[s("label",{attrs:{for:"logo-image"}},[e._v("Logo")]),s("input",{ref:"fileInput",staticClass:"form-control-file logoFileInput",attrs:{type:"file",id:"logo-image",name:"logo-image",accept:".jpg, .jpeg, .png"},on:{change:e.onFileSelected}}),null!==(t=e.formDataList.header)&&void 0!==t&&t.logoName?s("span",{staticClass:"text-single-line"},[e._v(e._s(e.formDataList.header.logoName))]):s("span",[e._v("no file chosen")])])],1),s("h5",{staticClass:"text-primary p-2"},[e._v("Color shades")]),s("div",{staticClass:"form-group row"},[s("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.formDataList.header.headerColor,expression:"formDataList.header.headerColor"}],staticClass:"form-control",attrs:{type:"color",id:"color"},domProps:{value:e.formDataList.header.headerColor},on:{input:function(t){t.target.composing||e.$set(e.formDataList.header,"headerColor",t.target.value)}}})])],1),s("div",{staticClass:"d-flex justify-content-between mt-3"},[s("div",{staticClass:"d-flex"},[s("div",[s("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(t){return t.preventDefault(),e.nextForm()}}},[e._v("Next")])],1)]),s("div",{staticClass:"d-flex"},[s("div",[s("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(t){return t.preventDefault(),e.refreshFormData()}}},[e._v("Reset")])],1),s("div",[s("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(t){return t.preventDefault(),e.confirm()}}},[e._v("Submit")])],1)])])])},Ea=[],Ua={props:{formDataList:{type:Object,required:!0},selectedLogoFile:File},created(){this.updateFormData(this.formDataList)},beforeDestroy(){this.submitForm()},mounted(){const t={title:"Header",paragraph:"You can use these fields to design the technical manual's front logo, color shades and title.",icons:"mdi mdi-page-layout-header font-size-26 align-middle"};this.$emit("data-mounted",t),this.selectedLogoFile&&(this.$refs.fileInput.value=null,this.$refs.fileInput.files=[this.selectedLogoFile])},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},convertDataToLowerCase(){const t=Object.keys(this.$data);for(const e of t){const t=this.$data[e];if("object"===typeof t&&null!==t){const e=Object.keys(t);for(const s of e)null!==t[s]&&"string"===typeof t[s]&&(t[s]=t[s].toLowerCase())}}},async confirm(){this.submitForm();const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes",cancelButtonText:"No"}).then(async t=>{t.isConfirmed&&this.finalSubmit()})},updateFormData(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e])},refreshFormData(){this.$emit("reset-form")},onFileSelected(t){const e=t.target.files[0];e&&(this.$set(this.formDataList.header,"logoName",e.name),this.$emit("fileSelected",e))},nextForm(){this.$emit("next-form"),this.submitForm(),this.convertDataToLowerCase()},prevForm(){this.$emit("prev-form"),this.submitForm(),this.convertDataToLowerCase()},finalSubmit(){this.$emit("final-submit"),this.convertDataToLowerCase()},submitForm(){this.$emit("form-submitnew",this.formDataList)}}},Ra=Ua,qa=(s("d8b3"),Object(l["a"])(Ra,La,Ea,!1,null,"1d547b31",null)),Ma=qa.exports,za=function(){var t=this,e=t._self._c;return e("div",[e("h5",{staticClass:"mb-2 text-primary p-2 title"},[t._v("Footer")]),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"12 mt-2 mb-0"}},[e("label",{attrs:{for:"facebook"}},[t._v("Company Name")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.formDataList.footer.companyName,expression:"formDataList.footer.companyName"}],staticClass:"form-control",attrs:{name:"companyName",type:"text",id:"companyName",placeholder:"Enter company name"},domProps:{value:t.formDataList.footer.companyName},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.formDataList.footer,"companyName",e.target.value)}}})])],1),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"12 mt-2 mb-0"}},[e("label",{attrs:{for:"facebook"}},[t._v("Company website")]),e("input",{directives:[{name:"model",rawName:"v-model",value:t.formDataList.footer.companyWebsite,expression:"formDataList.footer.companyWebsite"}],staticClass:"form-control",attrs:{name:"companyWebsite",type:"text",id:"companyWebsite",placeholder:"Enter company website"},domProps:{value:t.formDataList.footer.companyWebsite},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.formDataList.footer,"companyWebsite",e.target.value)}}})])],1),e("div",{staticClass:"d-flex justify-content-between mt-3"},[e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.prevForm.apply(null,arguments)}}},[t._v("Previous")])],1)]),e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.refreshFormData.apply(null,arguments)}}},[t._v("Reset")])],1),e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.confirm.apply(null,arguments)}}},[t._v("Submit")])],1)])])])},Va=[],Ha={props:{formDataList:{type:Object,required:!0}},data(){return{websiteError:""}},computed:{_(){return j.a}},created(){this.updateFormData(this.formDataList)},beforeDestroy(){this.submitForm()},mounted(){const t={title:"Footer",paragraph:"You can use these fields to customize the technical manual's footer.",icons:"mdi mdi-table font-size-26 align-middle mr-2"};this.$emit("data-mounted",t)},watch:{$data:{deep:!0,handler(){this.convertDataToLowerCase()}}},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},convertDataToLowerCase(){const t=Object.keys(this.$data);for(const e of t){const t=this.$data[e];if("object"===typeof t&&null!==t){const e=Object.keys(t);for(const s of e)null!==t[s]&&"string"===typeof t[s]&&(t[s]=t[s].toLowerCase())}}},async confirm(){this.submitForm();const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.finalSubmit()})},updateFormData(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e])},nextForm(){this.$emit("next-form"),this.submitForm(),this.convertDataToLowerCase()},prevForm(){this.$emit("prev-form"),this.submitForm(),this.convertDataToLowerCase()},finalSubmit(){this.$emit("final-submit"),this.convertDataToLowerCase()},submitForm(){const t={footer:this.formDataList.footer};this.$emit("form-submitnew",t)},refreshFormData(){this.$emit("reset-form")}}},Wa=Ha,Ya=(s("fc10"),Object(l["a"])(Wa,za,Va,!1,null,"2a08f61f",null)),Ga=Ya.exports,Ja={components:{Header:Ma,Footer:Ga},data(){return{progress:0,childData:{},condition:!0,currentFormNumber:1,totalForms:2,formDataList:{header:{logoName:"",headerColor:"#000000"},footer:{companyName:"",companyWebsite:""}},userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectedLogoFile:null}},computed:{_(){return j.a},currentForm(){switch(this.currentFormNumber){case 1:return"Header";case 2:return"Footer";default:return null}}},watch:{formDataList:{deep:!0}},methods:{handleChildData(t){this.childData=t},validateCompanyWebsite(){const t=this.formDataList.footer.companyWebsite,e=/^(https?:\/\/)(www\.)?[\w-]+(\.[\w-]+)+([/?#].*)?$/i;return!(t&&!e.test(t))||(this.messageToast("Validation Error","danger","Enter a valid website URL starting with http:// or https://"),!1)},async defaultalert(){if(this.condition){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",text:"This will set all attributes to default as dita-ot files. You will lose your previous attributes sets. Click confirm button to proceed.",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Confirm",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.handledefualt()})}},resetForm(){this.formDataList={header:{logoName:"",headerColor:"#000000"},footer:{companyName:"",companyWebsite:""}},this.selectedLogoFile=null},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},changeForm(t){this.currentFormNumber=t},handleformSubmit(t){this.formDataList=JSON.parse(JSON.stringify({...this.formDataList,...t}))},handlenextbtn(){this.currentFormNumber<this.totalForms&&this.currentFormNumber++},handlePreviousBtn(){this.currentFormNumber>1&&this.currentFormNumber--},redirectDocPublishrer(){const t=encodeURIComponent(this.$route.params.repouser),e=encodeURIComponent(this.$route.params.reponame),s=encodeURIComponent(this.$route.params.repobranch);this.$router.push({path:`/htmldocstyler/docpublisher/${t}/${e}/${s}`})},async saveLogoImage(t){const e=t.size/1024/1024;if(e>3)throw new Error("File size should not exceed 3 MB");{const e=new FormData;e.append("HtmlLogo",t);const s=this.$store.state.Auth.userId,a=this.$store.state.Auth.orgId;await this.$store.getters.client.post(`/orguser/docstyler/uploadHtmlLogo?userId=${s}&orgId=${a}`,e,{headers:{"Content-Type":"multipart/form-data"}})}},async finalSubmit(){if(!this.validateCompanyWebsite())return;let t=this.$loading.show({loader:"dots"});try{null!==this.selectedLogoFile&&await this.saveLogoImage(this.selectedLogoFile);const e={userId:this.userId,orgId:this.orgId,customizationOptions:this.formDataList,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8)};await this.$store.getters.client.post("/orguser/docstyler/customizeHtmlOutput",e),this.messageToast("Success","primary","Changes made successfully."),setTimeout(()=>{this.redirectDocPublishrer()},1500)}catch(e){console.log("📢[index.vue:412]: error: ",e);const t=e.response?e.response.data.message:e.message?e.message:"Error in customizing the output";this.messageToast("Invalid request","danger",t)}finally{t.hide()}},handledefualt(){const t={userId:this.userId,orgId:this.orgId,customizationOptions:{},projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8)};this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",t).then(()=>{this.redirectDocPublishrer(),this.messageToast("Success","primary","Your DITA-OT has been reset to its default settings.")}).catch(t=>{this.messageToast("Invalid request","danger",t.data.message)})},handleFileSelected(t){this.selectedLogoFile=t}}},Ka=Ja,Za=(s("bd30"),Object(l["a"])(Ka,Ba,Oa,!1,null,"541b1ad5",null)),Qa=Za.exports,Xa=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress","hide-header":"",title:"Processing","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Working on customization to receive the desired output.")]),e("b-progress",{staticClass:"custom-progress",attrs:{value:t.progress,max:100}})],1),e("div",{staticClass:"row"},[e("div",{staticClass:"col-xl-3 col-lg-4 user-select-none"},[e("div",{attrs:{"no-body":""}},[t._m(0),e("div",{staticClass:"border-top"},[e("div",{staticClass:"categories-group-card"},[e("a",{staticClass:"categories-group-list card-title",class:{active:1===t.currentFormNumber,"":1===t.currentFormNumber},on:{click:function(e){return t.changeForm(1)}}},[e("i",{staticClass:"mdi mdi-home font-size-18 align-middle mr-2"}),t._v(" Front Page ")])]),e("div",{staticClass:"categories-group-card"},[e("a",{staticClass:"categories-group-list card-title",class:{active:2===t.currentFormNumber,"":2===t.currentFormNumber},on:{click:function(e){return t.changeForm(2)}}},[e("i",{staticClass:"mdi mdi-home font-size-18 align-middle mr-2"}),t._v(" Base Color ")])]),e("div",{staticClass:"categories-group-card"},[e("a",{staticClass:"categories-group-list card-title",class:{active:3===t.currentFormNumber,"":3===t.currentFormNumber},on:{click:function(e){return t.changeForm(3)}}},[e("i",{staticClass:"mdi mdi-home font-size-18 align-middle mr-2"}),t._v(" Header & Footer ")])])])])]),e("div",{staticClass:"col-lg-9 border-left"},[e("div",{attrs:{"no-body":""}},[e("div",{staticClass:"custom-html-styler d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[e("span",{staticClass:"text-uppercase"},[t._v(t._s(t.childData.title))])])]),e("div",{staticClass:"mx-1 border-top"},[e("b-card-sub-title",{staticClass:"mt-3 mb-4"},[e("h6",{staticClass:"card-subtitle text-center"},[t._v(" "+t._s(t.childData.paragraph)+" ")])]),t.currentFormNumber>0&&t.currentFormNumber<=t.totalForms?e("div",[e(t.currentForm,{tag:"component",attrs:{formDataList:t.formDataList,"form-number":t.currentFormNumber,selectedLogoFile:t.selectedLogoFile},on:{"form-submitnew":t.handleformSubmit,"data-mounted":t.handleChildData,"next-form":t.handlenextbtn,"prev-form":t.handlePreviousBtn,"final-submit":t.finalSubmit,"reset-form":t.resetForm,fileSelected:t.handleFileSelected}})],1):e("div",[e("p",[t._v("No form found")])])],1)])])])],1)},tr=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-html-styler d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title mb-0"},[t._v("PDF STYLER")])])}],er=function(){var t=this,e=t._self._c;return e("div",[e("h5",{staticClass:"text-primary title p-2 mb-2"},[t._v("Base color")]),e("b-card-body",[e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[e("label",{attrs:{for:"font-family"}},[t._v("Select base color")]),e("b-form-input",{staticClass:"form-control",attrs:{id:"font-family",type:"color"},model:{value:t.formDataList.color,callback:function(e){t.$set(t.formDataList,"color",e)},expression:"formDataList.color"}})],1)],1)]),e("div",{staticClass:"d-flex justify-content-between mt-3"},[e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.prevForm()}}},[t._v("Previous")])],1),e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.nextForm()}}},[t._v("Next")])],1)]),e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.refreshFormData()}}},[t._v("Reset")])],1),e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.confirm()}}},[t._v("Submit")])],1)])])],1)},sr=[],ar={props:{formDataList:{type:Object,required:!0}},mounted(){const t={title:"Base Color",paragraph:"You can use these fields to design the technical manual's base color.",icons:"mdi mdi-page-layout-header-footer font-size-26 align-middle mr-2"};this.$emit("data-mounted",t)},created(){this.updateFormData(this.formDataList)},beforeDestroy(){this.submitForm()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},convertDataToLowerCase(){const t=Object.keys(this.$data);for(const e of t){const t=this.$data[e];if("object"===typeof t&&null!==t){const e=Object.keys(t);for(const s of e)null!==t[s]&&"string"===typeof t[s]&&(t[s]=t[s].toLowerCase())}}},async confirm(){this.submitForm();const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.finalSubmit()})},refreshFormData(){this.$emit("reset-form")},updateFormData(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e])},nextForm(){this.$emit("next-form"),this.submitForm(),this.convertDataToLowerCase()},prevForm(){this.$emit("prev-form"),this.submitForm(),this.convertDataToLowerCase()},finalSubmit(){this.$emit("final-submit"),this.convertDataToLowerCase()},submitForm(){this.$emit("form-submitnew",this.formDataList)}}},rr=ar,or=(s("557a"),Object(l["a"])(rr,er,sr,!1,null,"25f0d934",null)),ir=or.exports,nr=function(){var t=this,e=t._self._c;return e("div",[e("h5",{staticClass:"mb-0 title p-2 text-primary mb-2"},[t._v("Cover page Logo")]),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[e("label",{attrs:{for:"logo-image"}},[t._v("Logo")]),e("input",{ref:"fileInput",staticClass:"form-control-file logoFileInput",attrs:{type:"file",accept:".jpg, .jpeg, .png",id:"logo-image",name:"logo-image"},on:{change:t.onFileSelected}}),t.pdfCoverLogoFile?e("span",{staticClass:"text-single-line"},[t._v(t._s(t.pdfCoverLogoFile.file.name))]):e("span",[t._v("no file chosen")])]),e("p",{staticClass:"pl-2 mb-0"},[t._v("Logo resolution must be 150x150 pixels.")])],1),e("h5",{staticClass:"mb-0 title p-2 text-primary mb-2"},[t._v("Cover page Image")]),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[e("label",{attrs:{for:"logo-image"}},[t._v("Image")]),e("input",{ref:"fileInput",staticClass:"form-control-file logoFileInput",attrs:{type:"file",accept:".jpg, .jpeg, .png",id:"logo-image",name:"logo-image"},on:{change:t.onImageFileSelected}}),t.pdfCoverImageFile?e("span",{staticClass:"text-single-line"},[t._v(t._s(t.pdfCoverImageFile.file.name))]):e("span",[t._v("no file chosen")])]),e("p",{staticClass:"pl-2 mb-0"},[t._v(" Image resolution must be either 1920x1080, 2100x2970, or 1080x1920 pixels. ")])],1),e("div",{staticClass:"d-flex justify-content-between mt-3"},[e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.nextForm()}}},[t._v("Next")])],1)]),e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.refreshFormData()}}},[t._v("Reset")])],1),e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.confirm()}}},[t._v("Submit")])],1)])])])},cr=[],lr={props:{formDataList:{type:Object,required:!0},selectedLogoFile:{type:Array,required:!0,validator:t=>t.every(t=>t.file instanceof File&&"string"===typeof t.type)}},mounted(){const t={title:"Front Page",paragraph:"You can use these fields to design the technical manual's front cover page.",icons:"mdi mdi-home font-size-26 align-middle mr-2"};this.$emit("data-mounted",t),this.selectedLogoFile&&(this.$refs.fileInput.value=null)},computed:{pdfCoverLogoFile(){return this.selectedLogoFile.find(t=>"pdfCoverLogo"===t.type)||null},pdfCoverImageFile(){return this.selectedLogoFile.find(t=>"pdfCoverImage"===t.type)||null}},created(){this.updateFormData(this.formDataList)},beforeDestroy(){this.submitForm()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},convertDataToLowerCase(){const t=Object.keys(this.$data);for(const e of t){const t=this.$data[e];if("object"===typeof t&&null!==t){const e=Object.keys(t);for(const s of e)null!==t[s]&&"string"===typeof t[s]&&(t[s]=t[s].toLowerCase())}}},async confirm(){this.submitForm();const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"success",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.finalSubmit()})},updateFormData(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e])},onFileSelected(t){const e=t.target.files[0];if(!e)return;const s=new Image,a=URL.createObjectURL(e);s.onload=()=>{URL.revokeObjectURL(a);const t=s.width,r=s.height,o=[{width:150,height:150}],i=o.some(e=>t===e.width&&r===e.height);if(!i)return void this.messageToast("Invalid image selected","danger","Logo resolution must be 150x150 pixels.");const n={file:e,type:"pdfCoverLogo",coverLogoName:e.name};this.$emit("fileSelected",n)},s.onerror=()=>{throw URL.revokeObjectURL(a),new Error("Failed to load image file")},s.src=a},onImageFileSelected(t){const e=t.target.files[0];if(!e)return;const s=new Image,a=URL.createObjectURL(e);s.onload=()=>{URL.revokeObjectURL(a);const t=s.width,r=s.height,o=[{width:1920,height:1080},{width:2100,height:2970},{width:1080,height:1920}],i=o.some(e=>t===e.width&&r===e.height);if(!i)return void this.messageToast("Invalid image selected","danger","Image resolution must be either 1920x1080, 2100x2970, or 1080x1920 pixels");const n={file:e,type:"pdfCoverImage",coverImageName:e.name};this.$emit("fileSelected",n)},s.onerror=()=>{throw URL.revokeObjectURL(a),new Error("Failed to load image file")},s.src=a},refreshFormData(){this.$emit("reset-form")},nextForm(){this.$emit("next-form"),this.submitForm(),this.convertDataToLowerCase()},prevForm(){this.$emit("prev-form"),this.submitForm(),this.convertDataToLowerCase()},submitForm(){this.$emit("form-submitnew",{})},finalSubmit(){this.$emit("final-submit"),this.convertDataToLowerCase()},handleprogress(){this.$emit("start-progress",{})}}},dr=lr,ur=(s("afcc"),Object(l["a"])(dr,nr,cr,!1,null,"fc7e975c",null)),mr=ur.exports,hr=function(){var t=this,e=t._self._c;return e("div",[e("h5",{staticClass:"mb-0 title text-primary mb-2"},[t._v("Header Logo")]),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[e("label",{attrs:{for:"header-logo-image"}},[t._v("Image")]),e("input",{ref:"fileInput",staticClass:"form-control-file logoFileInput",attrs:{type:"file",accept:".jpg, .jpeg, .png",id:"header-logo-image",name:"header-logo-image"},on:{change:t.onFileSelected}}),t.pdfHeaderLogoFile?e("span",{staticClass:"text-single-line"},[t._v(t._s(t.pdfHeaderLogoFile.file.name))]):e("span",[t._v("no file chosen")])])],1),e("h5",{staticClass:"mb-0 title text-primary mb-2"},[t._v("Footer")]),e("div",{staticClass:"form-group row"},[e("b-col",{attrs:{sm:"6 mt-2 mb-0"}},[e("label",{attrs:{for:"company-name"}},[t._v("Company Name")]),e("b-form-input",{staticClass:"form-control",attrs:{id:"company-name",type:"text",placeholder:"Enter company name"},model:{value:t.formDataList.footer.companyName,callback:function(e){t.$set(t.formDataList.footer,"companyName",e)},expression:"formDataList.footer.companyName"}})],1)],1),e("div",{staticClass:"d-flex justify-content-between mt-3"},[e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.prevForm()}}},[t._v("Previous")])],1)]),e("div",{staticClass:"d-flex"},[e("div",[e("b-button",{staticClass:"w-100 mb-2 mr-2",attrs:{size:"sm",variant:"light"},on:{click:function(e){return e.preventDefault(),t.refreshFormData()}}},[t._v("Reset")])],1),e("div",[e("b-button",{staticClass:"w-100 mb-2 ml-2",attrs:{size:"sm",variant:"primary"},on:{click:function(e){return e.preventDefault(),t.confirm()}}},[t._v("Submit")])],1)])])])},pr=[],gr={props:{formDataList:{type:Object,required:!0},selectedLogoFile:{type:Array,required:!0,validator:t=>t.every(t=>t.file instanceof File&&"string"===typeof t.type)}},mounted(){const t={title:"Header/Footer",paragraph:"You can use these fields to design the technical manual's header logo and footer customizations.",icons:"mdi mdi-page-layout-header-footer font-size-26 align-middle mr-2"};this.$emit("data-mounted",t),this.selectedLogoFile&&(this.$refs.fileInput.value=null)},computed:{pdfHeaderLogoFile(){return this.selectedLogoFile.find(t=>"pdfHeaderLogo"===t.type)||null}},created(){this.updateFormData(this.formDataList)},beforeDestroy(){this.submitForm()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},convertDataToLowerCase(){const t=Object.keys(this.$data);for(const e of t){const t=this.$data[e];if("object"===typeof t&&null!==t){const e=Object.keys(t);for(const s of e)null!==t[s]&&"string"===typeof t[s]&&(t[s]=t[s].toLowerCase())}}},onFileSelected(t){const e=t.target,s=e.files[0];if(!s)return;const a=s.size/1024/1024;if(a>3)return this.messageToast("Error","danger","File size should not exceed 3 MB"),void(e.value="");const r={file:s,type:"pdfHeaderLogo",headerLogoName:s.name};this.$emit("fileSelected",r)},async confirm(){this.submitForm();const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Yes",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.finalSubmit()})},refreshFormData(){this.$emit("reset-form")},updateFormData(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this[e]=t[e])},prevForm(){this.$emit("prev-form"),this.submitForm(),this.convertDataToLowerCase()},finalSubmit(){this.$emit("final-submit"),this.convertDataToLowerCase()},submitForm(){this.$emit("form-submitnew",this.formDataList)}}},fr=gr,br=(s("7d4e"),Object(l["a"])(fr,hr,pr,!1,null,"7bf7569b",null)),vr=br.exports,yr={components:{frontpage:mr,baseColor:ir,headerfooter:vr},data(){return{progress:0,condition:!0,currentFormNumber:1,totalForms:3,formDataList:{color:"#000000",footer:{companyName:""},coverLogoName:"",coverImageName:"",headerLogoName:""},childData:{},userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectedLogoFile:[]}},computed:{_(){return j.a},currentForm(){switch(this.currentFormNumber){case 1:return"frontpage";case 2:return"baseColor";case 3:return"headerfooter";default:return null}}},methods:{handleChildData(t){this.childData=t},async defaultalert(){if(this.condition){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});await t.fire({title:"Do you want to confirm changes?",icon:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Confirm",cancelButtonText:"No"}).then(t=>{t.isConfirmed&&this.handledefualt()})}},resetForm(){this.formDataList={color:"#000000",footer:{companyName:""},coverLogoName:"",coverImageName:"",headerLogoName:""},console.log("reset: ",this.selectedLogoFile),this.selectedLogoFile=[],console.log("after reset: ",this.selectedLogoFile)},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},changeForm(t){this.currentFormNumber=t},handleformSubmit(t){this.formDataList=JSON.parse(JSON.stringify({...this.formDataList,...t}))},handlenextbtn(){this.currentFormNumber<this.totalForms&&this.currentFormNumber++},handlePreviousBtn(){this.currentFormNumber>1&&this.currentFormNumber--},redirectDocPublishrer(){const t=encodeURIComponent(this.$route.params.repouser),e=encodeURIComponent(this.$route.params.reponame),s=encodeURIComponent(this.$route.params.repobranch);this.$router.push({path:`/pdfdocstyler/docpublisher/${t}/${e}/${s}`})},async saveLogoImage(t){const e=new FormData;for(const r of t)e.append(r.type,r.file);const s=this.$store.state.Auth.userId,a=this.$store.state.Auth.orgId;await this.$store.getters.client.post(`/orguser/docstyler/uploadPdfLogo?userId=${s}&orgId=${a}`,e,{headers:{"Content-Type":"multipart/form-data"}})},async finalSubmit(){let t=this.$loading.show({loader:"dots"});try{this.selectedLogoFile.length>0&&await this.saveLogoImage(this.selectedLogoFile);const e={userId:this.userId,orgId:this.orgId,customizationOptions:this.formDataList};await this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",e),this.messageToast("Success","primary","Changes made successfully."),setTimeout(()=>{this.redirectDocPublishrer()},1500)}catch(e){console.log("📢[index.vue:412]: error: ",e);const t=e.response?e.response.data.message:e.message?e.message:"Error in customizing the output";this.messageToast("Invalid request","danger",t)}finally{t.hide()}},handledefualt(){const t={userId:this.userId,orgId:this.orgId,customizationOptions:{}};this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",t).then(()=>{this.redirectDocPublishrer(),this.messageToast("Success","primary","Your DITA-OT has been reset to its default settings.")}).catch(t=>{this.messageToast("Invalid request","danger",t.data.message)})},handleFileSelected(t){const e=this.selectedLogoFile.findIndex(e=>e.type===t.type);-1!==e?this.selectedLogoFile.splice(e,1,t):this.selectedLogoFile.push(t),Object.prototype.hasOwnProperty.call(t,"coverLogoName")&&(this.formDataList.coverLogoName=t.coverLogoName),Object.prototype.hasOwnProperty.call(t,"headerLogoName")&&(this.formDataList.headerLogoName=t.headerLogoName),Object.prototype.hasOwnProperty.call(t,"coverImageName")&&(this.formDataList.coverImageName=t.coverImageName)}}},Cr=yr,wr=(s("d236"),Object(l["a"])(Cr,Xa,tr,!1,null,"79c30866",null)),xr=wr.exports,_r={components:{BTabs:bs["a"],BTab:vs["a"],htmlstyler:Qa,pdfstyler:xr},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{ditaotVersion:"",projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),activeTab:0,title:"DocStyler",items:[{text:"Projects",href:"/docmanager"},{text:"DocEditor",href:`/doceditor/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocStyler",active:!0}]}},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text")},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text")},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)}}},$r=_r,Tr=(s("82e4"),Object(l["a"])($r,Aa,Fa,!1,null,"07a9e2a1",null)),kr=Tr.exports,Sr=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"mr-2 px-1"},[e("span",{staticClass:"project-name"},[t._v(t._s(t.projectName))])]),e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])]),e("div",{staticClass:"row"},[null!==t.ditaOtVersions?e("div",{staticClass:"col-xl-12"},[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1):t._e()])],1)},jr=[],Ir=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","hide-header":"","title-class":"font-18","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Document publishing is currently in progress.")]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1),e("b-modal",{ref:"pull-modal",attrs:{size:"lg",centered:"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-escer":"",title:"Create a Pull Request"}},[e("div",{staticClass:"d-block"},[e("p",{staticClass:"modal-text"},[t._v("Your files are not updated. Update now.")])]),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary mt-2 px-2 py-1 btn-sm",attrs:{block:""},on:{click:function(e){return t.createPullreq()}}},[t._v(" Pull Repository ")])])]),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-footer":""},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-sm btn-primary",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit ")])],1)]),t.hideform?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-6"},[e("div",{staticClass:"bg-primary text-white"}),e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body"},[e("h5",{staticClass:"mb-4"},[t._v("Project Name : "+t._s(t.projectName))]),e("p",[t._v("Important! Commit changes to download the output.")]),e("div",{staticClass:"d-flex justify-content-center pt-1"},[e("button",{staticClass:"btn btn-primary btn-sm mr-2 mb-2",attrs:{disabled:t.disablecommitbutton},on:{click:function(e){return e.preventDefault(),t.githubCommit.apply(null,arguments)}}},[t._v(" Commit on GitHub ")]),e("button",{staticClass:"btn btn-light btn-sm mr-2 mb-2",on:{click:function(e){return t.downloadFun()}}},[t._v(" Download Output ")])])])])])]):t._e(),t.hideform?t._e():e("div",{staticClass:"card mt-4"},[e("div",{staticClass:"card-body"},[e("form",{attrs:{novalidate:""},on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"form-group"},[t._m(0),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.releaseTitle,expression:"typeform.releaseTitle"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.releaseTitle.$error},attrs:{required:"",name:"releaseTitle",type:"text",id:"releaseTitle",placeholder:"Enter release title"},domProps:{value:t.typeform.releaseTitle},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.typeform,"releaseTitle",e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("releaseTitle")&&"required"==t._.find(t.errors.items,{field:"releaseTitle"}).rule,expression:"\n errors.has('releaseTitle') &&\n _.find(errors.items, { field: 'releaseTitle' }).rule ==\n 'required'\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Title field is required")])])]),e("div",{staticClass:"form-group"},[t._m(1),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.typeform.inputPath,expression:"typeform.inputPath"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"inputPath",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v(" Select source Ditamap ")]),t._l(t.selectInput,(function(s){return e("option",{key:s.path,domProps:{value:s.path}},[t._v(" "+t._s(s.fileName)+" ")])}))],2)])]),e("div",{staticClass:"form-group"},[t._m(2),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.typeform.outputFormat,expression:"typeform.outputFormat"}],staticClass:"form-control",attrs:{required:"",disabled:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"outputFormat",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v("Select output format")]),e("option",{domProps:{value:t.outputFormatData[0].transtype}},[t._v(" "+t._s(t.outputFormatData[0].transtype)+" ")])])])]),e("div",{staticClass:"form-group text-right mb-0"},[e("div",[e("button",{staticClass:"btn btn-primary btn-sm",attrs:{disabled:!(t.typeform.outputFormat&&t.typeform.inputPath&&t.typeform.releaseTitle)},on:{click:function(e){return t.generateOutputFun(t.projectPath,t.workspacePath)}}},[t._v(" Transform ")]),e("button",{staticClass:"btn btn-sm btn-light m-l-5 ml-1",on:{click:function(e){return t.resetform()}}},[t._v(" Cancel ")])])])])])])],1)},Pr=[function(){var t=this,e=t._self._c;return e("label",[t._v("Title "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Input Source Ditamap "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Output Format "),e("span",{staticClass:"text-secondary"},[t._v("*")])])}],Dr={props:{ditaotVersion:String},data(){return{userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,userName:this.$store.state.Auth.userName,typeform:{inputPath:"",outputPath:"",outputFormat:"",releaseTitle:""},selectInput:null,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectOutputFormat:null,submitted:!1,projectPath:null,typesubmit:!1,workspacePath:null,disablebutton:!1,disablecommitbutton:!0,disabledownloadbutton:!0,commitMsg:null,hideform:!1,showModal:!1,outputFormatData:null,model:"",releaseParams:null,outputURL:null,gitToken:this.$store.state.Auth.gitToken,urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/}},created(){this.getWorkspace(),this.hideform=!1},mounted(){this.getoutputFormat(),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/main/output`,this.hideform=!1},computed:{_(){return j.a},outputFormats(){return Object.values(this.selectOutputFormat)}},methods:{preventLeadingSpace(t){t.target.value?" "==t.target.value[0]&&(t.target.value=t.target.value.replace(/^\s*/,"")):t.preventDefault()},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=this.$route.params.reponame,s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},createPullreq(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/workspace/pullGitChanges?projectName="+this.projectName).then(e=>{this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.currentfilePath).then(t=>{U["eventBus"].$emit("getcontent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("textViewContent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("clearHistory")}).catch(()=>{}),this.$refs["pull-modal"].hide(),t.hide(),this.messageToast("Success","primary","Pull request completed")}).catch(e=>{t.hide(),this.messageToast("Invalid request","danger",e.response.data.message)})},async getWorkspace(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.userId).then(async e=>{let s=e.data.installedPath+"/"+this.projectName;this.workspacePath=e.data.installedPath,this.projectPath=e.data.installedPath+"/"+this.projectName,await this.$store.getters.client.post("/orguser/workspace/fetchGitRemoteChanges?path="+s).then(t=>{t.data.message.includes("please pull your branch to proceed")&&this.$refs["pull-modal"].show()});let a="ditamap";await this.$store.getters.client.get(`/orguser/workspace/inputfiles?path=${s}&extenssion=${a}`).then(e=>{t.hide(),this.selectInput=e.data}).catch(()=>{t.hide()}),await this.$store.getters.client.get("/orguser/workspace/repotree?path="+s).then(e=>{t.hide(),this.model=e.data}).catch(()=>{t.hide()})}).catch(()=>{t.hide()})},async generateOutputFun(t,e){this.disablebutton=!0;let s=e+"/dita-ot-"+this.ditaotVersion+"/bin",a={inputPath:this.typeform.inputPath,binPath:s,ditaotVersion:this.ditaotVersion,outputPath:t+"/output",outputFormat:this.typeform.outputFormat};this.releaseParams={ditaMapFileName:this.typeform.inputPath.split("/").pop(),outputFormat:this.typeform.outputFormat,ditaotVersion:this.ditaotVersion,orgId:this.orgId,userId:this.userId,releaseTitle:this.typeform.releaseTitle,releasedBy:this.userName,projectName:this.projectName},await this.$validator.validateAll().then(t=>{t&&(this.$refs["modaloutputprogress"].show(),this.$store.getters.client.post("/orguser/docpublish",a).then(t=>{this.disablebutton=!1,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","primary",t.data.message),this.typeform.inputPath=null,this.hideform=!0,this.disablecommitbutton=!1,this.typeform.releaseTitle=null}).catch(t=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("invalid request","danger",t.response.data.message)}))})},commitOnGithub(){this.showModal=!0},githubCommit(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit.",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,confirmButtonColor:"#556ee6",cancelButtonColor:"#f46a6a",preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={path:this.projectPath,githubUsername:this.$store.state.Auth.githubUsername,email:this.$store.state.Auth.userEmail,message:e,repoName:this.projectName,transType:this.typeform.outputFormat};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.put("/orguser/workspace/commit",s).then(e=>{this.disabledownloadbutton=!1,this.releaseParams.commitSHA=e.data.commitSHA,this.releaseParams.owner=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),this.$store.getters.client.post("/orguser/release",this.releaseParams).then(()=>{this.$store.commit("setRecentPublicationsData",[])}).catch(t=>{this.$refs["modaloutputprogress"].hide(),t.response&&t.response.data&&"release validation failed: commitSHA: Path `commitSHA` is required."===t.response.data.message||this.messageToast("Invalid request","danger",t.response&&t.response.data?t.response.data.message:"Unknown error occurred")}),t.fire({icon:"success",title:"Commit request completed.",text:e.data.message}),this.disablecommitbutton=!0}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message})})}})},async getoutputFormat(){await this.$store.getters.client.get("/plugins?type=pdf&category=docStyler").then(t=>{this.outputFormatData=t.data,this.typeform.outputFormat=this.outputFormatData[0].transtype}).catch(()=>{})},resetform(){this.typeform.inputPath=null,this.typeform.releaseTitle=null},async downloadFun(){let t=this.$loading.show({loader:"dots"});try{await at({repoName:this.projectName,commitSHA:this.releaseParams.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(e){this.messageToast("Invalid request","danger",e.message)}finally{t.hide()}},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")}}},Nr=Dr,Ar=(s("7eba"),Object(l["a"])(Nr,Ir,Pr,!1,null,"1770448b",null)),Fr=Ar.exports,Br={components:{generateoutput:Fr},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{organizationDetails:null,orgId:this.$store.state.Auth.orgId,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),title:"DocPublisher",items:[{text:"Projects",href:"/docmanager"},{text:"DocEditor",href:`/doceditor/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocStyler",href:`/docstyler/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocPublisher",active:!0}]}},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text")}},Or=Br,Lr=(s("d2e0"),Object(l["a"])(Or,Sr,jr,!1,null,"8419b08c",null)),Er=Lr.exports,Ur=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"mr-2 px-1"},[e("span",{staticClass:"project-name"},[t._v(t._s(t.projectName))])]),e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])]),e("div",{staticClass:"row"},[null!==t.ditaOtVersions?e("div",{staticClass:"col-xl-12"},[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1):t._e()])],1)},Rr=[],qr=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Document publishing is currently in progress.")]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1),e("b-modal",{ref:"pull-modal",attrs:{size:"lg",centered:"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-escer":"",title:"Create a Pull Request"}},[e("div",{staticClass:"d-block"},[e("p",{staticClass:"modal-text"},[t._v("Your files are not updated. Update now.")])]),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary mt-2 px-2 py-1 btn-sm",attrs:{block:""},on:{click:function(e){return t.createPullreq()}}},[t._v(" Pull Repository ")])])]),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-footer":""},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-sm btn-primary",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit ")])],1)]),t.hideform?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"bg-primary text-white"}),e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body text-center"},[e("h5",{staticClass:"mb-4"},[t._v("Project Name : "+t._s(t.projectName))]),e("p",[t._v("Important! Commit changes to download the output.")]),e("div",{staticClass:"d-flex justify-content-center pt-1"},[e("button",{staticClass:"btn btn-primary btn-sm mr-2 mb-2",attrs:{disabled:t.disablecommitbutton},on:{click:function(e){return e.preventDefault(),t.githubCommit.apply(null,arguments)}}},[t._v(" Commit on GitHub ")]),e("button",{staticClass:"btn btn-light btn-sm mr-2 mb-2",on:{click:function(e){return t.downloadFun()}}},[t._v(" Download Output ")]),e("button",{staticClass:"btn btn-info btn-sm mr-2 mb-2",attrs:{disabled:!t.userActivityId},on:{click:function(e){return t.deployToChatbotSelectBranch()}}},[t._v(" Deploy to chatbot ")])]),e("ChatbotPublishStatus")],1)])])]):t._e(),t.hideform?t._e():e("div",{staticClass:"card mt-4"},[e("div",{staticClass:"card-body"},[e("form",{attrs:{novalidate:""},on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"form-group"},[t._m(0),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.releaseTitle,expression:"typeform.releaseTitle"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.releaseTitle.$error},attrs:{required:"",name:"releaseTitle",type:"text",id:"releaseTitle",placeholder:"Enter Release Title"},domProps:{value:t.typeform.releaseTitle},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.typeform,"releaseTitle",e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("releaseTitle")&&"required"==t._.find(t.errors.items,{field:"releaseTitle"}).rule,expression:"\n errors.has('releaseTitle') &&\n _.find(errors.items, { field: 'releaseTitle' }).rule ==\n 'required'\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Title field is required")])])]),e("div",{staticClass:"form-group"},[t._m(1),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.typeform.inputPath,expression:"typeform.inputPath"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"inputPath",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v(" Select Source Ditamap ")]),t._l(t.selectInput,(function(s){return e("option",{key:s.path,domProps:{value:s.path}},[t._v(" "+t._s(s.fileName)+" ")])}))],2)])]),e("div",{staticClass:"form-group"},[t._m(2),e("div",[e("select",{directives:[{name:"model",rawName:"v-model",value:t.typeform.outputFormat,expression:"typeform.outputFormat"}],staticClass:"form-control",attrs:{required:"",disabled:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"outputFormat",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v("Select Output Format")]),e("option",{domProps:{value:t.outputFormatData[0].transtype}},[t._v(" "+t._s(t.outputFormatData[0].transtype)+" ")])])])]),e("div",{staticClass:"form-group text-right mb-0"},[e("div",[e("button",{staticClass:"btn btn-primary btn-sm",attrs:{disabled:!(t.typeform.outputFormat&&t.typeform.inputPath&&t.typeform.releaseTitle)},on:{click:function(e){return t.generateOutputFun(t.projectPath,t.workspacePath)}}},[t._v(" Transform ")]),e("button",{staticClass:"btn btn-sm btn-light m-l-5 ml-1",on:{click:function(e){return t.resetform()}}},[t._v(" Cancel ")])])])])])]),e("DeployToChatbot",{ref:"deplotToChatbotRef",attrs:{userActivityId:t.userActivityId,repouser:t.repouser},on:{deleteUserActivityId:t.deleteUserActivityId,publishSuccess:t.handlePublishSuccess}})],1)},Mr=[function(){var t=this,e=t._self._c;return e("label",[t._v("Title "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Input Source Ditamap "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Output Format "),e("span",{staticClass:"text-secondary"},[t._v("*")])])}],zr={components:{DeployToChatbot:ts,ChatbotPublishStatus:is},props:{ditaotVersion:String},data(){return{isPublishedToChatbot:!1,userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,userName:this.$store.state.Auth.userName,typeform:{inputPath:"",outputPath:"",outputFormat:"",releaseTitle:""},selectInput:null,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectOutputFormat:null,submitted:!1,projectPath:null,typesubmit:!1,workspacePath:null,disablebutton:!1,disablecommitbutton:!1,disabledownloadbutton:!0,commitMsg:null,hideform:!1,showModal:!1,outputFormatData:null,model:"",releaseParams:null,outputURL:null,gitToken:this.$store.state.Auth.gitToken,urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/,userActivityId:null}},created(){this.getWorkspace(),this.hideform=!1},mounted(){this.getoutputFormat(),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/main/output`,this.hideform=!1},computed:{_(){return j.a},outputFormats(){return Object.values(this.selectOutputFormat)}},methods:{handlePublishSuccess(){this.isPublishedToChatbot=!0},preventLeadingSpace(t){t.target.value?" "==t.target.value[0]&&(t.target.value=t.target.value.replace(/^\s*/,"")):t.preventDefault()},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),e=Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},createPullreq(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/workspace/pullGitChanges?projectName="+this.projectName).then(()=>{this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.currentfilePath).then(t=>{U["eventBus"].$emit("getcontent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("textViewContent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("clearHistory")}).catch(()=>{}),this.$refs["pull-modal"].hide(),t.hide(),this.messageToast("Success","primary","Pull request completed")}).catch(e=>{t.hide(),this.messageToast("Error","danger",e.response?e.response.data.message:"An error occurred during the pull request.")})},async getWorkspace(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.userId).then(async e=>{let s=e.data.installedPath+"/"+this.projectName;this.workspacePath=e.data.installedPath,this.projectPath=e.data.installedPath+"/"+this.projectName,await this.$store.getters.client.post("/orguser/workspace/fetchGitRemoteChanges?path="+s).then(t=>{t.data.message.includes("please pull your branch to proceed")&&this.$refs["pull-modal"].show()});let a="ditamap";await this.$store.getters.client.get(`/orguser/workspace/inputfiles?path=${s}&extenssion=${a}`).then(e=>{t.hide(),this.selectInput=e.data}).catch(()=>{t.hide()}),await this.$store.getters.client.get("/orguser/workspace/repotree?path="+s).then(e=>{t.hide(),this.model=e.data}).catch(()=>{t.hide()})}).catch(()=>{t.hide()})},async generateOutputFun(t,e){this.disablebutton=!0;let s=e+"/dita-ot-"+this.ditaotVersion+"/bin",a={inputPath:this.typeform.inputPath,binPath:s,ditaotVersion:this.ditaotVersion,outputPath:t+"/output",outputFormat:this.typeform.outputFormat};this.releaseParams={ditaMapFileName:this.typeform.inputPath.split("/").pop(),outputFormat:this.typeform.outputFormat,ditaotVersion:this.ditaotVersion,orgId:this.orgId,userId:this.userId,releaseTitle:this.typeform.releaseTitle,releasedBy:this.userName,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8)},await this.$validator.validateAll().then(t=>{t&&(this.$refs["modaloutputprogress"].show(),this.$store.getters.client.post("/orguser/docpublish",a).then(t=>{this.disablebutton=!1,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","success",t.data.message),this.typeform.inputPath=null,this.hideform=!0,this.disablecommitbutton=!1,this.typeform.releaseTitle=null}).catch(t=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("invalid request","danger",t.response.data.message)}))})},commitOnGithub(){this.showModal=!0},githubCommit(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit.",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,confirmButtonColor:"#556ee6",cancelButtonColor:"#f46a6a",preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={path:this.projectPath,githubUsername:this.$store.state.Auth.githubUsername,email:this.$store.state.Auth.userEmail,message:e,repoName:this.projectName,transType:this.typeform.outputFormat};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.put("/orguser/workspace/commit",s).then(e=>{this.disabledownloadbutton=!1,this.releaseParams.commitSHA=e.data.commitSHA,this.userActivityId=e.data.userActivityId,this.releaseParams.owner=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),this.$store.getters.client.post("/orguser/release",this.releaseParams).then(()=>{this.$store.commit("setRecentPublicationsData",[])}).catch(t=>{this.$refs["modaloutputprogress"].hide(),t.response&&t.response.data&&"release validation failed: commitSHA: Path `commitSHA` is required."===t.response.data.message||this.messageToast("Invalid request","danger",t.response&&t.response.data?t.response.data.message:"Unknown error occurred")}),t.fire({icon:"success",title:"Commit request completed.",text:e.data.message}),this.disablecommitbutton=!0}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message})})}})},deployToChatbotSelectBranch(){this.$refs.deplotToChatbotRef.deployToChatbotSelectBranch()},deleteUserActivityId(){this.userActivityId=null},async getoutputFormat(){await this.$store.getters.client.get("/plugins?type=html&category=docStyler").then(t=>{this.outputFormatData=t.data,this.typeform.outputFormat=this.outputFormatData[0].transtype}).catch(()=>{})},resetform(){this.typeform.inputPath=null,this.typeform.releaseTitle=null},async downloadFun(){let t=this.$loading.show({loader:"dots"});try{await at({repoName:this.projectName,commitSHA:this.releaseParams.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(e){this.messageToast("Invalid request","danger",e.message)}finally{t.hide()}},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")}}},Vr=zr,Hr=(s("e8f9"),Object(l["a"])(Vr,qr,Mr,!1,null,"19a9d8b2",null)),Wr=Hr.exports,Yr={components:{generateoutput:Wr},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{orgId:this.$store.state.Auth.orgId,title:"DocPublisher",items:[{text:"Projects",href:"/docmanager"},{text:"DocEditor",href:`/doceditor/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocStyler",href:`/docstyler/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocPublisher",active:!0}],projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8)}},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text")}},Gr=Yr,Jr=(s("1522"),Object(l["a"])(Gr,Ur,Rr,!1,null,"5c41ae26",null)),Kr=Jr.exports,Zr=[{path:"/docstyler/:repouser/:reponame/:repobranch",component:kr,name:"styler",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}},{path:"/pdfdocstyler/docpublisher/:repouser/:reponame/:repobranch",component:Er,name:"PdfDocPublisher",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}},{path:"/htmldocstyler/docpublisher/:repouser/:reponame/:repobranch",component:Kr,name:"HtmlDocPublisher",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}}],Qr=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"mr-2 px-1"},[e("span",{staticClass:"project-name"},[t._v(t._s(t.projectName))])]),e("div",{staticClass:"mr-2 dita-ot-cont px-1"},[e("span",{staticClass:"dita-ot"},[t._v("DITA-OT Version:")]),e("span",{staticClass:"dita-ot-version ml-2"},[t._v(t._s(t.ditaOtVersions))])])]),e("div",{staticClass:"row mt-3"},[this.$store.state.Auth.orgDetails.customPlugin&&t.customPluginOutputFormat.length?e("div",{staticClass:"col-xl-12"},[e("b-card",[e("b-tabs",{staticClass:"btabs-height",attrs:{justified:"","nav-class":"nav-tabs-custom","content-class":"text-muted"}},[e("b-tab",{attrs:{title:"Default Publisher",active:""}},[e("div",[e("div",[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1)])]),e("b-tab",{attrs:{title:"Custom Publisher"}},[e("div",[e("div",[e("customPlugin",{attrs:{ditaotVersion:t.ditaOtVersions}})],1)])])],1)],1)],1):e("div",{staticClass:"col-xl-12"},[null!==t.ditaOtVersions?e("div",[e("generateoutput",{attrs:{ditaotVersion:t.ditaOtVersions}})],1):t._e()])])],1)},Xr=[],to=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"modaloutputprogress",attrs:{id:"modal-progress",title:"Processing","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""}},[e("strong",[t._v("Please wait")]),e("br"),e("p",[t._v("Document publishing is currently in progress.")]),e("b-progress",{attrs:{value:75,max:100,animated:""}})],1),e("b-modal",{ref:"modalcommit",attrs:{id:"modal-commit",title:"Commit Output","title-class":"font-18","hide-header":"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-esc":""},model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[e("div",[e("b-form-group",{attrs:{label:"Commit Message"}},[e("b-form-input",{attrs:{for:"text"},model:{value:t.commitMsg,callback:function(e){t.commitMsg=e},expression:"commitMsg"}})],1),e("button",{staticClass:"btn btn-primary btn-sm",on:{click:function(e){return t.commitOutput()}}},[t._v(" Commit ")])],1)]),t.hideform?e("div",{staticClass:"row justify-content-center"},[e("div",{staticClass:"col-md-6"},[e("div",{staticClass:"bg-primary text-white"}),e("div",{staticClass:"card shadow-sm"},[e("div",{staticClass:"card-body"},[e("h5",{staticClass:"mb-4"},[t._v("Project Name : "+t._s(t.projectName))]),e("p",[t._v("Important! Commit changes to download the output.")]),e("div",{staticClass:"d-flex justify-content-center pt-1"},[e("button",{staticClass:"btn btn-primary btn-sm mr-2 mb-2",attrs:{disabled:t.disablecommitbutton},on:{click:function(e){return e.preventDefault(),t.githubCommit.apply(null,arguments)}}},[t._v(" Commit on GitHub ")]),e("button",{staticClass:"btn btn-light btn-sm mr-2 mb-2",on:{click:function(e){return t.downloadFun()}}},[t._v(" Download Output ")])])])])])]):t._e(),"Disabled"===this.$store.state.Auth.orgDetails.customPlugin?e("hr"):t._e(),t.hideform?t._e():e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("form",{attrs:{novalidate:""},on:{submit:function(t){t.preventDefault()}}},[e("div",{staticClass:"form-group"},[t._m(0),e("input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.releaseTitle,expression:"typeform.releaseTitle"}],staticClass:"form-control",class:{"is-invalid":t.submitted&&t.$v.releaseTitle.$error},attrs:{required:"",name:"releaseTitle",type:"text",id:"releaseTitle",placeholder:"Enter release title"},domProps:{value:t.typeform.releaseTitle},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.preventLeadingSpace.apply(null,arguments)},input:function(e){e.target.composing||t.$set(t.typeform,"releaseTitle",e.target.value)}}}),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("releaseTitle")&&"required"==t._.find(t.errors.items,{field:"releaseTitle"}).rule,expression:"\n errors.has('releaseTitle') &&\n _.find(errors.items, { field: 'releaseTitle' }).rule ==\n 'required'\n "}],staticClass:"text-danger text-sm"})]),e("div",{staticClass:"form-group"},[t._m(1),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.inputPath,expression:"typeform.inputPath"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"inputPath",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v(" Select source Ditamap ")]),t._l(t.selectInput,(function(s){return e("option",{key:s.path,domProps:{value:s.path}},[t._v(" "+t._s(s.fileName)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.inputPath")&&t.$v.typeform.inputPath.required,expression:"\n errors.has('typeform.inputPath') &&\n $v.typeform.inputPath.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Input Format selection is required")])])])]),e("div",{staticClass:"form-group"},[t._m(2),e("div",[e("select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"},{name:"model",rawName:"v-model",value:t.typeform.outputFormat,expression:"typeform.outputFormat"}],staticClass:"form-control",attrs:{required:""},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){var e="_value"in t?t._value:t.value;return e}));t.$set(t.typeform,"outputFormat",e.target.multiple?s:s[0])}}},[e("option",{attrs:{value:"",disabled:"",selected:""}},[t._v("Select output format")]),t._l(t.selectOutputFormat,(function(s){return e("option",{key:s.id,domProps:{value:s.transtype}},[t._v(" "+t._s(s.transtype)+" ")])}))],2),e("p",{directives:[{name:"show",rawName:"v-show",value:t.errors.has("typeform.outputFormat")&&t.$v.typeform.outputFormat.required,expression:"\n errors.has('typeform.outputFormat') &&\n $v.typeform.outputFormat.required\n "}],staticClass:"text-danger text-sm"},[e("span",[t._v("Output Format selection is required")])])])]),e("div",{staticClass:"form-group text-right mb-0"},[e("div",[e("button",{staticClass:"btn btn-sm btn-primary",attrs:{disabled:!(t.typeform.outputFormat&&t.typeform.inputPath&&t.typeform.releaseTitle)},on:{click:function(e){return t.generateOutputFun(t.projectPath,t.workspacePath)}}},[t._v(" Transform ")]),e("button",{staticClass:"btn btn-light btn-sm m-l-5 ml-1",on:{click:t.resetform}},[t._v(" Cancel ")])])])])])]),e("b-modal",{ref:"pull-modal",attrs:{size:"lg",centered:"","hide-footer":"","hide-close":"","no-close-on-backdrop":"","no-close-on-escer":"",title:"Create a Pull Request"}},[e("div",{staticClass:"d-block"},[e("p",{staticClass:"modal-text"},[t._v("Your files are not updated. Update now.")])]),e("div",{staticClass:"text-center"},[e("button",{staticClass:"btn btn-primary mt-2 px-2 py-1 btn-sm",attrs:{block:""},on:{click:function(e){return t.createPullreq()}}},[t._v(" Pull Repository ")])])])],1)},eo=[function(){var t=this,e=t._self._c;return e("label",[t._v("Title "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Input Source Ditamap "),e("span",{staticClass:"text-secondary"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",[t._v("Output Format "),e("span",{staticClass:"text-secondary"},[t._v("*")])])}],so=s("c4e3"),ao=s.n(so),ro=s("4749"),oo=s.n(ro),io=s("76a0"),no=s.n(io),co=s("3eed"),lo=s.n(co),uo=s("9e7e"),mo=s.n(uo),ho={props:{ditaotVersion:String},data(){return{userId:this.$store.state.Auth.userId,orgId:this.$store.state.Auth.orgId,userName:this.$store.state.Auth.userName,typeform:{inputPath:"",outputPath:"",outputFormat:"",releaseTitle:""},selectInput:null,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),selectOutputFormat:null,submitted:!1,projectPath:null,typesubmit:!1,workspacePath:null,disablebutton:!1,disablecommitbutton:!0,disabledownloadbutton:!0,commitMsg:null,hideform:!1,showModal:!1,model:"",releaseParams:null,outputURL:null,gitToken:this.$store.state.Auth.gitToken,urlParserRegex:/^[/]([^/]+)[/]([^/]+)[/]tree[/]([^/]+)[/](.*)/}},created(){this.getWorkspace(),this.hideform=!1},mounted(){this.getoutputFormat(),this.outputURL=`https://github.com/${this.repouser}/${this.projectName}/tree/main/output`,this.makedefaultplugin(),this.hideform=!1},computed:{_(){return j.a}},methods:{preventLeadingSpace(t){t.target.value?" "==t.target.value[0]&&(t.target.value=t.target.value.replace(/^\s*/,"")):t.preventDefault()},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},validateURL(){const t=this.$route.params.repouser,e=this.$route.params.reponame,s=localStorage.getItem("repouser"),a=localStorage.getItem("reponame");e===a&&t===s||oe(e)},createPullreq(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.post("/orguser/workspace/pullGitChanges?projectName="+this.projectName).then(e=>{this.$store.getters.client.get("/orguser/workspace/filecontent?path="+this.currentfilePath).then(t=>{U["eventBus"].$emit("getcontent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("textViewContent",{content:t.data,path:this.currentfilePath}),U["eventBus"].$emit("clearHistory")}).catch(()=>{}),this.$refs["pull-modal"].hide(),t.hide(),this.messageToast("Success","primary","Pull request completed")}).catch(e=>{t.hide(),this.messageToast("Invalid request","danger",e.response.data.message)})},async getWorkspace(){let t=this.$loading.show({loader:"dots"});await this.$store.getters.client.get("/orguser/workspace/byuserId?userId="+this.userId).then(async e=>{let s=e.data.installedPath+"/"+this.projectName;this.workspacePath=e.data.installedPath,this.projectPath=e.data.installedPath+"/"+this.projectName,await this.$store.getters.client.post("/orguser/workspace/fetchGitRemoteChanges?path="+s).then(t=>{t.data.message.includes("please pull your branch to proceed")&&this.$refs["pull-modal"].show()});let a="ditamap";await this.$store.getters.client.get(`/orguser/workspace/inputfiles?path=${s}&extenssion=${a}`).then(e=>{t.hide(),this.selectInput=e.data}).catch(()=>{t.hide()}),await this.$store.getters.client.get("/orguser/workspace/repotree?path="+s).then(e=>{t.hide(),this.model=e.data}).catch(()=>{t.hide()})}).catch(()=>{t.hide()})},makedefaultplugin(){const t={userId:this.userId,orgId:this.orgId,customizationOptions:{}};this.$store.getters.client.post("/orguser/docstyler/customizePdfOutput",t).then(()=>{}).catch(()=>{}),this.$store.getters.client.post("/orguser/docstyler/customizehtmlOutput",t).then(()=>{}).catch(()=>{})},async generateOutputFun(t,e){this.disablebutton=!0;let s=e+"/dita-ot-"+this.ditaotVersion+"/bin",a={inputPath:this.typeform.inputPath,binPath:s,ditaotVersion:this.ditaotVersion,outputPath:t+"/output",outputFormat:this.typeform.outputFormat};this.releaseParams={ditaMapFileName:this.typeform.inputPath.split("/").pop(),outputFormat:this.typeform.outputFormat,ditaotVersion:this.ditaotVersion,orgId:this.orgId,userId:this.userId,releaseTitle:this.typeform.releaseTitle,releasedBy:this.userName,projectName:this.projectName},await this.$validator.validateAll().then(t=>{t&&(this.$refs["modaloutputprogress"].show(),this.$store.getters.client.post("/orguser/docpublish",a).then(t=>{this.disablebutton=!1,this.$refs["modaloutputprogress"].hide(),this.messageToast("Success","primary",t.data.message),this.typeform.inputPath=null,this.hideform=!0,this.typeform.outputFormat=null,this.disablecommitbutton=!1,this.typeform.releaseTitle=null}).catch(t=>{this.$refs["modaloutputprogress"].hide(),this.messageToast("invalid request","danger",t.response.data.message)}))})},commitOnGithub(){this.showModal=!0},githubCommit(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm mr-2",cancelButton:"btn btn-light btn-sm"},buttonsStyling:!1});t.fire({title:"Add description to submit and commit.",input:"text",showCancelButton:!0,confirmButtonText:"Submit",showLoaderOnConfirm:!0,confirmButtonColor:"#556ee6",cancelButtonColor:"#f46a6a",preConfirm:t=>new Promise((e,s)=>{""===t.trim()?s(new Error("Please enter a commit message.")):e(t)}),allowOutsideClick:!1,inputValidator:t=>""!==t.trim()?void 0:"Please enter a commit message."}).then(({value:e})=>{if(void 0!==e){let s={path:this.projectPath,message:e,githubUsername:this.$store.state.Auth.githubUsername,email:this.$store.state.Auth.userEmail};t.fire({title:"Commit request in progress...",allowOutsideClick:!1,onOpen:()=>{}}),ae.a.showLoading(),this.$store.getters.client.put("/orguser/workspace/doceditor/commit",s).then(e=>{this.disabledownloadbutton=!1,this.releaseParams.commitSHA=e.data.commitSHA,this.releaseParams.owner=Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),this.$store.getters.client.post("/orguser/release",this.releaseParams).then(()=>{this.$store.commit("setRecentPublicationsData",[])}).catch(t=>{this.$refs["modaloutputprogress"].hide(),t.response&&t.response.data&&"release validation failed: commitSHA: Path `commitSHA` is required."===t.response.data.message||this.messageToast("Invalid request","danger",t.response&&t.response.data?t.response.data.message:"Unknown error occurred")}),t.fire({icon:"success",title:"Commit request completed.",text:e.data.message})}).catch(e=>{t.fire({icon:"error",title:"Commit failed!",text:e.response.data.message})})}})},async getoutputFormat(){await this.$store.getters.client.get("/plugins").then(t=>{this.selectOutputFormat=t.data}).catch(()=>{})},resetform(){this.typeform.inputPath="",this.typeform.outputFormat="",this.typeform.releaseTitle=""},async downloadFun(){let t=this.$loading.show({loader:"dots"});const e=new ao.a;let s,a,r,o;try{const t=new URL(this.outputURL);[,s,a,r,o]=this.urlParserRegex.exec(t.pathname)}catch(i){return this.messageToast("Invalid request","danger","Error parsing URL"),void t.hide()}try{const{private:i}=await this.fetchRepoInfo(`${s}/${a}`),n=await oo.a.viaTreesApi({user:s,repository:a,ref:r,directory:decodeURIComponent(o),token:this.gitToken,getFullData:!0}),c=new AbortController,l=async t=>{const e=await qe["b"].get(`https://raw.githubusercontent.com/${s}/${a}/${r}/${this.escapeFilepath(t.path)}`,{signal:c.signal});if(!e.ok)throw new Error(`HTTP ${e.statusText} for ${t.path}`);return e.blob()},d=async t=>{const e=await qe["b"].get(t.url,{headers:{Authorization:"Bearer "+this.gitToken},signal:c.signal}),{content:s}=await e.data,a=await fetch("data:application/octet-stream;base64,"+s);return a.blob()};let u=0;const m=async t=>{const s=()=>i?d(t):l(t),a=t=>{};try{const r=await lo()(s,{onFailedAttempt:a});u++;const i=await e;i.file(t.path.replace(o+"/",""),r,{binary:!0})}catch(r){}};await no()(n,m,{concurrency:20}),t.hide();const h=await e,p=await h.generateAsync({type:"blob"});u>0?(this.$router.push("/release"),await mo()(p,`${s} ${a} ${r} ${o}.zip`.replace(/\//,"-"))):this.messageToast("Invalid request","danger","No files were downloaded.")}catch(n){this.messageToast("Invalid request","danger","An error occurred while downloading.")}},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},escapeFilepath(t){return t.replaceAll("#","%23")}}},po=ho,go=(s("fe77"),Object(l["a"])(po,to,eo,!1,null,"1396e820",null)),fo=go.exports,bo={components:{generateoutput:fo,BTabs:bs["a"],BTab:vs["a"],customPlugin:fs},computed:{...Object(G["c"])(["ditaOtVersions"])},data(){return{organizationDetails:null,customPluginOutputFormat:null,orgId:this.$store.state.Auth.orgId,projectName:Tt.a.AES.decrypt(this.$route.params.reponame,kt["e"]).toString(Tt.a.enc.Utf8),repouser:Tt.a.AES.decrypt(this.$route.params.repouser,kt["e"]).toString(Tt.a.enc.Utf8),brachName:Tt.a.AES.decrypt(this.$route.params.repobranch,kt["e"]).toString(Tt.a.enc.Utf8),title:"DocPublisher",items:[{text:"Projects",href:"/docmanager"},{text:"DocEditor",href:`/doceditor/${encodeURIComponent(this.$route.params.repouser)}/${encodeURIComponent(this.$route.params.reponame)}/${encodeURIComponent(this.$route.params.repobranch)}`},{text:"DocPublisher",active:!0}]}},created(){U["eventBus"].$emit("update-sidebar","menuitems.docpublisher.text"),this.getoutputFormat()},mounted(){const t=ae.a.mixin({customClass:{confirmButton:"btn btn-primary btn-sm my-3",cancelButton:"btn btn-sm mr-2 btn-light"},buttonsStyling:!1});t.fire({text:" Do you want to style your document before publishing?",showCancelButton:!0,confirmButtonText:"Yes! Let's proceed",cancelButtonText:"No! Continue with DocPublisher",reverseButtons:!0}).then(t=>{if(t.isConfirmed){const t=encodeURIComponent(this.$route.params.repouser),e=encodeURIComponent(this.$route.params.reponame),s=encodeURIComponent(this.$route.params.repobranch);this.$router.push({path:`/docstyler/${t}/${e}/${s}`})}else t.dismiss,ae.a.DismissReason.cancel}),Object.keys(this.$store.state.Auth.orgDetails).length?this.organizationDetails=this.$store.state.Auth.orgDetails:this.getOrgDetails()},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},async getOrgDetails(){return this.$store.getters.client.get("/serveradmin/organization/byorgid?orgId="+this.orgId).then(t=>{t.data?(this.organizationDetails=t.data[0],this.$store.commit("setOrgDetails",this.organizationDetails)):this.messageToast("Invalid request","danger","No data received from the server")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred")})},async getoutputFormat(){await this.$store.getters.client.get("/orguser/docpublisher/customplugin").then(t=>{this.customPluginOutputFormat=t.data,this.ditaOtFolder=t.data}).catch(()=>{})}}},vo=bo,yo=(s("65f1"),Object(l["a"])(vo,Qr,Xr,!1,null,"6e3ae888",null)),Co=yo.exports,wo=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.item}}),e("div",{staticClass:"row"},[e("div",{staticClass:"col-md-8"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"card shadow-sm"},[t._m(0),e("div",{staticClass:"container"},[e("form",[e("div",{staticClass:"form-group row"},[t._m(1),e("div",{staticClass:"col-md-12"},[e("multiselect",{staticClass:"custom-multiselect",staticStyle:{width:"100%"},attrs:{options:t.projectList.map(t=>t.projectName),"max-height":150,placeholder:"Choose a Project"},model:{value:t.selectedproject,callback:function(e){t.selectedproject=e},expression:"selectedproject"}})],1)]),t.hasData?e("div",{staticClass:"form-group row"},[t._m(2),e("div",{staticClass:"col-md-12"},[e("multiselect",{attrs:{"max-height":150,options:t.repobranchesdata.map(t=>t.text),placeholder:"Choose a branch","allow-empty":!1},model:{value:t.selectedBranch,callback:function(e){t.selectedBranch=e},expression:"selectedBranch"}})],1)]):t._e(),e("div",{staticClass:"row form-group"},[e("div",{staticClass:"col-md-12"},[e("button",{staticClass:"btn btn-primary btn-sm",attrs:{type:"submit",disabled:t.isButtonDisabled||""===t.selectedproject},on:{click:function(e){return e.preventDefault(),t.setdata(t.selectedProjectOwner,t.selectedProjectName)}}},[t._v(" Next ")])])])])])])])])])],1)},xo=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"custom-notifications d-flex justify-content-between align-items-center flex-wrap"},[e("div",{staticClass:"custom-title"},[t._v(" Add details to proceed with DocEditor ")])])},function(){var t=this,e=t._self._c;return e("label",{staticClass:"col-md-12 col-form-label"},[t._v("Select Project"),e("span",{staticClass:"text-danger"},[t._v("*")])])},function(){var t=this,e=t._self._c;return e("label",{staticClass:"col-md-12 col-form-label"},[t._v("Select Branch"),e("span",{staticClass:"text-danger"},[t._v("*")])])}];function _o(t){return Tt.a.AES.decrypt(t,kt["e"]).toString(Tt.a.enc.Utf8)}function $o(t){return Tt.a.AES.encrypt(t,kt["e"]).toString()}var To={decrypt:_o,encrypt:$o},ko={components:{Multiselect:we.a},data(){return{selectedproject:"",userId:this.$store.state.Auth.userId,items:"",selectedBranch:"",previousSelectedBranch:"",selectedProjectOwner:"",selectedProjectName:null,projectList:[],repobranchesdata:[],title:"DocEditor",item:[{text:"Dashboard",href:"/"},{text:"DocEditor",active:!0}],ignoreNextChange:!1}},mounted(){U["eventBus"].$emit("update-sidebar","menuitems.doceditor.text")},created(){this.$store.state.Auth.projectsData.length?(this.projectList=this.$store.state.Auth.projectsData,this.initialSelectProjectIfQueryPresent()):this.getProjectData()},computed:{isButtonDisabled(){return null===this.selectedproject||""===this.selectedBranch},hasData(){return this.repobranchesdata.length>0}},methods:{messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},...Object(G["b"])({get:"userProjectDetails"}),getProjectData(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get("/projectuser/byuserid?userId="+this.userId).then(e=>{t.hide(),this.projectList=e.data,this.$store.commit("setProjectsList",e.data),this.initialSelectProjectIfQueryPresent()}).catch(()=>{t.hide()})},setdata(t,e){this.redirectProject(t,e)},async redirectProject(t,e){const s=To.encrypt(t),a=Tt.a.AES.encrypt(e,kt["e"]).toString(),r=Tt.a.AES.encrypt(this.selectedBranch,kt["e"]).toString();localStorage.setItem("repouser",s),localStorage.setItem("reponame",a);const o=encodeURIComponent(s),i=encodeURIComponent(a),n=encodeURIComponent(r);this.$router.push({path:`/doceditor/${o}/${i}/${n}`})},async getRepoBranch(){let t=this.$loading.show({loader:"dots"});this.$store.getters.client.get(`orguser/repobranches?repoUser=${this.selectedProjectOwner}&repoName=${this.selectedProjectName}`).then(async t=>{if(this.$route.query.branchName)this.selectedBranch=jt(this.$route.query.branchName),this.previousSelectedBranch=this.selectedBranch,this.checkoutBranch(this.selectedBranch),this.$router.push({});else{const t=await ye.currentBranch(this.selectedProjectName);this.selectedBranch=t.data,this.previousSelectedBranch=t.data}t.data&&t.data.length>0?this.repobranchesdata=t.data.map(t=>({value:t.name,text:t.name})):this.messageToast("invalid request","danger","No branches found in the Project.")}).catch(t=>{this.messageToast("invalid request","danger",t.response.data.message)}).finally(()=>{t.hide()})},async checkoutBranch(t){this.selectedBranch=t,console.log("in checkoutBranch: ",this.selectedBranch);const e=await ye.checkout({repoName:this.selectedProjectName,branchName:this.selectedBranch},this);if(console.log("ckeckout res: ",e),!1===e)return this.messageToast("Invalid request","danger","Failed to checkout branch."),this.selectedBranch=this.previousSelectedBranch,void(this.ignoreNextChange=!0);this.previousSelectedBranch=this.selectedBranch,this.messageToast("Branch checkout","success",e.message)},initialSelectProjectIfQueryPresent(){const t=this.$route.query;if(t.projectName&&t.branchName)this.selectedproject=jt(t.projectName),this.selectedBranch=jt(t.branchName);else if(this.$store.state.Auth.currentWorkingProject){const t=this.projectList.some(t=>t.projectName===this.$store.state.Auth.currentWorkingProject.projectName);if(!t)return this.$store.commit("setCurrentWorkingProject",null),void localStorage.removeItem("currentWorkingProject");this.selectedproject=this.$store.state.Auth.currentWorkingProject.projectName}}},watch:{selectedproject(t){console.log("selected project :",t);const e=this.projectList.find(e=>e.projectName===t);this.selectedProjectOwner=e.owner,this.selectedProjectName=e.projectName,this.repobranchesdata=[],this.getRepoBranch(),this.$store.commit("setCurrentWorkingProject",e)},selectedBranch(t,e){this.ignoreNextChange?this.ignoreNextChange=!1:e&&t&&(console.log("in selectedBranch: ",t,e),this.checkoutBranch(t))}}},So=ko,jo=(s("ac2f"),Object(l["a"])(So,wo,xo,!1,null,"9256ea9e",null)),Io=jo.exports;a["default"].use(Re["a"]);var Po=[{path:"/doceditor/docpublisher/:repouser/:reponame/:repobranch",component:Co,name:"Docpublisher",props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"publisher")}},{path:"/doceditor",component:Io,name:"DocEditor",beforeEnter:(t,e,s)=>{Ve(t,e,s,"editor")}}],Do=function(){var t=this,e=t._self._c;return e("div",[e("PageHeader",{attrs:{title:t.title,items:t.items}}),e("div",[e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"row mt-2 d-flex justify-content-between mx-3"},[e("div",{staticClass:"dataTables_length",attrs:{id:"tickets-table_length"}},[e("label",{staticClass:"d-inline-flex align-items-center"},[t._v(" Show "),e("b-form-select",{attrs:{size:"sm",options:t.pageOptions},model:{value:t.perPage,callback:function(e){t.perPage=e},expression:"perPage"}}),t._v(" entries ")],1)]),e("div",{staticClass:"d-md-flex align-items-center justify-content-between mb-3"},[e("div",{staticClass:"search-box mr-3 mb-2"},[e("div",{staticClass:"position-relative"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.filter,expression:"filter"}],staticClass:"form-control text-primary rounded custom-input-box",attrs:{type:"text",placeholder:"Search",id:"myInput"},domProps:{value:t.filter},on:{input:function(e){e.target.composing||(t.filter=e.target.value)}}}),e("i",{staticClass:"mdi mdi-magnify search-icon"})])]),e("b-button",{staticClass:"export-button mr-2 mb-2",attrs:{size:"sm",variant:"light"},on:{click:t.exportToExcel}},[t._v("Export to Excel")]),e("b-button",{staticClass:"export-button mb-2",attrs:{size:"sm",variant:"light"},on:{click:t.exportToCSV}},[t._v("Export to CSV")])],1),e("div",{staticClass:"table-responsive mb-0"},[e("b-table",{ref:"adminTable",attrs:{items:t.activityData,fields:t.colfields,responsive:"sm","per-page":t.perPage,"current-page":t.currentPage,"sort-by":t.sortBy,"sort-desc":t.sortDesc,filter:t.filter,"filter-included-fields":t.filterOn,"filter-function":t.filterTable,"show-empty":""},on:{"update:sortBy":function(e){t.sortBy=e},"update:sort-by":function(e){t.sortBy=e},"update:sortDesc":function(e){t.sortDesc=e},"update:sort-desc":function(e){t.sortDesc=e},filtered:t.onFiltered},scopedSlots:t._u([{key:"cell(createdAt)",fn:function(e){return[t._v(" "+t._s(t.moment(e.item.createdAt).format("YYYY-MM-DD h:mm A"))+" ")]}},{key:"cell(delete)",fn:function(s){return[e("div",{on:{click:function(e){return t.deleteRow(s.item)}}},[e("i",{staticClass:"btn text-secondary mdi mdi-delete"})])]}},{key:"cell(download)",fn:function(s){return[e("b-button",{attrs:{size:"sm",variant:"primary"},on:{click:function(e){return t.downloadFun(s.item)}}},[e("i",{staticClass:"mdi mdi-download"})])]}}])})],1),e("div",{staticClass:"col-12 border-top pt-3"},[e("div",{staticClass:"d-flex justify-content-end"},[e("b-pagination",{attrs:{"total-rows":t.filteredData.length,"per-page":t.perPage},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1)])])])])])])])],1)},No=[],Ao=s("25ca"),Fo={data(){return{activityData:[],filteredData:[],title:"Recent Publication ",items:[{text:"Dashboard",href:"/dashboard"},{text:"Recent Publications",active:!0}],userId:this.$store.state.Auth.userId,gitToken:this.$store.state.Auth.gitToken,totalRows:1,currentPage:1,perPage:5,pageOptions:[5,10,25,50,100],filter:null,filterOn:[],sortBy:"",sortDesc:!0,colfields:this.generateTableColumns(),chartData:{labels:[],datasets:[{label:"Number of Releases",backgroundColor:"#f87979",data:[]}]},chartOptions:{responsive:!0,maintainAspectRatio:!1}}},computed:{rows(){return this.activityData.length},_(){return j.a},totalPages(){return Math.ceil(this.rows/this.perPage)}},watch:{perPage:{handler(){this.currentPage=1}},activityData:{handler(){this.filteredData=this.activityData}},filter:{handler(){var t;this.filteredData=null===(t=this.activityData)||void 0===t?void 0:t.filter(t=>{var e;return t.projectName.toUpperCase().includes(null===(e=this.filter)||void 0===e?void 0:e.toUpperCase())})}}},created(){U["eventBus"].$emit("update-sidebar","menuitems.dashboard.text"),this.$store.state.Auth.recentPublicationsData.length?this.activityData=this.$store.state.Auth.recentPublicationsData:this.getReleasePublication(),this.prepareChartData()},methods:{moment:E.a,onFiltered(t){this.totalRows=t.length,this.currentPage=1},onPageChange(t){this.currentPage=t},prepareChartData(){const t={};this.activityData.forEach(e=>{const s=e.projectName;t[s]=(t[s]||0)+1}),this.chartData.labels=Object.keys(t),this.chartData.datasets[0].data=Object.values(t),this.$refs.barChart._chart.update()},generateTableColumns(){return[{key:"releaseTitle",label:"Release Title",sortable:!0},{key:"projectName",label:"Project Name",sortable:!0},{key:"releasedBy",label:"Released By",sortable:!0},{key:"outputFormat",label:"Output Format",sortable:!0},{key:"ditaotVersion",label:"DITA OT Version",sortable:!0},{key:"createdAt",label:"Created At",sortable:!0,sortByFormatted:!0,formatter:(t,e,s)=>E()(s.createdAt).format("YYYY-MM-DD HH:mm:ss")},{key:"delete",label:"Delete",sortable:!1},{key:"download",label:"Download",sortable:!1}]},messageToast(t,e,s){this.$bvToast.toast(s,{title:t,variant:e,solid:!0})},deleteRow(t){ae.a.fire({title:"Delete release",text:"Do you want to delete this release?",icon:"question",showCancelButton:!0,confirmButtonText:"delete"}).then(async e=>{if(e.isConfirmed){const e=this.activityData.indexOf(t);-1!==e&&(this.activityData.splice(e,1),this.$store.commit("setRecentPublicationsData",this.activityData),this.deleteItemOnServer(t))}})},deleteItemOnServer(t){this.$store.getters.client.delete("/orguser/release?Id="+t._id).then(()=>{this.messageToast("Success","primary","Item deleted successfully")}).catch(()=>{this.messageToast("Error","danger","Failed to delete item")})},getReleasePublication(){this.$store.getters.client.get("/orguser/release/byuserId?userId="+this.userId).then(t=>{t.data?(this.activityData=t.data,this.$store.commit("setRecentPublicationsData",t.data)):this.messageToast("Invalid request","danger","No data received from the server")}).catch(t=>{this.messageToast("Invalid request","danger",t.response?t.response.data.message:"An error occurred"),this.showSpinner=!1})},async fetchRepoInfo(t){try{const e=await fetch("https://api.github.com/repos/"+t,this.gitToken?{headers:{Authorization:"Bearer "+this.gitToken}}:{});if(!e.ok)throw new Error("HTTP "+e.statusText);return e.json()}catch(e){throw this.messageToast("Invalid request","danger","Error fetching repository info"),e}},async downloadFun(t){console.log("📢[releasetable.vue:389]: item: ",t);let e=this.$loading.show({loader:"dots"});try{await at({repoName:t.projectName,commitSHA:t.commitSHA}),this.messageToast("Files downloaded","primary","Downloaded successful!")}catch(s){this.messageToast("Invalid request","danger",s.message)}finally{e.hide()}},exportToExcel(){const t=this.filteredData.map(t=>({"Release Title":t.releaseTitle,"Project Name":t.projectName,"Released By":t.releasedBy,"Output Format":t.outputFormat,"DITA OT Version":t.ditaotVersion,"Created At":E()(t.createdAt).format("YYYY-MM-DD HH:mm:ss")})),e=Ao["a"].json_to_sheet(t),s=Ao["a"].book_new();Ao["a"].book_append_sheet(s,e,"Sheet1"),Ao["b"](s,"table_data.xlsx")},exportToCSV(){const t=this.filteredData.map(t=>({"Release Title":t.releaseTitle,"Project Name":t.projectName,"Released By":t.releasedBy,"Output Format":t.outputFormat,"DITA OT Version":t.ditaotVersion,"Created At":E()(t.createdAt).format("YYYY-MM-DD HH:mm:ss")})),e=Ao["a"].json_to_sheet(t),s=Ao["a"].book_new();Ao["a"].book_append_sheet(s,e,"Sheet1"),Ao["b"](s,"table_data.csv",{bookType:"csv"})},filterTable(t,e){const s=e.toUpperCase(),a=t.projectName.toUpperCase().includes(s);return a}}},Bo=Fo,Oo=(s("adf4"),Object(l["a"])(Bo,Do,No,!1,null,"aa64ea3a",null)),Lo=Oo.exports,Eo=[{path:"/release",component:Lo,name:"Releasetable"}];a["default"].use(r["a"]);const Uo=new r["a"]({mode:"history",base:"/",scrollBehavior(t,e,s){return s||{x:0,y:0}},routes:[...F,{path:"/dashboard",component:()=>s.e("chunk-6a0c29e7").then(s.bind(null,"5658")),children:[...Lt,...Ue,...Is,...Na,...Zr,...Po,...Eo]},{path:"/doceditor/:repouser/:reponame/:repobranch",component:()=>s.e("chunk-456005ef").then(s.bind(null,"6d85")),props:t=>({repouser:decodeURIComponent(t.params.repouser),reponame:decodeURIComponent(t.params.reponame),repobranch:decodeURIComponent(t.params.repobranch)}),beforeEnter:(t,e,s)=>{Ve(t,e,s,"editor")}},{path:"/not-found",component:()=>s.e("404").then(s.bind(null,"b2ec"))},{path:"*",redirect:"/not-found"}]});Uo.afterEach(()=>{const t=document.getElementById("loading-bg");t&&(t.style.display="none")});e["a"]=Uo},a306:function(t){t.exports=JSON.parse('{"navbar":{"search":{"text":"Buscar..."},"dropdown":{"megamenu":{"text":"Mega menú","uicontent":{"title":"Componentes de la IU","list":{"lightbox":"Caja ligera","rangeslider":"Control deslizante de rango","sweetalert":"Alerta dulce","rating":"Clasificación","forms":"Formas","tables":"Mesas","charts":"Gráficos"}},"application":{"title":"Aplicaciones","list":{"ecommerce":"Comercio electrónico","calendar":"Calendario","email":"Correo electrónico","projects":"Proyectos","tasks":"Tareas","contacts":"Contactos"}},"extrapages":{"title":"Páginas extra","list":{"lightsidebar":"Barra lateral ligera","compactsidebar":"Barra lateral compacta","horizontallayout":"Diseño horizontal","maintenance":"Mantenimiento","comingsoon":"Próximamente","timeline":"Cronograma","faqs":"Preguntas frecuentes"}}},"site":{"list":{"github":"GitHub","bitbucket":"Bitbucket","dribbble":"Regatear","dropbox":"Dropbox","mailchimp":"Chimpancé de correo","slack":"Floja"}},"notification":{"text":"Notificaciones","subtext":"Ver todo","order":{"title":"Su pedido es realizado","text":"Si varios idiomas fusionan la gramática","time":"Hace 3 minutos"},"james":{"title":"James Lemire","text":"Parecerá un inglés simplificado.","time":"Hace 1 hora"},"item":{"title":"Your item is shipped","text":"Si varios idiomas fusionan la gramática","time":"Hace 3 minutos"},"salena":{"title":"Salena Layfield","text":"As a skeptical Cambridge friend of mine occidental.","time":"Hace 1 hora"},"button":"Carga más.."},"kevin":{"text":"Kevin","list":{"profile":"Perfil","mywallet":"Mi billetera","settings":"Configuraciones","lockscreen":"Bloquear pantalla","logout":"cerrar sesión"}}}},"menuitems":{"menu":{"text":"Menú"},"dashboard":{"text":"Tableros","badge":"3"},"layouts":{"text":"Diseños","list":{"horizontal":"Horizontal","lightsidebar":"Barra lateral ligera","compactsidebar":"Barra lateral compacta","iconsidebar":"Barra lateral de iconos","boxed":"Diseño en caja","vertical":"Vertical","lighttopbar":"Barra superior ligera"}},"apps":{"text":"Aplicaciones"},"calendar":{"text":"Calendario"},"chat":{"text":"Charla","badge":"Nueva"},"ecommerce":{"text":"Comercio electrónico","list":{"products":"Productos","productdetail":"Detalle del producto","orders":"Pedidos","customers":"Clientes","cart":"Carro","checkout":"Revisa","shops":"Tiendas","addproduct":"Agregar producto"}},"email":{"text":"Correo electrónico","list":{"inbox":"Bandeja de entrada","reademail":"Leer el correo electrónico"}},"kanban":{"text":"Kanban Board"},"pages":{"text":"Páginas"},"authentication":{"text":"Autenticación","list":{"login":"Iniciar sesión","register":"Registrarse","recoverpwd":"Recuperar contraseña","lockscreen":"Bloquear pantalla"}},"utility":{"text":"Utilidad","list":{"starter":"Página de inicio","comingsoon":"Próximamente","maintenance":"Mantenimiento","timeline":"Cronograma","faqs":"Preguntas frecuentes","pricing":"Precios","error404":"error 404","error500":"error 500"}},"components":{"text":"Componentes"},"uielements":{"text":"Elementos de la IU","list":{"alerts":"Alertas","buttons":"Botones","cards":"Tarjetas","carousel":"Carrusel","dropdowns":"Listas deplegables","grid":"Cuadrícula","images":"Imágenes","modals":"Modalidades","rangeslider":"Control deslizante de rango","progressbar":"Barras de progreso","sweetalert":"Alerta dulce","tabs":"Pestañas y acordeones","typography":"Tipografía","video":"Vídeo","general":"General","lightbox":"Caja ligera","sessiontimeout":"Hora de término de la sesión","rating":"Clasificación","notifications":"Notificaciones"}},"forms":{"text":"Formas","badge":"8","list":{"elements":"Elementos de formulario","validation":"Validación de formulario","advanced":"Formulario avanzado","editor":"Editora de formularios","fileupload":"Subir archivo de formulario","wizard":"Asistente de formulario","mask":"Máscara de forma"}},"tables":{"text":"Mesas","list":{"basic":"Tablas Básicas","advanced":"Mesa avanzada"}},"charts":{"text":"Gráficos","list":{"apex":"Gráfico de Apex","chartjs":"Chartjs Chart","chartist":"Chartist Chart","echart":"Gráfico E"}},"icons":{"text":"Íconos","list":{"remix":"Remix iconos","materialdesign":"Diseño de materiales","dripicons":"Dripicons","fontawesome":"Font awesome"}},"maps":{"text":"Mapas","list":{"googlemap":"mapas de Google","leaflet":"Mapas de folleto"}},"multilevel":{"text":"Multi nivel","list":{"level1":{"1":"Nivel 1.1","2":"Nivel 1.2","level2":{"1":"Nivel 2.1","2":"Level 2.2"}}}}}}')},a8de:function(t,e,s){"use strict";s("934c")},a949:function(t,e,s){},ac2f:function(t,e,s){"use strict";s("e2e2")},ad34:function(t,e,s){t.exports=s.p+"img/upload.600f76dc.svg"},ad3a:function(t,e,s){"use strict";var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"d-flex flex-column flex-sm-row align-items-sm-center justify-content-between pb-3 page-title-box"},[e("h5",{staticClass:"mb-sm-0"},[t._v(t._s(t.title))]),e("b-breadcrumb",{staticClass:"m-0",attrs:{items:t.items}})],1)},r=[],o={props:{title:{type:String,default:""},items:{type:Array,default:()=>[]}}},i=o,n=(s("5b19"),s("2877")),c=Object(n["a"])(i,a,r,!1,null,"2e71ba3a",null);e["a"]=c.exports},adf4:function(t,e,s){"use strict";s("1e72")},adf6:function(t,e,s){},ae9a:function(t,e,s){"use strict";s("bcd2")},aebc:function(t,e,s){"use strict";s("bf5a")},af08:function(t){t.exports=JSON.parse('{"navbar":{"search":{"text":"بحث..."},"dropdown":{"megamenu":{"text":"القائمة الضخمة","uicontent":{"title":"مكونات واجهة المستخدم","list":{"lightbox":"صندوق مضئ","rangeslider":"شريط التمرير","sweetalert":"تنبيه لطيف","rating":"تقييم","forms":"نماذج","tables":"الجداول","charts":"الرسوم البيانية"}},"application":{"title":"التطبيقات","list":{"ecommerce":"التجارة الإلكترونية","calendar":"التقويم","email":"البريد الإلكتروني","projects":"المشاريع","tasks":"مهام","contacts":"جهات الاتصال"}},"extrapages":{"title":"صفحات اضافية","list":{"lightsidebar":"شريط جانبي خفيف","compactsidebar":"شريط جانبي مضغوط","horizontallayout":"التخطيط الأفقي","maintenance":"اعمال صيانة","comingsoon":"قريبا","timeline":"الجدول الزمني","faqs":"الأسئلة الشائعة"}}},"site":{"list":{"github":"جيثب","bitbucket":"Bitbucket","dribbble":"المراوغة","dropbox":"بصندوق الإسقاط","mailchimp":"بريد الشمبانزي","slack":"تثاقل"}},"notification":{"text":"إشعارات","subtext":"عرض الكل","order":{"title":"تم تقديم طلبك","text":"إذا دمجت عدة لغات القواعد","time":"قبل 3 دقائق"},"james":{"title":"جيمس لومير","text":"سيبدو الأمر مثل اللغة الإنجليزية المبسطة.","time":"منذ 1 ساعة"},"item":{"title":"يتم شحن البند الخاص بك","text":"إذا دمجت عدة لغات القواعد","time":"قبل 3 دقائق"},"salena":{"title":"سالينا لايفيلد","text":"بصفتي صديقًا متشككًا في كامبريدج لأعمال الغرب.","time":"منذ 1 ساعة"},"button":"تحميل المزيد.."},"kevin":{"text":"كيفن","list":{"profile":"الملف الشخصي","mywallet":"محفظتي","settings":"إعدادات","lockscreen":"اقفل الشاشة","logout":"تسجيل خروج"}}}},"menuitems":{"menu":{"text":"قائمة طعام"},"dashboard":{"text":"لوحات المعلومات","badge":"3"},"layouts":{"text":"التخطيطات","list":{"horizontal":"عرضي","lightsidebar":"شريط جانبي خفيف","compactsidebar":"شريط جانبي مضغوط","iconsidebar":"الشريط الجانبي للرموز","boxed":"تخطيط محاصر","vertical":"عمودي","lighttopbar":"شريط علوي خفيف"}},"apps":{"text":"تطبيقات"},"calendar":{"text":"التقويم"},"chat":{"text":"دردشة","badge":"جديد"},"ecommerce":{"text":"التجارة الإلكترونية","list":{"products":"منتجات","productdetail":"تفاصيل المنتج","orders":"الطلب #٪ s","customers":"الزبائن","cart":"عربة التسوق","checkout":"الدفع","shops":"محلات","addproduct":"أضف منتج"}},"email":{"text":"البريد الإلكتروني","list":{"inbox":"صندوق الوارد","reademail":"قراءة البريد الإلكتروني"}},"kanban":{"text":"مجلس كانبان"},"pages":{"text":"الصفحات"},"authentication":{"text":"المصادقة","list":{"login":"تسجيل الدخول","register":"تسجيل","recoverpwd":"إستعادة كلمة المرور","lockscreen":"اقفل الشاشة"}},"utility":{"text":"خدمة","list":{"starter":"صفحة المبتدئين","maintenance":"اعمال صيانة","comingsoon":"قريبا","timeline":"الجدول الزمني","faqs":"الأسئلة الشائعة","pricing":"التسعير","error404":"خطأ 404","error500":"خطأ 500"}},"components":{"text":"مكونات"},"uielements":{"text":"عناصر واجهة المستخدم","list":{"alerts":"التنبيهات","buttons":"أزرار","cards":"البطاقات","carousel":"دائري","dropdowns":"هبوط قطرة","grid":"جريد","images":"صور","modals":"مشروط","rangeslider":"شريط التمرير","progressbar":"أشرطة التقدم","sweetalert":"تنبيه لطيف","tabs":"علامات التبويب والأكورديون","typography":"الطباعة","video":"فيديو","general":"جنرال لواء","lightbox":"صندوق مضئ","sessiontimeout":"مهلة جلسة","rating":"تقييم","notifications":"إشعارات"}},"forms":{"text":"نماذج","badge":"8","list":{"elements":"عناصر النموذج","validation":"التحقق من صحة النموذج","advanced":"نموذج متقدم","editor":"محرر النماذج","fileupload":"تحميل ملف النموذج","wizard":"معالج النماذج","mask":"قناع النموذج"}},"tables":{"text":"الجداول","list":{"basic":"الجداول الأساسية","advanced":"جدول متقدم"}},"charts":{"text":"الرسوم البيانية","list":{"apex":"مخطط أبيكس","chartjs":"مخطط Chartjs","chartist":"مخطط رسومي","echart":"مخطط E"}},"icons":{"text":"أيقونات","list":{"remix":"أيقونات ريمكس","materialdesign":"التصميم المادي","dripicons":"Dripicons","fontawesome":"الخط رائع"}},"maps":{"text":"خرائط","list":{"googlemap":"خرائط جوجل","leaflet":"خرائط النشرة"}},"multilevel":{"text":"متعدد المستويات","list":{"level1":{"1":"المستوى 1.1","2":"المستوى 1.2","level2":{"1":"المستوى 2.1","2":"المستوى 2.2"}}}}}}')},afcc:function(t,e,s){"use strict";s("283e")},afea:function(t,e,s){},ba6f:function(t,e,s){},bcd2:function(t,e,s){},bd30:function(t,e,s){"use strict";s("5f8e")},bf5a:function(t,e,s){},c21a:function(t,e,s){"use strict";s.r(e),s.d(e,"state",(function(){return a})),s.d(e,"getters",(function(){return r})),s.d(e,"mutations",(function(){return o})),s.d(e,"actions",(function(){return i}));const a={layoutType:"vertical",layoutWidth:"fluid",leftSidebarType:"dark",topbar:"dark",loader:!1},r={},o={CHANGE_LAYOUT(t,e){t.layoutType=e},CHANGE_LAYOUT_WIDTH(t,e){t.layoutWidth=e},CHANGE_LEFT_SIDEBAR_TYPE(t,e){t.leftSidebarType=e},CHANGE_TOPBAR(t,e){t.topbar=e},LOADER(t,e){t.loader=e}},i={changeLayoutType({commit:t},{layoutType:e}){t("CHANGE_LAYOUT",e)},changeLayoutWidth({commit:t},{layoutWidth:e}){t("CHANGE_LAYOUT_WIDTH",e)},changeLeftSidebarType({commit:t},{leftSidebarType:e}){t("CHANGE_LEFT_SIDEBAR_TYPE",e)},changeTopbar({commit:t},{topbar:e}){t("CHANGE_TOPBAR",e)},changeLoaderValue({commit:t},{loader:e}){t("LOADER",e)}}},c2a4:function(t){t.exports=JSON.parse('{"title":"","description":""}')},c539:function(t,e,s){},cc69:function(t,e,s){},cfa9:function(t,e,s){var a={"./auth.js":"11c0","./docmanager/gitdetails.js":"7455","./docmanager/project.js":"6488","./layout.js":"c21a","./notification.js":"2208"};function r(t){var e=o(t);return s(e)}function o(t){if(!s.o(a,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return a[t]}r.keys=function(){return Object.keys(a)},r.resolve=o,t.exports=r,r.id="cfa9"},d13b:function(t,e,s){"use strict";s("ed58")},d1aa:function(t,e,s){"use strict";s("20e6")},d236:function(t,e,s){"use strict";s("62b4")},d2e0:function(t,e,s){"use strict";s("a949")},d8b3:function(t,e,s){"use strict";s("1508")},dfc1:function(t,e,s){},e2e2:function(t,e,s){},e31e:function(t,e,s){"use strict";s.d(e,"d",(function(){return a})),s.d(e,"b",(function(){return r})),s.d(e,"e",(function(){return o})),s.d(e,"c",(function(){return i})),s.d(e,"a",(function(){return n}));const a="https://devapi.met-r.io/",r="https://github.com/login/oauth/authorize?client_id=Ov23liENS9zY01g2BXrv&scope=repo&redirect_uri=https://devapi.met-r.io/api/orguser/github/callback",o="xyxyz1620",i="/home/met-r-devapi/htdocs/DITAxPressoWorkspace",n="https://demo-staging-portal.met-r.io/"},e3b2:function(t,e,s){"use strict";s("3ba8")},e517:function(t,e,s){},e693:function(t,e,s){},e883:function(t,e,s){},e8f9:function(t,e,s){"use strict";s("afea")},ecab:function(t,e,s){"use strict";s("6939")},ed58:function(t,e,s){},edd4:function(t){t.exports=JSON.parse('{"navbar":{"search":{"text":"Search..."},"dropdown":{"megamenu":{"text":"Mega Menu","uicontent":{"title":"UI Components","list":{"lightbox":"Lightbox","rangeslider":"Range Slider","sweetalert":"Sweet Alert","rating":"Rating","forms":"Forms","tables":"Tables","charts":"Charts"}},"application":{"title":"Applications","list":{"ecommerce":"Ecommece","calendar":"Calendar","email":"Email","projects":"Projects","tasks":"Tasks","contacts":"Contacts"}},"extrapages":{"title":"Extra Pages","list":{"lightsidebar":"Light Sidebar","compactsidebar":"Compact Sidebar","horizontallayout":"Horizontal Layout","maintenance":"Maintenance","comingsoon":"Coming Soon","timeline":"Timeline","faqs":"FAQs"}}},"site":{"list":{"github":"GitHub","bitbucket":"Bitbucket","dribbble":"Dribbble","dropbox":"Dropbox","mailchimp":"Mail Chimp","slack":"Slack"}},"notification":{"text":"Notifications","subtext":"View All","order":{"title":"Your order is placed","text":"If several languages coalesce the grammar","time":"3 min ago"},"james":{"title":"James Lemire","text":"It will seem like simplified English.","time":"1 hours ago"},"item":{"title":"Your item is shipped","text":"If several languages coalesce the grammar","time":"3 min ago"},"salena":{"title":"Salena Layfield","text":"As a skeptical Cambridge friend of mine occidental.","time":"1 hours ago"},"button":"Load More.."},"kevin":{"text":"Kevin","list":{"about":"About","mywallet":"My Wallet","settings":"Settings","lockscreen":"Lock screen","signout":"Sign out"}}}},"menuitems":{"menu":{"text":"Menu"},"dashboard":{"text":"Dashboard","badge":"3"},"docmanager":{"text":"DocManager","badge":"3"},"doceditor":{"text":"DocEditor","badge":"3"},"docpublisher":{"text":"DocPublisher","badge":"3"},"docmigration":{"text":"DocMigration","badge":"3"},"layouts":{"text":"Layouts","list":{"horizontal":"Horizontal","lightsidebar":"Light Sidebar","compactsidebar":"Compact Sidebar","iconsidebar":"Icons Sidebar","boxed":"Boxed Layout","vertical":"Vertical","lighttopbar":"Light Topbar"}},"apps":{"text":"Apps"},"calendar":{"text":"Calendar"},"chat":{"text":"Chat","badge":"New"},"ecommerce":{"text":"Ecommerce","list":{"products":"Products","productdetail":"Product Detail","orders":"Orders","customers":"Customers","cart":"Cart","checkout":"Checkout","shops":"Shops","addproduct":"Add Product"}},"email":{"text":"Email","list":{"inbox":"Inbox","reademail":"Read Email"}},"kanban":{"text":"Kanban Board"},"pages":{"text":"Pages"},"authentication":{"text":"Authentication","list":{"login":"Login","register":"Register","recoverpwd":"Recover Password","lockscreen":"Lock screen"}},"utility":{"text":"Utility","list":{"starter":"Starter Page","maintenance":"Maintenance","comingsoon":"Coming Soon","timeline":"Timeline","faqs":"FAQs","pricing":"Pricing","error404":"Error 404","error500":"Error 500"}},"components":{"text":"Components"},"uielements":{"text":"UI Elements","list":{"alerts":"Alerts","buttons":"Buttons","cards":"Cards","carousel":"Carousel","dropdowns":"Dropdowns","grid":"Grid","images":"Images","modals":"Modals","rangeslider":"Range Slider","progressbar":"Progress Bars","sweetalert":"Sweet Alert","tabs":"Tabs & Accordions","typography":"Typography","video":"Video","general":"General","lightbox":"Lightbox","sessiontimeout":"Session Timeout","rating":"Rating","notifications":"Notifications"}},"forms":{"text":"Forms","badge":"8","list":{"elements":"Form Elements","validation":"Form Validation","advanced":"Form Advanced","editor":"Form Editor","fileupload":"Form File Upload","wizard":"Form Wizard","mask":"Form Mask"}},"tables":{"text":"Tables","list":{"basic":"Basic Tables","advanced":"Advanced Table"}},"charts":{"text":"Charts","list":{"apex":"Apex Chart","chartjs":"Chartjs Chart","chartist":"Chartist Chart","echart":"E Chart"}},"icons":{"text":"Icons","list":{"remix":"Remix Icons","materialdesign":"Material Design","dripicons":"Dripicons","fontawesome":"Font Awesome 5"}},"maps":{"text":"Maps","list":{"googlemap":"Google Maps","leaflet":"Leaflet Maps"}},"multilevel":{"text":"Multi Level","list":{"level1":{"1":"Level 1.1","2":"Level 1.2","level2":{"1":"Level 2.1","2":"Level 2.2"}}}}}}')},ee24:function(t,e,s){"use strict";s("e693")},ef66:function(t,e,s){},f693:function(t){t.exports=JSON.parse('{"navbar":{"search":{"text":"Chercher..."},"dropdown":{"megamenu":{"text":"Mega Menu","uicontent":{"title":"Composants de l\'interface utilisateur","list":{"lightbox":"Boite à lumière","rangeslider":"Curseur de plage","sweetalert":"Sweet Alert","rating":"Évaluation","forms":"Formes","tables":"les tables","charts":"Graphiques"}},"application":{"title":"Applications","list":{"ecommerce":"Commerce électronique","calendar":"Calendrier","email":"Email","projects":"Projets","tasks":"Tâches","contacts":"Contacts"}},"extrapages":{"title":"Pages supplémentaires","list":{"lightsidebar":"Barre latérale légère","compactsidebar":"Barre latérale compacte","horizontallayout":"Disposition horizontale","maintenance":"Entretien","comingsoon":"Bientôt disponible","timeline":"Chronologie","faqs":"FAQ"}}},"site":{"list":{"github":"GitHub","bitbucket":"Bitbucket","dribbble":"Dribble","dropbox":"Dropbox","mailchimp":"Mail Chimp","slack":"Molle"}},"notification":{"text":"Notifications","subtext":"Voir tout","order":{"title":"Votre commande est passée","text":"Si plusieurs langues fusionnent la grammaire","time":"Il y a 3 minutes"},"james":{"title":"James Lemire","text":"It will seem like simplified English.","time":"Il y a 1 heure"},"item":{"title":"Votre article est expédié","text":"Si plusieurs langues fusionnent la grammaire","time":"Il y a 3 minutes"},"salena":{"title":"Salena Layfield","text":"As a skeptical Cambridge friend of mine occidental.","time":"Il y a 1 heure"},"button":"Charger plus.."},"kevin":{"text":"Kevin","list":{"profile":"Profil","mywallet":"Mon portefeuille","settings":"Réglages","lockscreen":"Écran verrouillé","logout":"Se déconnecter"}}}},"menuitems":{"menu":{"text":"Menu"},"dashboard":{"text":"Tableaux de bord","badge":"3"},"layouts":{"text":"Disposition","list":{"horizontal":"Horizontale","lightsidebar":"Barre latérale légère","compactsidebar":"Barre latérale compacte","iconsidebar":"Barre latérale des icônes","boxed":"Disposition en boîte","vertical":"Verticale","lighttopbar":"Barre supérieure légère"}},"apps":{"text":"Apps"},"calendar":{"text":"Calendrier"},"chat":{"text":"Bavarder","badge":"Nouvelle"},"ecommerce":{"text":"Commerce électronique","list":{"products":"Des produits","productdetail":"Product Detail","orders":"Ordres","customers":"Les clients","cart":"Chariot","checkout":"Check-out","shops":"Magasins","addproduct":"Ajouter un produit"}},"email":{"text":"Email","list":{"inbox":"Boîte de réception","reademail":"Lire l\'e-mail"}},"kanban":{"text":"Tableau Kanban"},"pages":{"text":"Pages"},"authentication":{"text":"Authentification","list":{"login":"S\'identifier","register":"S\'inscrire","recoverpwd":"Récupérer mot de passe","lockscreen":"Écran verrouillé"}},"utility":{"text":"Utilitaire","list":{"starter":"Page de démarrage","maintenance":"Entretien","comingsoon":"Bientôt disponible","timeline":"Chronologie","faqs":"FAQ","pricing":"Tarification","error404":"Erreur 404","error500":"Erreur 500"}},"components":{"text":"Composantes"},"uielements":{"text":"Éléments de l\'interface utilisateur","list":{"alerts":"Alerts","buttons":"Boutons","cards":"Cartes","carousel":"Carrousel","dropdowns":"Liste déroulante","grid":"la grille","images":"Images","modals":"Modals","rangeslider":"Curseur de plage","progressbar":"Barres de progression","sweetalert":"Sweet Alert","tabs":"Tablatures et accordéons","typography":"Typographie","video":"Vidéo","general":"Générale","lightbox":"Boite à lumière","sessiontimeout":"Expiration de la session","rating":"Évaluation","notifications":"Notifications"}},"forms":{"text":"Formes","badge":"8","list":{"elements":"Éléments de formulaire","validation":"Validation de formulaire","advanced":"Formulaire avancé","editor":"Éditeur de formulaires","fileupload":"Téléchargement de fichier de formulaire","wizard":"Assistant de formulaire","mask":"Masque de forme"}},"tables":{"text":"les tables","list":{"basic":"Tableaux de base","advanced":"Tableau avancé"}},"charts":{"text":"Graphiques","list":{"apex":"Graphique Apex","chartjs":"Graphique Chartjs","chartist":"Graphique Chartist","echart":"Graphique E"}},"icons":{"text":"Icônes","list":{"remix":"Remix Icons","materialdesign":"Conception matérielle","dripicons":"Dripicons","fontawesome":"Police géniale"}},"maps":{"text":"Plans","list":{"googlemap":"Google Maps","leaflet":"Cartes des dépliants"}},"multilevel":{"text":"Multi niveaux","list":{"level1":{"1":"Niveau 1.1","2":"Niveau 1.2","level2":{"1":"Niveau 2.1","2":"Niveau 2.2"}}}}}}')},fc10:function(t,e,s){"use strict";s("6849")},fcce:function(t,e,s){},fe77:function(t,e,s){"use strict";s("7081")},ffd2:function(t,e,s){"use strict";s("e517")}}); //# sourceMappingURL=app.a5915b72.js.map
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Generation time: 0.04 |
proxy
|
phpinfo
|
Settings