@g-gts/ui 1.5.39 → 1.5.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gts-ui.es.js CHANGED
@@ -11593,6 +11593,7 @@ const np = {
11593
11593
  L(i) ? (d(), m("img", {
11594
11594
  key: 0,
11595
11595
  src: L(i),
11596
+ style: { "object-fit": "cover" },
11596
11597
  class: "absolute inset-0 w-full h-full object-cover"
11597
11598
  }, null, 8, fp)) : F("", !0),
11598
11599
  L(a) ? F("", !0) : (d(), D(Ss, {
@@ -156,7 +156,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
156
156
  --brand-primary-pressed: ${s.pressedDark} !important;
157
157
  --brand-primary-subtle: ${s.subtleDarkMode}!important;
158
158
  }
159
- `}}return{title:a,favicon:o,colors:s}},getBrandConfig:()=>e()}},jd=["src"],xd=125,zd=660,ei=i.defineComponent({__name:"EasyBackground",props:{routePath:{}},setup(t){const e=t,{getBrandConfig:n}=Xn(),{backgroundImage:r,hideBalls:a}=n(),o=["violet","violet","grey","green","blue","orange","grey"],s=i.ref([]);function l(){s.value=[];for(let p=0;p<o.length;p++){const h=d(xd,zd),f=u();s.value.push({size:h,className:o[p],position:f})}}function u(){const p=d(200,window.innerWidth),h=d(-50,window.innerHeight);return[c(window.innerWidth,p),c(window.innerHeight,h)]}function c(p,h){return Math.ceil(h*100/p)+"%"}function d(p,h){const f=Math.random(),m=h-p;return Math.floor(f*m)+p}return i.watch(()=>e.routePath,()=>{l()}),i.onMounted(()=>{l()}),(p,h)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["easy-background dynamic-bg",[{"easy-background--shadow":!1},""]]),style:{backgroundColor:"transparent",borderRadius:"0"}},[i.unref(r)?(i.openBlock(),i.createElementBlock("img",{key:0,src:i.unref(r),class:"absolute inset-0 w-full h-full object-cover"},null,8,jd)):i.createCommentVNode("",!0),i.unref(a)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.TransitionGroup,{key:1,name:"fade"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,f=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sphere",f.className]),key:f.size,style:i.normalizeStyle({width:`${f.size}px`,height:`${f.size}px`,left:f.position[0],top:f.position[1]})},null,6))),128))]),_:1}))]))}}),Ad={key:0,class:"icon-Outline-More-vertical"},Ud={key:1,class:"icon-Outline-Arrow-Up2"},Nd={key:2,class:"icon-Outline-Arrow-Down2"},Kd={key:0,class:"navigation-sidebar-dropdown__menu"},Rd=["href"],_d={key:1,class:"navigation-sidebar-dropdown__trigger no-hover disabled",style:{"padding-left":"24px"}},Gr=Ue(i.defineComponent({__name:"NavigationSidebarDropdown",props:{item:{},expand:{type:Boolean},routeName:{}},setup(t){const e=i.ref(!1),n=t,r=i.computed(()=>n.routeName.replace(/^\//,""));return(a,o)=>{const s=i.resolveComponent("router-link");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["navigation-sidebar-dropdown",{expand:a.expand}])},[i.createElementVNode("div",{class:"navigation-sidebar-dropdown__trigger no-hover",onClick:o[0]||(o[0]=l=>e.value=!e.value)},[i.createElementVNode("span",null,i.toDisplayString(a.item.label),1),a.expand?(i.openBlock(),i.createElementBlock("i",Ad)):e.value?(i.openBlock(),i.createElementBlock("i",Ud)):(i.openBlock(),i.createElementBlock("i",Nd))]),i.createVNode(i.Transition,{name:"slide-fade"},{default:i.withCtx(()=>[e.value?(i.openBlock(),i.createElementBlock("div",Kd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.item.children,l=>{var u,c;return i.openBlock(),i.createElementBlock(i.Fragment,{key:l.path},[l.path?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[l.internal?(i.openBlock(),i.createBlock(s,{key:0,to:l.path,class:i.normalizeClass(["navigation-sidebar-dropdown__trigger ",{active:(u=l==null?void 0:l.pages)==null?void 0:u.includes(r.value)}]),style:{"padding-left":"24px"}},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.label),1)]),_:2},1032,["to","class"])):(i.openBlock(),i.createElementBlock("a",{key:1,href:l.path,class:i.normalizeClass(["navigation-sidebar-dropdown__trigger ",{active:(c=l==null?void 0:l.pages)==null?void 0:c.includes(r.value)}])},i.toDisplayString(l.label),11,Rd))],64)):(i.openBlock(),i.createElementBlock("div",_d,i.toDisplayString(l.label),1))],64)}),128))])):i.createCommentVNode("",!0)]),_:1})],2)}}}),[["__scopeId","data-v-0449b99a"]]),Yd={key:1},Hd={key:2,class:"icon-Outline-More-vertical navigation-sidebar__more"},Wd={key:0,class:"sidebar-short-items"},Gd={key:2,class:"sidebar-short-items__link disabled"},Zr=i.defineComponent({__name:"NavigationSidebarItem",props:{routeItem:{},isChild:{type:Boolean},routeName:{},short:{type:Boolean}},emits:["parentClick"],setup(t,{emit:e}){const n=i.ref(),r=t,a=e,o=i.inject("isContract"),s=p=>{var h;return(h=p.children)!=null&&h.length?{tag:"div",attribute:{}}:o!=null&&o.value?{tag:"a",attribute:{href:p.path}}:p.internal?{tag:"router-link",attribute:{to:p.path}}:{tag:"a",attribute:{href:p.path}}};function l(p){return p.includes(r.routeName)}function u(p){return l(p.pages??[])?p.activeIcon:p.icon}function c(p){n.value.toggle(p)}function d(p){p.children&&p.children.length>0&&a("parentClick",p.children)}return i.watch(()=>r.routeName,()=>{n.value.hide()}),(p,h)=>{var m,g,y,v,S;const f=i.resolveDirective("tooltip");return p.routeItem?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[p.short&&((m=p.routeItem)!=null&&m.children)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["navigation-sidebar__link",{active:p.routeItem.pages.includes(p.routeName)}]),onClick:c},[(g=p.routeItem)!=null&&g.icon?(i.openBlock(),i.createElementBlock("i",{key:0,class:i.normalizeClass([u(p.routeItem),"navigation-sidebar__icon"])},null,2)):i.createCommentVNode("",!0),h[1]||(h[1]=i.createElementVNode("i",{class:"icon-Outline-More-vertical navigation-sidebar__more"},null,-1))],2)):p.isChild&&((y=p.routeItem)!=null&&y.children)?(i.openBlock(),i.createBlock(Gr,{key:1,expand:"",item:p.routeItem,routeName:p.routeName},null,8,["item","routeName"])):i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(p.routeItem).tag),i.mergeProps({key:2},s(p.routeItem).attribute,{onClick:h[0]||(h[0]=O=>d(p.routeItem)),class:["navigation-sidebar__link",{active:l((v=p.routeItem)==null?void 0:v.pages)},{"pointer-events-none":p.routeItem.disabled}]}),{default:i.withCtx(()=>{var O,w;return[(O=p.routeItem)!=null&&O.icon?(i.openBlock(),i.createElementBlock("i",{key:0,class:i.normalizeClass([u(p.routeItem),"navigation-sidebar__icon"])},null,2)):i.createCommentVNode("",!0),p.short?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",Yd,i.toDisplayString(p.routeItem.label),1)),(w=p.routeItem)!=null&&w.children?(i.openBlock(),i.createElementBlock("i",Hd)):i.createCommentVNode("",!0)]}),_:1},16,["class"])),[[f,{value:p.routeItem.label,disabled:!p.short||!!((S=p.routeItem)!=null&&S.children)}]]),i.createVNode(i.unref(Gn),{ref_key:"op",ref:n,"append-to":"self",class:"sidebar-op"},{default:i.withCtx(()=>{var O;return[(O=p.routeItem)!=null&&O.children?(i.openBlock(),i.createElementBlock("section",Wd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.routeItem.children,(w,P)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:`${P}-${w.path}`},[w!=null&&w.children?(i.openBlock(),i.createBlock(Gr,{key:0,item:w,routeName:p.routeName},null,8,["item","routeName"])):w.path?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(w).tag),i.mergeProps({key:1,ref_for:!0},s(w).attribute,{class:["sidebar-short-items__link",{active:l(p.routeItem.pages)}]}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1040,["class"])):(i.openBlock(),i.createElementBlock("div",Gd,i.toDisplayString(w.label),1))],64))),128))])):i.createCommentVNode("",!0)]}),_:1},512)],64)):i.createCommentVNode("",!0)}}});var Zd={root:"p-scrollpanel p-component",wrapper:"p-scrollpanel-wrapper",content:"p-scrollpanel-content",barx:"p-scrollpanel-bar p-scrollpanel-bar-x",bary:"p-scrollpanel-bar p-scrollpanel-bar-y"},qd=A.extend({name:"scrollpanel",classes:Zd}),$d={name:"BaseScrollPanel",extends:L,props:{step:{type:Number,default:5}},style:qd,provide:function(){return{$parentInstance:this}}},qr={name:"ScrollPanel",extends:$d,inheritAttrs:!1,initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,timer:null,outsideClickListener:null,data:function(){return{id:this.$attrs.id,orientation:"vertical",lastScrollTop:0,lastScrollLeft:0}},watch:{"$attrs.id":function(e){this.id=e||ee()}},mounted:function(){this.id=this.id||ee(),this.$el.offsetParent&&this.initialize()},updated:function(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount:function(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize:function(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight:function(){var e=getComputedStyle(this.$el),n=getComputedStyle(this.$refs.xBar),r=b.getHeight(this.$el)-parseInt(n.height,10);e["max-height"]!=="none"&&r===0&&(this.$refs.content.offsetHeight+parseInt(n.height,10)>parseInt(e["max-height"],10)?this.$el.style.height=e["max-height"]:this.$el.style.height=this.$refs.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")},moveBar:function(){var e=this;if(this.$refs.content){var n=this.$refs.content.scrollWidth,r=this.$refs.content.clientWidth,a=(this.$el.clientHeight-this.$refs.xBar.clientHeight)*-1;this.scrollXRatio=r/n;var o=this.$refs.content.scrollHeight,s=this.$refs.content.clientHeight,l=(this.$el.clientWidth-this.$refs.yBar.clientWidth)*-1;this.scrollYRatio=s/o,this.frame=this.requestAnimationFrame(function(){e.$refs.xBar&&(e.scrollXRatio>=1?(e.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","true"),!e.isUnstyled&&b.addClass(e.$refs.xBar,"p-scrollpanel-hidden")):(e.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","false"),!e.isUnstyled&&b.removeClass(e.$refs.xBar,"p-scrollpanel-hidden"),e.$refs.xBar.style.cssText="width:"+Math.max(e.scrollXRatio*100,10)+"%; left:"+e.$refs.content.scrollLeft/n*100+"%;bottom:"+a+"px;")),e.$refs.yBar&&(e.scrollYRatio>=1?(e.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","true"),!e.isUnstyled&&b.addClass(e.$refs.yBar,"p-scrollpanel-hidden")):(e.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","false"),!e.isUnstyled&&b.removeClass(e.$refs.yBar,"p-scrollpanel-hidden"),e.$refs.yBar.style.cssText="height:"+Math.max(e.scrollYRatio*100,10)+"%; top: calc("+e.$refs.content.scrollTop/o*100+"% - "+e.$refs.xBar.clientHeight+"px);right:"+l+"px;"))})}},onYBarMouseDown:function(e){this.isYBarClicked=!0,this.$refs.yBar.focus(),this.lastPageY=e.pageY,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&b.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&b.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),e.preventDefault()},onXBarMouseDown:function(e){this.isXBarClicked=!0,this.$refs.xBar.focus(),this.lastPageX=e.pageX,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),e.preventDefault()},onScroll:function(e){this.lastScrollLeft!==e.target.scrollLeft?(this.lastScrollLeft=e.target.scrollLeft,this.orientation="horizontal"):this.lastScrollTop!==e.target.scrollTop&&(this.lastScrollTop=e.target.scrollTop,this.orientation="vertical"),this.moveBar()},onKeyDown:function(e){if(this.orientation==="vertical")switch(e.code){case"ArrowDown":{this.setTimer("scrollTop",this.step),e.preventDefault();break}case"ArrowUp":{this.setTimer("scrollTop",this.step*-1),e.preventDefault();break}case"ArrowLeft":case"ArrowRight":{e.preventDefault();break}}else if(this.orientation==="horizontal")switch(e.code){case"ArrowRight":{this.setTimer("scrollLeft",this.step),e.preventDefault();break}case"ArrowLeft":{this.setTimer("scrollLeft",this.step*-1),e.preventDefault();break}case"ArrowDown":case"ArrowUp":{e.preventDefault();break}}},onKeyUp:function(){this.clearTimer()},repeat:function(e,n){this.$refs.content[e]+=n,this.moveBar()},setTimer:function(e,n){var r=this;this.clearTimer(),this.timer=setTimeout(function(){r.repeat(e,n)},40)},clearTimer:function(){this.timer&&clearTimeout(this.timer)},onDocumentMouseMove:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):this.isYBarClicked?this.onMouseMoveForYBar(e):(this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar:function(e){var n=this,r=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame(function(){n.$refs.content.scrollLeft+=r/n.scrollXRatio})},onMouseMoveForYBar:function(e){var n=this,r=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame(function(){n.$refs.content.scrollTop+=r/n.scrollYRatio})},onFocus:function(e){this.$refs.xBar.isSameNode(e.target)?this.orientation="horizontal":this.$refs.yBar.isSameNode(e.target)&&(this.orientation="vertical")},onBlur:function(){this.orientation==="horizontal"&&(this.orientation="vertical")},onDocumentMouseUp:function(){this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),this.$refs.xBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame:function(e){var n=window.requestAnimationFrame||this.timeoutFrame;return n(e)},refresh:function(){this.moveBar()},scrollTop:function(e){var n=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;e=e>n?n:e>0?e:0,this.$refs.content.scrollTop=e},timeoutFrame:function(e){setTimeout(e,0)},bindDocumentMouseListeners:function(){var e=this;this.documentMouseMoveListener||(this.documentMouseMoveListener=function(n){e.onDocumentMouseMove(n)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=function(n){e.onDocumentMouseUp(n)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},computed:{contentId:function(){return this.id+"_content"}}},Qd=["id"],Jd=["aria-controls","aria-valuenow"],Xd=["aria-controls","aria-valuenow"];function ep(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:t.cx("root")},t.ptmi("root")),[i.createElementVNode("div",i.mergeProps({class:t.cx("wrapper")},t.ptm("wrapper")),[i.createElementVNode("div",i.mergeProps({ref:"content",id:o.contentId,class:t.cx("content"),onScroll:e[0]||(e[0]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)}),onMouseenter:e[1]||(e[1]=function(){return o.moveBar&&o.moveBar.apply(o,arguments)})},t.ptm("content")),[i.renderSlot(t.$slots,"default")],16,Qd)],16),i.createElementVNode("div",i.mergeProps({ref:"xBar",class:t.cx("barx"),tabindex:"0",role:"scrollbar","aria-orientation":"horizontal","aria-controls":o.contentId,"aria-valuenow":a.lastScrollLeft,onMousedown:e[2]||(e[2]=function(){return o.onXBarMouseDown&&o.onXBarMouseDown.apply(o,arguments)}),onKeydown:e[3]||(e[3]=function(s){return o.onKeyDown(s)}),onKeyup:e[4]||(e[4]=function(){return o.onKeyUp&&o.onKeyUp.apply(o,arguments)}),onFocus:e[5]||(e[5]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[6]||(e[6]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)})},t.ptm("barx"),{"data-pc-group-section":"bar"}),null,16,Jd),i.createElementVNode("div",i.mergeProps({ref:"yBar",class:t.cx("bary"),tabindex:"0",role:"scrollbar","aria-orientation":"vertical","aria-controls":o.contentId,"aria-valuenow":a.lastScrollTop,onMousedown:e[7]||(e[7]=function(){return o.onYBarMouseDown&&o.onYBarMouseDown.apply(o,arguments)}),onKeydown:e[8]||(e[8]=function(s){return o.onKeyDown(s)}),onKeyup:e[9]||(e[9]=function(){return o.onKeyUp&&o.onKeyUp.apply(o,arguments)}),onFocus:e[10]||(e[10]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)})},t.ptm("bary"),{"data-pc-group-section":"bar"}),null,16,Xd)],16)}qr.render=ep;const ti=[{path:"/",icon:"icon-Outline-Home",activeIcon:"icon-Bold-Home",label:"home",code:"search",internal:!0,pages:["home"]},{path:"/suppliers",icon:"icon-Outline-Ticket",activeIcon:"icon-Bold-Ticket",label:"suppliers",code:"suppliers-list",pages:["suppliers"]},{path:"/users",icon:"icon-Outline-2User",activeIcon:"icon-Bold-2User",label:"users",code:"list-staff",pages:["users"]},{path:"/search",icon:"icon-Outline-Search",activeIcon:"icon-Bold-Search",label:"search",code:"search",internal:!0,pages:["search"]},{icon:"icon-Outline-Create",activeIcon:"icon-Bold-Create",label:"extranet",pages:["extranet","extranet-create-description","extranet-create","charter"],children:[{path:"/charter",label:"charters",code:"provider-charter-list",pages:["charter"]},{path:"/excursions/extranet",label:"excursion",code:"provider-charter-list",pages:["extranet","extranet-create-description","extranet-create"]}]},{path:"/orders",icon:"icon-Outline-Buy",activeIcon:"icon-Bold-Buy",label:"orders",code:"list-own-order",internal:!0,pages:["orders"]},{path:"/new/agreements",icon:"icon-Outline-Document",activeIcon:"icon-Outline-Document",label:"contracts",code:"agreement-list",pages:["agreements","agreementsList"]},{icon:"icon-Outline-Activity",activeIcon:"icon-Bold-Activity",label:"reports",internal:!0,code:"customize-list",pages:["reports","files"],children:[{path:"/reports",label:"basicIndicators",code:"customize-list",internal:!0,pages:["reports","reports/basic-indicators"]}]},{icon:"icon-Outline-Setting",activeIcon:"icon-Bold-Setting",label:"settings",pages:["settings"],children:[{path:"/settings/exchange-rates",label:"currency",code:"get-exchange-rates",pages:["settings/exchange-rates"]},{path:"",label:"rules",pages:["settings"],accordion:!0,children:[{path:"/settings/rule-list",label:"rulesList",code:"rules-user-collection",pages:["settings/rule-list"]},{path:"/settings/groups/contracts",label:"groups",code:"rules-groups",pages:["settings/groups/contracts"]},{path:"/settings/rules-history",label:"usageHistory",code:"rules-get-history-list",pages:["settings/rules-history"]}]},{path:"/settings/route-receipt",label:"routeReceipt",code:"receipt-pattern-list",pages:["settings/route-receipt"]},{path:"/settings/personalization",label:"personalization",code:"personalization",pages:["settings/personalization"]},{path:"/settings/ftp",label:"ftp",code:"ftp",pages:["settings/ftp"]}]}],$r=()=>{const t=localStorage.getItem("apis"),e=localStorage.getItem("userType")??"AGENT",n=l=>l==="home"?!0:t&&(t==null?void 0:t.includes(l)),r=l=>l.filter(u=>{var c,d;return(c=u==null?void 0:u.children)!=null&&c.length?(u.children=r(u.children),!!((d=u.children)!=null&&d.length)):u.code==="home"?!0:t==null?void 0:t.includes(u.code)}).map(u=>{var c;return((c=u==null?void 0:u.children)==null?void 0:c.length)===1&&(u.path=u.children[0].path,delete u.children),u}),a=i.computed(()=>(console.log(e),e==="AGENT"?(console.log(ti),ti):r(ti)));function o(){var l;try{const u=a.value[0];return(l=u==null?void 0:u.children)!=null&&l.length?u==null?void 0:u.children[0].path:u.path}catch(u){return console.log(u),"/home"}}function s(l){try{return e==="AGENT"?!0:l.every(u=>t==null?void 0:t.includes(u))}catch(u){return console.log(u),!1}}return{definePermission:n,availableRoutes:a,getFirstAvailablePage:o,hasAccessAction:s}},Qr=t=>{const{get:e}=Ee({baseUrl:t}),n=i.ref(),r=oe(async()=>{var l,u,c,d;if(localStorage.getItem("userType")==="STAFF"){const p=localStorage.getItem("uid"),{data:h}=await e(`/v1/users/employee/${p}`);n.value=h.staff;const f=(c=(u=(l=h.staff)==null?void 0:l.parent)==null?void 0:u.currency)==null?void 0:c.code;f&&localStorage.setItem("currentUserCurrency",f)}else{const{data:p}=await e("/v1/users/agent/");n.value=p,(d=p==null?void 0:p.currency)!=null&&d.code&&localStorage.setItem("currentUserCurrency",p.currency.code)}}),a=oe(async()=>{const{data:s}=await e("/v1/settings/general/logo/");return s});return{getUserData:async()=>(await r(),n.value),user:n,getLogo:a}},tp={class:"navigation-sidebar__header"},np=["href"],ip={key:0},rp=["src"],op={class:"navigation-sidebar__body"},ap={key:0,class:"text-text-subtle"},sp={key:1,class:"navigation-sidebar__link disable text-text-subtle"},lp={class:"navigation-sidebar__footer"},up={key:0},cp="https://api.globaltravel.space/media/imgs/logo/dip-logo.png",dp="https://api.globaltravel.space/media/imgs/logo/logo.svg",pp="https://api.globaltravel.space/media/imgs/logo/short-logo.svg",fp="https://api.globaltravel.space/media/imgs/logo/dark-logo.svg",ni=i.defineComponent({__name:"NavigationSidebar",props:i.mergeModels({baseRoute:{default:"/home"},isDark:{type:Boolean},routeName:{}},{short:{type:Boolean,default:!1},shortModifiers:{}}),emits:["update:short"],setup(t){const e=t,n=i.useModel(t,"short"),{getLogo:r}=Qr(),a=$r(),o=i.inject("locale",i.ref("ru")),s=window.location.href.includes("dipavia.uz"),l=i.ref(!1),u=i.ref(""),c=i.ref(""),d=i.ref(!0),p=i.inject("baseUrl"),h=i.computed(()=>{const v=S=>S.map(O=>{var P,V;const w={...O};return w.label=((P=W[o.value])==null?void 0:P.sidebar[O.label])??O.label,"children"in w&&((V=w.children)!=null&&V.length)&&(w.children=v(w.children)),w});return v(a.availableRoutes.value)}),f=i.ref(h.value||[]),m=i.ref([]),g=i.computed(()=>n.value?c.value||pp:u.value?u.value:e.isDark?fp:dp),y=()=>{window.location.replace("/sign-in")};return r().then(v=>{v&&p&&(v.logo&&(u.value=p.value+v.logo),v.mini_logo&&(c.value=p.value+v.mini_logo))}).catch(v=>{console.error("Failed to load custom logo:",v)}).finally(()=>{d.value=!1}),i.watchEffect(()=>{const v=f.value.find(S=>{var O;return(O=S.pages)==null?void 0:O.includes(e.routeName)});v!=null&&v.children&&!n.value?(l.value=!0,f.value=v.children):(l.value=!1,f.value=h.value)}),(v,S)=>{const O=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("aside",{class:i.normalizeClass(["navigation-sidebar",{short:n.value}])},[i.createElementVNode("section",tp,[i.createElementVNode("a",{href:v.baseRoute},[d.value?(i.openBlock(),i.createElementBlock("div",ip,[i.createVNode(i.unref(Jn),{height:"43px",width:`${n.value?"43px":"150px"}`},null,8,["width"])])):i.unref(s)?(i.openBlock(),i.createElementBlock("img",{key:1,src:cp,alt:"",class:"navigation-sidebar__logo"})):(i.openBlock(),i.createElementBlock("img",{key:2,src:g.value,alt:"",class:"navigation-sidebar__logo"},null,8,rp))],8,np),i.createElementVNode("i",{class:"icon-Outline-Arrow-LeftSquare toggle text-dark",onClick:S[0]||(S[0]=w=>n.value=!n.value)})]),i.createVNode(i.unref(qr),{class:"scroll-height"},{default:i.withCtx(()=>{var w;return[i.createElementVNode("section",op,[l.value&&!n.value?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:S[1]||(S[1]=P=>{m.value=h.value,l.value=!1}),class:"navigation-sidebar__link disable",style:{cursor:"pointer"}},[S[4]||(S[4]=i.createElementVNode("i",{class:"icon-Outline-Arrow-LeftCircle navigation-sidebar__icon text-text-subtle"},null,-1)),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",ap,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.back),1))])):(i.openBlock(),i.createElementBlock("div",sp,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.title),1)),m.value.length?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:2},i.renderList(m.value,(P,V)=>(i.openBlock(),i.createBlock(Zr,{key:`${V}-${P.path}`,"route-item":P,"is-child":!1,routeName:v.routeName,onParentClick:S[2]||(S[2]=H=>{m.value=H,l.value=!0}),short:n.value},null,8,["route-item","routeName","short"]))),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:3},i.renderList(f.value,(P,V)=>(i.openBlock(),i.createBlock(Zr,{key:`${V}-${P.path}`,"route-item":P,routeName:v.routeName,"is-child":!1,onParentClick:S[3]||(S[3]=H=>{m.value=H,l.value=!0}),short:n.value},null,8,["route-item","routeName","short"]))),128))]),i.createElementVNode("section",lp,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"navigation-sidebar__link",onClick:y},[S[5]||(S[5]=i.createElementVNode("i",{class:"icon-Outline-Logout"},null,-1)),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",up,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.logout),1))])),[[O,{value:(w=i.unref(W)[i.unref(o)])==null?void 0:w.sidebar.logout,disabled:!n.value}]])])]}),_:1})],2)}}});function Jr(){const t=i.ref(window.innerWidth),e=i.ref(window.innerHeight),n=()=>{t.value=window.innerWidth,e.value=window.innerHeight};return i.onMounted(()=>{window.addEventListener("resize",n)}),i.onUnmounted(()=>{window.removeEventListener("resize",n)}),{width:t,height:e}}const hp={class:"easy-layout__content"},mp={class:"easy-layout__header"},gp={class:"easy-layout__scrollbar scrollbar"},yp={class:"easy-layout__body"},bp={class:"easy-layout__body-inner"},Xr=i.defineComponent({__name:"EasyLayout",props:{routeName:{},isDark:{type:Boolean},locale:{},baseUrl:{},env:{},isContract:{type:Boolean}},setup(t){const e=t,{width:n}=Jr();i.provide("locale",i.computed(()=>e.locale)),i.provide("baseUrl",i.computed(()=>e.baseUrl||"https://api.globaltravel.space")),i.provide("env",i.computed(()=>e.env||"production")),i.provide("isContract",i.computed(()=>e.isContract));const r=i.ref(!1);function a(){n.value<1420&&!r.value?r.value=!0:n.value>=1420&&r.value&&(r.value=!1)}return a(),i.watch(n,()=>{a()}),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["easy-layout",{short:r.value}])},[i.createVNode(ei),i.createVNode(ni,{short:r.value,"onUpdate:short":s[0]||(s[0]=l=>r.value=l),routeName:o.routeName,isDark:o.isDark},null,8,["short","routeName","isDark"]),i.createElementVNode("div",hp,[i.createElementVNode("div",mp,[i.renderSlot(o.$slots,"header")]),i.createElementVNode("div",gp,[i.createElementVNode("div",yp,[i.createElementVNode("div",bp,[i.renderSlot(o.$slots,"default")])])])])],2))}});var eo={name:"WindowMaximizeIcon",extends:q},vp=i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"},null,-1),kp=[vp];function Sp(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),kp,16)}eo.render=Sp;var to={name:"WindowMinimizeIcon",extends:q},wp=i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"},null,-1),Cp=[wp];function Op(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Cp,16)}to.render=Op;var Bp={mask:function(e){var n=e.position,r=e.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:n==="left"||n==="topleft"||n==="bottomleft"?"flex-start":n==="right"||n==="topright"||n==="bottomright"?"flex-end":"center",alignItems:n==="top"||n==="topleft"||n==="topright"?"flex-start":n==="bottom"||n==="bottomleft"||n==="bottomright"?"flex-end":"center",pointerEvents:r?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},Fp={mask:function(e){var n=e.props,r=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"],a=r.find(function(o){return o===n.position});return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":n.modal},a?"p-dialog-".concat(a):""]},root:function(e){var n=e.props,r=e.instance;return["p-dialog p-component",{"p-dialog-rtl":n.rtl,"p-dialog-maximized":n.maximizable&&r.maximized,"p-ripple-disabled":r.$primevue.config.ripple===!1}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},Ip=A.extend({name:"dialog",classes:Fp,inlineStyles:Bp}),Ep={name:"BaseDialog",extends:L,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:Ip,provide:function(){return{$parentInstance:this}}},no={name:"Dialog",extends:Ep,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:i.computed(function(){return e._instance})}},data:function(){return{id:this.$attrs.id,containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},watch:{"$attrs.id":function(e){this.id=e||ee()}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&J.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.id=this.id||ee(),this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&J.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&b.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),b.focus(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&J.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(a){return a&&a.querySelector("[autofocus]")},n=this.$slots.footer&&e(this.footerContainer);n||(n=this.$slots.header&&e(this.headerContainer),n||(n=this.$slots.default&&e(this.content),n||(this.maximizable?(this.focusableMax=!0,n=this.maximizableButton):(this.focusableClose=!0,n=this.closeButton)))),n&&b.focus(n,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?b.blockBodyScroll():b.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&b.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&b.unblockBodyScroll()},onKeyDown:function(e){e.code==="Escape"&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",b.setAttribute(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement);var n="";for(var r in this.breakpoints)n+=`
159
+ `}}return{title:a,favicon:o,colors:s}},getBrandConfig:()=>e()}},jd=["src"],xd=125,zd=660,ei=i.defineComponent({__name:"EasyBackground",props:{routePath:{}},setup(t){const e=t,{getBrandConfig:n}=Xn(),{backgroundImage:r,hideBalls:a}=n(),o=["violet","violet","grey","green","blue","orange","grey"],s=i.ref([]);function l(){s.value=[];for(let p=0;p<o.length;p++){const h=d(xd,zd),f=u();s.value.push({size:h,className:o[p],position:f})}}function u(){const p=d(200,window.innerWidth),h=d(-50,window.innerHeight);return[c(window.innerWidth,p),c(window.innerHeight,h)]}function c(p,h){return Math.ceil(h*100/p)+"%"}function d(p,h){const f=Math.random(),m=h-p;return Math.floor(f*m)+p}return i.watch(()=>e.routePath,()=>{l()}),i.onMounted(()=>{l()}),(p,h)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["easy-background dynamic-bg",[{"easy-background--shadow":!1},""]]),style:{backgroundColor:"transparent",borderRadius:"0"}},[i.unref(r)?(i.openBlock(),i.createElementBlock("img",{key:0,src:i.unref(r),style:{"object-fit":"cover"},class:"absolute inset-0 w-full h-full object-cover"},null,8,jd)):i.createCommentVNode("",!0),i.unref(a)?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.TransitionGroup,{key:1,name:"fade"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.value,f=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["sphere",f.className]),key:f.size,style:i.normalizeStyle({width:`${f.size}px`,height:`${f.size}px`,left:f.position[0],top:f.position[1]})},null,6))),128))]),_:1}))]))}}),Ad={key:0,class:"icon-Outline-More-vertical"},Ud={key:1,class:"icon-Outline-Arrow-Up2"},Nd={key:2,class:"icon-Outline-Arrow-Down2"},Kd={key:0,class:"navigation-sidebar-dropdown__menu"},Rd=["href"],_d={key:1,class:"navigation-sidebar-dropdown__trigger no-hover disabled",style:{"padding-left":"24px"}},Gr=Ue(i.defineComponent({__name:"NavigationSidebarDropdown",props:{item:{},expand:{type:Boolean},routeName:{}},setup(t){const e=i.ref(!1),n=t,r=i.computed(()=>n.routeName.replace(/^\//,""));return(a,o)=>{const s=i.resolveComponent("router-link");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["navigation-sidebar-dropdown",{expand:a.expand}])},[i.createElementVNode("div",{class:"navigation-sidebar-dropdown__trigger no-hover",onClick:o[0]||(o[0]=l=>e.value=!e.value)},[i.createElementVNode("span",null,i.toDisplayString(a.item.label),1),a.expand?(i.openBlock(),i.createElementBlock("i",Ad)):e.value?(i.openBlock(),i.createElementBlock("i",Ud)):(i.openBlock(),i.createElementBlock("i",Nd))]),i.createVNode(i.Transition,{name:"slide-fade"},{default:i.withCtx(()=>[e.value?(i.openBlock(),i.createElementBlock("div",Kd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.item.children,l=>{var u,c;return i.openBlock(),i.createElementBlock(i.Fragment,{key:l.path},[l.path?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[l.internal?(i.openBlock(),i.createBlock(s,{key:0,to:l.path,class:i.normalizeClass(["navigation-sidebar-dropdown__trigger ",{active:(u=l==null?void 0:l.pages)==null?void 0:u.includes(r.value)}]),style:{"padding-left":"24px"}},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(l.label),1)]),_:2},1032,["to","class"])):(i.openBlock(),i.createElementBlock("a",{key:1,href:l.path,class:i.normalizeClass(["navigation-sidebar-dropdown__trigger ",{active:(c=l==null?void 0:l.pages)==null?void 0:c.includes(r.value)}])},i.toDisplayString(l.label),11,Rd))],64)):(i.openBlock(),i.createElementBlock("div",_d,i.toDisplayString(l.label),1))],64)}),128))])):i.createCommentVNode("",!0)]),_:1})],2)}}}),[["__scopeId","data-v-0449b99a"]]),Yd={key:1},Hd={key:2,class:"icon-Outline-More-vertical navigation-sidebar__more"},Wd={key:0,class:"sidebar-short-items"},Gd={key:2,class:"sidebar-short-items__link disabled"},Zr=i.defineComponent({__name:"NavigationSidebarItem",props:{routeItem:{},isChild:{type:Boolean},routeName:{},short:{type:Boolean}},emits:["parentClick"],setup(t,{emit:e}){const n=i.ref(),r=t,a=e,o=i.inject("isContract"),s=p=>{var h;return(h=p.children)!=null&&h.length?{tag:"div",attribute:{}}:o!=null&&o.value?{tag:"a",attribute:{href:p.path}}:p.internal?{tag:"router-link",attribute:{to:p.path}}:{tag:"a",attribute:{href:p.path}}};function l(p){return p.includes(r.routeName)}function u(p){return l(p.pages??[])?p.activeIcon:p.icon}function c(p){n.value.toggle(p)}function d(p){p.children&&p.children.length>0&&a("parentClick",p.children)}return i.watch(()=>r.routeName,()=>{n.value.hide()}),(p,h)=>{var m,g,y,v,S;const f=i.resolveDirective("tooltip");return p.routeItem?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[p.short&&((m=p.routeItem)!=null&&m.children)?(i.openBlock(),i.createElementBlock("div",{key:0,class:i.normalizeClass(["navigation-sidebar__link",{active:p.routeItem.pages.includes(p.routeName)}]),onClick:c},[(g=p.routeItem)!=null&&g.icon?(i.openBlock(),i.createElementBlock("i",{key:0,class:i.normalizeClass([u(p.routeItem),"navigation-sidebar__icon"])},null,2)):i.createCommentVNode("",!0),h[1]||(h[1]=i.createElementVNode("i",{class:"icon-Outline-More-vertical navigation-sidebar__more"},null,-1))],2)):p.isChild&&((y=p.routeItem)!=null&&y.children)?(i.openBlock(),i.createBlock(Gr,{key:1,expand:"",item:p.routeItem,routeName:p.routeName},null,8,["item","routeName"])):i.withDirectives((i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(p.routeItem).tag),i.mergeProps({key:2},s(p.routeItem).attribute,{onClick:h[0]||(h[0]=O=>d(p.routeItem)),class:["navigation-sidebar__link",{active:l((v=p.routeItem)==null?void 0:v.pages)},{"pointer-events-none":p.routeItem.disabled}]}),{default:i.withCtx(()=>{var O,w;return[(O=p.routeItem)!=null&&O.icon?(i.openBlock(),i.createElementBlock("i",{key:0,class:i.normalizeClass([u(p.routeItem),"navigation-sidebar__icon"])},null,2)):i.createCommentVNode("",!0),p.short?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",Yd,i.toDisplayString(p.routeItem.label),1)),(w=p.routeItem)!=null&&w.children?(i.openBlock(),i.createElementBlock("i",Hd)):i.createCommentVNode("",!0)]}),_:1},16,["class"])),[[f,{value:p.routeItem.label,disabled:!p.short||!!((S=p.routeItem)!=null&&S.children)}]]),i.createVNode(i.unref(Gn),{ref_key:"op",ref:n,"append-to":"self",class:"sidebar-op"},{default:i.withCtx(()=>{var O;return[(O=p.routeItem)!=null&&O.children?(i.openBlock(),i.createElementBlock("section",Wd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.routeItem.children,(w,P)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:`${P}-${w.path}`},[w!=null&&w.children?(i.openBlock(),i.createBlock(Gr,{key:0,item:w,routeName:p.routeName},null,8,["item","routeName"])):w.path?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(s(w).tag),i.mergeProps({key:1,ref_for:!0},s(w).attribute,{class:["sidebar-short-items__link",{active:l(p.routeItem.pages)}]}),{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(w.label),1)]),_:2},1040,["class"])):(i.openBlock(),i.createElementBlock("div",Gd,i.toDisplayString(w.label),1))],64))),128))])):i.createCommentVNode("",!0)]}),_:1},512)],64)):i.createCommentVNode("",!0)}}});var Zd={root:"p-scrollpanel p-component",wrapper:"p-scrollpanel-wrapper",content:"p-scrollpanel-content",barx:"p-scrollpanel-bar p-scrollpanel-bar-x",bary:"p-scrollpanel-bar p-scrollpanel-bar-y"},qd=A.extend({name:"scrollpanel",classes:Zd}),$d={name:"BaseScrollPanel",extends:L,props:{step:{type:Number,default:5}},style:qd,provide:function(){return{$parentInstance:this}}},qr={name:"ScrollPanel",extends:$d,inheritAttrs:!1,initialized:!1,documentResizeListener:null,documentMouseMoveListener:null,documentMouseUpListener:null,frame:null,scrollXRatio:null,scrollYRatio:null,isXBarClicked:!1,isYBarClicked:!1,lastPageX:null,lastPageY:null,timer:null,outsideClickListener:null,data:function(){return{id:this.$attrs.id,orientation:"vertical",lastScrollTop:0,lastScrollLeft:0}},watch:{"$attrs.id":function(e){this.id=e||ee()}},mounted:function(){this.id=this.id||ee(),this.$el.offsetParent&&this.initialize()},updated:function(){!this.initialized&&this.$el.offsetParent&&this.initialize()},beforeUnmount:function(){this.unbindDocumentResizeListener(),this.frame&&window.cancelAnimationFrame(this.frame)},methods:{initialize:function(){this.moveBar(),this.bindDocumentResizeListener(),this.calculateContainerHeight()},calculateContainerHeight:function(){var e=getComputedStyle(this.$el),n=getComputedStyle(this.$refs.xBar),r=b.getHeight(this.$el)-parseInt(n.height,10);e["max-height"]!=="none"&&r===0&&(this.$refs.content.offsetHeight+parseInt(n.height,10)>parseInt(e["max-height"],10)?this.$el.style.height=e["max-height"]:this.$el.style.height=this.$refs.content.offsetHeight+parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)+parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth)+"px")},moveBar:function(){var e=this;if(this.$refs.content){var n=this.$refs.content.scrollWidth,r=this.$refs.content.clientWidth,a=(this.$el.clientHeight-this.$refs.xBar.clientHeight)*-1;this.scrollXRatio=r/n;var o=this.$refs.content.scrollHeight,s=this.$refs.content.clientHeight,l=(this.$el.clientWidth-this.$refs.yBar.clientWidth)*-1;this.scrollYRatio=s/o,this.frame=this.requestAnimationFrame(function(){e.$refs.xBar&&(e.scrollXRatio>=1?(e.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","true"),!e.isUnstyled&&b.addClass(e.$refs.xBar,"p-scrollpanel-hidden")):(e.$refs.xBar.setAttribute("data-p-scrollpanel-hidden","false"),!e.isUnstyled&&b.removeClass(e.$refs.xBar,"p-scrollpanel-hidden"),e.$refs.xBar.style.cssText="width:"+Math.max(e.scrollXRatio*100,10)+"%; left:"+e.$refs.content.scrollLeft/n*100+"%;bottom:"+a+"px;")),e.$refs.yBar&&(e.scrollYRatio>=1?(e.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","true"),!e.isUnstyled&&b.addClass(e.$refs.yBar,"p-scrollpanel-hidden")):(e.$refs.yBar.setAttribute("data-p-scrollpanel-hidden","false"),!e.isUnstyled&&b.removeClass(e.$refs.yBar,"p-scrollpanel-hidden"),e.$refs.yBar.style.cssText="height:"+Math.max(e.scrollYRatio*100,10)+"%; top: calc("+e.$refs.content.scrollTop/o*100+"% - "+e.$refs.xBar.clientHeight+"px);right:"+l+"px;"))})}},onYBarMouseDown:function(e){this.isYBarClicked=!0,this.$refs.yBar.focus(),this.lastPageY=e.pageY,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&b.addClass(this.$refs.yBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","true"),!this.isUnstyled&&b.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),e.preventDefault()},onXBarMouseDown:function(e){this.isXBarClicked=!0,this.$refs.xBar.focus(),this.lastPageX=e.pageX,this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.addClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.addClass(document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),e.preventDefault()},onScroll:function(e){this.lastScrollLeft!==e.target.scrollLeft?(this.lastScrollLeft=e.target.scrollLeft,this.orientation="horizontal"):this.lastScrollTop!==e.target.scrollTop&&(this.lastScrollTop=e.target.scrollTop,this.orientation="vertical"),this.moveBar()},onKeyDown:function(e){if(this.orientation==="vertical")switch(e.code){case"ArrowDown":{this.setTimer("scrollTop",this.step),e.preventDefault();break}case"ArrowUp":{this.setTimer("scrollTop",this.step*-1),e.preventDefault();break}case"ArrowLeft":case"ArrowRight":{e.preventDefault();break}}else if(this.orientation==="horizontal")switch(e.code){case"ArrowRight":{this.setTimer("scrollLeft",this.step),e.preventDefault();break}case"ArrowLeft":{this.setTimer("scrollLeft",this.step*-1),e.preventDefault();break}case"ArrowDown":case"ArrowUp":{e.preventDefault();break}}},onKeyUp:function(){this.clearTimer()},repeat:function(e,n){this.$refs.content[e]+=n,this.moveBar()},setTimer:function(e,n){var r=this;this.clearTimer(),this.timer=setTimeout(function(){r.repeat(e,n)},40)},clearTimer:function(){this.timer&&clearTimeout(this.timer)},onDocumentMouseMove:function(e){this.isXBarClicked?this.onMouseMoveForXBar(e):this.isYBarClicked?this.onMouseMoveForYBar(e):(this.onMouseMoveForXBar(e),this.onMouseMoveForYBar(e))},onMouseMoveForXBar:function(e){var n=this,r=e.pageX-this.lastPageX;this.lastPageX=e.pageX,this.frame=this.requestAnimationFrame(function(){n.$refs.content.scrollLeft+=r/n.scrollXRatio})},onMouseMoveForYBar:function(e){var n=this,r=e.pageY-this.lastPageY;this.lastPageY=e.pageY,this.frame=this.requestAnimationFrame(function(){n.$refs.content.scrollTop+=r/n.scrollYRatio})},onFocus:function(e){this.$refs.xBar.isSameNode(e.target)?this.orientation="horizontal":this.$refs.yBar.isSameNode(e.target)&&(this.orientation="vertical")},onBlur:function(){this.orientation==="horizontal"&&(this.orientation="vertical")},onDocumentMouseUp:function(){this.$refs.yBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(this.$refs.yBar,"p-scrollpanel-grabbed"),this.$refs.xBar.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(this.$refs.xBar,"p-scrollpanel-grabbed"),document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.isUnstyled&&b.removeClass(document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1},requestAnimationFrame:function(e){var n=window.requestAnimationFrame||this.timeoutFrame;return n(e)},refresh:function(){this.moveBar()},scrollTop:function(e){var n=this.$refs.content.scrollHeight-this.$refs.content.clientHeight;e=e>n?n:e>0?e:0,this.$refs.content.scrollTop=e},timeoutFrame:function(e){setTimeout(e,0)},bindDocumentMouseListeners:function(){var e=this;this.documentMouseMoveListener||(this.documentMouseMoveListener=function(n){e.onDocumentMouseMove(n)},document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=function(n){e.onDocumentMouseUp(n)},document.addEventListener("mouseup",this.documentMouseUpListener))},unbindDocumentMouseListeners:function(){this.documentMouseMoveListener&&(document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)},bindDocumentResizeListener:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.moveBar()},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentResizeListener:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},computed:{contentId:function(){return this.id+"_content"}}},Qd=["id"],Jd=["aria-controls","aria-valuenow"],Xd=["aria-controls","aria-valuenow"];function ep(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("div",i.mergeProps({class:t.cx("root")},t.ptmi("root")),[i.createElementVNode("div",i.mergeProps({class:t.cx("wrapper")},t.ptm("wrapper")),[i.createElementVNode("div",i.mergeProps({ref:"content",id:o.contentId,class:t.cx("content"),onScroll:e[0]||(e[0]=function(){return o.onScroll&&o.onScroll.apply(o,arguments)}),onMouseenter:e[1]||(e[1]=function(){return o.moveBar&&o.moveBar.apply(o,arguments)})},t.ptm("content")),[i.renderSlot(t.$slots,"default")],16,Qd)],16),i.createElementVNode("div",i.mergeProps({ref:"xBar",class:t.cx("barx"),tabindex:"0",role:"scrollbar","aria-orientation":"horizontal","aria-controls":o.contentId,"aria-valuenow":a.lastScrollLeft,onMousedown:e[2]||(e[2]=function(){return o.onXBarMouseDown&&o.onXBarMouseDown.apply(o,arguments)}),onKeydown:e[3]||(e[3]=function(s){return o.onKeyDown(s)}),onKeyup:e[4]||(e[4]=function(){return o.onKeyUp&&o.onKeyUp.apply(o,arguments)}),onFocus:e[5]||(e[5]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)}),onBlur:e[6]||(e[6]=function(){return o.onBlur&&o.onBlur.apply(o,arguments)})},t.ptm("barx"),{"data-pc-group-section":"bar"}),null,16,Jd),i.createElementVNode("div",i.mergeProps({ref:"yBar",class:t.cx("bary"),tabindex:"0",role:"scrollbar","aria-orientation":"vertical","aria-controls":o.contentId,"aria-valuenow":a.lastScrollTop,onMousedown:e[7]||(e[7]=function(){return o.onYBarMouseDown&&o.onYBarMouseDown.apply(o,arguments)}),onKeydown:e[8]||(e[8]=function(s){return o.onKeyDown(s)}),onKeyup:e[9]||(e[9]=function(){return o.onKeyUp&&o.onKeyUp.apply(o,arguments)}),onFocus:e[10]||(e[10]=function(){return o.onFocus&&o.onFocus.apply(o,arguments)})},t.ptm("bary"),{"data-pc-group-section":"bar"}),null,16,Xd)],16)}qr.render=ep;const ti=[{path:"/",icon:"icon-Outline-Home",activeIcon:"icon-Bold-Home",label:"home",code:"search",internal:!0,pages:["home"]},{path:"/suppliers",icon:"icon-Outline-Ticket",activeIcon:"icon-Bold-Ticket",label:"suppliers",code:"suppliers-list",pages:["suppliers"]},{path:"/users",icon:"icon-Outline-2User",activeIcon:"icon-Bold-2User",label:"users",code:"list-staff",pages:["users"]},{path:"/search",icon:"icon-Outline-Search",activeIcon:"icon-Bold-Search",label:"search",code:"search",internal:!0,pages:["search"]},{icon:"icon-Outline-Create",activeIcon:"icon-Bold-Create",label:"extranet",pages:["extranet","extranet-create-description","extranet-create","charter"],children:[{path:"/charter",label:"charters",code:"provider-charter-list",pages:["charter"]},{path:"/excursions/extranet",label:"excursion",code:"provider-charter-list",pages:["extranet","extranet-create-description","extranet-create"]}]},{path:"/orders",icon:"icon-Outline-Buy",activeIcon:"icon-Bold-Buy",label:"orders",code:"list-own-order",internal:!0,pages:["orders"]},{path:"/new/agreements",icon:"icon-Outline-Document",activeIcon:"icon-Outline-Document",label:"contracts",code:"agreement-list",pages:["agreements","agreementsList"]},{icon:"icon-Outline-Activity",activeIcon:"icon-Bold-Activity",label:"reports",internal:!0,code:"customize-list",pages:["reports","files"],children:[{path:"/reports",label:"basicIndicators",code:"customize-list",internal:!0,pages:["reports","reports/basic-indicators"]}]},{icon:"icon-Outline-Setting",activeIcon:"icon-Bold-Setting",label:"settings",pages:["settings"],children:[{path:"/settings/exchange-rates",label:"currency",code:"get-exchange-rates",pages:["settings/exchange-rates"]},{path:"",label:"rules",pages:["settings"],accordion:!0,children:[{path:"/settings/rule-list",label:"rulesList",code:"rules-user-collection",pages:["settings/rule-list"]},{path:"/settings/groups/contracts",label:"groups",code:"rules-groups",pages:["settings/groups/contracts"]},{path:"/settings/rules-history",label:"usageHistory",code:"rules-get-history-list",pages:["settings/rules-history"]}]},{path:"/settings/route-receipt",label:"routeReceipt",code:"receipt-pattern-list",pages:["settings/route-receipt"]},{path:"/settings/personalization",label:"personalization",code:"personalization",pages:["settings/personalization"]},{path:"/settings/ftp",label:"ftp",code:"ftp",pages:["settings/ftp"]}]}],$r=()=>{const t=localStorage.getItem("apis"),e=localStorage.getItem("userType")??"AGENT",n=l=>l==="home"?!0:t&&(t==null?void 0:t.includes(l)),r=l=>l.filter(u=>{var c,d;return(c=u==null?void 0:u.children)!=null&&c.length?(u.children=r(u.children),!!((d=u.children)!=null&&d.length)):u.code==="home"?!0:t==null?void 0:t.includes(u.code)}).map(u=>{var c;return((c=u==null?void 0:u.children)==null?void 0:c.length)===1&&(u.path=u.children[0].path,delete u.children),u}),a=i.computed(()=>(console.log(e),e==="AGENT"?(console.log(ti),ti):r(ti)));function o(){var l;try{const u=a.value[0];return(l=u==null?void 0:u.children)!=null&&l.length?u==null?void 0:u.children[0].path:u.path}catch(u){return console.log(u),"/home"}}function s(l){try{return e==="AGENT"?!0:l.every(u=>t==null?void 0:t.includes(u))}catch(u){return console.log(u),!1}}return{definePermission:n,availableRoutes:a,getFirstAvailablePage:o,hasAccessAction:s}},Qr=t=>{const{get:e}=Ee({baseUrl:t}),n=i.ref(),r=oe(async()=>{var l,u,c,d;if(localStorage.getItem("userType")==="STAFF"){const p=localStorage.getItem("uid"),{data:h}=await e(`/v1/users/employee/${p}`);n.value=h.staff;const f=(c=(u=(l=h.staff)==null?void 0:l.parent)==null?void 0:u.currency)==null?void 0:c.code;f&&localStorage.setItem("currentUserCurrency",f)}else{const{data:p}=await e("/v1/users/agent/");n.value=p,(d=p==null?void 0:p.currency)!=null&&d.code&&localStorage.setItem("currentUserCurrency",p.currency.code)}}),a=oe(async()=>{const{data:s}=await e("/v1/settings/general/logo/");return s});return{getUserData:async()=>(await r(),n.value),user:n,getLogo:a}},tp={class:"navigation-sidebar__header"},np=["href"],ip={key:0},rp=["src"],op={class:"navigation-sidebar__body"},ap={key:0,class:"text-text-subtle"},sp={key:1,class:"navigation-sidebar__link disable text-text-subtle"},lp={class:"navigation-sidebar__footer"},up={key:0},cp="https://api.globaltravel.space/media/imgs/logo/dip-logo.png",dp="https://api.globaltravel.space/media/imgs/logo/logo.svg",pp="https://api.globaltravel.space/media/imgs/logo/short-logo.svg",fp="https://api.globaltravel.space/media/imgs/logo/dark-logo.svg",ni=i.defineComponent({__name:"NavigationSidebar",props:i.mergeModels({baseRoute:{default:"/home"},isDark:{type:Boolean},routeName:{}},{short:{type:Boolean,default:!1},shortModifiers:{}}),emits:["update:short"],setup(t){const e=t,n=i.useModel(t,"short"),{getLogo:r}=Qr(),a=$r(),o=i.inject("locale",i.ref("ru")),s=window.location.href.includes("dipavia.uz"),l=i.ref(!1),u=i.ref(""),c=i.ref(""),d=i.ref(!0),p=i.inject("baseUrl"),h=i.computed(()=>{const v=S=>S.map(O=>{var P,V;const w={...O};return w.label=((P=W[o.value])==null?void 0:P.sidebar[O.label])??O.label,"children"in w&&((V=w.children)!=null&&V.length)&&(w.children=v(w.children)),w});return v(a.availableRoutes.value)}),f=i.ref(h.value||[]),m=i.ref([]),g=i.computed(()=>n.value?c.value||pp:u.value?u.value:e.isDark?fp:dp),y=()=>{window.location.replace("/sign-in")};return r().then(v=>{v&&p&&(v.logo&&(u.value=p.value+v.logo),v.mini_logo&&(c.value=p.value+v.mini_logo))}).catch(v=>{console.error("Failed to load custom logo:",v)}).finally(()=>{d.value=!1}),i.watchEffect(()=>{const v=f.value.find(S=>{var O;return(O=S.pages)==null?void 0:O.includes(e.routeName)});v!=null&&v.children&&!n.value?(l.value=!0,f.value=v.children):(l.value=!1,f.value=h.value)}),(v,S)=>{const O=i.resolveDirective("tooltip");return i.openBlock(),i.createElementBlock("aside",{class:i.normalizeClass(["navigation-sidebar",{short:n.value}])},[i.createElementVNode("section",tp,[i.createElementVNode("a",{href:v.baseRoute},[d.value?(i.openBlock(),i.createElementBlock("div",ip,[i.createVNode(i.unref(Jn),{height:"43px",width:`${n.value?"43px":"150px"}`},null,8,["width"])])):i.unref(s)?(i.openBlock(),i.createElementBlock("img",{key:1,src:cp,alt:"",class:"navigation-sidebar__logo"})):(i.openBlock(),i.createElementBlock("img",{key:2,src:g.value,alt:"",class:"navigation-sidebar__logo"},null,8,rp))],8,np),i.createElementVNode("i",{class:"icon-Outline-Arrow-LeftSquare toggle text-dark",onClick:S[0]||(S[0]=w=>n.value=!n.value)})]),i.createVNode(i.unref(qr),{class:"scroll-height"},{default:i.withCtx(()=>{var w;return[i.createElementVNode("section",op,[l.value&&!n.value?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:S[1]||(S[1]=P=>{m.value=h.value,l.value=!1}),class:"navigation-sidebar__link disable",style:{cursor:"pointer"}},[S[4]||(S[4]=i.createElementVNode("i",{class:"icon-Outline-Arrow-LeftCircle navigation-sidebar__icon text-text-subtle"},null,-1)),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",ap,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.back),1))])):(i.openBlock(),i.createElementBlock("div",sp,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.title),1)),m.value.length?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:2},i.renderList(m.value,(P,V)=>(i.openBlock(),i.createBlock(Zr,{key:`${V}-${P.path}`,"route-item":P,"is-child":!1,routeName:v.routeName,onParentClick:S[2]||(S[2]=H=>{m.value=H,l.value=!0}),short:n.value},null,8,["route-item","routeName","short"]))),128)):(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:3},i.renderList(f.value,(P,V)=>(i.openBlock(),i.createBlock(Zr,{key:`${V}-${P.path}`,"route-item":P,routeName:v.routeName,"is-child":!1,onParentClick:S[3]||(S[3]=H=>{m.value=H,l.value=!0}),short:n.value},null,8,["route-item","routeName","short"]))),128))]),i.createElementVNode("section",lp,[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:"navigation-sidebar__link",onClick:y},[S[5]||(S[5]=i.createElementVNode("i",{class:"icon-Outline-Logout"},null,-1)),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",up,i.toDisplayString(i.unref(W)[i.unref(o)].sidebar.logout),1))])),[[O,{value:(w=i.unref(W)[i.unref(o)])==null?void 0:w.sidebar.logout,disabled:!n.value}]])])]}),_:1})],2)}}});function Jr(){const t=i.ref(window.innerWidth),e=i.ref(window.innerHeight),n=()=>{t.value=window.innerWidth,e.value=window.innerHeight};return i.onMounted(()=>{window.addEventListener("resize",n)}),i.onUnmounted(()=>{window.removeEventListener("resize",n)}),{width:t,height:e}}const hp={class:"easy-layout__content"},mp={class:"easy-layout__header"},gp={class:"easy-layout__scrollbar scrollbar"},yp={class:"easy-layout__body"},bp={class:"easy-layout__body-inner"},Xr=i.defineComponent({__name:"EasyLayout",props:{routeName:{},isDark:{type:Boolean},locale:{},baseUrl:{},env:{},isContract:{type:Boolean}},setup(t){const e=t,{width:n}=Jr();i.provide("locale",i.computed(()=>e.locale)),i.provide("baseUrl",i.computed(()=>e.baseUrl||"https://api.globaltravel.space")),i.provide("env",i.computed(()=>e.env||"production")),i.provide("isContract",i.computed(()=>e.isContract));const r=i.ref(!1);function a(){n.value<1420&&!r.value?r.value=!0:n.value>=1420&&r.value&&(r.value=!1)}return a(),i.watch(n,()=>{a()}),(o,s)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["easy-layout",{short:r.value}])},[i.createVNode(ei),i.createVNode(ni,{short:r.value,"onUpdate:short":s[0]||(s[0]=l=>r.value=l),routeName:o.routeName,isDark:o.isDark},null,8,["short","routeName","isDark"]),i.createElementVNode("div",hp,[i.createElementVNode("div",mp,[i.renderSlot(o.$slots,"header")]),i.createElementVNode("div",gp,[i.createElementVNode("div",yp,[i.createElementVNode("div",bp,[i.renderSlot(o.$slots,"default")])])])])],2))}});var eo={name:"WindowMaximizeIcon",extends:q},vp=i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z",fill:"currentColor"},null,-1),kp=[vp];function Sp(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),kp,16)}eo.render=Sp;var to={name:"WindowMinimizeIcon",extends:q},wp=i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z",fill:"currentColor"},null,-1),Cp=[wp];function Op(t,e,n,r,a,o){return i.openBlock(),i.createElementBlock("svg",i.mergeProps({width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.pti()),Cp,16)}to.render=Op;var Bp={mask:function(e){var n=e.position,r=e.modal;return{position:"fixed",height:"100%",width:"100%",left:0,top:0,display:"flex",justifyContent:n==="left"||n==="topleft"||n==="bottomleft"?"flex-start":n==="right"||n==="topright"||n==="bottomright"?"flex-end":"center",alignItems:n==="top"||n==="topleft"||n==="topright"?"flex-start":n==="bottom"||n==="bottomleft"||n==="bottomright"?"flex-end":"center",pointerEvents:r?"auto":"none"}},root:{display:"flex",flexDirection:"column",pointerEvents:"auto"}},Fp={mask:function(e){var n=e.props,r=["left","right","top","topleft","topright","bottom","bottomleft","bottomright"],a=r.find(function(o){return o===n.position});return["p-dialog-mask",{"p-component-overlay p-component-overlay-enter":n.modal},a?"p-dialog-".concat(a):""]},root:function(e){var n=e.props,r=e.instance;return["p-dialog p-component",{"p-dialog-rtl":n.rtl,"p-dialog-maximized":n.maximizable&&r.maximized,"p-ripple-disabled":r.$primevue.config.ripple===!1}]},header:"p-dialog-header",title:"p-dialog-title",icons:"p-dialog-header-icons",maximizableButton:"p-dialog-header-icon p-dialog-header-maximize p-link",maximizableIcon:"p-dialog-header-maximize-icon",closeButton:"p-dialog-header-icon p-dialog-header-close p-link",closeButtonIcon:"p-dialog-header-close-icon",content:"p-dialog-content",footer:"p-dialog-footer"},Ip=A.extend({name:"dialog",classes:Fp,inlineStyles:Bp}),Ep={name:"BaseDialog",extends:L,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:Ip,provide:function(){return{$parentInstance:this}}},no={name:"Dialog",extends:Ep,inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:i.computed(function(){return e._instance})}},data:function(){return{id:this.$attrs.id,containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},watch:{"$attrs.id":function(e){this.id=e||ee()}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&J.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.id=this.id||ee(),this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&J.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&b.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),b.focus(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&J.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(a){return a&&a.querySelector("[autofocus]")},n=this.$slots.footer&&e(this.footerContainer);n||(n=this.$slots.header&&e(this.headerContainer),n||(n=this.$slots.default&&e(this.content),n||(this.maximizable?(this.focusableMax=!0,n=this.maximizableButton):(this.focusableClose=!0,n=this.closeButton)))),n&&b.focus(n,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?b.blockBodyScroll():b.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&b.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&b.unblockBodyScroll()},onKeyDown:function(e){e.code==="Escape"&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",b.setAttribute(this.styleElement,"nonce",(e=this.$primevue)===null||e===void 0||(e=e.config)===null||e===void 0||(e=e.csp)===null||e===void 0?void 0:e.nonce),document.head.appendChild(this.styleElement);var n="";for(var r in this.breakpoints)n+=`
160
160
  @media screen and (max-width: `.concat(r,`) {
161
161
  .p-dialog[`).concat(this.attributeSelector,`] {
162
162
  width: `).concat(this.breakpoints[r],` !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g-gts/ui",
3
- "version": "1.5.39",
3
+ "version": "1.5.41",
4
4
  "description": "GTS UI component library",
5
5
  "main": "dist/gts-ui.es.js",
6
6
  "module": "dist/gts-ui.es.js",