From a11247e43beee3076ed267644521e3bffcff94e2 Mon Sep 17 00:00:00 2001 From: Sanjusha_tridz Date: Tue, 16 Jan 2024 09:37:31 +0000 Subject: [PATCH] Fix:Qty adding bug --- .../{Login-e2605211.js => Login-74a82d5d.js} | 2 +- .../{index-e6ebee7c.js => index-29023b3f.js} | 4 ++-- ury_pos/public/urypos/index.html | 2 +- ury_pos/www/urypos.html | 2 +- urypos/src/stores/Menu.js | 15 ++++++++++----- 5 files changed, 15 insertions(+), 10 deletions(-) rename ury_pos/public/urypos/assets/{Login-e2605211.js => Login-74a82d5d.js} (98%) rename ury_pos/public/urypos/assets/{index-e6ebee7c.js => index-29023b3f.js} (99%) diff --git a/ury_pos/public/urypos/assets/Login-e2605211.js b/ury_pos/public/urypos/assets/Login-74a82d5d.js similarity index 98% rename from ury_pos/public/urypos/assets/Login-e2605211.js rename to ury_pos/public/urypos/assets/Login-74a82d5d.js index 59644c4..2c3d298 100644 --- a/ury_pos/public/urypos/assets/Login-e2605211.js +++ b/ury_pos/public/urypos/assets/Login-74a82d5d.js @@ -1 +1 @@ -import{_ as n,u as a,o,c as i,a as e,w as d,b as l,v as u,d as c}from"./index-e6ebee7c.js";const p={setup(){return{auth:a()}}},h={class:"flex flex-col justify-center py-12 sm:px-6 lg:px-8"},m={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},f={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},w={class:"relative mt-1"},x=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon email-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M2.5 7.65149V15.0757C2.5 15.4374 2.64367 15.7842 2.8994 16.04C3.15513 16.2957 3.50198 16.4394 3.86364 16.4394H16.1364C16.498 16.4394 16.8449 16.2957 17.1006 16.04C17.3563 15.7842 17.5 15.4374 17.5 15.0757V7.65149",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"}),e("path",{d:"M17.5 7.57572V5.53026C17.5 5.1686 17.3563 4.82176 17.1006 4.56603C16.8449 4.31029 16.498 4.16663 16.1364 4.16663H3.86364C3.50198 4.16663 3.15513 4.31029 2.8994 4.56603C2.64367 4.82176 2.5 5.1686 2.5 5.53026V7.57572L10 10.8333L17.5 7.57572Z",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"})])],-1),C={class:"mt-1"},g={class:"relative"},b=["type"],_=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon password-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0961 1.93768H10.0264C8.94806 1.92763 7.90976 2.34591 7.13951 3.10075C6.36866 3.85619 5.9294 4.88687 5.91833 5.96612L5.91831 5.96612V5.97124V6.52695H4.3125C3.20793 6.52695 2.3125 7.42238 2.3125 8.52695V16.0165C2.3125 17.121 3.20793 18.0165 4.3125 18.0165H15.7356C16.8401 18.0165 17.7356 17.121 17.7356 16.0165V8.52695C17.7356 7.42238 16.8401 6.52695 15.7356 6.52695H14.1297V6.04576C14.1397 4.96742 13.7214 3.92913 12.9666 3.15888C12.2112 2.38803 11.1805 1.94877 10.1012 1.9377V1.93768H10.0961ZM13.1297 6.52695V6.04336V6.03838H13.1297C13.1378 5.22428 12.8222 4.44029 12.2524 3.85881C11.6831 3.27793 10.9067 2.94667 10.0934 2.93768H10.024H10.019V2.93765C9.20491 2.92955 8.42092 3.24512 7.83944 3.81497C7.25856 4.38423 6.9273 5.1607 6.91831 5.9739V6.52695H13.1297ZM4.3125 7.52695C3.76022 7.52695 3.3125 7.97467 3.3125 8.52695V16.0165C3.3125 16.5687 3.76022 17.0165 4.3125 17.0165H15.7356C16.2879 17.0165 16.7356 16.5687 16.7356 16.0165V8.52695C16.7356 7.97467 16.2879 7.52695 15.7356 7.52695H4.3125ZM10.0242 13.2384C10.5581 13.2384 10.9909 12.8056 10.9909 12.2717C10.9909 11.7377 10.5581 11.3049 10.0242 11.3049C9.49023 11.3049 9.05738 11.7377 9.05738 12.2717C9.05738 12.8056 9.49023 13.2384 10.0242 13.2384ZM11.9909 12.2717C11.9909 13.3579 11.1104 14.2384 10.0242 14.2384C8.93794 14.2384 8.05738 13.3579 8.05738 12.2717C8.05738 11.1854 8.93794 10.3049 10.0242 10.3049C11.1104 10.3049 11.9909 11.1854 11.9909 12.2717Z",fill:"#74808B"})])],-1),v={class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5"},y={key:0,class:"text-gray-400"},V={key:1,class:"text-gray-400"},H=e("div",null,[e("button",{type:"submit",class:"flex w-full justify-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}," Sign in ")],-1);function k(r,s,M,B,P,Z){return o(),i("div",h,[e("div",m,[e("div",f,[e("form",{class:"space-y-6",onSubmit:s[3]||(s[3]=d((...t)=>this.auth.login&&this.auth.login(...t),["prevent"]))},[e("div",w,[l(e("input",{name:"user_id","onUpdate:modelValue":s[0]||(s[0]=t=>this.auth.userId=t),required:"",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pr-8 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm",placeholder:"jane@exmaple.com"},null,512),[[u,this.auth.userId]]),x]),e("div",C,[e("div",g,[l(e("input",{name:"currentPassword",type:this.auth.passwordFieldType,"onUpdate:modelValue":s[1]||(s[1]=t=>this.auth.currentPassword=t),required:"",placeholder:"•••••",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm"},null,8,b),[[c,this.auth.currentPassword]]),_,e("div",v,[e("button",{type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5",onClick:s[2]||(s[2]=t=>this.auth.showPassword=!this.auth.showPassword)},[this.auth.showPassword?(o(),i("span",y,"Hide")):(o(),i("span",V,"Show"))])])])]),H],32)])])])}const q=n(p,[["render",k]]);export{q as default}; +import{_ as n,u as a,o,c as i,a as e,w as d,b as l,v as u,d as c}from"./index-29023b3f.js";const p={setup(){return{auth:a()}}},h={class:"flex flex-col justify-center py-12 sm:px-6 lg:px-8"},m={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},f={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},w={class:"relative mt-1"},x=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon email-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M2.5 7.65149V15.0757C2.5 15.4374 2.64367 15.7842 2.8994 16.04C3.15513 16.2957 3.50198 16.4394 3.86364 16.4394H16.1364C16.498 16.4394 16.8449 16.2957 17.1006 16.04C17.3563 15.7842 17.5 15.4374 17.5 15.0757V7.65149",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"}),e("path",{d:"M17.5 7.57572V5.53026C17.5 5.1686 17.3563 4.82176 17.1006 4.56603C16.8449 4.31029 16.498 4.16663 16.1364 4.16663H3.86364C3.50198 4.16663 3.15513 4.31029 2.8994 4.56603C2.64367 4.82176 2.5 5.1686 2.5 5.53026V7.57572L10 10.8333L17.5 7.57572Z",stroke:"#74808B","stroke-miterlimit":"10","stroke-linecap":"square"})])],-1),C={class:"mt-1"},g={class:"relative"},b=["type"],_=e("div",{class:"absolute inset-y-0 left-0 flex items-center px-2"},[e("svg",{class:"field-icon password-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.0961 1.93768H10.0264C8.94806 1.92763 7.90976 2.34591 7.13951 3.10075C6.36866 3.85619 5.9294 4.88687 5.91833 5.96612L5.91831 5.96612V5.97124V6.52695H4.3125C3.20793 6.52695 2.3125 7.42238 2.3125 8.52695V16.0165C2.3125 17.121 3.20793 18.0165 4.3125 18.0165H15.7356C16.8401 18.0165 17.7356 17.121 17.7356 16.0165V8.52695C17.7356 7.42238 16.8401 6.52695 15.7356 6.52695H14.1297V6.04576C14.1397 4.96742 13.7214 3.92913 12.9666 3.15888C12.2112 2.38803 11.1805 1.94877 10.1012 1.9377V1.93768H10.0961ZM13.1297 6.52695V6.04336V6.03838H13.1297C13.1378 5.22428 12.8222 4.44029 12.2524 3.85881C11.6831 3.27793 10.9067 2.94667 10.0934 2.93768H10.024H10.019V2.93765C9.20491 2.92955 8.42092 3.24512 7.83944 3.81497C7.25856 4.38423 6.9273 5.1607 6.91831 5.9739V6.52695H13.1297ZM4.3125 7.52695C3.76022 7.52695 3.3125 7.97467 3.3125 8.52695V16.0165C3.3125 16.5687 3.76022 17.0165 4.3125 17.0165H15.7356C16.2879 17.0165 16.7356 16.5687 16.7356 16.0165V8.52695C16.7356 7.97467 16.2879 7.52695 15.7356 7.52695H4.3125ZM10.0242 13.2384C10.5581 13.2384 10.9909 12.8056 10.9909 12.2717C10.9909 11.7377 10.5581 11.3049 10.0242 11.3049C9.49023 11.3049 9.05738 11.7377 9.05738 12.2717C9.05738 12.8056 9.49023 13.2384 10.0242 13.2384ZM11.9909 12.2717C11.9909 13.3579 11.1104 14.2384 10.0242 14.2384C8.93794 14.2384 8.05738 13.3579 8.05738 12.2717C8.05738 11.1854 8.93794 10.3049 10.0242 10.3049C11.1104 10.3049 11.9909 11.1854 11.9909 12.2717Z",fill:"#74808B"})])],-1),v={class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5"},y={key:0,class:"text-gray-400"},V={key:1,class:"text-gray-400"},H=e("div",null,[e("button",{type:"submit",class:"flex w-full justify-center rounded-md border border-transparent bg-blue-600 py-2 px-4 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}," Sign in ")],-1);function k(r,s,M,B,P,Z){return o(),i("div",h,[e("div",m,[e("div",f,[e("form",{class:"space-y-6",onSubmit:s[3]||(s[3]=d((...t)=>this.auth.login&&this.auth.login(...t),["prevent"]))},[e("div",w,[l(e("input",{name:"user_id","onUpdate:modelValue":s[0]||(s[0]=t=>this.auth.userId=t),required:"",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pr-8 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm",placeholder:"jane@exmaple.com"},null,512),[[u,this.auth.userId]]),x]),e("div",C,[e("div",g,[l(e("input",{name:"currentPassword",type:this.auth.passwordFieldType,"onUpdate:modelValue":s[1]||(s[1]=t=>this.auth.currentPassword=t),required:"",placeholder:"•••••",class:"block w-full appearance-none rounded-md border border-gray-300 px-3 py-2 pl-10 placeholder-gray-400 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-blue-500 sm:text-sm"},null,8,b),[[c,this.auth.currentPassword]]),_,e("div",v,[e("button",{type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 text-sm leading-5",onClick:s[2]||(s[2]=t=>this.auth.showPassword=!this.auth.showPassword)},[this.auth.showPassword?(o(),i("span",y,"Hide")):(o(),i("span",V,"Show"))])])])]),H],32)])])])}const q=n(p,[["render",k]]);export{q as default}; diff --git a/ury_pos/public/urypos/assets/index-e6ebee7c.js b/ury_pos/public/urypos/assets/index-29023b3f.js similarity index 99% rename from ury_pos/public/urypos/assets/index-e6ebee7c.js rename to ury_pos/public/urypos/assets/index-29023b3f.js index 1418550..2daf7dd 100644 --- a/ury_pos/public/urypos/assets/index-e6ebee7c.js +++ b/ury_pos/public/urypos/assets/index-29023b3f.js @@ -6,7 +6,7 @@ var Um=Object.defineProperty,qm=Object.defineProperties;var Km=Object.getOwnProp * vue-router v4.2.4 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Ds=typeof window!="undefined";function Ly(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const qe=Object.assign;function Tu(e,t){const r={};for(const n in t){const s=t[n];r[n]=wr(s)?s.map(e):e(s)}return r}const Pi=()=>{},wr=Array.isArray,Vy=/\/$/,Uy=e=>e.replace(Vy,"");function Fu(e,t,r="/"){let n,s={},i="",a="";const o=t.indexOf("#");let u=t.indexOf("?");return o=0&&(u=-1),u>-1&&(n=t.slice(0,u),i=t.slice(u+1,o>-1?o:t.length),s=e(i)),o>-1&&(n=n||t.slice(0,o),a=t.slice(o,t.length)),n=zy(n!=null?n:t,r),{fullPath:n+(i&&"?")+i+a,path:n,query:s,hash:a}}function qy(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function cf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ky(e,t,r){const n=t.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Gs(t.matched[n],r.matched[s])&&t0(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function t0(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!Yy(e[r],t[r]))return!1;return!0}function Yy(e,t){return wr(e)?hf(e,t):wr(t)?hf(t,e):e===t}function hf(e,t){return wr(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function zy(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),n=e.split("/"),s=n[n.length-1];(s===".."||s===".")&&n.push("");let i=r.length-1,a,o;for(a=0;a1&&i--;else break;return r.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var zi;(function(e){e.pop="pop",e.push="push"})(zi||(zi={}));var Di;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Di||(Di={}));function Wy(e){if(!e)if(Ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Uy(e)}const Gy=/^[^#]+#/;function Jy(e,t){return e.replace(Gy,"#")+t}function Xy(e,t){const r=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-r.left-(t.left||0),top:n.top-r.top-(t.top||0)}}const $o=()=>({left:window.pageXOffset,top:window.pageYOffset});function Zy(e){let t;if("el"in e){const r=e.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;t=Xy(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ff(e,t){return(history.state?history.state.position-t:-1)+e}const fl=new Map;function Qy(e,t){fl.set(e,t)}function eb(e){const t=fl.get(e);return fl.delete(e),t}let tb=()=>location.protocol+"//"+location.host;function r0(e,t){const{pathname:r,search:n,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(o);return u[0]!=="/"&&(u="/"+u),cf(u,"")}return cf(r,e)+n+s}function rb(e,t,r,n){let s=[],i=[],a=null;const o=({state:c})=>{const f=r0(e,location),p=r.value,g=t.value;let m=0;if(c){if(r.value=f,t.value=c,a&&a===p){a=null;return}m=g?c.position-g.position:0}else n(f);s.forEach(y=>{y(r.value,p,{delta:m,type:zi.pop,direction:m?m>0?Di.forward:Di.back:Di.unknown})})};function u(){a=r.value}function l(c){s.push(c);const f=()=>{const p=s.indexOf(c);p>-1&&s.splice(p,1)};return i.push(f),f}function h(){const{history:c}=window;c.state&&c.replaceState(qe({},c.state,{scroll:$o()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",o),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",o),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function df(e,t,r,n=!1,s=!1){return{back:e,current:t,forward:r,replaced:n,position:window.history.length,scroll:s?$o():null}}function nb(e){const{history:t,location:r}=window,n={value:r0(e,r)},s={value:t.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,l,h){const d=e.indexOf("#"),c=d>-1?(r.host&&document.querySelector("base")?e:e.slice(d))+u:tb()+e+u;try{t[h?"replaceState":"pushState"](l,"",c),s.value=l}catch(f){console.error(f),r[h?"replace":"assign"](c)}}function a(u,l){const h=qe({},t.state,df(s.value.back,u,s.value.forward,!0),l,{position:s.value.position});i(u,h,!0),n.value=u}function o(u,l){const h=qe({},s.value,t.state,{forward:u,scroll:$o()});i(h.current,h,!0);const d=qe({},df(n.value,u,null),{position:h.position+1},l);i(u,d,!1),n.value=u}return{location:n,state:s,push:o,replace:a}}function sb(e){e=Wy(e);const t=nb(e),r=rb(e,t.state,t.location,t.replace);function n(i,a=!0){a||r.pauseListeners(),history.go(i)}const s=qe({location:"",base:e,go:n,createHref:Jy.bind(null,e)},t,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ib(e){return typeof e=="string"||e&&typeof e=="object"}function n0(e){return typeof e=="string"||typeof e=="symbol"}const dn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},s0=Symbol("");var pf;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pf||(pf={}));function Js(e,t){return qe(new Error,{type:e,[s0]:!0},t)}function jr(e,t){return e instanceof Error&&s0 in e&&(t==null||!!(e.type&t))}const gf="[^/]+?",ab={sensitive:!1,strict:!1,start:!0,end:!0},ob=/[.+*?^${}()[\]/\\]/g;function ub(e,t){const r=qe({},ab,t),n=[];let s=r.start?"^":"";const i=[];for(const l of e){const h=l.length?[]:[90];r.strict&&!l.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function cb(e,t){let r=0;const n=e.score,s=t.score;for(;r0&&t[t.length-1]<0}const hb={type:0,value:""},fb=/[a-zA-Z0-9_]/;function db(e){if(!e)return[[]];if(e==="/")return[[hb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${r})/"${l}": ${f}`)}let r=0,n=r;const s=[];let i;function a(){i&&s.push(i),i=[]}let o=0,u,l="",h="";function d(){l&&(r===0?i.push({type:0,value:l}):r===1||r===2||r===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:l,regexp:h,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),l="")}function c(){l+=u}for(;o{a(x)}:Pi}function a(h){if(n0(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function o(){return r}function u(h){let d=0;for(;d=0&&(h.record.path!==r[d].record.path||!i0(h,r[d]));)d++;r.splice(d,0,h),h.record.name&&!yf(h)&&n.set(h.record.name,h)}function l(h,d){let c,f={},p,g;if("name"in h&&h.name){if(c=n.get(h.name),!c)throw Js(1,{location:h});g=c.record.name,f=qe(vf(d.params,c.keys.filter(x=>!x.optional).map(x=>x.name)),h.params&&vf(h.params,c.keys.map(x=>x.name))),p=c.stringify(f)}else if("path"in h)p=h.path,c=r.find(x=>x.re.test(p)),c&&(f=c.parse(p),g=c.record.name);else{if(c=d.name?n.get(d.name):r.find(x=>x.re.test(d.path)),!c)throw Js(1,{location:h,currentLocation:d});g=c.record.name,f=qe({},d.params,h.params),p=c.stringify(f)}const m=[];let y=c;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:p,params:f,matched:m,meta:yb(m)}}return e.forEach(h=>i(h)),{addRoute:i,resolve:l,removeRoute:a,getRoutes:o,getRecordMatcher:s}}function vf(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function mb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vb(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const n in e.components)t[n]=typeof r=="object"?r[n]:r;return t}function yf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yb(e){return e.reduce((t,r)=>qe(t,r.meta),{})}function bf(e,t){const r={};for(const n in e)r[n]=n in t?t[n]:e[n];return r}function i0(e,t){return t.children.some(r=>r===e||i0(e,r))}const a0=/#/g,bb=/&/g,wb=/\//g,xb=/=/g,Sb=/\?/g,o0=/\+/g,_b=/%5B/g,Eb=/%5D/g,u0=/%5E/g,Cb=/%60/g,l0=/%7B/g,kb=/%7C/g,c0=/%7D/g,Ab=/%20/g;function uc(e){return encodeURI(""+e).replace(kb,"|").replace(_b,"[").replace(Eb,"]")}function Pb(e){return uc(e).replace(l0,"{").replace(c0,"}").replace(u0,"^")}function dl(e){return uc(e).replace(o0,"%2B").replace(Ab,"+").replace(a0,"%23").replace(bb,"%26").replace(Cb,"`").replace(l0,"{").replace(c0,"}").replace(u0,"^")}function Db(e){return dl(e).replace(xb,"%3D")}function Tb(e){return uc(e).replace(a0,"%23").replace(Sb,"%3F")}function Fb(e){return e==null?"":Tb(e).replace(wb,"%2F")}function eo(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function Ob(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&dl(i)):[n&&dl(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+r,i!=null&&(t+="="+i))})}return t}function Rb(e){const t={};for(const r in e){const n=e[r];n!==void 0&&(t[r]=wr(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return t}const Ib=Symbol(""),xf=Symbol(""),lc=Symbol(""),h0=Symbol(""),pl=Symbol("");function pi(){let e=[];function t(n){return e.push(n),()=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function bn(e,t,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((a,o)=>{const u=d=>{d===!1?o(Js(4,{from:r,to:t})):d instanceof Error?o(d):ib(d)?o(Js(2,{from:t,to:d})):(i&&n.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),a())},l=e.call(n&&n.instances[s],t,r,u);let h=Promise.resolve(l);e.length<3&&(h=h.then(u)),h.catch(d=>o(d))})}function Ou(e,t,r,n){const s=[];for(const i of e)for(const a in i.components){let o=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Nb(o)){const l=(o.__vccOpts||o)[t];l&&s.push(bn(l,r,n,i,a))}else{let u=o();s.push(()=>u.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const h=Ly(l)?l.default:l;i.components[a]=h;const c=(h.__vccOpts||h)[t];return c&&bn(c,r,n,i,a)()}))}}return s}function Nb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Sf(e){const t=zt(lc),r=zt(h0),n=et(()=>t.resolve(An(e.to))),s=et(()=>{const{matched:u}=n.value,{length:l}=u,h=u[l-1],d=r.matched;if(!h||!d.length)return-1;const c=d.findIndex(Gs.bind(null,h));if(c>-1)return c;const f=_f(u[l-2]);return l>1&&_f(h)===f&&d[d.length-1].path!==f?d.findIndex(Gs.bind(null,u[l-2])):c}),i=et(()=>s.value>-1&&Hb(r.params,n.value.params)),a=et(()=>s.value>-1&&s.value===r.matched.length-1&&t0(r.params,n.value.params));function o(u={}){return $b(u)?t[An(e.replace)?"replace":"push"](An(e.to)).catch(Pi):Promise.resolve()}return{route:n,href:et(()=>n.value.href),isActive:i,isExactActive:a,navigate:o}}const Mb=Er({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Sf,setup(e,{slots:t}){const r=Ir(Sf(e)),{options:n}=zt(lc),s=et(()=>({[Ef(e.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[Ef(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=t.default&&t.default(r);return e.custom?i:Yi("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),Bb=Mb;function $b(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Hb(e,t){for(const r in t){const n=t[r],s=e[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wr(s)||s.length!==n.length||n.some((i,a)=>i!==s[a]))return!1}return!0}function _f(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ef=(e,t,r)=>e!=null?e:t!=null?t:r,jb=Er({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const n=zt(pl),s=et(()=>e.route||n.value),i=zt(xf,0),a=et(()=>{let l=An(i);const{matched:h}=s.value;let d;for(;(d=h[l])&&!d.components;)l++;return l}),o=et(()=>s.value.matched[a.value]);os(xf,et(()=>a.value+1)),os(Ib,o),os(pl,s);const u=tt();return $s(()=>[u.value,o.value,e.name],([l,h,d],[c,f,p])=>{h&&(h.instances[d]=l,f&&f!==h&&l&&l===c&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!Gs(h,f)||!c)&&(h.enterCallbacks[d]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=s.value,h=e.name,d=o.value,c=d&&d.components[h];if(!c)return Cf(r.default,{Component:c,route:l});const f=d.props[h],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=Yi(c,qe({},p,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[h]=null)},ref:u}));return Cf(r.default,{Component:m,route:l})||m}}});function Cf(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const Lb=jb;function Vb(e){const t=gb(e.routes,e),r=e.parseQuery||Ob,n=e.stringifyQuery||wf,s=e.history,i=pi(),a=pi(),o=pi(),u=fp(dn);let l=dn;Ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Tu.bind(null,L=>""+L),d=Tu.bind(null,Fb),c=Tu.bind(null,eo);function f(L,X){let J,ne;return n0(L)?(J=t.getRecordMatcher(L),ne=X):ne=L,t.addRoute(ne,J)}function p(L){const X=t.getRecordMatcher(L);X&&t.removeRoute(X)}function g(){return t.getRoutes().map(L=>L.record)}function m(L){return!!t.getRecordMatcher(L)}function y(L,X){if(X=qe({},X||u.value),typeof L=="string"){const H=Fu(r,L,X.path),U=t.resolve({path:H.path},X),Y=s.createHref(H.fullPath);return qe(H,U,{params:c(U.params),hash:eo(H.hash),redirectedFrom:void 0,href:Y})}let J;if("path"in L)J=qe({},L,{path:Fu(r,L.path,X.path).path});else{const H=qe({},L.params);for(const U in H)H[U]==null&&delete H[U];J=qe({},L,{params:d(H)}),X.params=d(X.params)}const ne=t.resolve(J,X),xe=L.hash||"";ne.params=h(c(ne.params));const O=qy(n,qe({},L,{hash:Pb(xe),path:ne.path})),I=s.createHref(O);return qe({fullPath:O,hash:xe,query:n===wf?Rb(L.query):L.query||{}},ne,{redirectedFrom:void 0,href:I})}function x(L){return typeof L=="string"?Fu(r,L,u.value.path):qe({},L)}function C(L,X){if(l!==L)return Js(8,{from:X,to:L})}function A(L){return _(L)}function P(L){return A(qe(x(L),{replace:!0}))}function b(L){const X=L.matched[L.matched.length-1];if(X&&X.redirect){const{redirect:J}=X;let ne=typeof J=="function"?J(L):J;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=x(ne):{path:ne},ne.params={}),qe({query:L.query,hash:L.hash,params:"path"in ne?{}:L.params},ne)}}function _(L,X){const J=l=y(L),ne=u.value,xe=L.state,O=L.force,I=L.replace===!0,H=b(J);if(H)return _(qe(x(H),{state:typeof H=="object"?qe({},xe,H.state):xe,force:O,replace:I}),X||J);const U=J;U.redirectedFrom=X;let Y;return!O&&Ky(n,ne,J)&&(Y=Js(16,{to:U,from:ne}),Pe(ne,ne,!0,!1)),(Y?Promise.resolve(Y):k(U,ne)).catch(G=>jr(G)?jr(G,2)?G:fe(G):re(G,U,ne)).then(G=>{if(G){if(jr(G,2))return _(qe({replace:I},x(G.to),{state:typeof G.to=="object"?qe({},xe,G.to.state):xe,force:O}),X||U)}else G=T(U,ne,!0,I,xe);return D(U,ne,G),G})}function S(L,X){const J=C(L,X);return J?Promise.reject(J):Promise.resolve()}function w(L){const X=Xe.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(L):L()}function k(L,X){let J;const[ne,xe,O]=Ub(L,X);J=Ou(ne.reverse(),"beforeRouteLeave",L,X);for(const H of ne)H.leaveGuards.forEach(U=>{J.push(bn(U,L,X))});const I=S.bind(null,L,X);return J.push(I),He(J).then(()=>{J=[];for(const H of i.list())J.push(bn(H,L,X));return J.push(I),He(J)}).then(()=>{J=Ou(xe,"beforeRouteUpdate",L,X);for(const H of xe)H.updateGuards.forEach(U=>{J.push(bn(U,L,X))});return J.push(I),He(J)}).then(()=>{J=[];for(const H of O)if(H.beforeEnter)if(wr(H.beforeEnter))for(const U of H.beforeEnter)J.push(bn(U,L,X));else J.push(bn(H.beforeEnter,L,X));return J.push(I),He(J)}).then(()=>(L.matched.forEach(H=>H.enterCallbacks={}),J=Ou(O,"beforeRouteEnter",L,X),J.push(I),He(J))).then(()=>{J=[];for(const H of a.list())J.push(bn(H,L,X));return J.push(I),He(J)}).catch(H=>jr(H,8)?H:Promise.reject(H))}function D(L,X,J){o.list().forEach(ne=>w(()=>ne(L,X,J)))}function T(L,X,J,ne,xe){const O=C(L,X);if(O)return O;const I=X===dn,H=Ds?history.state:{};J&&(ne||I?s.replace(L.fullPath,qe({scroll:I&&H&&H.scroll},xe)):s.push(L.fullPath,xe)),u.value=L,Pe(L,X,J,I),fe()}let M;function F(){M||(M=s.listen((L,X,J)=>{if(!_t.listening)return;const ne=y(L),xe=b(ne);if(xe){_(qe(xe,{replace:!0}),ne).catch(Pi);return}l=ne;const O=u.value;Ds&&Qy(ff(O.fullPath,J.delta),$o()),k(ne,O).catch(I=>jr(I,12)?I:jr(I,2)?(_(I.to,ne).then(H=>{jr(H,20)&&!J.delta&&J.type===zi.pop&&s.go(-1,!1)}).catch(Pi),Promise.reject()):(J.delta&&s.go(-J.delta,!1),re(I,ne,O))).then(I=>{I=I||T(ne,O,!1),I&&(J.delta&&!jr(I,8)?s.go(-J.delta,!1):J.type===zi.pop&&jr(I,20)&&s.go(-1,!1)),D(ne,O,I)}).catch(Pi)}))}let R=pi(),N=pi(),$;function re(L,X,J){fe(L);const ne=N.list();return ne.length?ne.forEach(xe=>xe(L,X,J)):console.error(L),Promise.reject(L)}function de(){return $&&u.value!==dn?Promise.resolve():new Promise((L,X)=>{R.add([L,X])})}function fe(L){return $||($=!L,F(),R.list().forEach(([X,J])=>L?J(L):X()),R.reset()),L}function Pe(L,X,J,ne){const{scrollBehavior:xe}=e;if(!Ds||!xe)return Promise.resolve();const O=!J&&eb(ff(L.fullPath,0))||(ne||!J)&&history.state&&history.state.scroll||null;return Do().then(()=>xe(L,X,O)).then(I=>I&&Zy(I)).catch(I=>re(I,L,X))}const Fe=L=>s.go(L);let Ze;const Xe=new Set,_t={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,hasRoute:m,getRoutes:g,resolve:y,options:e,push:A,replace:P,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:i.add,beforeResolve:a.add,afterEach:o.add,onError:N.add,isReady:de,install(L){const X=this;L.component("RouterLink",Bb),L.component("RouterView",Lb),L.config.globalProperties.$router=X,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>An(u)}),Ds&&!Ze&&u.value===dn&&(Ze=!0,A(s.location).catch(xe=>{}));const J={};for(const xe in dn)Object.defineProperty(J,xe,{get:()=>u.value[xe],enumerable:!0});L.provide(lc,X),L.provide(h0,op(J)),L.provide(pl,u);const ne=L.unmount;Xe.add(L),L.unmount=function(){Xe.delete(L),Xe.size<1&&(l=dn,M&&M(),M=null,u.value=dn,Ze=!1,$=!1),ne()}}};function He(L){return L.reduce((X,J)=>X.then(()=>w(J)),Promise.resolve())}return _t}function Ub(e,t){const r=[],n=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aGs(l,o))?n.push(o):r.push(o));const u=e.matched[a];u&&(t.matched.find(l=>Gs(l,u))||s.push(u))}return[r,n,s]}const qb="modulepreload",Kb=function(e){return"/assets/ury_pos/urypos/"+e},kf={},Yb=function(t,r,n){if(!r||r.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Kb(i),i in kf)return;kf[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let h=s.length-1;h>=0;h--){const d=s[h];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":qb,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((h,d)=>{l.addEventListener("load",h),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},zb=[{path:"/login",name:"Login",component:()=>Yb(()=>import("./Login-e2605211.js"),[]),meta:{isLoginPage:!0},props:!0}],ra=Mr("notification",{state:()=>({}),actions:{createNotification(e){const t=document.createElement("div");t.classList.add("fixed","bottom-20","right-5"),document.body.appendChild(t);const r=document.createElement("div");r.classList.add("bg-green-100","text-dark","py-2","px-2","mr-3"),r.style.borderRadius="5px",r.style.width="400px",r.style.height="65px",window.matchMedia("(max-width: 640px)").matches&&(r.style.width="300px");const s=document.createElement("span");s.innerHTML=` + */const Ds=typeof window!="undefined";function Ly(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const qe=Object.assign;function Tu(e,t){const r={};for(const n in t){const s=t[n];r[n]=wr(s)?s.map(e):e(s)}return r}const Pi=()=>{},wr=Array.isArray,Vy=/\/$/,Uy=e=>e.replace(Vy,"");function Fu(e,t,r="/"){let n,s={},i="",a="";const o=t.indexOf("#");let u=t.indexOf("?");return o=0&&(u=-1),u>-1&&(n=t.slice(0,u),i=t.slice(u+1,o>-1?o:t.length),s=e(i)),o>-1&&(n=n||t.slice(0,o),a=t.slice(o,t.length)),n=zy(n!=null?n:t,r),{fullPath:n+(i&&"?")+i+a,path:n,query:s,hash:a}}function qy(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function cf(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Ky(e,t,r){const n=t.matched.length-1,s=r.matched.length-1;return n>-1&&n===s&&Gs(t.matched[n],r.matched[s])&&t0(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function t0(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!Yy(e[r],t[r]))return!1;return!0}function Yy(e,t){return wr(e)?hf(e,t):wr(t)?hf(t,e):e===t}function hf(e,t){return wr(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function zy(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),n=e.split("/"),s=n[n.length-1];(s===".."||s===".")&&n.push("");let i=r.length-1,a,o;for(a=0;a1&&i--;else break;return r.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var zi;(function(e){e.pop="pop",e.push="push"})(zi||(zi={}));var Di;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Di||(Di={}));function Wy(e){if(!e)if(Ds){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Uy(e)}const Gy=/^[^#]+#/;function Jy(e,t){return e.replace(Gy,"#")+t}function Xy(e,t){const r=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-r.left-(t.left||0),top:n.top-r.top-(t.top||0)}}const $o=()=>({left:window.pageXOffset,top:window.pageYOffset});function Zy(e){let t;if("el"in e){const r=e.el,n=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;t=Xy(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function ff(e,t){return(history.state?history.state.position-t:-1)+e}const fl=new Map;function Qy(e,t){fl.set(e,t)}function eb(e){const t=fl.get(e);return fl.delete(e),t}let tb=()=>location.protocol+"//"+location.host;function r0(e,t){const{pathname:r,search:n,hash:s}=t,i=e.indexOf("#");if(i>-1){let o=s.includes(e.slice(i))?e.slice(i).length:1,u=s.slice(o);return u[0]!=="/"&&(u="/"+u),cf(u,"")}return cf(r,e)+n+s}function rb(e,t,r,n){let s=[],i=[],a=null;const o=({state:c})=>{const f=r0(e,location),p=r.value,g=t.value;let m=0;if(c){if(r.value=f,t.value=c,a&&a===p){a=null;return}m=g?c.position-g.position:0}else n(f);s.forEach(y=>{y(r.value,p,{delta:m,type:zi.pop,direction:m?m>0?Di.forward:Di.back:Di.unknown})})};function u(){a=r.value}function l(c){s.push(c);const f=()=>{const p=s.indexOf(c);p>-1&&s.splice(p,1)};return i.push(f),f}function h(){const{history:c}=window;c.state&&c.replaceState(qe({},c.state,{scroll:$o()}),"")}function d(){for(const c of i)c();i=[],window.removeEventListener("popstate",o),window.removeEventListener("beforeunload",h)}return window.addEventListener("popstate",o),window.addEventListener("beforeunload",h,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function df(e,t,r,n=!1,s=!1){return{back:e,current:t,forward:r,replaced:n,position:window.history.length,scroll:s?$o():null}}function nb(e){const{history:t,location:r}=window,n={value:r0(e,r)},s={value:t.state};s.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,l,h){const d=e.indexOf("#"),c=d>-1?(r.host&&document.querySelector("base")?e:e.slice(d))+u:tb()+e+u;try{t[h?"replaceState":"pushState"](l,"",c),s.value=l}catch(f){console.error(f),r[h?"replace":"assign"](c)}}function a(u,l){const h=qe({},t.state,df(s.value.back,u,s.value.forward,!0),l,{position:s.value.position});i(u,h,!0),n.value=u}function o(u,l){const h=qe({},s.value,t.state,{forward:u,scroll:$o()});i(h.current,h,!0);const d=qe({},df(n.value,u,null),{position:h.position+1},l);i(u,d,!1),n.value=u}return{location:n,state:s,push:o,replace:a}}function sb(e){e=Wy(e);const t=nb(e),r=rb(e,t.state,t.location,t.replace);function n(i,a=!0){a||r.pauseListeners(),history.go(i)}const s=qe({location:"",base:e,go:n,createHref:Jy.bind(null,e)},t,r);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ib(e){return typeof e=="string"||e&&typeof e=="object"}function n0(e){return typeof e=="string"||typeof e=="symbol"}const dn={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},s0=Symbol("");var pf;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pf||(pf={}));function Js(e,t){return qe(new Error,{type:e,[s0]:!0},t)}function jr(e,t){return e instanceof Error&&s0 in e&&(t==null||!!(e.type&t))}const gf="[^/]+?",ab={sensitive:!1,strict:!1,start:!0,end:!0},ob=/[.+*?^${}()[\]/\\]/g;function ub(e,t){const r=qe({},ab,t),n=[];let s=r.start?"^":"";const i=[];for(const l of e){const h=l.length?[]:[90];r.strict&&!l.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===40+40?1:-1:0}function cb(e,t){let r=0;const n=e.score,s=t.score;for(;r0&&t[t.length-1]<0}const hb={type:0,value:""},fb=/[a-zA-Z0-9_]/;function db(e){if(!e)return[[]];if(e==="/")return[[hb]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${r})/"${l}": ${f}`)}let r=0,n=r;const s=[];let i;function a(){i&&s.push(i),i=[]}let o=0,u,l="",h="";function d(){l&&(r===0?i.push({type:0,value:l}):r===1||r===2||r===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:l,regexp:h,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),l="")}function c(){l+=u}for(;o{a(x)}:Pi}function a(h){if(n0(h)){const d=n.get(h);d&&(n.delete(h),r.splice(r.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=r.indexOf(h);d>-1&&(r.splice(d,1),h.record.name&&n.delete(h.record.name),h.children.forEach(a),h.alias.forEach(a))}}function o(){return r}function u(h){let d=0;for(;d=0&&(h.record.path!==r[d].record.path||!i0(h,r[d]));)d++;r.splice(d,0,h),h.record.name&&!yf(h)&&n.set(h.record.name,h)}function l(h,d){let c,f={},p,g;if("name"in h&&h.name){if(c=n.get(h.name),!c)throw Js(1,{location:h});g=c.record.name,f=qe(vf(d.params,c.keys.filter(x=>!x.optional).map(x=>x.name)),h.params&&vf(h.params,c.keys.map(x=>x.name))),p=c.stringify(f)}else if("path"in h)p=h.path,c=r.find(x=>x.re.test(p)),c&&(f=c.parse(p),g=c.record.name);else{if(c=d.name?n.get(d.name):r.find(x=>x.re.test(d.path)),!c)throw Js(1,{location:h,currentLocation:d});g=c.record.name,f=qe({},d.params,h.params),p=c.stringify(f)}const m=[];let y=c;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:p,params:f,matched:m,meta:yb(m)}}return e.forEach(h=>i(h)),{addRoute:i,resolve:l,removeRoute:a,getRoutes:o,getRecordMatcher:s}}function vf(e,t){const r={};for(const n of t)n in e&&(r[n]=e[n]);return r}function mb(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:vb(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function vb(e){const t={},r=e.props||!1;if("component"in e)t.default=r;else for(const n in e.components)t[n]=typeof r=="object"?r[n]:r;return t}function yf(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yb(e){return e.reduce((t,r)=>qe(t,r.meta),{})}function bf(e,t){const r={};for(const n in e)r[n]=n in t?t[n]:e[n];return r}function i0(e,t){return t.children.some(r=>r===e||i0(e,r))}const a0=/#/g,bb=/&/g,wb=/\//g,xb=/=/g,Sb=/\?/g,o0=/\+/g,_b=/%5B/g,Eb=/%5D/g,u0=/%5E/g,Cb=/%60/g,l0=/%7B/g,kb=/%7C/g,c0=/%7D/g,Ab=/%20/g;function uc(e){return encodeURI(""+e).replace(kb,"|").replace(_b,"[").replace(Eb,"]")}function Pb(e){return uc(e).replace(l0,"{").replace(c0,"}").replace(u0,"^")}function dl(e){return uc(e).replace(o0,"%2B").replace(Ab,"+").replace(a0,"%23").replace(bb,"%26").replace(Cb,"`").replace(l0,"{").replace(c0,"}").replace(u0,"^")}function Db(e){return dl(e).replace(xb,"%3D")}function Tb(e){return uc(e).replace(a0,"%23").replace(Sb,"%3F")}function Fb(e){return e==null?"":Tb(e).replace(wb,"%2F")}function eo(e){try{return decodeURIComponent(""+e)}catch(t){}return""+e}function Ob(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&dl(i)):[n&&dl(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+r,i!=null&&(t+="="+i))})}return t}function Rb(e){const t={};for(const r in e){const n=e[r];n!==void 0&&(t[r]=wr(n)?n.map(s=>s==null?null:""+s):n==null?n:""+n)}return t}const Ib=Symbol(""),xf=Symbol(""),lc=Symbol(""),h0=Symbol(""),pl=Symbol("");function pi(){let e=[];function t(n){return e.push(n),()=>{const s=e.indexOf(n);s>-1&&e.splice(s,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function bn(e,t,r,n,s){const i=n&&(n.enterCallbacks[s]=n.enterCallbacks[s]||[]);return()=>new Promise((a,o)=>{const u=d=>{d===!1?o(Js(4,{from:r,to:t})):d instanceof Error?o(d):ib(d)?o(Js(2,{from:t,to:d})):(i&&n.enterCallbacks[s]===i&&typeof d=="function"&&i.push(d),a())},l=e.call(n&&n.instances[s],t,r,u);let h=Promise.resolve(l);e.length<3&&(h=h.then(u)),h.catch(d=>o(d))})}function Ou(e,t,r,n){const s=[];for(const i of e)for(const a in i.components){let o=i.components[a];if(!(t!=="beforeRouteEnter"&&!i.instances[a]))if(Nb(o)){const l=(o.__vccOpts||o)[t];l&&s.push(bn(l,r,n,i,a))}else{let u=o();s.push(()=>u.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${i.path}"`));const h=Ly(l)?l.default:l;i.components[a]=h;const c=(h.__vccOpts||h)[t];return c&&bn(c,r,n,i,a)()}))}}return s}function Nb(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Sf(e){const t=zt(lc),r=zt(h0),n=et(()=>t.resolve(An(e.to))),s=et(()=>{const{matched:u}=n.value,{length:l}=u,h=u[l-1],d=r.matched;if(!h||!d.length)return-1;const c=d.findIndex(Gs.bind(null,h));if(c>-1)return c;const f=_f(u[l-2]);return l>1&&_f(h)===f&&d[d.length-1].path!==f?d.findIndex(Gs.bind(null,u[l-2])):c}),i=et(()=>s.value>-1&&Hb(r.params,n.value.params)),a=et(()=>s.value>-1&&s.value===r.matched.length-1&&t0(r.params,n.value.params));function o(u={}){return $b(u)?t[An(e.replace)?"replace":"push"](An(e.to)).catch(Pi):Promise.resolve()}return{route:n,href:et(()=>n.value.href),isActive:i,isExactActive:a,navigate:o}}const Mb=Er({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Sf,setup(e,{slots:t}){const r=Ir(Sf(e)),{options:n}=zt(lc),s=et(()=>({[Ef(e.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[Ef(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const i=t.default&&t.default(r);return e.custom?i:Yi("a",{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),Bb=Mb;function $b(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Hb(e,t){for(const r in t){const n=t[r],s=e[r];if(typeof n=="string"){if(n!==s)return!1}else if(!wr(s)||s.length!==n.length||n.some((i,a)=>i!==s[a]))return!1}return!0}function _f(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Ef=(e,t,r)=>e!=null?e:t!=null?t:r,jb=Er({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:r}){const n=zt(pl),s=et(()=>e.route||n.value),i=zt(xf,0),a=et(()=>{let l=An(i);const{matched:h}=s.value;let d;for(;(d=h[l])&&!d.components;)l++;return l}),o=et(()=>s.value.matched[a.value]);os(xf,et(()=>a.value+1)),os(Ib,o),os(pl,s);const u=tt();return $s(()=>[u.value,o.value,e.name],([l,h,d],[c,f,p])=>{h&&(h.instances[d]=l,f&&f!==h&&l&&l===c&&(h.leaveGuards.size||(h.leaveGuards=f.leaveGuards),h.updateGuards.size||(h.updateGuards=f.updateGuards))),l&&h&&(!f||!Gs(h,f)||!c)&&(h.enterCallbacks[d]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=s.value,h=e.name,d=o.value,c=d&&d.components[h];if(!c)return Cf(r.default,{Component:c,route:l});const f=d.props[h],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=Yi(c,qe({},p,t,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[h]=null)},ref:u}));return Cf(r.default,{Component:m,route:l})||m}}});function Cf(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}const Lb=jb;function Vb(e){const t=gb(e.routes,e),r=e.parseQuery||Ob,n=e.stringifyQuery||wf,s=e.history,i=pi(),a=pi(),o=pi(),u=fp(dn);let l=dn;Ds&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const h=Tu.bind(null,L=>""+L),d=Tu.bind(null,Fb),c=Tu.bind(null,eo);function f(L,X){let J,ne;return n0(L)?(J=t.getRecordMatcher(L),ne=X):ne=L,t.addRoute(ne,J)}function p(L){const X=t.getRecordMatcher(L);X&&t.removeRoute(X)}function g(){return t.getRoutes().map(L=>L.record)}function m(L){return!!t.getRecordMatcher(L)}function y(L,X){if(X=qe({},X||u.value),typeof L=="string"){const H=Fu(r,L,X.path),U=t.resolve({path:H.path},X),Y=s.createHref(H.fullPath);return qe(H,U,{params:c(U.params),hash:eo(H.hash),redirectedFrom:void 0,href:Y})}let J;if("path"in L)J=qe({},L,{path:Fu(r,L.path,X.path).path});else{const H=qe({},L.params);for(const U in H)H[U]==null&&delete H[U];J=qe({},L,{params:d(H)}),X.params=d(X.params)}const ne=t.resolve(J,X),xe=L.hash||"";ne.params=h(c(ne.params));const O=qy(n,qe({},L,{hash:Pb(xe),path:ne.path})),I=s.createHref(O);return qe({fullPath:O,hash:xe,query:n===wf?Rb(L.query):L.query||{}},ne,{redirectedFrom:void 0,href:I})}function x(L){return typeof L=="string"?Fu(r,L,u.value.path):qe({},L)}function C(L,X){if(l!==L)return Js(8,{from:X,to:L})}function A(L){return _(L)}function P(L){return A(qe(x(L),{replace:!0}))}function b(L){const X=L.matched[L.matched.length-1];if(X&&X.redirect){const{redirect:J}=X;let ne=typeof J=="function"?J(L):J;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=x(ne):{path:ne},ne.params={}),qe({query:L.query,hash:L.hash,params:"path"in ne?{}:L.params},ne)}}function _(L,X){const J=l=y(L),ne=u.value,xe=L.state,O=L.force,I=L.replace===!0,H=b(J);if(H)return _(qe(x(H),{state:typeof H=="object"?qe({},xe,H.state):xe,force:O,replace:I}),X||J);const U=J;U.redirectedFrom=X;let Y;return!O&&Ky(n,ne,J)&&(Y=Js(16,{to:U,from:ne}),Pe(ne,ne,!0,!1)),(Y?Promise.resolve(Y):k(U,ne)).catch(G=>jr(G)?jr(G,2)?G:fe(G):re(G,U,ne)).then(G=>{if(G){if(jr(G,2))return _(qe({replace:I},x(G.to),{state:typeof G.to=="object"?qe({},xe,G.to.state):xe,force:O}),X||U)}else G=T(U,ne,!0,I,xe);return D(U,ne,G),G})}function S(L,X){const J=C(L,X);return J?Promise.reject(J):Promise.resolve()}function w(L){const X=Xe.values().next().value;return X&&typeof X.runWithContext=="function"?X.runWithContext(L):L()}function k(L,X){let J;const[ne,xe,O]=Ub(L,X);J=Ou(ne.reverse(),"beforeRouteLeave",L,X);for(const H of ne)H.leaveGuards.forEach(U=>{J.push(bn(U,L,X))});const I=S.bind(null,L,X);return J.push(I),He(J).then(()=>{J=[];for(const H of i.list())J.push(bn(H,L,X));return J.push(I),He(J)}).then(()=>{J=Ou(xe,"beforeRouteUpdate",L,X);for(const H of xe)H.updateGuards.forEach(U=>{J.push(bn(U,L,X))});return J.push(I),He(J)}).then(()=>{J=[];for(const H of O)if(H.beforeEnter)if(wr(H.beforeEnter))for(const U of H.beforeEnter)J.push(bn(U,L,X));else J.push(bn(H.beforeEnter,L,X));return J.push(I),He(J)}).then(()=>(L.matched.forEach(H=>H.enterCallbacks={}),J=Ou(O,"beforeRouteEnter",L,X),J.push(I),He(J))).then(()=>{J=[];for(const H of a.list())J.push(bn(H,L,X));return J.push(I),He(J)}).catch(H=>jr(H,8)?H:Promise.reject(H))}function D(L,X,J){o.list().forEach(ne=>w(()=>ne(L,X,J)))}function T(L,X,J,ne,xe){const O=C(L,X);if(O)return O;const I=X===dn,H=Ds?history.state:{};J&&(ne||I?s.replace(L.fullPath,qe({scroll:I&&H&&H.scroll},xe)):s.push(L.fullPath,xe)),u.value=L,Pe(L,X,J,I),fe()}let M;function F(){M||(M=s.listen((L,X,J)=>{if(!_t.listening)return;const ne=y(L),xe=b(ne);if(xe){_(qe(xe,{replace:!0}),ne).catch(Pi);return}l=ne;const O=u.value;Ds&&Qy(ff(O.fullPath,J.delta),$o()),k(ne,O).catch(I=>jr(I,12)?I:jr(I,2)?(_(I.to,ne).then(H=>{jr(H,20)&&!J.delta&&J.type===zi.pop&&s.go(-1,!1)}).catch(Pi),Promise.reject()):(J.delta&&s.go(-J.delta,!1),re(I,ne,O))).then(I=>{I=I||T(ne,O,!1),I&&(J.delta&&!jr(I,8)?s.go(-J.delta,!1):J.type===zi.pop&&jr(I,20)&&s.go(-1,!1)),D(ne,O,I)}).catch(Pi)}))}let R=pi(),N=pi(),$;function re(L,X,J){fe(L);const ne=N.list();return ne.length?ne.forEach(xe=>xe(L,X,J)):console.error(L),Promise.reject(L)}function de(){return $&&u.value!==dn?Promise.resolve():new Promise((L,X)=>{R.add([L,X])})}function fe(L){return $||($=!L,F(),R.list().forEach(([X,J])=>L?J(L):X()),R.reset()),L}function Pe(L,X,J,ne){const{scrollBehavior:xe}=e;if(!Ds||!xe)return Promise.resolve();const O=!J&&eb(ff(L.fullPath,0))||(ne||!J)&&history.state&&history.state.scroll||null;return Do().then(()=>xe(L,X,O)).then(I=>I&&Zy(I)).catch(I=>re(I,L,X))}const Fe=L=>s.go(L);let Ze;const Xe=new Set,_t={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,hasRoute:m,getRoutes:g,resolve:y,options:e,push:A,replace:P,go:Fe,back:()=>Fe(-1),forward:()=>Fe(1),beforeEach:i.add,beforeResolve:a.add,afterEach:o.add,onError:N.add,isReady:de,install(L){const X=this;L.component("RouterLink",Bb),L.component("RouterView",Lb),L.config.globalProperties.$router=X,Object.defineProperty(L.config.globalProperties,"$route",{enumerable:!0,get:()=>An(u)}),Ds&&!Ze&&u.value===dn&&(Ze=!0,A(s.location).catch(xe=>{}));const J={};for(const xe in dn)Object.defineProperty(J,xe,{get:()=>u.value[xe],enumerable:!0});L.provide(lc,X),L.provide(h0,op(J)),L.provide(pl,u);const ne=L.unmount;Xe.add(L),L.unmount=function(){Xe.delete(L),Xe.size<1&&(l=dn,M&&M(),M=null,u.value=dn,Ze=!1,$=!1),ne()}}};function He(L){return L.reduce((X,J)=>X.then(()=>w(J)),Promise.resolve())}return _t}function Ub(e,t){const r=[],n=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aGs(l,o))?n.push(o):r.push(o));const u=e.matched[a];u&&(t.matched.find(l=>Gs(l,u))||s.push(u))}return[r,n,s]}const qb="modulepreload",Kb=function(e){return"/assets/ury_pos/urypos/"+e},kf={},Yb=function(t,r,n){if(!r||r.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=Kb(i),i in kf)return;kf[i]=!0;const a=i.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!n)for(let h=s.length-1;h>=0;h--){const d=s[h];if(d.href===i&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${o}`))return;const l=document.createElement("link");if(l.rel=a?"stylesheet":qb,a||(l.as="script",l.crossOrigin=""),l.href=i,document.head.appendChild(l),a)return new Promise((h,d)=>{l.addEventListener("load",h),l.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},zb=[{path:"/login",name:"Login",component:()=>Yb(()=>import("./Login-74a82d5d.js"),[]),meta:{isLoginPage:!0},props:!0}],ra=Mr("notification",{state:()=>({}),actions:{createNotification(e){const t=document.createElement("div");t.classList.add("fixed","bottom-20","right-5"),document.body.appendChild(t);const r=document.createElement("div");r.classList.add("bg-green-100","text-dark","py-2","px-2","mr-3"),r.style.borderRadius="5px",r.style.width="400px",r.style.height="65px",window.matchMedia("(max-width: 640px)").matches&&(r.style.width="300px");const s=document.createElement("span");s.innerHTML=` Close @@ -18,7 +18,7 @@ var Um=Object.defineProperty,qm=Object.defineProperties;var Km=Object.getOwnProp

${t}

- `,i.appendChild(a),a.querySelector("button").addEventListener("click",()=>{i.remove(),s.remove(),n(),this.auth.isPosOpen===!1&&this.auth.isPosOpenChecking(),this.okButtonClicked=!0})})}}}),ps=Mr("menu",{state:()=>({items:[],cart:[],searchTerm:"",showAll:!0,showPriority:!1,currentPage:1,perPage:20,comments:"",alert:Mn(),invoiceData:ur(),auth:cr(),notification:ra(),table:ws(),showDialog:!1,showDialogCart:!1,quantity:"",item:[],itemComments:"",call:Dt.call()}),getters:{filteredItems(e){if(typeof e.searchTerm!="string"||e.searchTerm.trim()==="")return e.showAll?e.items:e.items.filter(t=>t.special_dish===1);{const t=e.searchTerm.toLowerCase();return e.items.filter(r=>typeof r.item_name=="string"&&typeof r.item=="string"&&(r.item_name.toLowerCase().includes(t)||r.item.toLowerCase().includes(t)))}},totalPages(){return Math.ceil(this.filteredItems.length/this.perPage)},paginatedItems(){const e=(this.currentPage-1)*this.perPage,t=e+this.perPage;return this.filteredItems.slice(e,t)},pageNumbers(){const e=[];for(let t=1;t<=this.totalPages;t++)e.push(t);return e}},actions:{fetchItems(){const e={pos_profile:this.invoiceData.posProfile};this.call.get("ury.ury_pos.api.getRestaurantMenu",e).then(t=>{!this.auth.cashier&&this.table.tableMenu?this.items=this.table.tableMenu:this.items=t.message,this.items.forEach(r=>{r.special_dish==1&&(this.showPriority=!0)})}).catch(t=>{if(t._server_messages){const r=JSON.parse(t._server_messages),n=JSON.parse(r[0]);this.alert.createAlert("Message",n.message,"OK")}})},updateSearchTerm(){this.currentPage=1},handleSearchInput(e){this.searchTerm=e.target.value,this.updateSearchTerm()},clearSearch(e){e.target.value="",this.searchTerm="",this.showAll=!0},showAllItems(){this.showAll=!0},showSpecialItems(){this.showAll=!1},showModal(e){this.showDialog=!0,this.quantity=e.qty,this.item=e,this.itemComments=e.comment},addToCartAndUpdateQty(){const e=this.item;e.qty?(e.qty=this.quantity,e.comment=this.itemComments):this.$set(e,"qty",this.quantity),this.showDialog=!1},getitemQty(e){e.qty=this.cart.qty},addToCart(e){if(!(this.cart.findIndex(n=>n.item===e.item)!==-1)){e.qty=1,e.comment="",this.cart.push(e);let n=`Added ${e.item} to Cart`;this.notification.createNotification(n)}},incrementItemQuantity(e){const t=this.cart.findIndex(a=>a.item===e.item),r=t!==-1;this.invoiceData.posProfile;const s=this.table.previousOrderdItem.find(a=>a.item_code===e.item);let i=r?this.cart[t].qty+1:1;if(s&&(i-=s.qty),r){e.comment="",this.cart[t].qty++;let a=`${e.item}'s Qty updated to ${e.qty} in Cart`;this.notification.createNotification(a)}else e.comment="",this.cart.push({item:e.item,qty:1})},decrementItemQuantity(e){const t=this.cart.findIndex(n=>n.item===e.item);if(t!==-1){this.cart[t].qty--,this.cart=this.cart.filter(s=>s.qty>0);let n=e.qty>0?`${e.item}'s Qty Reduced from Cart Total Qty=${e.qty}`:`${e.item} has been removed from Cart`;this.notification.createNotification(n)}},removeItemFromCart(e){const t=this.cart[e];t.qty=0,this.cart.splice(e,1)}}}),Yo=Mr("customers",{state:()=>({customer:[],notification:ra(),search:"",alert:Mn(),showCustomers:!1,numberOfPax:"",selectedCustomerName:"",customerFavouriteItems:[],showModalNewCustomer:!1,newCustomerMobileNo:"",newCustomer:"",showCustomersGroup:!1,showCustomersTerritory:!1,showAddNewCustomer:!0,customerTerritoryList:[],customerTerritory:null,customerGroupList:[],customerGroup:null,call:Dt.call(),db:Dt.db()}),getters:{isFlagSet(){return this.customer.length===0}},actions:{pickCustomer(){return _e(this,null,function*(){const e={text:this.search,doctype:"Customer",limit:5};this.call.get("frappe.utils.global_search.search",e).then(t=>{this.customer=t.message}).catch(t=>console.error(t))})},pickCustomerGroup(){this.db.getDocList("Customer Group").then(e=>{this.customerGroupList=e}).catch(e=>console.error(e))},selectCustomerGroup(e){this.customerGroup=e.name,this.showCustomersGroup=!1},pickCustomerTerritory(){this.db.getDocList("Territory").then(e=>{this.customerTerritoryList=e}).catch(e=>console.error(e))},selectCustomerTerritory(e){this.customerTerritory=e.name,this.showCustomersTerritory=!1},newCustomerData(e){this.showModalNewCustomer=!0,!isNaN(parseFloat(e))&&isFinite(e)?this.newCustomerMobileNo=e:typeof e=="string"?this.newCustomer=e:this.alert.createAlert("Message","Invalid Customer","OK")},addNewCustomer:function(){return _e(this,null,function*(){if(!this.newCustomer||!this.newCustomerMobileNo){let e=[];this.newCustomer||e.push("Customer Name"),this.newCustomerMobileNo||e.push("Mobile Number"),this.customerGroup||e.push("Customer Group"),this.customerTerritory||e.push("Territory");const t="Following fields have missing values: "+e.join(", ");this.alert.createAlert("Message",t,"OK")}else this.showAddNewCustomer=!1,Dt.db().createDoc("Customer",{customer_name:this.newCustomer,mobile_number:this.newCustomerMobileNo.toString(),customer_group:this.customerGroup,territory:this.customerTerritory}).then(t=>{this.search=t.name,this.notification.createNotification("New Customer Created"),this.showModalNewCustomer=!1}).catch(t=>{const r=JSON.parse(t._server_messages),s=JSON.parse(r[0]).message;this.alert.createAlert("Message",s,"OK")})})},extractName(e){if(e){const t=e.indexOf("Mobile Number :");if(t!==-1){const r=e.indexOf("|||",t);if(r!==-1)return e.substring(t,r).trim()}}return""},selectCustomer(e){return _e(this,null,function*(){this.search=e.name,this.showCustomers=!1,this.fectchCustomerFavouriteItem()})},fectchCustomerFavouriteItem(){return _e(this,null,function*(){const e=ws();e.previousOrderdCustomer?this.selectedCustomerName=e.previousOrderdCustomer:this.selectedCustomerName=this.search;const t={customer_name:this.selectedCustomerName};this.call.get("ury.ury.doctype.ury_order.ury_order.customer_favourite_item",t).then(r=>{this.customerFavouriteItems=[],r.message.forEach(n=>{this.customerFavouriteItems.push(n)})}).catch(r=>console.error(r))})}}});//! moment.js + `,i.appendChild(a),a.querySelector("button").addEventListener("click",()=>{i.remove(),s.remove(),n(),this.auth.isPosOpen===!1&&this.auth.isPosOpenChecking(),this.okButtonClicked=!0})})}}}),ps=Mr("menu",{state:()=>({items:[],cart:[],searchTerm:"",showAll:!0,showPriority:!1,currentPage:1,perPage:20,comments:"",alert:Mn(),invoiceData:ur(),auth:cr(),notification:ra(),table:ws(),showDialog:!1,showDialogCart:!1,quantity:"",item:[],itemComments:"",call:Dt.call()}),getters:{filteredItems(e){if(typeof e.searchTerm!="string"||e.searchTerm.trim()==="")return e.showAll?e.items:e.items.filter(t=>t.special_dish===1);{const t=e.searchTerm.toLowerCase();return e.items.filter(r=>typeof r.item_name=="string"&&typeof r.item=="string"&&(r.item_name.toLowerCase().includes(t)||r.item.toLowerCase().includes(t)))}},totalPages(){return Math.ceil(this.filteredItems.length/this.perPage)},paginatedItems(){const e=(this.currentPage-1)*this.perPage,t=e+this.perPage;return this.filteredItems.slice(e,t)},pageNumbers(){const e=[];for(let t=1;t<=this.totalPages;t++)e.push(t);return e}},actions:{fetchItems(){const e={pos_profile:this.invoiceData.posProfile};this.call.get("ury.ury_pos.api.getRestaurantMenu",e).then(t=>{!this.auth.cashier&&this.table.tableMenu?this.items=this.table.tableMenu:this.items=t.message,this.items.forEach(r=>{r.special_dish==1&&(this.showPriority=!0)})}).catch(t=>{if(t._server_messages){const r=JSON.parse(t._server_messages),n=JSON.parse(r[0]);this.alert.createAlert("Message",n.message,"OK")}})},updateSearchTerm(){this.currentPage=1},handleSearchInput(e){this.searchTerm=e.target.value,this.updateSearchTerm()},clearSearch(e){e.target.value="",this.searchTerm="",this.showAll=!0},showAllItems(){this.showAll=!0},showSpecialItems(){this.showAll=!1},showModal(e){this.showDialog=!0,this.quantity=e.qty,this.item=e,this.itemComments=e.comment},addToCartAndUpdateQty(){const e=this.item;this.quantity!==null&&this.quantity!==void 0&&this.quantity!==""&&this.quantity!==0&&(e.qty?(e.qty=this.quantity,e.comment=this.itemComments):this.$set(e,"qty",this.quantity)),this.showDialog=!1},getitemQty(e){e.qty=this.cart.qty},addToCart(e){if(!(this.cart.findIndex(n=>n.item===e.item)!==-1)){e.qty=1,e.comment="",this.cart.push(e);let n=`Added ${e.item} to Cart`;this.notification.createNotification(n)}},incrementItemQuantity(e){const t=this.cart.findIndex(a=>a.item===e.item),r=t!==-1;this.invoiceData.posProfile;const s=this.table.previousOrderdItem.find(a=>a.item_code===e.item);let i=r?this.cart[t].qty+1:1;if(s&&(i-=s.qty),r){e.comment="",this.cart[t].qty++;let a=`${e.item}'s Qty updated to ${e.qty} in Cart`;this.notification.createNotification(a)}else e.comment="",this.cart.push({item:e.item,qty:1})},decrementItemQuantity(e){const t=this.cart.findIndex(n=>n.item===e.item);if(t!==-1){this.cart[t].qty--,this.cart=this.cart.filter(s=>s.qty>0);let n=e.qty>0?`${e.item}'s Qty Reduced from Cart Total Qty=${e.qty}`:`${e.item} has been removed from Cart`;this.notification.createNotification(n)}},removeItemFromCart(e){const t=this.cart[e];t.qty=0,this.cart.splice(e,1)}}}),Yo=Mr("customers",{state:()=>({customer:[],notification:ra(),search:"",alert:Mn(),showCustomers:!1,numberOfPax:"",selectedCustomerName:"",customerFavouriteItems:[],showModalNewCustomer:!1,newCustomerMobileNo:"",newCustomer:"",showCustomersGroup:!1,showCustomersTerritory:!1,showAddNewCustomer:!0,customerTerritoryList:[],customerTerritory:null,customerGroupList:[],customerGroup:null,call:Dt.call(),db:Dt.db()}),getters:{isFlagSet(){return this.customer.length===0}},actions:{pickCustomer(){return _e(this,null,function*(){const e={text:this.search,doctype:"Customer",limit:5};this.call.get("frappe.utils.global_search.search",e).then(t=>{this.customer=t.message}).catch(t=>console.error(t))})},pickCustomerGroup(){this.db.getDocList("Customer Group").then(e=>{this.customerGroupList=e}).catch(e=>console.error(e))},selectCustomerGroup(e){this.customerGroup=e.name,this.showCustomersGroup=!1},pickCustomerTerritory(){this.db.getDocList("Territory").then(e=>{this.customerTerritoryList=e}).catch(e=>console.error(e))},selectCustomerTerritory(e){this.customerTerritory=e.name,this.showCustomersTerritory=!1},newCustomerData(e){this.showModalNewCustomer=!0,!isNaN(parseFloat(e))&&isFinite(e)?this.newCustomerMobileNo=e:typeof e=="string"?this.newCustomer=e:this.alert.createAlert("Message","Invalid Customer","OK")},addNewCustomer:function(){return _e(this,null,function*(){if(!this.newCustomer||!this.newCustomerMobileNo){let e=[];this.newCustomer||e.push("Customer Name"),this.newCustomerMobileNo||e.push("Mobile Number"),this.customerGroup||e.push("Customer Group"),this.customerTerritory||e.push("Territory");const t="Following fields have missing values: "+e.join(", ");this.alert.createAlert("Message",t,"OK")}else this.showAddNewCustomer=!1,Dt.db().createDoc("Customer",{customer_name:this.newCustomer,mobile_number:this.newCustomerMobileNo.toString(),customer_group:this.customerGroup,territory:this.customerTerritory}).then(t=>{this.search=t.name,this.notification.createNotification("New Customer Created"),this.showModalNewCustomer=!1}).catch(t=>{const r=JSON.parse(t._server_messages),s=JSON.parse(r[0]).message;this.alert.createAlert("Message",s,"OK")})})},extractName(e){if(e){const t=e.indexOf("Mobile Number :");if(t!==-1){const r=e.indexOf("|||",t);if(r!==-1)return e.substring(t,r).trim()}}return""},selectCustomer(e){return _e(this,null,function*(){this.search=e.name,this.showCustomers=!1,this.fectchCustomerFavouriteItem()})},fectchCustomerFavouriteItem(){return _e(this,null,function*(){const e=ws();e.previousOrderdCustomer?this.selectedCustomerName=e.previousOrderdCustomer:this.selectedCustomerName=this.search;const t={customer_name:this.selectedCustomerName};this.call.get("ury.ury.doctype.ury_order.ury_order.customer_favourite_item",t).then(r=>{this.customerFavouriteItems=[],r.message.forEach(n=>{this.customerFavouriteItems.push(n)})}).catch(r=>console.error(r))})}}});//! moment.js //! version : 2.29.4 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT diff --git a/ury_pos/public/urypos/index.html b/ury_pos/public/urypos/index.html index dac25da..03fd791 100644 --- a/ury_pos/public/urypos/index.html +++ b/ury_pos/public/urypos/index.html @@ -5,7 +5,7 @@ URY POS - + diff --git a/ury_pos/www/urypos.html b/ury_pos/www/urypos.html index dac25da..03fd791 100644 --- a/ury_pos/www/urypos.html +++ b/ury_pos/www/urypos.html @@ -5,7 +5,7 @@ URY POS - + diff --git a/urypos/src/stores/Menu.js b/urypos/src/stores/Menu.js index df9e859..09a0c29 100644 --- a/urypos/src/stores/Menu.js +++ b/urypos/src/stores/Menu.js @@ -123,12 +123,17 @@ export const useMenuStore = defineStore("menu", { addToCartAndUpdateQty() { const item = this.item; - if (!item.qty) { - this.$set(item, "qty", this.quantity); - } else { - item.qty = this.quantity; - item.comment = this.itemComments; + + // Check if 'qty' is a valid and non-empty value + if (this.quantity !== null && this.quantity !== undefined && this.quantity !== '' && this.quantity !== 0) { + if (!item.qty) { + this.$set(item, "qty", this.quantity); + } else { + item.qty = this.quantity; + item.comment = this.itemComments; + } } + this.showDialog = false; }, getitemQty(item) {